diff options
| author | Dana Jansens <danakj@orodu.net> | 2003-01-18 03:52:58 +0000 |
|---|---|---|
| committer | Dana Jansens <danakj@orodu.net> | 2003-01-18 03:52:58 +0000 |
| commit | 2005c344bdb4b59611972bc37e194d2e14cdf911 (patch) | |
| tree | 35fe6c0f7b6ce425a0ac83fe393c02c0be3bbfee /otk/widget.hh | |
| parent | 4ac47a41a15626a3da41d68efd2212869c9188b2 (diff) | |
surface started
Diffstat (limited to 'otk/widget.hh')
| -rw-r--r-- | otk/widget.hh | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/otk/widget.hh b/otk/widget.hh index 7f2d926c..1cfa627f 100644 --- a/otk/widget.hh +++ b/otk/widget.hh @@ -2,6 +2,7 @@ #ifndef __widget_hh #define __widget_hh +#include "surface.hh" #include "rect.hh" #include "point.hh" #include "texture.hh" @@ -18,7 +19,7 @@ extern "C" { namespace otk { -class Widget : public EventHandler { +class Widget : public Surface, public EventHandler { public: @@ -42,7 +43,7 @@ public: inline const Widget *parent(void) const { return _parent; } inline const WidgetList &children(void) const { return _children; } inline unsigned int screen(void) const { return _screen; } - inline const Rect &rect(void) const { return _rect; } + inline Rect rect(void) const { return Rect(_pos, size()); } void move(const Point &to); void move(int x, int y); @@ -50,9 +51,6 @@ public: virtual void setWidth(int); virtual void setHeight(int); - virtual int width() const { return _rect.width(); } - virtual int height() const { return _rect.height(); } - virtual void resize(const Point &to); virtual void resize(int x, int y); @@ -159,7 +157,7 @@ protected: const Color *_bcolor; unsigned int _bwidth; - Rect _rect; + Point _pos; unsigned int _screen; bool _fixed_width; |
