Woopsi 1.3
Nintendo DS Gui Framework
libwoopsi/include/radiobuttongroup.h
00001 #ifndef _RADIO_BUTTON_GROUP_H_
00002 #define _RADIO_BUTTON_GROUP_H_
00003 
00004 #include <nds.h>
00005 #include "gadget.h"
00006 #include "gadgetstyle.h"
00007 #include "gadgeteventhandler.h"
00008 
00009 namespace WoopsiUI {
00010 
00011     class RadioButton;
00012 
00019     class RadioButtonGroup : public Gadget, public GadgetEventHandler  {
00020 
00021     public:
00022 
00033         RadioButtonGroup(s16 x, s16 y, GadgetStyle* style = NULL);
00034 
00046         RadioButton* newRadioButton(s16 x, s16 y, u16 width, u16 height);
00047 
00052         virtual const RadioButton* getSelectedGadget() const;
00053 
00058         virtual const s32 getSelectedIndex() const;
00059 
00064         virtual void setSelectedGadget(RadioButton* gadget);
00065 
00070         virtual void setSelectedIndex(s32 index);
00071 
00079         virtual void getPreferredDimensions(Rect& rect) const;
00080 
00085         virtual void handleClickEvent(const GadgetEventArgs& e);
00086 
00091         virtual void handleDoubleClickEvent(const GadgetEventArgs& e);
00092 
00098         virtual void handleReleaseEvent(const GadgetEventArgs& e);
00099 
00105         virtual void handleReleaseOutsideEvent(const GadgetEventArgs& e);
00106 
00107     protected:
00108         RadioButton* _selectedGadget;       
00117         virtual void drawContents(GraphicsPort* port);
00118 
00122         virtual ~RadioButtonGroup() { };
00123 
00127         inline RadioButtonGroup(const RadioButtonGroup& radioButtonGroup) : Gadget(radioButtonGroup) { };
00128     };
00129 }
00130 
00131 #endif
 All Classes Functions Variables Enumerations Enumerator