Changeset View
Changeset View
Standalone View
Standalone View
source/gui/IGUITextOwner.h
Show First 20 Lines • Show All 53 Lines • ▼ Show 20 Lines | public: | ||||
/** | /** | ||||
* Adds a text object. | * Adds a text object. | ||||
*/ | */ | ||||
void AddText(SGUIText* text); | void AddText(SGUIText* text); | ||||
/** | /** | ||||
* Subscribe the custom JS methods. | * Subscribe the custom JS methods. | ||||
*/ | */ | ||||
void CreateJSObject() override; | virtual void CreateJSObject() override; | ||||
/** | /** | ||||
* @see IGUIObject#HandleMessage() | * @see IGUIObject#HandleMessage() | ||||
*/ | */ | ||||
virtual void HandleMessage(SGUIMessage& Message); | virtual void HandleMessage(SGUIMessage& Message) override; | ||||
/** | /** | ||||
* @see IGUIObject#UpdateCachedSize() | * @see IGUIObject#UpdateCachedSize() | ||||
*/ | */ | ||||
virtual void UpdateCachedSize(); | virtual void UpdateCachedSize() override; | ||||
/** | /** | ||||
* Draws the Text. | * Draws the Text. | ||||
* | * | ||||
* @param index Index value of text. Mostly this will be 0 | * @param index Index value of text. Mostly this will be 0 | ||||
* @param color | * @param color | ||||
* @param pos Position | * @param pos Position | ||||
* @param z Z value | * @param z Z value | ||||
* @param clipping Clipping rectangle, don't even add a parameter | * @param clipping Clipping rectangle, don't even add a parameter | ||||
* to get no clipping. | * to get no clipping. | ||||
*/ | */ | ||||
virtual void DrawText(size_t index, const CGUIColor& color, const CPos& pos, float z, const CRect& clipping = CRect()); | virtual void DrawText(size_t index, const CGUIColor& color, const CPos& pos, float z, const CRect& clipping = CRect()); | ||||
/** | /** | ||||
* Test if mouse position is over an icon | * Test if mouse position is over an icon | ||||
*/ | */ | ||||
virtual bool MouseOverIcon(); | virtual bool MouseOverIcon() override; | ||||
/** | /** | ||||
* Workaround to avoid a dynamic_cast which can be 80 times slower than this. | * Workaround to avoid a dynamic_cast which can be 80 times slower than this. | ||||
*/ | */ | ||||
virtual void* GetTextOwner() override { return this; } | virtual void* GetTextOwner() override { return this; } | ||||
/** | |||||
* The inheriting classes are supposed to add settings relevant to text. | |||||
*/ | |||||
virtual void AddSettings() override = 0; | |||||
protected: | protected: | ||||
/** | /** | ||||
* Setup texts. Functions that sets up all texts when changes have been made. | * Setup texts. Functions that sets up all texts when changes have been made. | ||||
*/ | */ | ||||
virtual void SetupText() = 0; | virtual void SetupText() = 0; | ||||
/** | /** | ||||
Show All 21 Lines |
Wildfire Games · Phabricator