]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Reorder event handling functions
[libs/gltk.git] / source / widget.h
index 6cb3d0654362f60142e4d083561291879713a7c8..2bf751a714f0db3a25bc45015894181fe3c96562 100644 (file)
@@ -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
 {
@@ -53,6 +52,9 @@ protected:
        PartCache part_cache;
 
        Widget();
+private:
+       Widget(const Widget &);
+       Widget &operator=(const Widget &);
 public:
        virtual ~Widget();
 
@@ -62,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; }
@@ -133,6 +136,9 @@ public:
        virtual void pointer_motion(int, int) { }
        virtual void pointer_enter();
        virtual void pointer_leave();
+       virtual void touch_press(int, int, unsigned);
+       virtual void touch_release(int, int, unsigned);
+       virtual void touch_motion(int, int, unsigned);
        virtual void key_press(unsigned, unsigned) { }
        virtual void key_release(unsigned, unsigned) { }
        virtual void character(wchar_t) { }