summaryrefslogtreecommitdiff
path: root/plugingui/button.h
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2012-01-23 20:08:12 +0100
commitaf9c9091ed69394171485aa4c4814504f86f2004 (patch)
tree070b911dc8faed486c8e8829f0f41aec7d5b4350 /plugingui/button.h
parent5e4cb10f72ef69d73fbd2c1bc42465c9111a4c41 (diff)
Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending...
Diffstat (limited to 'plugingui/button.h')
-rw-r--r--plugingui/button.h20
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__*/