#include <TextField.h>
Inherits Widget.
Inherited by NumericField.
Inheritance diagram for TextField:


Public Methods | |
| TextField (const string t="") | |
| Default constructor. More... | |
| const string & | getText () |
| Returns the currently displayed text. | |
| void | setText (const string &t) |
| Set the text value. More... | |
| virtual void | checkInput () |
| Checkes the current input. More... | |
| void | refresh () |
| Repaints the region. More... | |
| bool | handleEvent (Event &evnt) |
| Handle window-system events. More... | |
| void | parseSymbol (Token &t, ObjectFile &file) |
| Reads a single parameter sections inside the body of the object description. More... | |
| void | writeParams (ostream &stream) |
| Writes all parameter sections inside the body of the object description. More... | |
Protected Methods | |
| void | cursorLeft () |
| Moved the cursor to the left. | |
| void | cursorRight () |
| Moved the cursor to the right. | |
| int | widgetSize () |
| Returns the widget size (in characters). | |
| void | createSymbols () |
| Creates all parameter symbols that are used within the body of the object description. | |
Protected Attributes | |
| string | text |
| Current string value. | |
| int | start |
| First character that is displayed. | |
| int | cursor |
| Cursor position. | |
Used to edit a string value.
Events:
PARAM ::= TEXT_VALUE
TEXT_VALUE :== "text" <string>
|
|
Default constructor. Constructs a new TextField with text value 't'.
|
|
|
Checkes the current input. Called when the text value is modified. This method is to be used by sub-classes of TextField to verify the input.
Reimplemented in NumericField. |
|
|
Handle window-system events. This method handles keyboard or mouse event from the window system. Window events are handled top down, events that are not consumed are passed to child regions that are willing to accept the event.
Reimplemented from Region. |
|
||||||||||||
|
Reads a single parameter sections inside the body of the object description. Each object has a set of parameter names associated with it, called symbols. Symbols are declared inside the createSymbols method. The method parseSymbol expects the Token t to be such a symbol and reads the corresponding parameters. Unknown symbols are passed to its super class.
Reimplemented from Widget. Reimplemented in NumericField. |
|
|
Repaints the region. This method is called whenever the screen is repainted. The repaint method uses OpenGL calls to render the region. Currently it is assumed that regions are refreshed automatically so that no refresh notification has to be done when the region changes state i.e. no refresh has to be forced by the region. Region rendering is done back to front.
Reimplemented from Region. |
|
|
Set the text value. The new text value is stored and the cursor is positioned at the end. |
|
|
Writes all parameter sections inside the body of the object description. This method writes all object parameters to ostream. Inhereting classes will always call super::writeParams().
Reimplemented from Widget. Reimplemented in NumericField. |