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

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

#include <IWinProc.h>

Inheritance diagram for UTFWin::IWinProc:
Object Editors::EditorUI Editors::PaintModeCategory GameCiv::GameCiv Palettes::ColorSwatchUI Palettes::DefaultItemFrameUI Palettes::ItemViewer Palettes::PageArrowsUI Palettes::PaletteCategoryUI Palettes::PalettePageUI Palettes::PaletteUI Palettes::StandardItemUI UI::SpaceGameUI UTFWin::InteractiveWinProc UTFWin::LambdaProc

Public Member Functions

virtual int GetPriority () const
 Gets a number that represents the priority of this IWinProc. More...
 
virtual int GetEventFlags () const =0
 Gets the flags that represent which type of messages this IWinProc can handle. More...
 
virtual bool HandleUIMessage (IWindow *pWindow, const Message &message)=0
 Method called every time a message is received on a window that has this IWinProc added. More...
 
- Public Member Functions inherited from Object
virtual int AddRef ()=0
 
virtual int Release ()=0
 
virtual void * Cast (uint32_t typeID) const =0
 

Static Public Attributes

static const uint32_t TYPE = 0x2F009DD0
 
- Static Public Attributes inherited from Object
static const uint32_t TYPE = 0xEE3F516E
 

Additional Inherited Members

- Protected Member Functions inherited from Object
virtual ~Object ()
 

Detailed Description

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.

Member Function Documentation

◆ GetEventFlags()

virtual 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.

Implemented in Palettes::PageArrowsUI, Palettes::PaletteCategoryUI, Palettes::ColorSwatchUI, UTFWin::LambdaProc, Palettes::PaletteUI, Palettes::PalettePageUI, UTFWin::CascadeEffect, UTFWin::RotateEffect, UTFWin::SporeTooltipWinProc, UTFWin::ModulateEffect, UTFWin::PerspectiveEffect, UTFWin::GlideEffect, UTFWin::InflateEffect, UTFWin::SimpleLayout, and UTFWin::ProportionalLayout.

◆ GetPriority()

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

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.

Reimplemented in UTFWin::LambdaProc.

◆ HandleUIMessage()

virtual 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.

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.

Parameters
pWindowThe window that received this message.
messageThe message received.
Returns
Whether the message was handled or not.

Implemented in Palettes::PageArrowsUI, UTFWin::BiStateEffect, Palettes::PaletteCategoryUI, UTFWin::LambdaFilterProc, Palettes::ColorSwatchUI, UTFWin::LambdaProc, Palettes::PaletteUI, Palettes::PalettePageUI, UTFWin::CascadeEffect, UTFWin::RotateEffect, UTFWin::SporeTooltipWinProc, UTFWin::ModulateEffect, UTFWin::PerspectiveEffect, UTFWin::GlideEffect, UTFWin::InflateEffect, Editors::EditorUI, and UTFWin::InteractiveWinProc.

Member Data Documentation

◆ TYPE

const uint32_t UTFWin::IWinProc::TYPE = 0x2F009DD0
static

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