Palettes::PalettePageUI class

This class holds all information related with the user interface of a palette page.

It's the UI representation of a Palettes::PalettePage.

Base classes

class UTFWin::IWinProc
This class is a window procedure, also known as an event/message listener.
class DefaultRefCounted
The default implementation of a reference counted class.

Public types

enum DisplayType { kDisplayStandard = 0, kDisplayOutfitter = 0xB4E4F69B, kDisplaySelectable = 0xECCC3657 }
enum ControlIDs { kControlItemsPanel = 0x12DF7465 }

Public static variables

static const uint32_t TYPE

Constructors, destructors, conversion operators

PalettePageUI()
~PalettePageUI() virtual

Public functions

auto Load(PalettePage* pPage, UTFWin::IWindow* pWindow, PaletteInfo* pInfo, size_t nIndex, bool) -> void
auto GetItemArea(size_t nItemIndex) -> Math::Rectangle
Returns the area the item in the given index should have, relative to the items panel.
auto AddRef() -> int override
auto Release() -> int override
auto Cast(uint32_t) const -> void* override
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.

Public variables

UILayoutPtr mpLayout
The layout of the palette page, loaded using the ID in Palettes::PalettePage::mLayoutID.
UTFWin::IWindow* mpItemsPanel
The panel that will contain the items.
PalettePagePtr mpPage
float field_18
float field_1C
eastl::vector<StandardItemUIPtr> mStandardItems
eastl::vector<eastl::intrusive_ptr<IAdvancedItemUI>> mAdvancedItems

Enum documentation

enum Palettes::PalettePageUI::ControlIDs

Enumerators
kControlItemsPanel

The ControlID of the panel that will contain the items.

Function documentation

Math::Rectangle Palettes::PalettePageUI::GetItemArea(size_t nItemIndex)

Returns the area the item in the given index should have, relative to the items panel.

The layout properties of the page will be applied here. The index is the index to the item in the Palettes::PalettePage::mItems vector.

int Palettes::PalettePageUI::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 Palettes::PalettePageUI::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.

Variable documentation

UTFWin::IWindow* Palettes::PalettePageUI::mpItemsPanel

The panel that will contain the items.

It corresponds to the Palettes::PaletteCategoryUI::ControlIDs::kControlItemsPanel window.