Crazy Eddies GUI System  0.7.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CEGUI::BasicRenderedStringParser Class Reference

Basic RenderedStringParser class that offers support for 'colour', 'font', 'image' and 'window' control tags. More...

+ Inheritance diagram for CEGUI::BasicRenderedStringParser:
+ Collaboration diagram for CEGUI::BasicRenderedStringParser:

Public Member Functions

 BasicRenderedStringParser ()
 Constructor.
 
 BasicRenderedStringParser (const String &initial_font, const ColourRect &initial_colours)
 Initialising constructor. More...
 
virtual ~BasicRenderedStringParser ()
 Destructor.
 
void setInitialFontName (const String &font_name)
 set the initial font name to be used on subsequent calls to parse. More...
 
void setInitialColours (const ColourRect &colours)
 Set the initial colours to be used on subsequent calls to parse. More...
 
const StringgetInitialFontName () const
 Return the name of the initial font used in each parse.
 
const ColourRectgetInitialColours () const
 Return a ColourRect describing the initial colours used in each parse.
 
RenderedString parse (const String &input_string, Font *initial_font, const ColourRect *initial_colours)
 parse a text string and return a RenderedString representation. More...
 

Protected Member Functions

virtual void appendRenderedText (RenderedString &rs, const String &text) const
 append the text string text to the RenderedString rs.
 
virtual void processControlString (RenderedString &rs, const String &ctrl_str)
 Process the control string ctrl_str.
 
virtual void initialiseDefaultState ()
 initialise the default state
 

Protected Attributes

String d_initialFontName
 initial font name
 
ColourRect d_initialColours
 initial colours
 
Rect d_padding
 active padding values.
 
ColourRect d_colours
 active colour values.
 
String d_fontName
 active font.
 

Detailed Description

Basic RenderedStringParser class that offers support for 'colour', 'font', 'image' and 'window' control tags.

Constructor & Destructor Documentation

CEGUI::BasicRenderedStringParser::BasicRenderedStringParser ( const String initial_font,
const ColourRect initial_colours 
)

Initialising constructor.

Parameters
initial_fontReference to a String holding the name of the initial font to be used.
initial_coloursReference to a ColourRect describing the initial colours to be used.

Member Function Documentation

RenderedString CEGUI::BasicRenderedStringParser::parse ( const String input_string,
Font initial_font,
const ColourRect initial_colours 
)
virtual

parse a text string and return a RenderedString representation.

Parameters
input_stringString object holding the text that is to be parsed.
initial_fontPointer to the initial font to be used for text (0 for system default).
initial_coloursPointer to the initial colours to be used (0 for default).
Returns
RenderedString object holding the result of the parse operation.

Implements CEGUI::RenderedStringParser.

void CEGUI::BasicRenderedStringParser::setInitialColours ( const ColourRect colours)

Set the initial colours to be used on subsequent calls to parse.

Parameters
coloursColourRect object holding the colours.
void CEGUI::BasicRenderedStringParser::setInitialFontName ( const String font_name)

set the initial font name to be used on subsequent calls to parse.

Parameters
font_nameString object holding the name of the font.