diff options
Diffstat (limited to 'plugingui/button.h')
-rw-r--r-- | plugingui/button.h | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/plugingui/button.h b/plugingui/button.h index f050f3c..8f27d71 100644 --- a/plugingui/button.h +++ b/plugingui/button.h @@ -30,19 +30,24 @@ #include <string> #include "widget.h" -#include "globalcontext.h" + +namespace GUI { class Button : public Widget { public: - Button(GlobalContext *gctx, Widget *parent); + Button(Widget *parent); + + bool isFocusable() { return true; } void setText(std::string text); -protected: + void registerClickHandler(void (*handler)(void *), void *ptr); + + //protected: virtual void clicked() {} - virtual void repaint(RepaintEvent *e); - virtual void button(ButtonEvent *e); + virtual void repaintEvent(RepaintEvent *e); + virtual void buttonEvent(ButtonEvent *e); private: typedef enum { @@ -52,6 +57,11 @@ private: std::string text; state_t state; + + void (*handler)(void *); + void *ptr; +}; + }; #endif/*__DRUMGIZMO_BUTTON_H__*/ |