X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fwidget.h;h=557e10153269c2290bc8c6c4e938fc95c8284874;hb=79af58bcfa941e0f2c33b172c9e924522ebcdfea;hp=461cafe232781b1fb490a93bf85e19785ed4e961;hpb=6deb1daf5e29bdd2bd828afa0cb3dec6d409c3b4;p=libs%2Fgltk.git diff --git a/source/widget.h b/source/widget.h index 461cafe..557e101 100644 --- a/source/widget.h +++ b/source/widget.h @@ -17,8 +17,7 @@ class Resources; class Style; /** -Base class for all widgets. Derived classes should call update_style in -constructor, because it can't be done correctly in the Widget constructor. +Base class for all widgets. */ class Widget { @@ -65,8 +64,9 @@ public: void set_position(int, int); void set_size(unsigned, unsigned); void autosize(); + void autosize(Geometry &) const; protected: - virtual void autosize_special(const Part &, Geometry &) { } + virtual void autosize_special(const Part &, Geometry &) const { }; public: void set_geometry(const Geometry &); const Geometry &get_geometry() const { return geom; } @@ -139,6 +139,9 @@ public: virtual void key_press(unsigned, unsigned) { } virtual void key_release(unsigned, unsigned) { } virtual void character(wchar_t) { } + virtual void touch_press(int, int, unsigned); + virtual void touch_release(int, int, unsigned); + virtual void touch_motion(int, int, unsigned); virtual void focus_in(); virtual void focus_out(); protected: