Isle
Loading...
Searching...
No Matches
legoeventnotificationparam.h
Go to the documentation of this file.
1#ifndef LEGOEVENTNOTIFICATIONPARAM_H
2#define LEGOEVENTNOTIFICATIONPARAM_H
3
5#include "mxtypes.h"
6
7#include <stdlib.h>
8
9class LegoROI;
10
11// VTABLE: LEGO1 0x100d6aa0
12// SIZE 0x20
19public:
20
29 enum {
34 };
35
42 MxNotificationParam* Clone() const override
43 {
46 clone->m_roi = m_roi;
47 return clone;
48 } // vtable+0x04
49
54
65 NotificationId p_type,
66 MxCore* p_sender,
67 MxU8 p_modifier,
68 MxS32 p_x,
69 MxS32 p_y,
70 MxU8 p_key
71 )
72 : MxNotificationParam(p_type, p_sender), m_modifier(p_modifier), m_x(p_x), m_y(p_y), m_key(p_key), m_roi(NULL)
73 {
74 }
75
80 LegoROI* GetROI() { return m_roi; }
90 MxU8 GetKey() const { return m_key; }
91
95 MxS32 GetX() const { return m_x; }
96
100 MxS32 GetY() const { return m_y; }
101
106 void SetROI(LegoROI* p_roi) { m_roi = p_roi; }
107
112 void SetModifier(MxU8 p_modifier) { m_modifier = p_modifier; }
113
118 void SetKey(MxU8 p_key) { m_key = p_key; }
119
124 void SetX(MxS32 p_x) { m_x = p_x; }
125
130 void SetY(MxS32 p_y) { m_y = p_y; }
131
132protected:
138
142 MxS32 m_x; // 0x10
143
147 MxS32 m_y; // 0x14
148
152 MxU8 m_key; // 0x18
153
157 LegoROI* m_roi; // 0x1c
158};
159
160// SYNTHETIC: LEGO1 0x10028770
161// LegoEventNotificationParam::`scalar deleting destructor'
162
163// SYNTHETIC: LEGO1 0x100287e0
164// LegoEventNotificationParam::~LegoEventNotificationParam
165
166#endif // LEGOEVENTNOTIFICATIONPARAM_H
Notification parameter class for LEGO event notifications such as mouse events and modifier keys.
MxS32 GetY() const
Returns Y (vertical) coordinate for the event, usually screen-relative in pixels.
MxS32 m_x
X position (horizontal pixel coordinate) for event, typically relative to window/screen.
void SetX(MxS32 p_x)
Sets the X (horizontal) coordinate for the event.
MxU8 GetModifier()
Returns modifier bitmask for this event (mouse/keyboard state).
LegoROI * GetROI()
Returns the ROI (3D Object) associated with this event, if any.
void SetKey(MxU8 p_key)
Sets the keycode for the event.
MxU8 m_modifier
Bitmask of button/modifier state at the time of the event.
void SetY(MxS32 p_y)
Sets the Y (vertical) coordinate for the event.
MxS32 m_y
Y position (vertical pixel coordinate) for event, typically relative to window/screen.
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.
MxU8 GetKey() const
Returns the keycode for this event, or 0 if not used.
MxU8 m_key
Key code of event, if any (else 0).
MxS32 GetX() const
Returns X (horizontal) coordinate for the event, usually screen-relative in pixels.
LegoROI * m_roi
Reference to involved world object (ROI), if any (else NULL).
void SetModifier(MxU8 p_modifier)
Sets the modifier state bitmask for the event.
void SetROI(LegoROI *p_roi)
Sets the ROI reference (object involved in the event).
MxNotificationParam * Clone() const override
Creates a deep copy of this notification parameter object.
LegoEventNotificationParam()
Default constructor.
[AI] Represents a Real-time Object Instance enriched with LEGO-specific functionality.
Definition: legoroi.h:43
[AI] Base virtual class for all Mindscape engine (Mx) objects.
Definition: mxcore.h:15
[AI] Parameter object representing a single notification or event, carrying an identifier and sender ...
MxCore * m_sender
[AI] Pointer to the MxCore instance that sent or originated this notification.
NotificationId m_type
[AI] Type of notification/event carried by this object (see NotificationId).
#define NULL
[AI] Null pointer value (C/C++ semantics).
Definition: legotypes.h:26
NotificationId
Several of those should be defined in LegoOmni.
@ c_notificationType0
[AI] Undefined/Generic notification type [AI]
unsigned char MxU8
[AI]
Definition: mxtypes.h:8
signed int MxS32
[AI]
Definition: mxtypes.h:38