Pyrogenesis  trunk
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
IGUITextOwner Class Referenceabstract

Framework for handling Output text. More...

#include <IGUITextOwner.h>

Inheritance diagram for IGUITextOwner:
Inheritance graph
[legend]
Collaboration diagram for IGUITextOwner:
Collaboration graph
[legend]

Public Member Functions

 IGUITextOwner (IGUIObject &pObject)
 
virtual ~IGUITextOwner ()
 
CGUITextAddText ()
 Adds a text object. More...
 
CGUITextAddText (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< CGUITextm_GeneratedTexts
 Texts that are generated and ready to be rendered. More...
 
CGUISimpleSetting< EAlignm_TextAlign
 
CGUISimpleSetting< EVAlignm_TextVAlign
 

Private Member Functions

 NONCOPYABLE (IGUITextOwner)
 

Private Attributes

IGUIObjectm_pObject
 Reference to the IGUIObject. More...
 

Detailed Description

Framework for handling Output text.

Constructor & Destructor Documentation

◆ IGUITextOwner()

IGUITextOwner::IGUITextOwner ( IGUIObject pObject)

◆ ~IGUITextOwner()

IGUITextOwner::~IGUITextOwner ( )
virtual

Member Function Documentation

◆ AddText() [1/2]

CGUIText & IGUITextOwner::AddText ( )

Adds a text object.

◆ AddText() [2/2]

CGUIText & IGUITextOwner::AddText ( const CGUIString Text,
const CStrW &  Font,
const float &  Width,
const float &  BufferZone 
)

Adds a text generated by the given arguments.

◆ CalculateTextPosition()

void IGUITextOwner::CalculateTextPosition ( CRect ObjSize,
CVector2D TextPos,
CGUIText Text 
)
protected

Calculate the position for the text, based on the alignment.

◆ DrawText()

void IGUITextOwner::DrawText ( CCanvas2D canvas,
size_t  index,
const CGUIColor color,
const CVector2D pos,
const CRect clipping = CRect() 
)
virtual

Draws the Text.

Parameters
canvasCanvas to draw on.
indexIndex value of text. Mostly this will be 0
color
posPosition
clippingClipping rectangle, don't even add a parameter to get no clipping.

◆ HandleMessage()

void IGUITextOwner::HandleMessage ( SGUIMessage Message)
virtual

◆ NONCOPYABLE()

IGUITextOwner::NONCOPYABLE ( IGUITextOwner  )
private

◆ SetupText()

virtual void IGUITextOwner::SetupText ( )
protectedpure virtual

Setup texts.

Functions that sets up all texts when changes have been made.

Implemented in CDropDown, CChart, CButton, CList, COList, CText, and CTooltip.

◆ UpdateCachedSize()

void IGUITextOwner::UpdateCachedSize ( )
virtual

◆ UpdateText()

void IGUITextOwner::UpdateText ( )
protectedvirtual

Regenerate the text in case it is invalid.

Should only be called when inevitable.

Member Data Documentation

◆ m_GeneratedTexts

std::vector<CGUIText> IGUITextOwner::m_GeneratedTexts
protected

Texts that are generated and ready to be rendered.

◆ m_GeneratedTextsValid

bool IGUITextOwner::m_GeneratedTextsValid
protected

Whether the cached text is currently valid (if not then SetupText will be called by Draw)

◆ m_pObject

IGUIObject& IGUITextOwner::m_pObject
private

Reference to the IGUIObject.

Private, because we don't want to inherit it in multiple classes.

◆ m_TextAlign

CGUISimpleSetting<EAlign> IGUITextOwner::m_TextAlign
protected

◆ m_TextVAlign

CGUISimpleSetting<EVAlign> IGUITextOwner::m_TextVAlign
protected

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