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

CUI_RadioGroup.h

Go to the documentation of this file.
00001 
00015 #ifndef CUI_RADIOGROUP_H
00016 #define CUI_RADIOGROUP_H
00017 
00018 
00019 #include "UI_Lib.h"
00020 #include "UI_types.h"
00021 #include "CUI_MultipleStateButton.h"
00022 #include "CUI_Control.h"
00023 #include "CUI_RadioItem.h"
00024 
00026 
00041 class GLGUI_ENTRY CUI_RadioGroup : public CUI_Control
00042 {
00043 public:
00045         CUI_RadioGroup(// frame
00046                                         CUI_UI *ui = NULL, float x = 0, float y = 0, float x2 = 1, float y2 = 1,
00047                                         CUI_Frame *parent = NULL, IUI_Shader *shader = NULL,
00048                                         IUI_Shader *cursor = NULL, CUI_CoordSys *coordsys = NULL,
00049                                         // radio group
00050                                         int columns = 1, IUI_Font *font = NULL,
00051                                         IUI_Shader *onShader = NULL, IUI_Shader *offShader = NULL,
00052                                         IUI_Shader *onHoverShader = NULL, IUI_Shader *offHoverShader = NULL
00053                                         );
00054 
00056         virtual ~CUI_RadioGroup();
00057 
00059         virtual bool AddItem( char *text = NULL, unsigned int itemID = 0, IUI_Shader *icon = NULL );
00060 
00062         virtual bool AddItem( CUI_RadioItem* item );
00063 
00065         virtual bool RemoveItem( unsigned int itemID );
00066 
00068         virtual bool EnableItem( unsigned int itemID, bool enable = true );
00069 
00071         virtual bool UpdateView( );
00072 
00074         virtual bool ProcessKey( unsigned long key );
00075 
00077 
00080         virtual bool CallbackFunc( int id, int numparam, void *param );
00081 
00083         virtual bool SetButtonShaders( IUI_Shader *onshader = NULL, IUI_Shader *offshader = NULL,
00084                                                                         IUI_Shader *onhover = NULL, IUI_Shader *offhover = NULL );
00086         virtual bool SetColumns( unsigned int columns )
00087         { m_columns = columns; return false; }
00088 
00089 protected:
00090 
00092         virtual CUI_RadioItem *FindItem( unsigned int itemID );
00093 
00095         virtual bool SelectNext();
00096 
00098         virtual bool SelectPrevious();
00099 
00101         unsigned int m_columns;
00102 
00104         IUI_Shader *m_onShader;
00105 
00107         IUI_Shader *m_onHoverShader;
00108 
00110         IUI_Shader *m_offShader;
00111 
00113         IUI_Shader *m_offHoverShader;
00114 
00116         typedef std::list<CUI_RadioItem*> RADIOITEMLIST;
00117 
00119         RADIOITEMLIST m_itemList;
00120 
00122         CUI_RadioItem *m_selected;
00123 
00125         unsigned int m_activeItems;
00126 
00127 };
00128 
00129 #endif

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