All events
Events spoiler
Triggered when a user release a mouse button
Event::MouseUp
EventCallback::MouseUp(Box<
Fn(&mut ui, caller, x:i32, y:i32, btn:u32, modifiers: u32)
>)
Params
- x: X coordinate of the mouse
- y: Y coordinate of the mouse
- btn: Bitwise combinations of
BTN_MOUSE_MIDDLE
, BTN_MOUSE_RIGHT
, BTN_MOUSE_LEFT
- modifiers: Bitwise combinations of
MOD_MOUSE_CTRL
, MOD_MOUSE_SHIFT
Triggered when a user press a mouse button
Event::MouseDown
EventCallback::MouseDown(Box<
Fn(&mut ui, caller, x:i32, y:i32, btn:u32, modifiers: u32)
>)
Params
- x: X coordinate of the mouse
- y: Y coordinate of the mouse
- btn: Bitwise combinations of
BTN_MOUSE_MIDDLE
, BTN_MOUSE_RIGHT
, BTN_MOUSE_LEFT
- modifiers: Bitwise combinations of
MOD_MOUSE_CTRL
, MOD_MOUSE_SHIFT
Triggered when a user press a keyboard button. The currently focused control receive the event.
Event::KeyDown
EventCallback::KeyDown(Box<Fn(&mut ui, caller, keycode:u32)>)
Params
- keycode: The virtual code of the key that was pressed. See:
native_windows_gui::constants::keys
Triggered when a user release a keyboard button. The currently focused control receive the event.
Event::KeyUp
EventCallback::KeyUp(Box<Fn(&mut ui, caller, keycode:u32)>)
Params
- keycode: The virtual code of the key that was pressed. See:
native_windows_gui::constants::keys
Triggered when a control is resized by the user or programmatically.
Event::Resize
EventCallback::Resize(Box<
Fn(&mut ui, caller, x:i32, y:i32, width:u32, height: u32)
>)
Params
- x: X coordinate of the window
- y: Y coordinate of the window
- width: Width of the window
- height: Height of the window
Triggered when a control is moved by the user or programmatically.
Event::Move
EventCallback::Move(Box<Fn(&mut ui, caller, x:i32, y:i32)>)
Params
- x: X coordinate of the window
- y: Y coordinate of the window
Triggered when the user execute a mouse click. Similar to MouseUp
Event::Click
EventCallback::Click(Box<Fn(&mut ui, caller)>)
Triggered when a control receive or loose user focus
Event::Focus
EventCallback::Focus(Box<Fn(&mut ui, caller, focused: bool)>)
Params
- focused:
true
if the control received the focus or false
otherwise.
Triggered just before the control destruction
Removed::Click
EventCallback::Removed(Box<Fn(&mut ui, caller)>)
Triggered when the value of the control change
Event::ValueChanged
EventCallback::ValueChanged(Box<Fn(&mut ui, caller)>)
Triggered when the menu of a control is opened
Event::MenuOpen
EventCallback::MenuOpen(Box<Fn(&mut ui, caller)>)
Triggered when the menu of a control is closed
Event::MenuClose
EventCallback::MenuClose(Box<Fn(&mut ui, caller)>)
Triggered when the value of the control exeed a limit previously set. (Will probably be renamed to something like
LimitedReached
)
Event::MaxValue
EventCallback::MaxValue(Box<Fn(&mut ui, caller)>)
Triggered when the selected item of a control is changed
Event::SelectionChanged
EventCallback::SelectionChanged(Box<
Fn(&mut ui, caller, new_index: u32, new_text: String)
>)
Params
- new_index: New choosen item index in the control collection
- new_text: New choosen item value represented as a string