00001 #ifndef _CHECKBOX_H_ 00002 #define _CHECKBOX_H_ 00003 00004 #include <nds.h> 00005 #include "button.h" 00006 #include "gadgetstyle.h" 00007 00008 namespace WoopsiUI { 00009 00015 class CheckBox : public Button { 00016 00017 public: 00021 enum CheckBoxState { 00022 CHECK_BOX_STATE_OFF = 0, 00023 CHECK_BOX_STATE_ON = 1, 00024 CHECK_BOX_STATE_MU = 2 00025 }; 00026 00038 CheckBox(s16 x, s16 y, u16 width, u16 height, GadgetStyle* style = NULL); 00039 00044 virtual inline const CheckBoxState getState() const { return _state; }; 00045 00050 virtual void setState(CheckBoxState state); 00051 00052 protected: 00053 CheckBoxState _state; 00061 virtual void drawContents(GraphicsPort* port); 00062 00069 virtual void drawBorder(GraphicsPort* port); 00070 00076 virtual void onClick(s16 x, s16 y); 00077 00081 virtual inline ~CheckBox() { }; 00082 00086 inline CheckBox(const CheckBox& checkBox) : Button(checkBox) { }; 00087 }; 00088 } 00089 00090 #endif