#ifndef __Button__
#define __Button__

#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"


class GUI_DLL Button : public Window {
public:
    enum {
        NORMAL,
        HIGHLIGHTED,
        DEPRESSED
    };

    Button(Window* parent = 0, bool toggleButton = false);
    virtual ~Button();

    virtual void enable(bool enabled);

    bool isToggleButton();
    void setToggleButton(bool toggle);
    
    bool isToggled();
    void toggle(bool toggled);

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

    int  _state;
    bool _toggleButton, _toggled;

    Texture *_normalTexture,
            *_highlightedTexture,
            *_depressedTexture,
            *_disabledTexture;
};

#endif