GLWLabel Class Reference

#include <GLWLabel.h>

Inheritance diagram for GLWLabel:

GLWidget MetaClass

List of all members.

Public Types

enum  LabelFlags { eMultiLine = 1 }

Public Member Functions

 GLWLabel (float x=0.0f, float y=0.0f, const LangString &labelText=LangString(), float size=14.0f, unsigned int flags=0)
virtual ~GLWLabel ()
virtual float getW ()
virtual float getH ()
virtual void draw ()
bool getEmpty ()
void setText (const LangString &text)
void setColor (const Vector &color)
void setSize (float size)
void calcWidth ()
 REGISTER_CLASS_HEADER (GLWLabel)

Protected Attributes

unsigned int flags_
LangString labelText_
std::vector< LangStringlabelTexts_
Vector color_
float size_


Detailed Description

Definition at line 30 of file GLWLabel.h.


Member Enumeration Documentation

enum GLWLabel::LabelFlags

Enumerator:
eMultiLine 

Definition at line 33 of file GLWLabel.h.


Constructor & Destructor Documentation

GLWLabel::GLWLabel ( float  x = 0.0f,
float  y = 0.0f,
const LangString labelText = LangString(),
float  size = 14.0f,
unsigned int  flags = 0 
)

Definition at line 26 of file GLWLabel.cpp.

References setText(), and GLWidget::tooltipTransparent_.

GLWLabel::~GLWLabel (  )  [virtual]

Definition at line 35 of file GLWLabel.cpp.


Member Function Documentation

virtual float GLWLabel::getW (  )  [inline, virtual]

Reimplemented from GLWidget.

Definition at line 44 of file GLWLabel.h.

References calcWidth(), and GLWidget::getW().

Referenced by BuyAccessoryDialog::addAccessory(), GLWTextButton::draw(), GLWTab::getTw(), and GLWCheckBoxText::getW().

virtual float GLWLabel::getH (  )  [inline, virtual]

Reimplemented from GLWidget.

Definition at line 45 of file GLWLabel.h.

References calcWidth(), and GLWidget::getH().

void GLWLabel::draw (  )  [virtual]

Reimplemented from GLWidget.

Definition at line 98 of file GLWLabel.cpp.

References calcWidth(), color_, GLFont2d::draw(), GLWidget::draw(), eMultiLine, flags_, GLWFont::getGameFont(), glColor3f(), GLWFont::instance(), int(), labelText_, labelTexts_, size_, GLWidget::x_, and GLWidget::y_.

Referenced by GLWTextButton::draw(), GLWCheckBoxText::draw(), GLWTab::drawNonSurround(), and GLWTab::drawSurround().

bool GLWLabel::getEmpty (  )  [inline]

Definition at line 48 of file GLWLabel.h.

References labelText_, and labelTexts_.

Referenced by GLWTextButton::getEmpty().

void GLWLabel::setText ( const LangString text  ) 

Definition at line 51 of file GLWLabel.cpp.

References eMultiLine, flags_, labelText_, labelTexts_, and GLWidget::w_.

Referenced by GLWLabel(), LogDialog::setServerName(), GLWTextButton::setText(), MsgBoxDialog::show(), and SkipAllDialog::simulate().

void GLWLabel::setColor ( const Vector color  ) 

Definition at line 40 of file GLWLabel.cpp.

References color_.

Referenced by BuyAccessoryDialog::addAccessory(), and GLWTextButton::draw().

void GLWLabel::setSize ( float  size  ) 

Definition at line 45 of file GLWLabel.cpp.

References size_, and GLWidget::w_.

Referenced by BuyAccessoryDialog::BuyAccessoryDialog(), and GLWTab::GLWTab().

void GLWLabel::calcWidth (  ) 

Definition at line 76 of file GLWLabel.cpp.

References eMultiLine, flags_, GLWFont::getGameFont(), GLFont2d::getWidth(), GLWidget::h_, GLWFont::instance(), int(), labelText_, labelTexts_, MAX, size_, and GLWidget::w_.

Referenced by GLWTextButton::draw(), draw(), getH(), getW(), and MsgBoxDialog::show().

GLWLabel::REGISTER_CLASS_HEADER ( GLWLabel   ) 


Member Data Documentation

unsigned int GLWLabel::flags_ [protected]

Definition at line 58 of file GLWLabel.h.

Referenced by calcWidth(), draw(), and setText().

LangString GLWLabel::labelText_ [protected]

Definition at line 59 of file GLWLabel.h.

Referenced by calcWidth(), draw(), getEmpty(), and setText().

std::vector<LangString> GLWLabel::labelTexts_ [protected]

Definition at line 60 of file GLWLabel.h.

Referenced by calcWidth(), draw(), getEmpty(), and setText().

Vector GLWLabel::color_ [protected]

Definition at line 61 of file GLWLabel.h.

Referenced by draw(), and setColor().

float GLWLabel::size_ [protected]

Definition at line 62 of file GLWLabel.h.

Referenced by calcWidth(), draw(), and setSize().


The documentation for this class was generated from the following files:
Generated on Mon Feb 16 15:15:02 2009 for Scorched3D by  doxygen 1.5.3