Spore ModAPI  2.4.0
API for creating C++ mods for Spore
Public Member Functions | Public Attributes | List of all members
UTFWin::Message Class Reference

#include <Message.h>

Public Member Functions

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

Public Attributes

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

Member Function Documentation

◆ IsSource() [1/2]

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

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

Parameters
pWindowThe expected source window.

◆ IsSource() [2/2]

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

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

Parameters
controlIDThe expected control ID of the source.

◆ IsType()

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

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

Parameters
typeThe expected message type.

Member Data Documentation

◆ @77

union { ... }

◆ area

Math::Rectangle* UTFWin::Message::area

Pointer to the new layout area.

◆ ButtonClick

struct { ... } UTFWin::Message::ButtonClick

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

◆ ButtonSelect

struct { ... } UTFWin::Message::ButtonSelect

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

◆ change

TextChange* UTFWin::Message::change

The change of the text.

◆ CollisionDetect

struct { ... } 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;

◆ commandID

uint32_t UTFWin::Message::commandID

The command ID of the clicked button.

◆ eventType

int UTFWin::Message::eventType

◆ field_04

int UTFWin::Message::field_04

◆ field_0C

int UTFWin::Message::field_0C

◆ field_10

int UTFWin::Message::field_10

◆ field_14

int UTFWin::Message::field_14

◆ isColliding

bool* UTFWin::Message::isColliding

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

◆ isSelected

bool UTFWin::Message::isSelected

Whether the button is now selected.

◆ Key

struct { ... } UTFWin::Message::Key

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

◆ KeyPress

struct { ... } UTFWin::Message::KeyPress

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

◆ Layout

struct { ... } UTFWin::Message::Layout

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

◆ modifiers

int UTFWin::Message::modifiers

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

◆ Mouse

struct { ... } 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.

◆ MouseEnter

struct { ... } UTFWin::Message::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.

◆ MouseLeave

struct { ... } UTFWin::Message::MouseLeave

◆ mouseState

int UTFWin::Message::mouseState

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

◆ mouseX

float UTFWin::Message::mouseX

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

◆ mouseY

float UTFWin::Message::mouseY

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

◆ newState

int UTFWin::Message::newState

The new state flags of the window.

◆ oldState

int UTFWin::Message::oldState

The previous state flags of the window.

◆ Paint

struct { ... } UTFWin::Message::Paint

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

◆ Refresh

struct { ... } UTFWin::Message::Refresh

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

◆ refreshType

RefreshType UTFWin::Message::refreshType

◆ renderer

UIRenderer* UTFWin::Message::renderer

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

◆ source

IWindow* UTFWin::Message::source

◆ StateChanged

struct { ... } UTFWin::Message::StateChanged

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

◆ TextChanged

struct { ... } UTFWin::Message::TextChanged

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

◆ transformation

Math::Matrix4* UTFWin::Message::transformation

The transformation matrix applied.

◆ Transformed

struct { ... } UTFWin::Message::Transformed

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

◆ vkey [1/2]

int UTFWin::Message::vkey

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

◆ vkey [2/2]

int16_t UTFWin::Message::vkey

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

◆ wheelDelta

int UTFWin::Message::wheelDelta

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

◆ window

IWindow* UTFWin::Message::window

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

◆ x

float UTFWin::Message::x

The X coordinate where the collision check must be done.

◆ y

float UTFWin::Message::y

The Y coordinate where the collision check must be done.


The documentation for this class was generated from the following file: