Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

CUI_TextField.h

Go to the documentation of this file.
00001 
00015 #ifndef CUI_TEXTFIELD_H
00016 #define CUI_TEXTFIELD_H
00017 
00018 #include "UI_Lib.h"
00019 #include "UI_types.h"
00020 #include "CUI_EditableTextBox.h"
00021 #include "CUI_Control.h"
00022 
00024 
00037 class GLGUI_ENTRY CUI_TextField : public CUI_Control
00038 {
00039 public:
00041         CUI_TextField(// frame
00042                                 CUI_UI *ui = NULL, float x = 0, float y = 0, float x2 = 1, float y2 = 1,
00043                                 CUI_Frame *parent = NULL, IUI_Shader *shader = NULL,
00044                                 IUI_Shader *cursor = NULL, CUI_CoordSys *coordsys = NULL,
00045                                 // textfield
00046                                 unsigned int width = 20, bool activeupdate = false
00047                                 );
00049         virtual ~CUI_TextField();
00050 
00052         virtual bool SetUI( CUI_UI *ui );
00053 
00055 
00056         virtual bool ProcessKey( unsigned long key );
00057 
00058         // Callback function prevent extraneous calls to global callback
00059         virtual bool CallbackFunc( int id, int numparam, void *param )
00060         { return true; }
00061 
00063         virtual bool SetWidth( unsigned int width );
00064 
00066         virtual bool SetActiveUpdate( bool activeupdate )
00067         { m_activeUpdate = activeupdate; return false; }
00068 
00070 
00072         virtual char *GetText( void )
00073         { return m_textBox->GetText(); }
00074 
00076         virtual bool SetText( const char *text )
00077         { return m_textBox->SetText( text ); }
00078 
00080         virtual bool SetStart( int startColumn = 0, int startRow = 0 )
00081         { return m_textBox->SetStart( startColumn, startRow ); }
00082 
00084         virtual bool SetFont( IUI_Font *font )
00085         { return m_textBox->SetFont( font ); }
00086 
00088         virtual bool MoveCursor( int pos )
00089         { return m_textBox->MoveCursor(pos); }
00090 
00092         virtual unsigned long GetCursorPosition( )
00093         { return m_textBox->GetCursorPosition(); }
00094 
00095 protected:
00097         CUI_EditableTextBox *m_textBox;
00098 
00100         unsigned int m_width;
00101 
00103         bool m_activeUpdate;
00104 
00105 };
00106 
00107 #endif

Generated on Mon Sep 29 23:07:02 2003 for glGUI by doxygen 1.3.4