Event types
Overview
Here is a list of all events in the Widget Library together with the passed arguments - i.e. the arguments the subscribing agent needs - and when the events are triggered.
Mouse events
-
mouse_button_down_event
Argument: EM_MOUSEBUTTON_EVENT
Triggered: When any mouse button is pressed on a component. -
mouse_button_up_event
Argument: EM_MOUSEBUTTON_EVENT
Triggered: When a pressed button is released. -
mouse_button_clicked_event
Argument: EM_MOUSEBUTTON_EVENT
Triggered: When the mouse is pressed and released and not moved in between. -
mouse_moved_event
Argument: EM_MOUSEMOTION_EVENT
Triggered: When the mouse is moved and no button is currently pressed. -
mouse_dragged_event
Argument: EM_MOUSEMOTION_EVENT
Triggered: When the mouse is moved and a button is currently pressed. -
mouse_drag_start_event
Argument: EM_MOUSE_EVENT
Triggered: Before the first mouse_dragged_event is fired. -
mouse_drag_stop_event
Argument: EM_MOUSE_EVENT
Triggered: When the mouse button is released after dragging. -
mouse_wheel_up_event
Argument: None
Triggered: When the mouse wheel is rotated up. -
mouse_wheel_down_event
Argument: None
Triggered: When the mouse wheel is rotated down. -
mouse_entered_event
Argument: None
Triggered: When the mouse pointer entered the component. -
mouse_exited_event
Argument: None
Triggered: When the mouse pointer exited the component.
See also the description of class EM_MOUSE_SENSITIVE
Keyboard events
-
key_down_event
Argument: EM_KEYBOARD_EVENT
Triggered: When a key is pressed. -
key_up_event
Argument: EM_KEYBOARD_EVENT
Triggered: When a key is released. -
focus_received_event
Argument: None
Triggered: When either the mouse is clicked on a component, or the object is the default keyboard focus and the mouse is clicked on a component which doesn't want the focus. -
focus_lost_event
Argument: None
Triggered: When another object received keyboard focus.
See also the options section.
Joystick events
-
joystick_button_down_event
Argument: EM_JOYSTICK_BUTTON_EVENT
Triggered: When a button is pressed. -
joystick_button_up_event
Argument: EM_JOYSTICK_BUTTON_EVENT
Triggered: When a button is released. -
joystick_hat_event
Argument: EM_JOYSTICK_HAT_EVENT
Triggered: When the hat moved. -
joystick_ball_event
Argument: EM_JOYSTICK_BALL_EVENT
Triggered: When a ball is moved. -
joystick_axis_event
Argument: EM_JOYSTICK_AXIS_EVENT
Triggered: When an axis is moved.
Although any component can trigger joystick events, the focus has to be set manually. So remember to add components to the joystick focus list when you want to receive events from a component.
Component events
If properties of a component change it will notify all registered agents. Available events are:
-
show_event
Argument: None
Triggered: When show is called. -
hide_event
Argument: None
Triggered: When hide is called. -
move_event
Argument: None
Triggered: When the component's position changes. Thus one of set_position, set_x or set_y is called. -
resize_event
Argument: None
Triggered: When the component's dimension changes. Thus one of set_dimension, set_width or set_height is called.
Other events
Some widgets provide custom events like button clicks or list selection. These are:
-
EM_BUTTON.clicked_event
Argument: None
Triggered: When the button is clicked. -
EM_CHECKBOX.checked_event
Argument: None
Triggered: When the checkbox is checked. -
EM_CHECKBOX.unchecked_event
Argument: None
Triggered: When the checkbox is unchecked. -
EM_LIST.selection_changed_event
Argument: Selected element (can be Void)
Triggered: When the selected element changes. -
EM_SLIDER.position_changed_event
Argument: INTEGER - New slider value
Triggered: When the slider value changes. -
EM_TEXTBOX.text_changed_event
Argument: None
Triggered: When the text of the textbox changes -
EM_TEXTAREA.text_changed_event
Argument: None
Triggered: When the text of the textbox changes -
EM_MESSAGE_DIALOG.button_clicked_event
Argument: None
Triggered: When any button on the message dialog is clicked. -
EM_FILE_DIALOG.button_clicked_event
Argument: None
Triggered: When any button on the message dialog is clicked.