UTFWin::Message class

Contents

Public functions

auto IsType(int type) const -> bool
Tells whether the message is of the given type, in the enum MessageType.
auto IsSource(const IWindow* pWindow) const -> bool
Tells whether this window is the source window that generated the message.
auto IsSource(uint32_t controlID) const -> bool
Tells whether this control ID is the one used by the source window that generated the message.

Public variables

IWindow* source
int field_04
int eventType
int field_0C
int vkey
The virtual key that was pressed/released. Example usage: vkey == VK_A (means the user pressed/released A).
int modifiers
The modifiers that were applying in the key event, from the KeyModifiers enum.
struct UTFWin::Message::@74::@76 Key
The event arguments for the message types: UTFWin::kMsgKeyDown | UTFWin::kMsgKeyUp | UTFWin::kMsgKeyDown2 | UTFWin::kMsgKeyUp2.
int16_t vkey
The virtual key that was pressed/released. Example usage: vkey == VK_A (means the user pressed/released A).
struct UTFWin::Message::@74::@77 KeyPress
The event arguments for the message type: UTFWin::kMsgKeyPress.
float mouseX
The X coordinate of the mouse, relative to the window that raised the event.
float mouseY
The Y coordinate of the mouse, relative to the window that raised the event.
int mouseState
A combination of values from the MouseStateFlags enum.
int wheelDelta
How much the mouse wheel changed, it is usually a multiple of 120.
struct UTFWin::Message::@74::@78 Mouse
The event arguments for the message types: UTFWin::kMsgMouseDown | UTFWin::kMsgMouseUp | UTFWin::kMsgMouseMove | UTFWin::kMsgMouseWheel.
int field_10
int field_14
IWindow* window
For kMsgMouseLeave, the windows that lost focus; for kMsgMouseEnter, the window that gained focus.
struct UTFWin::Message::@74::@79 MouseEnter
The event arguments for the message types: UTFWin::kMsgMouseLeave | UTFWin::kMsgMouseEnter The 'window' member is the window that lost focus for UTFWin::kMsgMouseLeave, and the window that is getting focus for UTFWin::kMsgMouseEnter.
struct UTFWin::Message::@74::@79 MouseLeave
UIRenderer* renderer
The object that can be used to paint to the UI.
struct UTFWin::Message::@74::@80 Paint
The event arguments for the message type: UTFWin::kMsgPaint.
RefreshType refreshType
struct UTFWin::Message::@74::@81 Refresh
The event arguments for the message type: UTFWin::kMsgRefresh.
Math::Rectangle* area
Pointer to the new layout area.
struct UTFWin::Message::@74::@82 Layout
The event arguments for the message type: UTFWin::kMsgLayout.
int oldState
The previous state flags of the window.
int newState
The new state flags of the window.
struct UTFWin::Message::@74::@83 StateChanged
The event arguments for the message type: UTFWin::kMsgStateChanged.
float x
The X coordinate where the collision check must be done.
float y
The Y coordinate where the collision check must be done.
bool* isColliding
This bool* holds the result, whether a collision was detected or not.
struct UTFWin::Message::@74::@84 CollisionDetect
The event arguments for the message type: UTFWin::kMsgCollisionDetect This message has a member called mpbIsColliding, which is a pointer to the result.
Math::Matrix4* transformation
The transformation matrix applied.
struct UTFWin::Message::@74::@85 Transformed
The event arguments for the message type: UTFWin::kMsgTransformed.
uint32_t commandID
The command ID of the clicked button.
struct UTFWin::Message::@74::@86 ButtonClick
The event arguments for the message type: UTFWin::kMsgButtonClick.
bool isSelected
Whether the button is now selected.
struct UTFWin::Message::@74::@87 ButtonSelect
The event arguments for the message type: UTFWin::kMsgButtonSelect.
TextChange* change
The change of the text.
struct UTFWin::Message::@74::@88 TextChanged
The event arguments for the message type: UTFWin::kMsgTextChanged.
union UTFWin::Message::@74 @75

Function documentation

bool UTFWin::Message::IsType(int type) const

Tells whether the message is of the given type, in the enum MessageType.

Parameters
type The expected message type.

bool UTFWin::Message::IsSource(const IWindow* pWindow) const

Tells whether this window is the source window that generated the message.

Parameters
pWindow The expected source window.

bool UTFWin::Message::IsSource(uint32_t controlID) const

Tells whether this control ID is the one used by the source window that generated the message.

Parameters
controlID The expected control ID of the source.

Variable documentation

int UTFWin::Message::mouseState

A combination of values from the MouseStateFlags enum.

A combination of values from the UTFWin::MouseState enum.

struct UTFWin::Message::@74::@78 UTFWin::Message::Mouse

The event arguments for the message types: UTFWin::kMsgMouseDown | UTFWin::kMsgMouseUp | UTFWin::kMsgMouseMove | UTFWin::kMsgMouseWheel.

Note that the mnWheelDelta member should only be considered on UTFWin::kMsgMouseWheel messages.

struct UTFWin::Message::@74::@84 UTFWin::Message::CollisionDetect

The event arguments for the message type: UTFWin::kMsgCollisionDetect This message has a member called mpbIsColliding, which is a pointer to the result.

For example, if you decide that the mouse position is colliding the window, use *mpbIsColliding = true;