Isle
|
Notification parameter class for LEGO event notifications such as mouse events and modifier keys. More...
#include <legoeventnotificationparam.h>
Public Types | |
enum | { c_lButtonState = 1 , c_rButtonState = 2 , c_modKey1 = 4 , c_modKey2 = 8 } |
Modifier and mouse button state bit-flag values for user input. More... | |
Public Member Functions | |
MxNotificationParam * | Clone () const override |
Creates a deep copy of this notification parameter object. More... | |
LegoEventNotificationParam () | |
Default constructor. More... | |
LegoEventNotificationParam (NotificationId p_type, MxCore *p_sender, MxU8 p_modifier, MxS32 p_x, MxS32 p_y, MxU8 p_key) | |
Constructor with all parameter fields for event reporting. More... | |
LegoROI * | GetROI () |
Returns the ROI (3D Object) associated with this event, if any. More... | |
MxU8 | GetModifier () |
Returns modifier bitmask for this event (mouse/keyboard state). More... | |
MxU8 | GetKey () const |
Returns the keycode for this event, or 0 if not used. More... | |
MxS32 | GetX () const |
Returns X (horizontal) coordinate for the event, usually screen-relative in pixels. More... | |
MxS32 | GetY () const |
Returns Y (vertical) coordinate for the event, usually screen-relative in pixels. More... | |
void | SetROI (LegoROI *p_roi) |
Sets the ROI reference (object involved in the event). More... | |
void | SetModifier (MxU8 p_modifier) |
Sets the modifier state bitmask for the event. More... | |
void | SetKey (MxU8 p_key) |
Sets the keycode for the event. More... | |
void | SetX (MxS32 p_x) |
Sets the X (horizontal) coordinate for the event. More... | |
void | SetY (MxS32 p_y) |
Sets the Y (vertical) coordinate for the event. More... | |
![]() | |
MxNotificationParam () | |
[AI] Constructs a default notification parameter with type c_notificationType0 and no sender. More... | |
MxNotificationParam (NotificationId p_type, MxCore *p_sender) | |
[AI] Constructs a notification parameter with a specific type and sender. More... | |
virtual MxNotificationParam * | Clone () const |
[AI] Creates a copy of this notification parameter object on the heap. More... | |
NotificationId | GetNotification () const |
[AI] Retrieves the current notification type of this parameter. More... | |
MxCore * | GetSender () const |
[AI] Retrieves the sender pointer associated with this notification. More... | |
void | SetNotification (NotificationId p_type) |
[AI] Sets the notification type for this parameter object. More... | |
void | SetSender (MxCore *p_sender) |
[AI] Sets the sender pointer for this notification parameter. More... | |
![]() | |
virtual | ~MxParam () |
[AI] Virtual destructor for safe polymorphic deletion of derived parameter objects. More... | |
Protected Attributes | |
MxU8 | m_modifier |
Bitmask of button/modifier state at the time of the event. More... | |
MxS32 | m_x |
X position (horizontal pixel coordinate) for event, typically relative to window/screen. More... | |
MxS32 | m_y |
Y position (vertical pixel coordinate) for event, typically relative to window/screen. More... | |
MxU8 | m_key |
Key code of event, if any (else 0). More... | |
LegoROI * | m_roi |
Reference to involved world object (ROI), if any (else NULL). More... | |
![]() | |
NotificationId | m_type |
[AI] Type of notification/event carried by this object (see NotificationId). More... | |
MxCore * | m_sender |
[AI] Pointer to the MxCore instance that sent or originated this notification. More... | |
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
[AI]
[AI] Handles mouse position, button/modifier state, key events, and optionally associates with a LegoROI for the event. Used to pass user input details through the event/notification systems of the LEGO Island engine.
Definition at line 18 of file legoeventnotificationparam.h.
anonymous enum |
Modifier and mouse button state bit-flag values for user input.
[AI]
[AI] Used in m_modifier: left/right mouse buttons and up to two modifier keys can be represented. c_lButtonState: Indicates (bit 0) left mouse button is pressed. c_rButtonState: Indicates (bit 1) right mouse button is pressed. c_modKey1: Indicates (bit 2) a modifier key (e.g., Shift) is pressed. c_modKey2: Indicates (bit 3) another modifier key (e.g., Ctrl) is pressed.
Enumerator | |
---|---|
c_lButtonState | |
c_rButtonState | |
c_modKey1 | |
c_modKey2 |
Definition at line 29 of file legoeventnotificationparam.h.
|
inline |
Default constructor.
Sets type to c_notificationType0 and sender to NULL; all data to default/zero. [AI]
Definition at line 53 of file legoeventnotificationparam.h.
|
inline |
Constructor with all parameter fields for event reporting.
[AI]
p_type | Notification type (event type enum, e.g. mouse, key event) [AI] |
p_sender | Pointer to the sender object (usually the input handler or direct control object) [AI] |
p_modifier | Modifier bitmask (from enum, combines l/r mouse and modifiers) [AI] |
p_x | Mouse X coordinate [AI] |
p_y | Mouse Y coordinate [AI] |
p_key | Keycode for the key event; 0 if unused [AI] |
Definition at line 64 of file legoeventnotificationparam.h.
|
inlineoverridevirtual |
Creates a deep copy of this notification parameter object.
[AI]
[AI] Returns a new LegoEventNotificationParam with identical members, including the associated ROI pointer. Used for forwarding or queuing input events. [AI]
Reimplemented from MxNotificationParam.
Definition at line 42 of file legoeventnotificationparam.h.
|
inline |
Returns the keycode for this event, or 0 if not used.
[AI]
[AI] Represents keyboard input; if not a key event, will be 0. [AI]
Definition at line 90 of file legoeventnotificationparam.h.
|
inline |
Returns modifier bitmask for this event (mouse/keyboard state).
[AI]
[AI] Bitmask with possible bit flags from enum {c_lButtonState, ...}. [AI]
Definition at line 85 of file legoeventnotificationparam.h.
|
inline |
Returns the ROI (3D Object) associated with this event, if any.
[AI]
[AI] May be null. Used if the event occurred on a specific world object. [AI]
Definition at line 80 of file legoeventnotificationparam.h.
|
inline |
Returns X (horizontal) coordinate for the event, usually screen-relative in pixels.
[AI]
Definition at line 95 of file legoeventnotificationparam.h.
|
inline |
Returns Y (vertical) coordinate for the event, usually screen-relative in pixels.
[AI]
Definition at line 100 of file legoeventnotificationparam.h.
|
inline |
Sets the keycode for the event.
[AI]
p_key | Keycode to assign. [AI] |
Definition at line 118 of file legoeventnotificationparam.h.
|
inline |
Sets the modifier state bitmask for the event.
[AI]
p_modifier | Modifier mask (from enum) to set. [AI] |
Definition at line 112 of file legoeventnotificationparam.h.
|
inline |
Sets the ROI reference (object involved in the event).
[AI]
p_roi | Pointer to a LegoROI to associate; can be NULL. [AI] |
Definition at line 106 of file legoeventnotificationparam.h.
|
inline |
Sets the X (horizontal) coordinate for the event.
[AI]
p_x | New X coordinate. [AI] |
Definition at line 124 of file legoeventnotificationparam.h.
|
inline |
Sets the Y (vertical) coordinate for the event.
[AI]
p_y | New Y coordinate. [AI] |
Definition at line 130 of file legoeventnotificationparam.h.
|
protected |
Key code of event, if any (else 0).
[AI]
Definition at line 152 of file legoeventnotificationparam.h.
|
protected |
Bitmask of button/modifier state at the time of the event.
[AI]
[AI] See enum above for interpretation: lButton, rButton, modKey1, modKey2. [AI]
Definition at line 137 of file legoeventnotificationparam.h.
|
protected |
Reference to involved world object (ROI), if any (else NULL).
[AI]
Definition at line 157 of file legoeventnotificationparam.h.
|
protected |
X position (horizontal pixel coordinate) for event, typically relative to window/screen.
[AI]
Definition at line 142 of file legoeventnotificationparam.h.
|
protected |
Y position (vertical pixel coordinate) for event, typically relative to window/screen.
[AI]
Definition at line 147 of file legoeventnotificationparam.h.