GClasses
|
This is a box in which the user can enter text. More...
#include <GWidgets.h>
Public Member Functions | |
GWidgetTextBox (GWidgetGroup *pParent, int x, int y, int w, int h) | |
virtual | ~GWidgetTextBox () |
virtual WidgetType | type () |
virtual void | draw (GImage *pCanvas, int x, int y) |
Draws this widget on pCanvas at (x,y) | |
const std::string & | text () |
Returns the current contents of this text box. | |
void | setText (const char *szText) |
Sets the text in this text box. | |
void | setText (int nValue) |
void | setText (double dValue) |
void | SetSelection (int anchorPos, int cursorPos) |
Sets the cursor position and selection. | |
virtual void | onChar (char c) |
virtual void | onSpecialKey (int key) |
void | setPassword () |
Sets whether or not it should display a bunch of '#'s instead of the current text. | |
void | setColor (unsigned int c) |
Protected Member Functions | |
virtual void | grab (int button, int x, int y) |
virtual void | release (int button) |
virtual void | onGetFocus () |
virtual void | onLoseFocus () |
virtual void | onMouseMove (int dx, int dy) |
Protected Attributes | |
std::string | m_text |
bool | m_bGotFocus |
bool | m_bPassword |
int | m_nAnchorPos |
int | m_nCursorPos |
int | m_nMouseDelta |
unsigned int | m_cBackground |
This is a box in which the user can enter text.
GClasses::GWidgetTextBox::GWidgetTextBox | ( | GWidgetGroup * | pParent, |
int | x, | ||
int | y, | ||
int | w, | ||
int | h | ||
) |
virtual GClasses::GWidgetTextBox::~GWidgetTextBox | ( | ) | [virtual] |
virtual void GClasses::GWidgetTextBox::draw | ( | GImage * | pCanvas, |
int | x, | ||
int | y | ||
) | [virtual] |
Draws this widget on pCanvas at (x,y)
Implements GClasses::GWidget.
virtual void GClasses::GWidgetTextBox::grab | ( | int | button, |
int | x, | ||
int | y | ||
) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::onChar | ( | char | c | ) | [virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::onGetFocus | ( | ) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::onLoseFocus | ( | ) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::onMouseMove | ( | int | dx, |
int | dy | ||
) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::onSpecialKey | ( | int | key | ) | [virtual] |
Reimplemented from GClasses::GWidgetAtomic.
virtual void GClasses::GWidgetTextBox::release | ( | int | button | ) | [protected, virtual] |
Reimplemented from GClasses::GWidgetAtomic.
void GClasses::GWidgetTextBox::setColor | ( | unsigned int | c | ) |
void GClasses::GWidgetTextBox::setPassword | ( | ) | [inline] |
Sets whether or not it should display a bunch of '#'s instead of the current text.
void GClasses::GWidgetTextBox::SetSelection | ( | int | anchorPos, |
int | cursorPos | ||
) |
Sets the cursor position and selection.
void GClasses::GWidgetTextBox::setText | ( | int | nValue | ) |
void GClasses::GWidgetTextBox::setText | ( | const char * | szText | ) |
Sets the text in this text box.
void GClasses::GWidgetTextBox::setText | ( | double | dValue | ) |
const std::string& GClasses::GWidgetTextBox::text | ( | ) | [inline] |
Returns the current contents of this text box.
virtual WidgetType GClasses::GWidgetTextBox::type | ( | ) | [inline, virtual] |
Implements GClasses::GWidget.
bool GClasses::GWidgetTextBox::m_bGotFocus [protected] |
bool GClasses::GWidgetTextBox::m_bPassword [protected] |
unsigned int GClasses::GWidgetTextBox::m_cBackground [protected] |
int GClasses::GWidgetTextBox::m_nAnchorPos [protected] |
int GClasses::GWidgetTextBox::m_nCursorPos [protected] |
int GClasses::GWidgetTextBox::m_nMouseDelta [protected] |
std::string GClasses::GWidgetTextBox::m_text [protected] |