Function native_windows_gui::bind_event_handler
source · [−]pub fn bind_event_handler<F>(
handle: &ControlHandle,
parent_handle: &ControlHandle,
f: F
) -> EventHandlerwhere
F: Fn(Event, EventData, ControlHandle) + 'static,
Expand description
Hook the window subclass with the default event dispatcher. The hook is applied to the control and its parent. All common controls send their events to their parent.
Arguments: - handle: Handle to the main control to hook - parent_handle: Parent to the main control. - f: User event callback
Returns a EventHandler
that can be passed to unbind_event_handler
to remove the callbacks.