class
InteractiveWinProc
Base classes
- class IWinProc
- This class is a window procedure, also known as an event/message listener.
- class ILayoutElement
- This class represents an element that is part of a user interfaces.
Derived classes
- class Effect
- class ProportionalLayout
- class SimpleLayout
- class SporeTooltipWinProc
Constructors, destructors, conversion operators
Public functions
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t typeID) const -> void* override - auto SetSerializer(Serializer& dst) -> void override
-
auto GetProxyID() const -> uint32_
t override - Returns the ID that identifies this type of element in a SPUI file.
- auto HandleUIMessage(IWindow* pWindow, const Message& message) -> bool override
- Method called every time a message is received on a window that has this IWinProc added.
- auto OnKeyDown2(IWindow* pWindow, int, int virtualKey, int modifiers) -> bool virtual
- An event listener called every time a key is pressed on a window this procedure is listening.
- auto OnKeyUp2(IWindow* pWindow, int, int virtualKey, int modifiers) -> bool virtual
- An event listener called every time a key is released on a window this procedure is listening.
- auto OnKeyDown(IWindow* pWindow, int, int virtualKey, int modifiers) -> bool virtual
- An event listener called every time a key is pressed on a window this procedure is listening.
- auto OnKeyUp(IWindow* pWindow, int, int virtualKey, int modifiers) -> bool virtual
- An event listener called every time a key is released on a window this procedure is listening.
-
auto OnKeyPress(IWindow* pWindow,
int,
int16_
t virtualKey) -> bool virtual - An event listener called every time a character, space or backspace key is released on a window this procedure is listening.
- auto OnMouseDown(IWindow* pWindow, float fMouseX, float fMouseY, int, int state) -> bool virtual
- An event listener called every time a mouse key is pressed on a window this procedure is listening.
- auto OnMouseUp(IWindow* pWindow, float fMouseX, float fMouseY, int, int state) -> bool virtual
- An event listener called every time a mouse key is released on a window this procedure is listening.
- auto OnMouseMove(IWindow* pWindow, float fMouseX, float fMouseY, int state) -> bool virtual
- An event listener called every time the mouse is moved within a window this procedure is listening.
- auto OnMouseWheel(IWindow* pWindow, float fMouseX, float fMouseY, int state, int nWheelDelta) -> bool virtual
- An event listener called every time the mouse wheel is moved within a window this procedure is listening.
- auto OnRefresh(IWindow* pWindow, RefreshType type, IWindow*) -> bool virtual
- An event listener called every time the mouse pointer enters or leaves a window this procedure is listening, or the keyboard focus is gained or lost.
- auto func44h(IWindow* pWindow, int arg_4, int arg_8) -> bool virtual
- auto OnUpdate(IWindow* pWindow) -> bool virtual
- An event listener called every game loop if the window this procedure is listening is registered to receive update events.
- auto OnCollisionDetect(IWindow* pWindow, float fMouseX, float fMouseY, bool* pbResult) -> bool virtual
- An event listener called to check if the window contains the mouse pointer.
- auto OnElementAdd(IWindow* pWindow) -> bool virtual
- An event listener called every time a window or procedure is added to a component this procedure is listening.
- auto OnElementRemove(IWindow* pWindow) -> bool virtual
- An event listener called every time a window is removed from a component this procedure is listening.
-
auto OnLayout(IWindow* window,
Math::
Rectangle& parentBounds) -> void virtual - An event listener called every time the window layout is recalculated on a window this procedure is listening.
-
auto OnTransform(IWindow* pWindow,
Math::
Matrix4* pTransformation) -> void virtual - An event listener called every time a transformation is applied on a window.
- auto OnWinProcAdd(IWindow* pWindow) -> void virtual
- An event listener called when this procedure is added into an IWindow.
- auto OnWinProcRemove(IWindow* pWindow) -> void virtual
- An event listener called when this procedure is removed from an IWindow.
-
auto OnButtonClick(IWindow* pWindow,
IWindow* pSourceWindow,
uint32_
t commandID) -> bool virtual - An event listener called when the window is clicked, if it's a standard button.
-
auto OnButtonSelect(IWindow* pWindow,
IWindow* pSourceWindow,
uint32_
t commandID, Message& message) -> bool virtual - An event listener called when the window is selected, if it's a toggle or radio button.
- auto func70h(IWindow* pWindow, int arg_4, int arg_8) -> bool virtual
- auto func74h(IWindow* pWindow, int arg_4, int arg_8) -> bool virtual
- auto OnMouseEnter(IWindow* pWindow, int, IWindow* pFocusWindow) -> bool virtual
- An event listener called every time the pointer enters a component this procedure is listening.
- auto OnMouseLeave(IWindow* pWindow, int, IWindow* pLostFocusWindow) -> bool virtual
- An event listener called every time the pointer leaves a component this procedure is listening.
Protected variables
Function documentation
bool UTFWin:: InteractiveWinProc:: HandleUIMessage(IWindow* pWindow,
const Message& message) override
Method called every time a message is received on a window that has this IWinProc added.
Parameters | |
---|---|
pWindow | The window that received this message. |
message | The message received. |
Returns | Whether the message was handled or not. |
This method is responsible of handling (or not) the message. This method receives the IWindow that is currently receiving the message; this way, the same IWinProc can be listening for more than one window. This method returns whether the message was handled or not; if it was handled, no other IWinProcs will be called on that window.
bool UTFWin:: InteractiveWinProc:: OnKeyDown2(IWindow* pWindow,
int,
int virtualKey,
int modifiers) virtual
An event listener called every time a key is pressed on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
virtualKey | The VK code of the key. |
modifiers | The modifiers (Ctrl, Alt and Shift) currently being pressed. They use the enum values kModifier.... |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnKeyUp2(IWindow* pWindow,
int,
int virtualKey,
int modifiers) virtual
An event listener called every time a key is released on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
virtualKey | The VK code of the key. |
modifiers | The modifiers (Ctrl, Alt and Shift) currently being pressed. They use the enum values kModifier.... |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnKeyDown(IWindow* pWindow,
int,
int virtualKey,
int modifiers) virtual
An event listener called every time a key is pressed on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
virtualKey | The VK code of the key. |
modifiers | The modifiers (Ctrl, Alt and Shift) currently being pressed. They use the enum values kModifier.... |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnKeyUp(IWindow* pWindow,
int,
int virtualKey,
int modifiers) virtual
An event listener called every time a key is released on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
virtualKey | The VK code of the key. |
modifiers | The modifiers (Ctrl, Alt and Shift) currently being pressed. They use the enum values kModifier.... |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnKeyPress(IWindow* pWindow,
int,
int16_ t virtualKey) virtual
An event listener called every time a character, space or backspace key is released on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
virtualKey | The VK code of the key. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseDown(IWindow* pWindow,
float fMouseX,
float fMouseY,
int,
int state) virtual
An event listener called every time a mouse key is pressed on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
fMouseX | The X position of the mouse. |
fMouseY | The Y position of the mouse. |
state | The state of the mouse, flags of the UTFWin::kMouse.... values. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseUp(IWindow* pWindow,
float fMouseX,
float fMouseY,
int,
int state) virtual
An event listener called every time a mouse key is released on a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
fMouseX | The X position of the mouse. |
fMouseY | The Y position of the mouse. |
state | The state of the mouse, flags of the UTFWin::kMouse.... values. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseMove(IWindow* pWindow,
float fMouseX,
float fMouseY,
int state) virtual
An event listener called every time the mouse is moved within a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
fMouseX | The X position of the mouse. |
fMouseY | The Y position of the mouse. |
state | The state of the mouse, flags of the UTFWin::kMouse.... values. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseWheel(IWindow* pWindow,
float fMouseX,
float fMouseY,
int state,
int nWheelDelta) virtual
An event listener called every time the mouse wheel is moved within a window this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
fMouseX | The X position of the mouse. |
fMouseY | The Y position of the mouse. |
state | The state of the mouse, flags of the UTFWin::kMouse.... values. |
nWheelDelta | |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnRefresh(IWindow* pWindow,
RefreshType type,
IWindow*) virtual
An event listener called every time the mouse pointer enters or leaves a window this procedure is listening, or the keyboard focus is gained or lost.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
type | The type of refresh that happened, in the RefreshType enum. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnCollisionDetect(IWindow* pWindow,
float fMouseX,
float fMouseY,
bool* pbResult) virtual
An event listener called to check if the window contains the mouse pointer.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
fMouseX | The X position of the mouse. |
fMouseY | The Y position of the mouse. |
pbResult | The bool* where the result of the detection must go. Set it to true if it collisions with this window. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnElementAdd(IWindow* pWindow) virtual
An event listener called every time a window or procedure is added to a component this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnElementRemove(IWindow* pWindow) virtual
An event listener called every time a window is removed from a component this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
Returns | Whether the event was handled or not. |
void UTFWin:: InteractiveWinProc:: OnLayout(IWindow* window,
Math:: Rectangle& parentBounds) virtual
An event listener called every time the window layout is recalculated on a window this procedure is listening.
Parameters | |
---|---|
window | |
parentBounds |
void UTFWin:: InteractiveWinProc:: OnTransform(IWindow* pWindow,
Math:: Matrix4* pTransformation) virtual
An event listener called every time a transformation is applied on a window.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
pTransformation |
void UTFWin:: InteractiveWinProc:: OnWinProcAdd(IWindow* pWindow) virtual
An event listener called when this procedure is added into an IWindow.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
void UTFWin:: InteractiveWinProc:: OnWinProcRemove(IWindow* pWindow) virtual
An event listener called when this procedure is removed from an IWindow.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
bool UTFWin:: InteractiveWinProc:: OnButtonClick(IWindow* pWindow,
IWindow* pSourceWindow,
uint32_ t commandID) virtual
An event listener called when the window is clicked, if it's a standard button.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
pSourceWindow | The button IWindow that was clicked. |
commandID | The command ID of the button. |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnButtonSelect(IWindow* pWindow,
IWindow* pSourceWindow,
uint32_ t commandID,
Message& message) virtual
An event listener called when the window is selected, if it's a toggle or radio button.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
pSourceWindow | The button IWindow that was clicked. |
commandID | The command ID of the button. |
message | |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseEnter(IWindow* pWindow,
int,
IWindow* pFocusWindow) virtual
An event listener called every time the pointer enters a component this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
pFocusWindow | |
Returns | Whether the event was handled or not. |
bool UTFWin:: InteractiveWinProc:: OnMouseLeave(IWindow* pWindow,
int,
IWindow* pLostFocusWindow) virtual
An event listener called every time the pointer leaves a component this procedure is listening.
Parameters | |
---|---|
pWindow | The IWindow where this event was received. |
pLostFocusWindow | The window that lost focus. |
Returns | Whether the event was handled or not. |