#include <CUI_TextField.h>
Inheritance diagram for CUI_TextField:
Public Member Functions | |
CUI_TextField (CUI_UI *ui=NULL, float x=0, float y=0, float x2=1, float y2=1, CUI_Frame *parent=NULL, IUI_Shader *shader=NULL, IUI_Shader *cursor=NULL, CUI_CoordSys *coordsys=NULL, unsigned int width=20, bool activeupdate=false) | |
constructor | |
virtual | ~CUI_TextField () |
destructor | |
virtual bool | SetUI (CUI_UI *ui) |
Set UI - add the textbox and scrollbars to the ui. | |
virtual bool | ProcessKey (unsigned long key) |
Process a incoming key. | |
virtual bool | CallbackFunc (int id, int numparam, void *param) |
Wrapper to m_callbackFunc to check for NULL and present a simple interface. | |
virtual bool | SetWidth (unsigned int width) |
Set the text width. | |
virtual bool | SetActiveUpdate (bool activeupdate) |
Set the activeupdate option. | |
virtual char * | GetText (void) |
get the text from the box | |
virtual bool | SetText (const char *text) |
set the text for the box to display | |
virtual bool | SetStart (int startColumn=0, int startRow=0) |
set the starting column and row | |
virtual bool | SetFont (IUI_Font *font) |
set the font for the textbox | |
virtual bool | MoveCursor (int pos) |
Set cursor position. | |
virtual unsigned long | GetCursorPosition () |
Get cursor positoin. | |
Protected Attributes | |
CUI_EditableTextBox * | m_textBox |
pointer to the editable textbox | |
unsigned int | m_width |
number of characters to allow in the field | |
bool | m_activeUpdate |
update whenever the text changes? |
Uses a row-limited editable text box to accept text. On hitting enter (or optionally whenever the text changes), sends a message to the callback function with the text as a parameter.
Recognized flags:
[system]
UI_CLICKED
UI_HOVER
UI_SELECTED
UI_DISABLED
UI_INACTIVE
|
Wrapper to m_callbackFunc to check for NULL and present a simple interface.
Reimplemented from CUI_Frame. |
|
get the text from the box Returned memory belongs to the CUI_ScrollableTextBox |
|
Process a incoming key. Everything except 'enter' gets passed to the textbox Reimplemented from CUI_Frame. |