![]() |
NDEVR
API Documentation
|
Describes a mouse or touch input event with position, button, and modifier information. More...
Public Types | |
| enum | MouseClickType { e_right_button , e_center_button , e_left_button , none } |
| Identifies which mouse button was involved in the event. More... | |
| enum | MouseEventType { e_mouse_clicked , e_mouse_dragged , e_mouse_entered , e_mouse_exited , e_mouse_moved , e_mouse_pressed , e_mouse_released , e_mouse_scrolled , e_touch_zoomed } |
| The type of mouse or touch action that occurred. More... | |
Public Member Functions | |
| MouseEvent () | |
| Constructs a default MouseEvent with no associated window instance. | |
| MouseEvent (WindowInstance *instance) | |
| Constructs a MouseEvent associated with the given window instance. | |
| bool | hasModifier (KeyEvent::KeyModifier modifier) const |
| Checks whether a specific key modifier was active during this mouse event. | |
| bool | operator== (const MouseEvent &other) const |
| Checks equality between two MouseEvent objects. | |
Public Attributes | |
| MouseClickType | click_type = MouseClickType::none |
| Which mouse button was involved. | |
| Vector< 2, fltp04 > | distance_scrolled = Constant<Vector<2, fltp04>>::Invalid |
| The scroll distance in X and Y directions. | |
| Vector< 2, fltp04 > | event_location = Constant<Vector<2, fltp04>>::Invalid |
| The current mouse position in window coordinates. | |
| MouseEventType | event_type = MouseEventType::e_mouse_exited |
| The type of mouse action that occurred. | |
| uint01 | key_modifier = 0 |
| Bitmask of active KeyModifier flags during this event. | |
| uint01 | number_of_clicks = 0 |
| The number of consecutive clicks (e.g., 2 for double-click). | |
| Vector< 2, fltp04 > | prev_location = Constant<Vector<2, fltp04>>::Invalid |
| The previous mouse position in window coordinates. | |
| WindowInstance * | window_instance |
| The window instance where this event originated. | |
Describes a mouse or touch input event with position, button, and modifier information.
The type of mouse or touch action that occurred.
|
inline |
Constructs a MouseEvent associated with the given window instance.
| [in] | instance | The window instance where the mouse event originated. |
Definition at line 355 of file Event.h.
References window_instance.
|
inline |
Checks whether a specific key modifier was active during this mouse event.
| [in] | modifier | The KeyModifier flag to test for. |
Definition at line 363 of file Event.h.
References cast(), and key_modifier.
|
inline |
Checks equality between two MouseEvent objects.
| [in] | other | The MouseEvent to compare against. |
Definition at line 381 of file Event.h.
References MouseEvent(), click_type, distance_scrolled, event_location, event_type, key_modifier, number_of_clicks, prev_location, and window_instance.