summaryrefslogtreecommitdiff
path: root/plugingui/window.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/window.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/window.h')
-rw-r--r--plugingui/window.h62
1 files changed, 59 insertions, 3 deletions
diff --git a/plugingui/window.h b/plugingui/window.h
index de36160..e1e49c7 100644
--- a/plugingui/window.h
+++ b/plugingui/window.h
@@ -29,11 +29,67 @@
#include "widget.h"
-class _Window : public Widget {
+#include "globalcontext.h"
+
+#include "pixelbuffer.h"
+
+namespace GUI {
+
+class Window : public Widget {
public:
- _Window(GlobalContext *gctx);
+ Window(GlobalContext *gctx);
+ ~Window();
+
+ void show();
+ void hide();
+
+ void resize(size_t width, size_t height);
+ void move(size_t x, size_t y);
+
+ size_t x();
+ size_t y();
+ size_t width();
+ size_t height();
+
+ void addChild(Widget *widget);
+
+ void repaintEvent(GUI::RepaintEvent *e);
+
+ void beginPaint();
+ void endPaint();
+
+ Window *window();
+
+ // handlers
+ virtual void redraw();
+ void resized(size_t w, size_t h);
+
+ Widget *keyboardFocus();
+ void setKeyboardFocus(Widget *widget);
+
+ Widget *buttonDownFocus();
+ void setButtonDownFocus(Widget *widget);
+
+ GlobalContext *gctx;
+
+ PixelBuffer wpixbuf;
+
+protected:
+ void updateBuffer();
+
+ size_t refcount;
+
+ Widget *_keyboardFocus;
+ Widget *_buttonDownFocus;
+
+#ifdef X11
+ ::Window xwindow;
+ GC gc;
+ XImage *buffer;
+#endif/*X11*/
+
+};
- void repaint(RepaintEvent *e);
};
#endif/*__DRUMGIZMO_WINDOW_H__*/