Return to Index
TextInput
Parent class: Widget
The TextInput class provides a base class for single line
text manipulation widgets.  It cannot be instantiated on its
own, but its direct descendants TextEntry and PasswordEntry
are frequently used in graphical applications.
Object Events:
| Changed | An event generated when the text changes. | 
| Activated | An event generated when the Enter key is pressed in the entry. | 
| void  TextInput::setText | 
| void  TextInput::setText(const String&  pText); 
 Sets the text in the entry.
 | 
| | Parameters: |  | const String& | pText | The text string. | 
 | 
| String  TextInput::getText | 
| String  TextInput::getText(); 
 Returns the text in the entry.
 | 
| void  TextInput::clear | 
| void  TextInput::clear(); 
 Removes all the text.
 | 
| int  TextInput::getLength | 
| int  TextInput::getLength(); 
 Returns the length of the text stored in the entry.
 | 
| void  TextInput::setCursorPos | 
| void  TextInput::setCursorPos(int  pPos); 
 Changes the current insertion position.
 | 
| | Parameters: |  | int | pPos | The new position. | 
 | 
| int  TextInput::getCursorPos | 
| int  TextInput::getCursorPos(); 
 Returns the current insertion position.
 | 
| void  TextInput::setMaxLength | 
| void  TextInput::setMaxLength(int  l); 
 Changes the maximum length of an accepted string in the entry.
 | 
| | Parameters: |  | int | l | The new maximum length. | 
 | 
| int  TextInput::getMaxLength | 
| int  TextInput::getMaxLength(); 
 Returns the maximum length of strings accepted.
 | 
| void  TextInput::select | 
| void  TextInput::select(int  pStart, int  pEnd); 
 Selects the text in the specified range.
 | 
| | Parameters: |  | int | pStart | The starting position. |  | int | pEnd | The ending position. | 
 | 
| void  TextInput::selectAll | 
| void  TextInput::selectAll(); 
 Selects all of the text in the editor.
 | 
| void  TextInput::setEditable | 
| void  TextInput::setEditable(bool  pEditable); 
 Changes whether the text in the entry is editable.
 | 
| | Parameters: |  | bool | pEditable | To enable editing or not. | 
 | 
| bool  TextInput::isEditable | 
| bool  TextInput::isEditable(); 
 Returns whether the entry is user-editable.
 | 
| void  TextInput::setValue | 
| void  TextInput::setValue(int  v); 
 Sets the text to the integer numeric value.
 | 
| | Parameters: |  | int | v | The value. | 
 | 
| void  TextInput::setValue | 
| void  TextInput::setValue(double  v, int  d); 
 Sets the text to the double numeric value.
 | 
| | Parameters: |  | double | v | The value. |  | int | d | Number of decimal places. Defaults to 3 | 
 | 
| int  TextInput::getIntValue(); | 
| int  TextInput::getIntValue();(); 
 Gets the integer value of the text.
 | 
| double  TextInput::getFloatValue(); | 
| double  TextInput::getFloatValue();(); 
 Gets the double value of the text.
 | 
Generated automatically by docgen 0.0.1
© 2003 Aron Dobos