00001 #ifndef _CHECKBOX_H_ 00002 #define _CHECKBOX_H_ 00003 00004 #include <nds.h> 00005 #include "button.h" 00006 00007 namespace WoopsiUI { 00008 00014 class CheckBox : public Button { 00015 00016 public: 00020 enum CheckBoxState { 00021 CHECK_BOX_STATE_OFF = 0, 00022 CHECK_BOX_STATE_ON = 1, 00023 CHECK_BOX_STATE_MU = 2 00024 }; 00025 00034 CheckBox(s16 x, s16 y, u16 width, u16 height, FontBase* font = NULL); 00035 00042 virtual void draw(Rect clipRect); 00043 00050 virtual bool click(s16 x, s16 y); 00051 00056 virtual inline const CheckBoxState getState() const { return _state; }; 00057 00062 virtual void setState(CheckBoxState state); 00063 00064 protected: 00065 CheckBoxState _state; 00070 virtual inline ~CheckBox() { }; 00071 00075 inline CheckBox(const CheckBox& checkBox) : Button(checkBox) { }; 00076 }; 00077 } 00078 00079 #endif