|
wavelength 1.0.0
|
Line of text the keyboard edits, with a cursor and an overwrite mode. More...
#include <editfield.h>
Public Types | |
| enum | KeyResult { kKeyCancel = -2 , kKeySubmit = -1 , kKeyIgnored = 0 , kKeyChanged = 1 } |
| The values of HandleKey(). More... | |
Public Member Functions | |
| EditField (int nMaxLength) | |
| Construct an empty field. | |
| ~EditField () | |
| Release the text. | |
| int | HandleKey (KeyboardKeyMsg *pMsg) |
| Apply a key to the text and the cursor. | |
| const char * | GetText () |
| Report the text. | |
| void | Clear () |
| Empty the text to a single space and move the cursor to the start. | |
| int | GetCursor () const |
Line of text the keyboard edits, with a cursor and an overwrite mode.
The class is not polymorphic and emits no RTTI, and its title is inferred. The object is 0x1c bytes. Only the members the chat calls are declared.
| enum EditField::KeyResult |
The values of HandleKey().
| Enumerator | |
|---|---|
| kKeyCancel | The key cancels the edit. |
| kKeySubmit | The key submits the text. |
| kKeyIgnored | The key does not change the text. |
| kKeyChanged | The key changes the text. |
|
explicit |
Construct an empty field.
| nMaxLength | The most characters the field takes. |
| EditField::~EditField | ( | ) |
Release the text.
| int EditField::HandleKey | ( | KeyboardKeyMsg * | pMsg | ) |
Apply a key to the text and the cursor.
| pMsg | The key. |
| const char * EditField::GetText | ( | ) |
Report the text.
| void EditField::Clear | ( | ) |
Empty the text to a single space and move the cursor to the start.
|
inline |