GLWTextBox Class Reference

#include <GLWTextBox.h>

Inheritance diagram for GLWTextBox:

GLWidget MetaClass

List of all members.

Public Types

enum  TextFlags { eFlagPassword = 1 }

Public Member Functions

 GLWTextBox (float x=0.0f, float y=0.0f, float w=0.0f, const LangString &startText=LangString(), unsigned int flags=0)
virtual ~GLWTextBox ()
void setHandler (GLWTextBoxI *handler)
virtual void setParent (GLWPanel *parent)
virtual void draw ()
virtual void simulate (float frameTime)
virtual void keyDown (char *buffer, unsigned int keyState, KeyboardHistory::HistoryElement *history, int hisCount, bool &skipRest)
virtual void mouseDown (int button, float x, float y, bool &skipRest)
void setCurrent ()
void setAllowUnicode (bool allowUnicode)
std::stringgetText ()
LangStringgetLangString ()
void setText (const LangString &text)
void setMaxTextLen (unsigned int maxLen)
 REGISTER_CLASS_HEADER (GLWTextBox)

Protected Attributes

float ctime_
bool cursor_
bool current_
bool allowUnicode_
unsigned int maxTextLen_
unsigned int flags_
LangString text_
GLWTextBoxIhandler_


Detailed Description

Definition at line 33 of file GLWTextBox.h.


Member Enumeration Documentation

enum GLWTextBox::TextFlags

Enumerator:
eFlagPassword 

Definition at line 36 of file GLWTextBox.h.


Constructor & Destructor Documentation

GLWTextBox::GLWTextBox ( float  x = 0.0f,
float  y = 0.0f,
float  w = 0.0f,
const LangString startText = LangString(),
unsigned int  flags = 0 
)

Definition at line 30 of file GLWTextBox.cpp.

References setText().

GLWTextBox::~GLWTextBox (  )  [virtual]

Definition at line 40 of file GLWTextBox.cpp.


Member Function Documentation

void GLWTextBox::setHandler ( GLWTextBoxI handler  )  [inline]

Definition at line 47 of file GLWTextBox.h.

References handler_.

Referenced by NetworkSelectDialog::NetworkSelectDialog().

void GLWTextBox::setParent ( GLWPanel parent  )  [virtual]

Reimplemented from GLWidget.

Definition at line 169 of file GLWTextBox.cpp.

References setCurrent(), and GLWidget::setParent().

void GLWTextBox::draw (  )  [virtual]

Reimplemented from GLWidget.

Definition at line 55 of file GLWTextBox.cpp.

References current_, cursor_, GLWidget::draw(), GLWidget::drawShadedRoundBox(), GLFont2d::drawWidth(), eFlagPassword, flags_, GLWFont::getGameFont(), GL_LINE_LOOP, glBegin(), glEnd(), glLineWidth(), GLWidget::h_, GLWFont::instance(), LANG_STRING, text_, GLWidget::w_, GLWFont::widgetFontColor, GLWidget::x_, and GLWidget::y_.

void GLWTextBox::simulate ( float  frameTime  )  [virtual]

Reimplemented from GLWidget.

Definition at line 45 of file GLWTextBox.cpp.

References ctime_, and cursor_.

void GLWTextBox::keyDown ( char *  buffer,
unsigned int  keyState,
KeyboardHistory::HistoryElement history,
int  hisCount,
bool &  skipRest 
) [virtual]

Reimplemented from GLWidget.

Definition at line 77 of file GLWTextBox.cpp.

References allowUnicode_, current_, MetaClass::getMetaClassId(), GLWPanel::getWidgets(), handler_, GLWidget::id_, maxTextLen_, GLWidget::parent_, KeyboardHistory::HistoryElement::representedUnicode, KeyboardHistory::HistoryElement::sdlKey, text_, GLWTextBoxI::textChanged(), and GLWPanel::GLWPanelEntry::widget.

void GLWTextBox::mouseDown ( int  button,
float  x,
float  y,
bool &  skipRest 
) [virtual]

Reimplemented from GLWidget.

Definition at line 147 of file GLWTextBox.cpp.

References GLWidget::h_, GLWidget::inBox(), setCurrent(), GLWidget::w_, GLWidget::x_, and GLWidget::y_.

void GLWTextBox::setCurrent (  ) 

Definition at line 175 of file GLWTextBox.cpp.

References current_, MetaClass::getMetaClassId(), GLWPanel::getWidgets(), GLWidget::parent_, and GLWPanel::GLWPanelEntry::widget.

Referenced by AdminAuthDialog::display(), mouseDown(), NetworkSelectDialog::NetworkSelectDialog(), and setParent().

void GLWTextBox::setAllowUnicode ( bool  allowUnicode  )  [inline]

Definition at line 58 of file GLWTextBox.h.

References allowUnicode_.

Referenced by PlayerDialog::PlayerDialog().

std::string & GLWTextBox::getText (  ) 

Definition at line 140 of file GLWTextBox.cpp.

References LangStringUtil::convertFromLang(), and text_.

Referenced by SaveDialog::buttonDown(), PlayerDialog::buttonDown(), NetworkSelectDialog::buttonDown(), AuthDialog::buttonDown(), AdminAuthDialog::buttonDown(), and GLWOptionEntry::updateEntries().

LangString& GLWTextBox::getLangString (  )  [inline]

Definition at line 61 of file GLWTextBox.h.

References text_.

Referenced by PlayerDialog::buttonDown().

void GLWTextBox::setText ( const LangString text  ) 

Definition at line 156 of file GLWTextBox.cpp.

References allowUnicode_, handler_, GLWidget::id_, text_, and GLWTextBoxI::textChanged().

Referenced by SaveDialog::display(), NetworkSelectDialog::display(), GLWTextBox(), PlayerDialog::nextPlayer(), NetworkSelectDialog::rowSelectedGames(), and GLWOptionEntry::updateControls().

void GLWTextBox::setMaxTextLen ( unsigned int  maxLen  )  [inline]

Definition at line 63 of file GLWTextBox.h.

References maxTextLen_.

Referenced by PlayerDialog::PlayerDialog().

GLWTextBox::REGISTER_CLASS_HEADER ( GLWTextBox   ) 


Member Data Documentation

float GLWTextBox::ctime_ [protected]

Definition at line 68 of file GLWTextBox.h.

Referenced by simulate().

bool GLWTextBox::cursor_ [protected]

Definition at line 69 of file GLWTextBox.h.

Referenced by draw(), and simulate().

bool GLWTextBox::current_ [protected]

Definition at line 69 of file GLWTextBox.h.

Referenced by draw(), keyDown(), and setCurrent().

bool GLWTextBox::allowUnicode_ [protected]

Definition at line 70 of file GLWTextBox.h.

Referenced by keyDown(), setAllowUnicode(), and setText().

unsigned int GLWTextBox::maxTextLen_ [protected]

Definition at line 71 of file GLWTextBox.h.

Referenced by keyDown(), and setMaxTextLen().

unsigned int GLWTextBox::flags_ [protected]

Definition at line 71 of file GLWTextBox.h.

Referenced by draw().

LangString GLWTextBox::text_ [protected]

Definition at line 72 of file GLWTextBox.h.

Referenced by draw(), getLangString(), getText(), keyDown(), and setText().

GLWTextBoxI* GLWTextBox::handler_ [protected]

Definition at line 73 of file GLWTextBox.h.

Referenced by keyDown(), setHandler(), and setText().


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