Pyrogenesis  trunk
Classes | Public Member Functions | Public Attributes | Private Attributes | List of all members
CGUIString Class Reference

String class, substitute for CStr, but that parses the tags and builds up a list of all text that will be different when outputted. More...

#include <GUItext.h>

Classes

struct  SFeedback
 All data generated in GenerateTextCall() More...
 
struct  TextChunk
 A chunk of text that represents one call to the renderer. More...
 

Public Member Functions

void SetValue (const CStrW &str)
 Set the value, the string will automatically be parsed when set. More...
 
const CStrW & GetOriginalString () const
 Get String, with tags. More...
 
void GenerateTextCall (const CGUI *pGUI, SFeedback &Feedback, CStrIntern DefaultFont, const int &from, const int &to, const bool FirstLine, const IGUIObject *pObject=NULL) const
 Generate Text Call from specified range. More...
 

Public Attributes

std::vector< int > m_Words
 Words. More...
 

Private Attributes

std::vector< TextChunkm_TextChunks
 TextChunks. More...
 
CStrW m_RawString
 The full raw string. More...
 
CStrW m_OriginalString
 The original string value passed to SetValue. More...
 

Detailed Description

String class, substitute for CStr, but that parses the tags and builds up a list of all text that will be different when outputted.

The difference between CGUIString and SGUIText is that CGUIString is a string-class that parses the tags when the value is set. The SGUIText is just a container which stores the positions and settings of all text-calls that will have to be made to the Renderer.

Member Function Documentation

void CGUIString::GenerateTextCall ( const CGUI pGUI,
SFeedback Feedback,
CStrIntern  DefaultFont,
const int &  from,
const int &  to,
const bool  FirstLine,
const IGUIObject pObject = NULL 
) const

Generate Text Call from specified range.

The range must span only within ONE TextChunk though. Otherwise it can't be fit into a single Text Call

Notice it won't make it complete, you will have to add X/Y values and such.

Parameters
pGUIPointer to CGUI object making this call, for e.g. icon retrieval.
Feedbackcontains all info that is generated.
DefaultFontDefault Font
fromFrom character n,
toto character n.
FirstLineWhether this is the first line of text, to calculate its height correctly
pObjectOnly for Error outputting, optional! If NULL then no Errors will be reported! Useful when you need to make several GenerateTextCall in different phases, it avoids duplicates.
const CStrW& CGUIString::GetOriginalString ( ) const
inline

Get String, with tags.

void CGUIString::SetValue ( const CStrW &  str)

Set the value, the string will automatically be parsed when set.

Member Data Documentation

CStrW CGUIString::m_OriginalString
private

The original string value passed to SetValue.

CStrW CGUIString::m_RawString
private

The full raw string.

Stripped of tags.

std::vector<TextChunk> CGUIString::m_TextChunks
private

TextChunks.

std::vector<int> CGUIString::m_Words

Words.


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