Crazy Eddies GUI System: CEGUI::TextComponent Class Reference

Crazy Eddies GUI System 0.7.6

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | Protected Member Functions
CEGUI::TextComponent Class Reference

Class that encapsulates information for a text component. More...

Inheritance diagram for CEGUI::TextComponent:
[legend]
Collaboration diagram for CEGUI::TextComponent:
[legend]

List of all members.

## 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.
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.
const String & | getFont () const
| Return the name of the font to be used when rendering this TextComponent.
void | setFont (const String &font)
| Set the name of the font to be used when rendering this TextComponent.
VerticalTextFormatting | getVerticalFormatting () const
| Return the current vertical formatting setting for this TextComponent.
void | setVerticalFormatting (VerticalTextFormatting fmt)
| Set the vertical formatting setting for this TextComponent.
HorizontalTextFormatting | getHorizontalFormatting () const
| Return the current horizontal formatting setting for this TextComponent.
void | setHorizontalFormatting (HorizontalTextFormatting fmt)
| Set the horizontal formatting setting for this TextComponent.
void | writeXMLToStream (XMLSerializer &xml_stream) const
| Writes an xml representation of this TextComponent to out_stream.
bool | isTextFetchedFromProperty () const
| Return whether this TextComponent fetches it's text string via a property on the target window.
const String & | getTextPropertySource () const
| Return the name of the property that will be used to determine the text string to render for this TextComponent.
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.
bool | isFontFetchedFromProperty () const
| Return whether this TextComponent fetches it's font via a property on the target window.
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.
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.
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.
## 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

## Detailed Description

Class that encapsulates information for a text component.

## Member Function Documentation

const String& CEGUI::TextComponent::getFont | ( |  | ) | const

Return the name of the font to be used when rendering this TextComponent.

Returns:
  String object containing the name of a font, or "" if the window font is to be used.

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.

Returns:
  String object holding the name of a Propery.

HorizontalTextFormatting CEGUI::TextComponent::getHorizontalFormatting | ( |  | ) | const

Return the current horizontal formatting setting for this TextComponent.

Returns:
  One of the HorizontalTextFormatting enumerated values.

const String& CEGUI::TextComponent::getText | ( |  | ) | const

Return the text object that will be rendered by this TextComponent.

Returns:
  String object containing the text that will be rendered.

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.

Returns:
  String object holding the name of a Propery.

VerticalTextFormatting CEGUI::TextComponent::getVerticalFormatting | ( |  | ) | const

Return the current vertical formatting setting for this TextComponent.

Returns:
  One of the VerticalTextFormatting enumerated values.

bool CEGUI::TextComponent::isFontFetchedFromProperty | ( |  | ) | const

Return whether this TextComponent fetches it's font via a property on the target window.

Returns:
  - true if the font comes via a Propery.
  - false if the font is defined explicitly, or will come from the target window.

bool CEGUI::TextComponent::isTextFetchedFromProperty | ( |  | ) | const

Return whether this TextComponent fetches it's text string via a property on the target window.

Returns:
  - true if the text string comes via a Propery.
  - false if the text string is defined explicitly, or will come from 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.

Parameters:

  font | String containing name of a font

Returns:
  Nothing.

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.

Parameters:

  property | String object holding the name of a Propery. The property should access a valid font name.

Returns:
  Nothing.

void CEGUI::TextComponent::setHorizontalFormatting | ( | HorizontalTextFormatting | fmt | ) |

Set the horizontal formatting setting for this TextComponent.

Parameters:

  fmt | One of the HorizontalTextFormatting enumerated values.

Returns:
  Nothing.

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.

Parameters:

  text | String containing text to render, or "" to render text from window.

Returns:
  Nothing.

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.

Parameters:

  property | String object holding the name of a Propery. The property can contain any text string to render.

Returns:
  Nothing.

void CEGUI::TextComponent::setVerticalFormatting | ( | VerticalTextFormatting | fmt | ) |

Set the vertical formatting setting for this TextComponent.

Parameters:

  fmt | One of the VerticalTextFormatting enumerated values.

Returns:
  Nothing.

void CEGUI::TextComponent::writeXMLToStream | ( | XMLSerializer & | xml_stream | ) | const

Writes an xml representation of this TextComponent to out_stream.

Parameters:

  xml_stream | Stream where xml data should be output.

Returns:
  Nothing.