Om
1.0.0
A universal framework for multimedia simulation
|
A class that describes how a style of text should be displayed. More...
#include <omGraphicsGUITextStyle.h>
Public Member Functions | |
TextStyle () | |
Create a default text style object with no font. More... | |
TextStyle (Font *newFont, Float newFontSize, const Color4f &newColor) | |
Create a new text style object that has the specified attributes. More... | |
TextStyle (Font *newFont, Float newFontSize, const Color4f &newColor, const TextLayout &newLayout) | |
Create a new text style object that has the specified attributes. More... | |
Font * | getFont () const |
Return a pointer to a Font object that determines the glyphs that are used for a text style. More... | |
void | setFont (Font *newFont) |
Set a pointer to a Font object that determines the glyphs that are used for a text style. More... | |
Float | getSize () const |
Return a number that indicates the nominal size of the font for the style. More... | |
void | setSize (Float newSize) |
Set a number that indicates the nominal size of the font for the style. More... | |
const Color4f & | getColor () const |
Return a reference to an object that describes the RGBA color of the font glyphs. More... | |
void | setColor (const Color4f &newColor) |
Set an object that describes the RGBA color of the font glyphs. More... | |
const Color4f & | getOutlineColor () const |
Return a reference to an object that describes the RGBA outline color of the text style. More... | |
void | setOutlineColor (const Color4f &newOutlineColor) |
Set an object that describes the RGBA outline color of the text style. More... | |
const TextLayout & | getLayout () const |
Return an object that describes the direction that the text style is layed out. More... | |
void | setLayout (const TextLayout &newLayout) |
Set an object that describes the direction that the text style is layed out. More... | |
Float | getTabWidth () const |
Return the number of spaces that are used for each tab character. More... | |
void | setTabWidth (Float newTabWidth) |
Set the number of spaces that are used for each tab character. More... | |
Float | getUnderlineWidth () const |
Return the width in pixels of the text style's underline, if applicable. More... | |
void | setUnderlineWidth (Float newUnderlineWidth) |
Set the width in pixels of the text style's underline, if applicable. More... | |
TextFlags & | getFlags () |
Return a reference to the flags for this text style. More... | |
const TextFlags & | getFlags () const |
Return a const reference to the flags for this text style. More... | |
void | setFlags (const TextFlags &newFlags) |
Set the flags for this text style. More... | |
Bool | flagIsSet (TextFlags::Flag flag) const |
Return whether or not the specified boolan flag is set for this text style. More... | |
void | setFlag (TextFlags::Flag flag, Bool newIsSet=true) |
Set whether or not the specified boolan flag is set for this text style. More... | |
Bool | getGlyphLayout (const UTF8String &text, GlyphLayout &layout) |
Update a glyph layout for this text style and the specified. More... | |
Static Public Member Functions | |
static TextStyle | getDefault () |
Return the default text style that uses the default font. More... | |
Static Public Attributes | |
static const Float | DEFAULT_SIZE |
The default nominal font size to use for this text style. More... | |
static const TextLayout | DEFAULT_LAYOUT |
The default layout direction to use for a text style. More... | |
static const Float | DEFAULT_TAB_WIDTH |
The default width of a tab character, as a multiple of the width of a space character. More... | |
static const Float | DEFAULT_UNDERLINE_WIDTH |
The default width in pixels of a text style underline. More... | |
static const Color4f | DEFAULT_COLOR |
The default RGBA color to use for font glyphs. More... | |
static const Color4f | DEFAULT_OUTLINE_COLOR |
The default RGBA color to use for font glyph outlines. More... | |
A class that describes how a style of text should be displayed.
This includes the font to use when rendering text, the nominal size of the font, and the text color.
om::graphics::gui::fonts::TextStyle::TextStyle | ( | ) |
Create a default text style object with no font.
om::graphics::gui::fonts::TextStyle::TextStyle | ( | Font * | newFont, |
Float | newFontSize, | ||
const Color4f & | newColor | ||
) |
Create a new text style object that has the specified attributes.
om::graphics::gui::fonts::TextStyle::TextStyle | ( | Font * | newFont, |
Float | newFontSize, | ||
const Color4f & | newColor, | ||
const TextLayout & | newLayout | ||
) |
Create a new text style object that has the specified attributes.
|
inline |
Return a pointer to a Font object that determines the glyphs that are used for a text style.
|
inline |
Set a pointer to a Font object that determines the glyphs that are used for a text style.
|
inline |
Return a number that indicates the nominal size of the font for the style.
|
inline |
Set a number that indicates the nominal size of the font for the style.
|
inline |
Return a reference to an object that describes the RGBA color of the font glyphs.
|
inline |
Set an object that describes the RGBA color of the font glyphs.
|
inline |
Return a reference to an object that describes the RGBA outline color of the text style.
|
inline |
Set an object that describes the RGBA outline color of the text style.
|
inline |
Return an object that describes the direction that the text style is layed out.
|
inline |
Set an object that describes the direction that the text style is layed out.
|
inline |
Return the number of spaces that are used for each tab character.
|
inline |
Set the number of spaces that are used for each tab character.
|
inline |
Return the width in pixels of the text style's underline, if applicable.
|
inline |
Set the width in pixels of the text style's underline, if applicable.
|
inline |
Return a reference to the flags for this text style.
|
inline |
Return a const reference to the flags for this text style.
|
inline |
Set the flags for this text style.
|
inline |
Return whether or not the specified boolan flag is set for this text style.
|
inline |
Set whether or not the specified boolan flag is set for this text style.
Bool om::graphics::gui::fonts::TextStyle::getGlyphLayout | ( | const UTF8String & | text, |
GlyphLayout & | layout | ||
) |
Update a glyph layout for this text style and the specified.
|
inlinestatic |
Return the default text style that uses the default font.
|
static |
The default nominal font size to use for this text style.
|
static |
The default layout direction to use for a text style.
|
static |
The default width of a tab character, as a multiple of the width of a space character.
|
static |
The default width in pixels of a text style underline.
|
static |
The default RGBA color to use for font glyphs.
|
static |
The default RGBA color to use for font glyph outlines.