Woopsi 1.0 GUI Framework for Nintendo DS Homebrew

- Main Page
- Classes
- Files

- File List

# radiobutton.h

    00001 #ifndef _RADIO_BUTTON_H_
    00002 #define _RADIO_BUTTON_H_
    00003
    00004 #include <nds.h>
    00005 #include "button.h"
    00006 #include "gadgetstyle.h"
    00007
    00008 namespace WoopsiUI {
    00009
    00010         class RadioButtonGroup;
    00011
    00019         class RadioButton : public Button {
    00020
    00021         public:
    00025                 enum RadioButtonState {
    00026                         RADIO_BUTTON_STATE_OFF = 0,
    00027                         RADIO_BUTTON_STATE_ON = 1,
    00028                         RADIO_BUTTON_STATE_MU = 2
    00029                 };
    00030
    00044                 RadioButton(s16 x, s16 y, u16 width, u16 height, GadgetStyle* style = NULL);
    00045
    00050                 virtual inline RadioButtonState getState() { return _state; }
    00051
    00056                 virtual void setState(RadioButtonState state);
    00057
    00058         protected:
    00059                 RadioButtonState _state;
    00067                 virtual void drawContents(GraphicsPort* port);
    00068
    00074                 virtual void onClick(s16 x, s16 y);
    00075
    00079                 virtual inline ~RadioButton() { };
    00080
    00084                 inline RadioButton(const RadioButton& radioButton) : Button(radioButton) { };
    00085         };
    00086 }
    00087
    00088 #endif