#ifndef __RadioButton__
#define __RadioButton__

#ifndef GUI_DLL 
    #ifdef GUI_BUILD
	    #define GUI_DLL __declspec(dllexport)
    #else
	    #define GUI_DLL __declspec(dllimport)
        #pragma comment(lib, "WindowManager.lib")
    #endif
#endif


#include "Window.h"
#include "Label.h"

class GUI_DLL RadioButton;
class GUI_DLL RadioGroup;


class GUI_DLL RadioGroup : public Label {
public:
    RadioGroup(Window* parent = 0);
    virtual ~RadioGroup();

    RadioButton* getSelected();
    void select(RadioButton* radioButton);

protected:
    RadioButton* _selected;
};


class GUI_DLL RadioButton : public Window {
public:
    RadioButton(RadioGroup* radioGroup, Window* parent = 0);
    virtual ~RadioButton();

    virtual void setSize(Size& size);

    bool isSelected();
    void select(bool selected);

protected:
    void onMouseEnter(Event& event);
    void onMouseLeave(Event& event);
    void onMouseLeftDown(Event& event);
    void onMouseLeftUp(Event& event);

    class _RadioButton;
    _RadioButton* _radioButton;

    RadioGroup* _radioGroup;
};

#endif