GUIText Class Reference

#include <glwx.h>

List of all members.

Public Member Functions

 GUIText (const std::string &text="")
 GUIText (const GUIText &text)
GUITextoperator= (const GUIText &text)
GUITextoperator= (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


Detailed Description

Definition at line 314 of file glwx.h.


Constructor & Destructor Documentation

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  ) 

Definition at line 13 of file GUIText.cpp.

References operator=().


Member Function Documentation

GUIText & GUIText::operator= ( const GUIText text  ) 

Definition at line 18 of file GUIText.cpp.

References color, fontIndex, scales, size, text, and update.

Referenced by GUIText().

GUIText & GUIText::operator= ( const std::string &  text  ) 

Definition at line 32 of file GUIText.cpp.

References setString().

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.

References text, and update.

Referenced by GUIText(), GUITextBox::GUITextBox(), loadXMLSettings(), operator=(), and GUITextBox::setupText().

void GUIText::setString ( const char *  text  ) 

Definition at line 78 of file GUIText.cpp.

References text, and update.

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 
)

Definition at line 176 of file GUIText.cpp.

References size.

void GUIText::setSize ( const Tuple2i &  size  ) 

Definition at line 175 of file GUIText.cpp.

References size.

const Tuple2i & GUIText::getSize (  ) 

Definition at line 181 of file GUIText.cpp.

References size.

void GUIText::setColor ( float  r,
float  g,
float  b 
)

Definition at line 187 of file GUIText.cpp.

References color.

Referenced by setColor().

void GUIText::setColor ( const Tuple3f &  color  ) 

Definition at line 185 of file GUIText.cpp.

References setColor().

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 (  ) 

Definition at line 212 of file GUIText.cpp.

References scales.

float GUIText::getWidthScale (  ) 

Definition at line 217 of file GUIText.cpp.

References scales.

const Tuple2f & GUIText::getScales (  ) 

Definition at line 222 of file GUIText.cpp.

References scales.

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().


Member Data Documentation

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]

Definition at line 364 of file glwx.h.

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().


The documentation for this class was generated from the following files:
Generated on Wed Dec 5 20:32:03 2007 for GLWX by  doxygen 1.5.3