#include <glwx.h>
Public Member Functions | |
GUIText (const std::string &text="") | |
GUIText (const GUIText &text) | |
GUIText & | operator= (const GUIText &text) |
GUIText & | operator= (const std::string &text) |
virtual bool | loadXMLSettings (const TiXmlElement *node) |
void | computeDimensions () |
void | printCenteredXY (int x, int y, int startIndex=0, int endIndex=-1) |
void | printCenteredX (int x, int y, int startIndex=0, int endIndex=-1) |
void | printCenteredY (int x, int y, int startIndex=0, int endIndex=-1) |
void | print (int x, int y, int startIndex=0, int endIndex=-1) |
const std::string & | getString () |
void | setString (const std::string &text) |
void | setString (const char *text) |
void | clear () |
void | setSize (int x, int y) |
void | setSize (const Tuple2i &size) |
const Tuple2i & | getSize () |
void | setColor (float r, float g, float b) |
void | setColor (const Tuple3f &color) |
const Tuple3f & | getColor () |
int | getHeight () |
int | getWidth () |
void | setHeightScale (float hs) |
void | setWidthScale (float ws) |
void | setScales (Tuple2f scales) |
float | getHeightScale () |
float | getWidthScale () |
const Tuple2f & | getScales () |
bool | needUpdating () |
void | forceUpdate (bool update) |
void | setFontIndex (int fontIndex) |
int | getFontIndex () |
Protected Attributes | |
std::string | text |
Tuple2i | position |
Tuple2i | size |
Tuple2f | scales |
Tuple3f | color |
bool | update |
int | fontIndex |
Definition at line 314 of file glwx.h.
GUIText::GUIText | ( | const std::string & | text = "" |
) |
Definition at line 3 of file GUIText.cpp.
References color, fontIndex, scales, setString(), and update.
GUIText::GUIText | ( | const GUIText & | text | ) |
GUIText & GUIText::operator= | ( | const std::string & | text | ) |
bool GUIText::loadXMLSettings | ( | const TiXmlElement * | node | ) | [virtual] |
Definition at line 38 of file GUIText.cpp.
References GUIFontManager::addFont(), color, fontIndex, setFontIndex(), setHeightScale(), setString(), setWidthScale(), and Logger::writeErrorLog().
Referenced by GUIAlphaElement::loadXMLSettings().
void GUIText::computeDimensions | ( | ) |
Definition at line 152 of file GUIText.cpp.
References GUIFontManager::findFontIndex(), fontIndex, forceUpdate(), GUIFontManager::getCurrentFont(), GUIFontManager::getDefaultFont(), GUIFont::getFontObject(), needUpdating(), scales, GUIFontManager::setCurrentFont(), size, and text.
Referenced by GUIButton::computeWindowBounds(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), GUICheckBox::getWindowBounds(), print(), printCenteredX(), printCenteredXY(), and printCenteredY().
void GUIText::printCenteredXY | ( | int | x, | |
int | y, | |||
int | startIndex = 0 , |
|||
int | endIndex = -1 | |||
) |
Definition at line 143 of file GUIText.cpp.
References computeDimensions(), print(), size, and text.
Referenced by GUILabel::render(), and GUIButton::render().
void GUIText::printCenteredX | ( | int | x, | |
int | y, | |||
int | startIndex = 0 , |
|||
int | endIndex = -1 | |||
) |
Definition at line 125 of file GUIText.cpp.
References computeDimensions(), print(), size, and text.
Referenced by GUISlider::render().
void GUIText::printCenteredY | ( | int | x, | |
int | y, | |||
int | startIndex = 0 , |
|||
int | endIndex = -1 | |||
) |
Definition at line 134 of file GUIText.cpp.
References computeDimensions(), print(), size, and text.
Referenced by GUICheckBox::render().
void GUIText::print | ( | int | x, | |
int | y, | |||
int | startIndex = 0 , |
|||
int | endIndex = -1 | |||
) |
Definition at line 104 of file GUIText.cpp.
References color, computeDimensions(), fontIndex, GUIFontManager::getCurrentFont(), GUIFontManager::getDefaultFont(), GUIFont::getFontObject(), scales, GUIFontManager::setCurrentFont(), and text.
Referenced by printCenteredX(), printCenteredXY(), printCenteredY(), GUITextBox::render(), and GUILabel::render().
const std::string & GUIText::getString | ( | ) |
Definition at line 67 of file GUIText.cpp.
References text.
Referenced by GUITextBox::checkKeyboardEvents(), GUIAlphaElement::getLabelString(), GUITextBox::setupBlinker(), and GUITextBox::setupText().
void GUIText::setString | ( | const std::string & | text | ) |
Definition at line 69 of file GUIText.cpp.
Referenced by GUIText(), GUITextBox::GUITextBox(), loadXMLSettings(), operator=(), and GUITextBox::setupText().
void GUIText::setString | ( | const char * | text | ) |
void GUIText::clear | ( | ) |
Definition at line 87 of file GUIText.cpp.
References size, text, and update.
Referenced by GUITextBox::setupText().
void GUIText::setSize | ( | int | x, | |
int | y | |||
) |
void GUIText::setSize | ( | const Tuple2i & | size | ) |
const Tuple2i & GUIText::getSize | ( | ) |
void GUIText::setColor | ( | float | r, | |
float | g, | |||
float | b | |||
) |
void GUIText::setColor | ( | const Tuple3f & | color | ) |
const Tuple3f & GUIText::getColor | ( | ) |
Definition at line 226 of file GUIText.cpp.
References color.
Referenced by GUITextBox::render(), and GUIButton::render().
int GUIText::getHeight | ( | ) |
Definition at line 178 of file GUIText.cpp.
References size.
Referenced by GUIButton::computeWindowBounds(), GUITextBox::getWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), GUICheckBox::getWindowBounds(), and GUILabel::render().
int GUIText::getWidth | ( | ) |
Definition at line 179 of file GUIText.cpp.
References size.
Referenced by GUIButton::computeWindowBounds(), GUISlider::getWindowBounds(), GUILabel::getWindowBounds(), and GUICheckBox::getWindowBounds().
void GUIText::setHeightScale | ( | float | hs | ) |
Definition at line 198 of file GUIText.cpp.
References scales.
Referenced by loadXMLSettings(), and setScales().
void GUIText::setWidthScale | ( | float | ws | ) |
Definition at line 202 of file GUIText.cpp.
References scales.
Referenced by loadXMLSettings(), and setScales().
void GUIText::setScales | ( | Tuple2f | scales | ) |
Definition at line 206 of file GUIText.cpp.
References setHeightScale(), and setWidthScale().
Referenced by GUITabbedPanel::addPanel(), and GUIComboBox::finalizeSize().
float GUIText::getHeightScale | ( | ) |
float GUIText::getWidthScale | ( | ) |
const Tuple2f & GUIText::getScales | ( | ) |
bool GUIText::needUpdating | ( | ) |
Definition at line 182 of file GUIText.cpp.
References update.
Referenced by computeDimensions(), and GUILabel::render().
void GUIText::forceUpdate | ( | bool | update | ) |
Definition at line 184 of file GUIText.cpp.
References update.
Referenced by GUITextBox::checkKeyboardEvents(), and computeDimensions().
void GUIText::setFontIndex | ( | int | fontIndex | ) |
Definition at line 99 of file GUIText.cpp.
References fontIndex.
Referenced by GUITabbedPanel::addPanel(), GUIComboBox::finalizeSize(), and loadXMLSettings().
int GUIText::getFontIndex | ( | ) |
Definition at line 94 of file GUIText.cpp.
References fontIndex.
Referenced by GUITextBox::setupBlinker(), and GUITextBox::setupText().
std::string GUIText::text [protected] |
Definition at line 363 of file glwx.h.
Referenced by clear(), computeDimensions(), getString(), operator=(), print(), printCenteredX(), printCenteredXY(), printCenteredY(), and setString().
Tuple2i GUIText::position [protected] |
Tuple2i GUIText::size [protected] |
Definition at line 364 of file glwx.h.
Referenced by clear(), computeDimensions(), getHeight(), getSize(), getWidth(), operator=(), printCenteredX(), printCenteredXY(), printCenteredY(), and setSize().
Tuple2f GUIText::scales [protected] |
Definition at line 366 of file glwx.h.
Referenced by computeDimensions(), getHeightScale(), getScales(), getWidthScale(), GUIText(), operator=(), print(), setHeightScale(), and setWidthScale().
Tuple3f GUIText::color [protected] |
Definition at line 367 of file glwx.h.
Referenced by getColor(), GUIText(), loadXMLSettings(), operator=(), print(), and setColor().
bool GUIText::update [protected] |
Definition at line 368 of file glwx.h.
Referenced by clear(), forceUpdate(), GUIText(), needUpdating(), operator=(), and setString().
int GUIText::fontIndex [protected] |
Definition at line 369 of file glwx.h.
Referenced by computeDimensions(), getFontIndex(), GUIText(), loadXMLSettings(), operator=(), print(), and setFontIndex().