csInputLine Class Reference
[Input line]
The Input Line class implements a rectangular are where user can enter any text.
More...
#include <csiline.h>
Inheritance diagram for csInputLine:

Public Methods | |
csInputLine (csComponent *iParent, int iMaxLen=CSIL_DEFAULTLENGTH, csInputLineFrameStyle iFrameStyle=csifsThickRect) | |
Create input line object. | |
virtual void | SetText (const char *iText) |
Set text field. | |
virtual void | Draw () |
Draw the input line. | |
virtual bool | HandleEvent (iEvent &Event) |
Handle external events. | |
virtual void | SetState (int mask, bool enable) |
Override SetState method to redraw input line when it is switched. | |
void | SetSelection (int iStart, int iEnd) |
Select text from character iStart to character iEnd. | |
void | SetCursorPos (int NewPos, bool ExtendSel) |
Set new cursor position and extend selection if extendsel == true. | |
virtual void | SuggestSize (int &w, int &h) |
Report the minimal size of inputline. | |
virtual bool | IsValidPos (int NewPos) |
Check whenever new cursor position is valid. | |
virtual bool | IsValidChar (char iChar) |
Check whenever a character is valid for inserting into string. | |
virtual bool | IsValidString (const char *iText) |
Check if string after modification is valid. | |
void | DeleteSelection () |
Delete selection. | |
Protected Methods | |
int | GetCharX (int iNum) |
Query character X position within component. | |
void | SetTextExt (const char *iText) |
Set text, drop the selection and don't move the cursor. |
Detailed Description
The Input Line class implements a rectangular are where user can enter any text.The class has a method called IsValidChar() which can be overriden to implement specific needs, for example if you would like to implement a input line which accepts only numbers you can just override the method IsValidChar() and analyze entered characters. There is also a more general method called IsValidString() which checks the just-modified string for correctness. If method decides that string is incorrect, the changes are undone.
Definition at line 61 of file csiline.h.
Constructor & Destructor Documentation
|
Create input line object.
|
Member Function Documentation
|
Delete selection.
|
|
Draw the input line.
Reimplemented from csComponent. Reimplemented in csSpinBox. |
|
Query character X position within component.
|
|
Handle external events.
Reimplemented from csComponent. Reimplemented in csSpinBox. |
|
Check whenever a character is valid for inserting into string.
|
|
Check whenever new cursor position is valid.
|
|
Check if string after modification is valid.
|
|
Set new cursor position and extend selection if extendsel == true.
|
|
Select text from character iStart to character iEnd.
|
|
Override SetState method to redraw input line when it is switched.
Reimplemented from csComponent. |
|
Set text field.
Reimplemented from csComponent. Reimplemented in csSpinBox. |
|
Set text, drop the selection and don't move the cursor.
|
|
Report the minimal size of inputline.
Reimplemented from csComponent. |
The documentation for this class was generated from the following file:
- csws/csiline.h
Generated for Crystal Space by doxygen 1.2.18