#include <Font.h>
Inheritance diagram for GG::Font::TextElement:

Public Types | |
| enum | TextElementType { OPEN_TAG, CLOSE_TAG, TEXT, WHITESPACE, NEWLINE } |
Public Member Functions | |
| TextElement (bool ws, bool nl) | |
| virtual | ~TextElement () |
| int | Width () const |
| virtual TextElementType | Type () const |
| virtual int | OriginalStringChars () const |
Public Attributes | |
| std::string | text |
| std::vector< int > | widths |
| const bool | whitespace |
| const bool | newline |
Definition at line 112 of file Font.h.
The types of token-like entities that can be represented by a TextElement.
| GG::Font::TextElement::TextElement | ( | bool | ws, | |
| bool | nl | |||
| ) |
Ctor. ws indicates that the element contains only whitespace; nl indicates that it is a newline element.
| virtual GG::Font::TextElement::~TextElement | ( | ) | [virtual] |
Virtual dtor.
| int GG::Font::TextElement::Width | ( | ) | const |
Returns the width of the element, in pixels.
| virtual TextElementType GG::Font::TextElement::Type | ( | ) | const [virtual] |
| virtual int GG::Font::TextElement::OriginalStringChars | ( | ) | const [virtual] |
Returns the number of characters in the original string that the element represents.
Reimplemented in GG::Font::FormattingTag.
| std::string GG::Font::TextElement::text |
The text represented by the element, or the name of the tag, if the element is a FormattingTag.
| std::vector<int> GG::Font::TextElement::widths |
| const bool GG::Font::TextElement::whitespace |
| const bool GG::Font::TextElement::newline |
1.5.2