A text field.
More...
#include <textfield.h>
A text field.
Definition at line 71 of file textfield.h.
◆ TextField()
TextField::TextField |
( |
const std::string & |
text = std::string() , |
|
|
bool |
loseFocusOnTab = true |
|
) |
| |
Constructor, initializes the text field with the given string.
Definition at line 38 of file textfield.cpp.
◆ autoComplete()
void TextField::autoComplete |
( |
| ) |
|
|
private |
◆ draw()
void TextField::draw |
( |
gcn::Graphics * |
graphics | ) |
|
|
override |
◆ drawCaret()
void TextField::drawCaret |
( |
gcn::Graphics * |
graphics, |
|
|
int |
x |
|
) |
| |
|
overrideprotected |
◆ drawFrame()
void TextField::drawFrame |
( |
gcn::Graphics * |
graphics | ) |
|
|
override |
Draws the background and border.
Definition at line 72 of file textfield.cpp.
◆ getAutoComplete()
◆ getHistory()
◆ getValue()
int TextField::getValue |
( |
| ) |
const |
Return the value for a numeric field.
Definition at line 100 of file textfield.cpp.
◆ handlePaste()
void TextField::handlePaste |
( |
| ) |
|
|
private |
◆ keyPressed()
void TextField::keyPressed |
( |
gcn::KeyEvent & |
keyEvent | ) |
|
|
override |
◆ setAutoComplete()
Sets the TextField's source of autocomplete.
Passing null will disable autocomplete.
Definition at line 133 of file textfield.h.
◆ setHistory()
◆ setMaximum()
void TextField::setMaximum |
( |
int |
max | ) |
|
|
inline |
Set the maximum value for a range.
Definition at line 122 of file textfield.h.
◆ setMinimum()
void TextField::setMinimum |
( |
int |
min | ) |
|
|
inline |
Set the minimum value for a range.
Definition at line 117 of file textfield.h.
◆ setNumeric()
void TextField::setNumeric |
( |
bool |
numeric | ) |
|
Determine whether the field should be numeric or not.
Definition at line 83 of file textfield.cpp.
◆ setRange()
void TextField::setRange |
( |
int |
min, |
|
|
int |
max |
|
) |
| |
|
inline |
Set the range on the field if it is numeric.
Definition at line 98 of file textfield.h.
◆ textInput()
void TextField::textInput |
( |
const TextInput & |
textInput | ) |
|
Handle text input (should possibly be new event in Guichan).
Definition at line 247 of file textfield.cpp.
◆ mAutoComplete
◆ mHistory
◆ mLoseFocusOnTab
bool TextField::mLoseFocusOnTab |
|
private |
◆ mMaximum
int TextField::mMaximum = 0 |
|
private |
◆ mMinimum
int TextField::mMinimum = 0 |
|
private |
◆ mNumeric
bool TextField::mNumeric = false |
|
private |
◆ mPadding
int TextField::mPadding = 1 |
|
private |
The documentation for this class was generated from the following files: