UTFWin::IWinProc class

This class is a window procedure, also known as an event/message listener.

IWinProc objects are added to windows; when a message (aka event) is received or generated on the window, the window procedures receive it and handle it.

Base classes

class Object
This class represents a basic reference counted object.

Derived classes

class Editors::EditorUI
class Editors::PaintModeCategory
class GameCiv::GameCiv
class Palettes::ColorSwatchUI
This class holds all information related with a single color button in editor categories and its user interface.
class Palettes::DefaultItemFrameUI
class Palettes::ItemViewer
class Palettes::PageArrowsUI
The class that represents the fragment of user interface of the page numbers and arrow buttons in an Editors::PaletteCategory.
class Palettes::PaletteCategoryUI
This class holds all information related with the user interface of a palette category.
class Palettes::PalettePageUI
This class holds all information related with the user interface of a palette page.
class Palettes::PaletteUI
This class holds all information related to the user interface of a palette.
class Palettes::StandardItemUI
class UI::SpaceGameUI
class InteractiveWinProc
class LambdaProc

Public static variables

static const uint32_t TYPE

Public functions

auto GetPriority() const -> int virtual
Gets a number that represents the priority of this IWinProc.
auto GetEventFlags() const -> int pure virtual
Gets the flags that represent which type of messages this IWinProc can handle.
auto HandleUIMessage(IWindow* pWindow, const Message& message) -> bool pure virtual
Method called every time a message is received on a window that has this IWinProc added.

Function documentation

int UTFWin::IWinProc::GetPriority() const virtual

Gets a number that represents the priority of this IWinProc.

The procedures with highest priority will be the first ones to receive a message when the window they are added to receives it.

int UTFWin::IWinProc::GetEventFlags() const pure virtual

Gets the flags that represent which type of messages this IWinProc can handle.

This allows for better performance, since generally a procedure only needs to listen specific events. The flags are in the kEventFlag... values.

bool UTFWin::IWinProc::HandleUIMessage(IWindow* pWindow, const Message& message) pure virtual

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.