class
EditorNamePanel
Base classes
- class UTFWin::IWinProc
- This class is a window procedure, also known as an event/message listener.
- class App::IMessageListener
- An interface that can receive messages sent through the app.
- class DefaultRefCounted
- The default implementation of a reference counted class.
Public static variables
Constructors, destructors, conversion operators
Public functions
-
auto Initialize(Editors::
INameableEntity* pEntity, UTFWin:: IWindow* pContainer, uint32_ t layoutID, bool allowRename = true, uint32_ t randomNameType = 0x0) -> void - Creates a functional renaming UI for a nameable entity (eg Tribes and Cities) allowRename when set to false will gray-out the name field randomNameType when set to 0x0 will hide the randomization button.
- auto Dispose() -> void
- auto SetExtended(bool extended) -> void virtual
- auto GetEventFlags() const -> int override
- Gets the flags that represent which type of messages this IWinProc can handle.
-
auto HandleUIMessage(UTFWin::
IWindow* pWindow, const UTFWin:: Message& message) -> bool override - Method called every time a message is received on a window that has this IWinProc added.
-
auto HandleMessage(uint32_
t messageID, void* msg) -> bool override - Called every time a message is received.
- auto AddRef() -> int override
- auto Release() -> int override
-
auto Cast(uint32_
t type) const -> void* override
Public variables
Function documentation
int UI:: EditorNamePanel:: GetEventFlags() const override
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 UI:: EditorNamePanel:: HandleUIMessage(UTFWin:: IWindow* pWindow,
const UTFWin:: 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 UI:: EditorNamePanel:: HandleMessage(uint32_ t messageID,
void* msg) override
Called every time a message is received.
Parameters | |
---|---|
messageID | The ID of the message received. |
msg | The data of the message received, it might be nullptr. |
Returns | Whether the message was handled or not. |
Only the messages with an ID this listener signed up for will call this event.