UTFWin::Message class

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.
auto UNNAMED(MessageUnion) -> union

Public variables

IWindow* source
int field_04
int eventType

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.

union UTFWin::Message::UNNAMED(MessageUnion)

The event arguments for the message types: UTFWin::kMsgKeyDown | UTFWin::kMsgKeyUp | UTFWin::kMsgKeyDown2 | UTFWin::kMsgKeyUp2.

The virtual key that was pressed/released. Example usage: vkey == VK_A (means the user pressed/released A).

The modifiers that were applying in the key event, from the KeyModifiers enum.

The event arguments for the message type: UTFWin::kMsgKeyPress

The virtual key that was pressed/released. Example usage: vkey == VK_A (means the user pressed/released A).

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

The X coordinate of the mouse, relative to the window that raised the event.

The Y coordinate of the mouse, relative to the window that raised the event.

A combination of values from the MouseStateFlags enum.

Which mouse button was pressed/released. Not always available??

The event arguments for the message type: UTFWin::kMsgMouseWheel

The X coordinate of the mouse, relative to the window that raised the event.

The Y coordinate of the mouse, relative to the window that raised the event.

A combination of values from the MouseStateFlags enum.

How much the mouse wheel changed, it is usually a multiple of 120.

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.

For kMsgMouseLeave, the windows that lost focus; for kMsgMouseEnter, the window that gained focus.

The event arguments for the message type: UTFWin::kMsgPaint

The object that can be used to paint to the UI.

The event arguments for the message type: UTFWin::kMsgRefresh

The event arguments for the message type: UTFWin::kMsgLayout

Pointer to the new layout area.

The event arguments for the message type: UTFWin::kMsgStateChanged

The previous state flags of the window.

The new state flags of the window.

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;

The X coordinate where the collision check must be done.

The Y coordinate where the collision check must be done.

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

This bool* holds the result, whether a collision was detected or not.

The event arguments for the message type: UTFWin::kMsgTransformed

The transformation matrix applied.

The event arguments for the message type: UTFWin::kMsgButtonClick

The command ID of the clicked button.

The event arguments for the message type: UTFWin::kMsgButtonSelect

The command ID of the clicked button.

Whether the button is now selected.

The event arguments for the message type: UTFWin::kMsgTextChanged

The change of the text.

The event arguments for the message type: UTFWin::kMsgComponentActivated

The control ID of the activated button.