![]() |
Pyrogenesis HEAD
Pyrogenesis, a RTS Engine
|
Framework for handling Output text. More...
#include <IGUITextOwner.h>


Public Member Functions | |
| IGUITextOwner (IGUIObject &pObject) | |
| virtual | ~IGUITextOwner () |
| CGUIText & | AddText () |
| Adds a text object. More... | |
| CGUIText & | AddText (const CGUIString &Text, const CStrW &Font, const float &Width, const float &BufferZone) |
| Adds a text generated by the given arguments. More... | |
| virtual void | HandleMessage (SGUIMessage &Message) |
| virtual void | UpdateCachedSize () |
| virtual void | DrawText (CCanvas2D &canvas, size_t index, const CGUIColor &color, const CVector2D &pos, const CRect &clipping=CRect()) |
| Draws the Text. More... | |
Protected Member Functions | |
| virtual void | SetupText ()=0 |
| Setup texts. More... | |
| virtual void | UpdateText () |
| Regenerate the text in case it is invalid. More... | |
| void | CalculateTextPosition (CRect &ObjSize, CVector2D &TextPos, CGUIText &Text) |
| Calculate the position for the text, based on the alignment. More... | |
Protected Attributes | |
| bool | m_GeneratedTextsValid |
| Whether the cached text is currently valid (if not then SetupText will be called by Draw) More... | |
| std::vector< CGUIText > | m_GeneratedTexts |
| Texts that are generated and ready to be rendered. More... | |
| CGUISimpleSetting< EAlign > | m_TextAlign |
| CGUISimpleSetting< EVAlign > | m_TextVAlign |
Private Member Functions | |
| NONCOPYABLE (IGUITextOwner) | |
Private Attributes | |
| IGUIObject & | m_pObject |
| Reference to the IGUIObject. More... | |
Framework for handling Output text.
| IGUITextOwner::IGUITextOwner | ( | IGUIObject & | pObject | ) |
|
virtual |
| CGUIText & IGUITextOwner::AddText | ( | ) |
Adds a text object.
| CGUIText & IGUITextOwner::AddText | ( | const CGUIString & | Text, |
| const CStrW & | Font, | ||
| const float & | Width, | ||
| const float & | BufferZone | ||
| ) |
Adds a text generated by the given arguments.
|
protected |
Calculate the position for the text, based on the alignment.
|
virtual |
Draws the Text.
| canvas | Canvas to draw on. |
| index | Index value of text. Mostly this will be 0 |
| color | |
| pos | Position |
| clipping | Clipping rectangle, don't even add a parameter to get no clipping. |
|
virtual |
|
private |
|
protectedpure virtual |
|
virtual |
|
protectedvirtual |
Regenerate the text in case it is invalid.
Should only be called when inevitable.
|
protected |
Texts that are generated and ready to be rendered.
|
protected |
Whether the cached text is currently valid (if not then SetupText will be called by Draw)
|
private |
Reference to the IGUIObject.
Private, because we don't want to inherit it in multiple classes.
|
protected |
|
protected |