summaryrefslogtreecommitdiff
path: root/plugingui/checkbox.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/checkbox.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/checkbox.h')
-rw-r--r--plugingui/checkbox.h33
1 files changed, 32 insertions, 1 deletions
diff --git a/plugingui/checkbox.h b/plugingui/checkbox.h
index 4576a66..fd25081 100644
--- a/plugingui/checkbox.h
+++ b/plugingui/checkbox.h
@@ -2,7 +2,7 @@
/***************************************************************************
* checkbox.h
*
- * Sun Oct 9 13:02:01 CEST 2011
+ * Sat Nov 26 15:07:44 CET 2011
* Copyright 2011 Bent Bisballe Nyeng
* deva@aasimon.org
****************************************************************************/
@@ -26,4 +26,35 @@
*/
#ifndef __DRUMGIZMO_CHECKBOX_H__
#define __DRUMGIZMO_CHECKBOX_H__
+
+#include "widget.h"
+
+namespace GUI {
+
+class CheckBox : public Widget {
+public:
+ CheckBox(Widget *parent);
+
+ bool isFocusable() { return true; }
+
+ bool checked();
+ void setChecked(bool checked);
+
+ void registerClickHandler(void (*handler)(void *), void *ptr);
+
+ //protected:
+ virtual void clicked() {}
+
+ virtual void repaintEvent(RepaintEvent *e);
+ virtual void buttonEvent(ButtonEvent *e);
+
+private:
+ bool state;
+
+ void (*handler)(void *);
+ void *ptr;
+};
+
+};
+
#endif/*__DRUMGIZMO_CHECKBOX_H__*/