From af9c9091ed69394171485aa4c4814504f86f2004 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Mon, 23 Jan 2012 20:08:12 +0100 Subject: Simple image blit. New slider class. New filenamelineedit. New pixelbuffer used for drawing everything but the root window - with alpha blending... --- plugingui/window.h | 62 +++++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 59 insertions(+), 3 deletions(-) (limited to 'plugingui/window.h') 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__*/ -- cgit v1.2.3