Crazy Eddies GUI System
0.7.7
|
Class that encapsulates information for a text component. More...
Public Member Functions | |
TextComponent () | |
Constructor. | |
~TextComponent () | |
Destructor. | |
TextComponent (const TextComponent &obj) | |
Copy constructor. | |
TextComponent & | operator= (const TextComponent &other) |
Assignment. | |
const String & | getText () const |
Return the text object that will be rendered by this TextComponent. More... | |
const String & | getTextVisual () const |
return text string with visual ordering of glyphs. | |
void | setText (const String &text) |
Set the text that will be rendered by this TextComponent. More... | |
const String & | getFont () const |
Return the name of the font to be used when rendering this TextComponent. More... | |
void | setFont (const String &font) |
Set the name of the font to be used when rendering this TextComponent. More... | |
VerticalTextFormatting | getVerticalFormatting () const |
Return the current vertical formatting setting for this TextComponent. More... | |
void | setVerticalFormatting (VerticalTextFormatting fmt) |
Set the vertical formatting setting for this TextComponent. More... | |
HorizontalTextFormatting | getHorizontalFormatting () const |
Return the current horizontal formatting setting for this TextComponent. More... | |
void | setHorizontalFormatting (HorizontalTextFormatting fmt) |
Set the horizontal formatting setting for this TextComponent. More... | |
void | writeXMLToStream (XMLSerializer &xml_stream) const |
Writes an xml representation of this TextComponent to out_stream. More... | |
bool | isTextFetchedFromProperty () const |
Return whether this TextComponent fetches it's text string via a property on the target window. More... | |
const String & | getTextPropertySource () const |
Return the name of the property that will be used to determine the text string to render for this TextComponent. More... | |
void | setTextPropertySource (const String &property) |
Set the name of the property that will be used to determine the text string to render for this TextComponent. More... | |
bool | isFontFetchedFromProperty () const |
Return whether this TextComponent fetches it's font via a property on the target window. More... | |
const String & | getFontPropertySource () const |
Return the name of the property that will be used to determine the font to use for rendering the text string for this TextComponent. More... | |
void | setFontPropertySource (const String &property) |
Set the name of the property that will be used to determine the font to use for rendering the text string of this TextComponent. More... | |
float | getHorizontalTextExtent () const |
return the horizontal pixel extent of the formatted rendered string. | |
float | getVerticalTextExtent () const |
return the vertical pixel extent of the formatted rendered string. | |
Public Member Functions inherited from CEGUI::FalagardComponentBase | |
FalagardComponentBase () | |
Constructor. | |
virtual | ~FalagardComponentBase () |
Destructor. | |
void | render (Window &srcWindow, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render this component. More correctly, the component is cached for rendering. More... | |
void | render (Window &srcWindow, const Rect &baseRect, const CEGUI::ColourRect *modColours=0, const Rect *clipper=0, bool clipToDisplay=false) const |
Render this component. More correctly, the component is cached for rendering. More... | |
const ComponentArea & | getComponentArea () const |
Return the ComponentArea of this ImageryComponent. More... | |
void | setComponentArea (const ComponentArea &area) |
Set the ImageryComponent's ComponentArea. More... | |
const ColourRect & | getColours () const |
Return the ColourRect set for use by this ImageryComponent. More... | |
void | setColours (const ColourRect &cols) |
Set the colours to be used by this ImageryComponent. More... | |
void | setColoursPropertySource (const String &property) |
Set the name of the property where colour values can be obtained. More... | |
void | setColoursPropertyIsColourRect (bool setting=true) |
Set whether the colours property source represents a full ColourRect. More... | |
void | setVertFormattingPropertySource (const String &property) |
Set the name of the property where vertical formatting option can be obtained. More... | |
void | setHorzFormattingPropertySource (const String &property) |
Set the name of the property where horizontal formatting option can be obtained. More... | |
Protected Member Functions | |
void | render_impl (Window &srcWindow, Rect &destRect, const CEGUI::ColourRect *modColours, const Rect *clipper, bool clipToDisplay) const |
Method to do main render caching work. | |
void | setupStringFormatter (const Window &window, const RenderedString &rendered_string) const |
helper to set up an appropriate FormattedRenderedString | |
Protected Member Functions inherited from CEGUI::FalagardComponentBase | |
void | initColoursRect (const Window &wnd, const ColourRect *modCols, ColourRect &cr) const |
Helper method to initialise a ColourRect with appropriate values according to the way the ImageryComponent is set up. More... | |
bool | writeColoursXML (XMLSerializer &xml_stream) const |
Writes xml for the colours to a OutStream. Will prefer property colours before explicit. More... | |
bool | writeVertFormatXML (XMLSerializer &xml_stream) const |
Writes xml for the vertical formatting to a OutStream if such a property is defined. More... | |
bool | writeHorzFormatXML (XMLSerializer &xml_stream) const |
Writes xml for the horizontal formatting to a OutStream if such a property is defined. More... | |
Additional Inherited Members | |
Protected Attributes inherited from CEGUI::FalagardComponentBase | |
ComponentArea | d_area |
Destination area for this component. | |
ColourRect | d_colours |
base colours to be applied when rendering the image component. | |
String | d_colourPropertyName |
name of property to fetch colours from. | |
bool | d_colourProperyIsRect |
true if the colour property will fetch a full ColourRect. | |
String | d_vertFormatPropertyName |
name of property to fetch vertical formatting setting from. | |
String | d_horzFormatPropertyName |
name of property to fetch horizontal formatting setting from. | |
Class that encapsulates information for a text component.
const String& CEGUI::TextComponent::getFont | ( | ) | const |
Return the name of the font to be used when rendering this TextComponent.
const String& CEGUI::TextComponent::getFontPropertySource | ( | ) | const |
Return the name of the property that will be used to determine the font to use for rendering the text string for this TextComponent.
HorizontalTextFormatting CEGUI::TextComponent::getHorizontalFormatting | ( | ) | const |
Return the current horizontal formatting setting for this TextComponent.
const String& CEGUI::TextComponent::getText | ( | ) | const |
Return the text object that will be rendered by this TextComponent.
const String& CEGUI::TextComponent::getTextPropertySource | ( | ) | const |
Return the name of the property that will be used to determine the text string to render for this TextComponent.
VerticalTextFormatting CEGUI::TextComponent::getVerticalFormatting | ( | ) | const |
Return the current vertical formatting setting for this TextComponent.
bool CEGUI::TextComponent::isFontFetchedFromProperty | ( | ) | const |
Return whether this TextComponent fetches it's font via a property on the target window.
bool CEGUI::TextComponent::isTextFetchedFromProperty | ( | ) | const |
Return whether this TextComponent fetches it's text string via a property on the target window.
void CEGUI::TextComponent::setFont | ( | const String & | font | ) |
Set the name of the font to be used when rendering this TextComponent.
Note that setting this to the empty string ("") will cause the font from the base window passed when rendering to be used instead.
font | String containing name of a font |
void CEGUI::TextComponent::setFontPropertySource | ( | const String & | property | ) |
Set the name of the property that will be used to determine the font to use for rendering the text string of this TextComponent.
property | String object holding the name of a Propery. The property should access a valid font name. |
void CEGUI::TextComponent::setHorizontalFormatting | ( | HorizontalTextFormatting | fmt | ) |
Set the horizontal formatting setting for this TextComponent.
fmt | One of the HorizontalTextFormatting enumerated values. |
void CEGUI::TextComponent::setText | ( | const String & | text | ) |
Set the text that will be rendered by this TextComponent.
Note that setting this to the empty string ("") will cause the text from the base window passed when rendering to be used instead.
text | String containing text to render, or "" to render text from window. |
void CEGUI::TextComponent::setTextPropertySource | ( | const String & | property | ) |
Set the name of the property that will be used to determine the text string to render for this TextComponent.
property | String object holding the name of a Propery. The property can contain any text string to render. |
void CEGUI::TextComponent::setVerticalFormatting | ( | VerticalTextFormatting | fmt | ) |
Set the vertical formatting setting for this TextComponent.
fmt | One of the VerticalTextFormatting enumerated values. |
void CEGUI::TextComponent::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const |
Writes an xml representation of this TextComponent to out_stream.
xml_stream | Stream where xml data should be output. |