#include <textfield.h>

Definition at line 41 of file textfield.h.
Public Member Functions | |
| TextField (const std::string &text="") | |
| Constructor, initializes the text field with the given string. | |
| ~TextField () | |
| Destructor. | |
| virtual void | draw (gcn::Graphics *graphics) |
| Draws the text field. | |
| void | drawFrame (gcn::Graphics *graphics) |
| Draws the background and border. | |
| void | setNumeric (bool numeric) |
| Determine whether the field should be numeric or not. | |
| void | setRange (int min, int max) |
| Set the range on the field if it is numeric. | |
| void | keyPressed (gcn::KeyEvent &keyEvent) |
| Processes one keypress. | |
| void | setMinimum (int min) |
| Set the minimum value for a range. | |
| void | setMaximum (int max) |
| Set the maximum value for a range. | |
| int | getValue () const |
| Return the value for a numeric field. | |
| void | addListener (TextFieldListener *listener) |
| Add a listener. | |
Private Attributes | |
| bool | mNumeric |
| int | mMinimum |
| int | mMaximum |
| TextFieldListener * | mListener |
Static Private Attributes | |
| static int | instances = 0 |
| static float | mAlpha = 1.0 |
| static ImageRect | skin |
| TextField::TextField | ( | const std::string & | text = "" |
) |
Constructor, initializes the text field with the given string.
Definition at line 43 of file textfield.cpp.
| TextField::~TextField | ( | ) |
| void TextField::draw | ( | gcn::Graphics * | graphics | ) | [virtual] |
| void TextField::drawFrame | ( | gcn::Graphics * | graphics | ) |
| void TextField::setNumeric | ( | bool | numeric | ) |
| void TextField::setRange | ( | int | min, | |
| int | max | |||
| ) | [inline] |
Set the range on the field if it is numeric.
Reimplemented in IntTextField.
Definition at line 72 of file textfield.h.
| void TextField::keyPressed | ( | gcn::KeyEvent & | keyEvent | ) |
Processes one keypress.
Reimplemented in IntTextField.
Definition at line 149 of file textfield.cpp.
| void TextField::setMinimum | ( | int | min | ) | [inline] |
| void TextField::setMaximum | ( | int | max | ) | [inline] |
| int TextField::getValue | ( | ) | const |
| void TextField::addListener | ( | TextFieldListener * | listener | ) | [inline] |
int TextField::instances = 0 [static, private] |
Definition at line 100 of file textfield.h.
float TextField::mAlpha = 1.0 [static, private] |
Definition at line 101 of file textfield.h.
ImageRect TextField::skin [static, private] |
Definition at line 102 of file textfield.h.
bool TextField::mNumeric [private] |
Definition at line 103 of file textfield.h.
int TextField::mMinimum [private] |
Definition at line 104 of file textfield.h.
int TextField::mMaximum [private] |
Definition at line 105 of file textfield.h.
TextFieldListener* TextField::mListener [private] |
Definition at line 106 of file textfield.h.
1.5.5