]> Dogcows Code - chaz/openbox/blobdiff - otk/widget.hh
better historyplacement
[chaz/openbox] / otk / widget.hh
index 7f2d926c4cf579941a44c67e941913bc50c5c81c..e2e477dfdb17cf46162c97446263c1d80945fa3b 100644 (file)
@@ -4,10 +4,11 @@
 
 #include "rect.hh"
 #include "point.hh"
-#include "texture.hh"
-#include "style.hh"
+#include "rendertexture.hh"
+#include "renderstyle.hh"
 #include "eventdispatcher.hh"
 #include "display.hh"
+#include "surface.hh"
 
 extern "C" {
 #include <assert.h>
@@ -27,13 +28,13 @@ public:
   typedef std::list<Widget *> WidgetList;
 
   Widget(Widget *parent, Direction = Horizontal);
-  Widget(EventDispatcher *event_dispatcher, Style *style,
+  Widget(EventDispatcher *event_dispatcher, RenderStyle *style,
          Direction direction = Horizontal, Cursor cursor = 0,
          int bevel_width = 1, bool override_redirect = false);
 
   virtual ~Widget();
 
-  virtual void update(void);
+  virtual void update();
 
   void exposeHandler(const XExposeEvent &e);
   void configureHandler(const XConfigureEvent &e);
@@ -76,12 +77,12 @@ 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; }
-  virtual void setBorderColor(const Color *color) {
+  inline const RenderColor *borderColor(void) const { return _bcolor; }
+  virtual void setBorderColor(const RenderColor *color) {
     assert(color); _bcolor = color;
     XSetWindowBorder(**display, _window, color->pixel());
   }
@@ -114,8 +115,8 @@ public:
   inline Direction direction(void) const { return _direction; }
   void setDirection(Direction dir) { _direction = dir; }
 
-  inline Style *style(void) const { return _style; }
-  virtual void setStyle(Style *style);
+  inline RenderStyle *style(void) const { return _style; }
+  virtual void setStyle(RenderStyle *style);
 
   inline EventDispatcher *eventDispatcher(void)
     { return _event_dispatcher; }
@@ -132,13 +133,14 @@ protected:
   virtual void adjustVert(void);
   virtual void internalResize(int width, int height);
   virtual void render(void);
+  virtual void renderForeground() {} // for overriding
 
   Window _window;
 
   Widget *_parent;
   WidgetList _children;
 
-  Style *_style;
+  RenderStyle *_style;
   Direction _direction;
   Cursor _cursor;
   int _bevel_width;
@@ -152,11 +154,11 @@ protected:
   bool _stretchable_vert;
   bool _stretchable_horz;
 
-  Texture *_texture;
+  RenderTexture *_texture;
   Pixmap _bg_pixmap;
   unsigned int _bg_pixel;
 
-  const Color *_bcolor;
+  const RenderColor *_bcolor;
   unsigned int _bwidth;
 
   Rect _rect;
@@ -165,6 +167,8 @@ protected:
   bool _fixed_width;
   bool _fixed_height;
 
+  Surface *_surface;
+
   EventDispatcher *_event_dispatcher;
 };
 
This page took 0.022462 seconds and 4 git commands to generate.