X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=otk%2Fwidget.hh;h=7d183c28963571b2e69cb1e48049275d27505388;hb=f329167e4cc2715bb3baaac249433c64cb46d22d;hp=7f2d926c4cf579941a44c67e941913bc50c5c81c;hpb=c97915f445017d36667a6ad32767fa41d14d23b1;p=chaz%2Fopenbox diff --git a/otk/widget.hh b/otk/widget.hh index 7f2d926c..7d183c28 100644 --- a/otk/widget.hh +++ b/otk/widget.hh @@ -4,10 +4,11 @@ #include "rect.hh" #include "point.hh" -#include "texture.hh" +#include "rendertexture.hh" #include "style.hh" #include "eventdispatcher.hh" #include "display.hh" +#include "surface.hh" extern "C" { #include @@ -76,8 +77,8 @@ public: bool grabKeyboard(void); void ungrabKeyboard(void); - inline Texture *texture(void) const { return _texture; } - virtual void setTexture(Texture *texture) + inline RenderTexture *texture(void) const { return _texture; } + virtual void setTexture(RenderTexture *texture) { _texture = texture; _dirty = true; } inline const Color *borderColor(void) const { return _bcolor; } @@ -132,6 +133,7 @@ protected: virtual void adjustVert(void); virtual void internalResize(int width, int height); virtual void render(void); + virtual void renderForeground(void) {} // for overriding Window _window; @@ -152,7 +154,7 @@ protected: bool _stretchable_vert; bool _stretchable_horz; - Texture *_texture; + RenderTexture *_texture; Pixmap _bg_pixmap; unsigned int _bg_pixel; @@ -165,6 +167,8 @@ protected: bool _fixed_width; bool _fixed_height; + Surface _surface; + EventDispatcher *_event_dispatcher; };