Crazy Eddies GUI System: CEGUI::FontDim Class Reference

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

- Class List
- Alphabetical List
- Class Hierarchy
- Class Members

# CEGUI::FontDim Class Reference

Dimension type that represents some metric of a Font. Implements BaseDim interface. More...

Inheritance diagram for CEGUI::FontDim:

[legend]
Collaboration diagram for CEGUI::FontDim:

[legend]
List of all members.

## Public Member Functions
| FontDim (const String &name, const String &font, const String &text, FontMetricType metric, float padding=0)
| Constructor.
## Protected Member Functions
float | getValue_impl (const Window &wnd) const
| Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically.
float | getValue_impl (const Window &wnd, const Rect &container) const
| Implementataion method to return the base value for this BaseDim. This method should not attempt to apply the mathematical operator; this is handled automatically by BaseDim.
void | writeXMLElementName_impl (OutStream &out_stream) const
| Implementataion method to output real xml element name to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element name itself.
void | writeXMLElementAttributes_impl (OutStream &out_stream) const
| Implementataion method to output xml element attributes to an OutStream. This method should not write the element opening '<' character, nor close the element, it must write just the element attributes.
BaseDim * | clone_impl () const
| Implementataion method to return a clone of this sub-class of BaseDim. This method should not attempt to clone the mathematical operator or operand; theis is handled automatically by BaseDim.

## Detailed Description

Dimension type that represents some metric of a Font. Implements BaseDim interface.

## Constructor & Destructor Documentation

CEGUI::FontDim::FontDim | ( | const String & | name,
|  | const String & | font,
|  | const String & | text,
|  | FontMetricType | metric,
|  | float | padding = `0`
| ) |

  | Constructor. Parameters:
  | name | String holding the name suffix of the window to be accessed to obtain the font and / or text strings to be used when these items are not explicitly given.
  | font | String holding the name of the font to use for this dimension. If the string is empty, the font assigned to the window passed to getValue will be used.
  | text | String holding the text to be measured for horizontal extent. If this is empty, the text from the window passed to getValue will be used.
  | metric | One of the FontMetricType values indicating what we should represent.
  | padding | constant pixel padding value to be added.