]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Avoid generating events during destruction of a widget
[libs/gltk.git] / source / widget.h
index 64db74e85a15d4b7f4a06fe5577a29140048966d..3653970a2f470e4a03ad6ff66af225802eafeb93 100644 (file)
@@ -41,6 +41,7 @@ public:
        };
 
        sigc::signal<void, bool> signal_visibility_changed;
+       sigc::signal<void> signal_autosize_changed;
        sigc::signal<void> signal_request_focus;
        sigc::signal<void> signal_grab_pointer;
        sigc::signal<void> signal_ungrab_pointer;
@@ -66,7 +67,7 @@ public:
 
        void set_position(int, int);
        void set_size(unsigned, unsigned);
-       virtual void autosize() { }
+       virtual void autosize();
        void set_geometry(const Geometry &);
        const Geometry &get_geometry() const { return geom; }
 
@@ -76,8 +77,9 @@ protected:
        calling this function with a non-null parameter.
        */
        void set_parent(Container *);
-
 public:
+       Container *get_parent() const { return parent; }
+
        /**
        Sets the widget style.  The final style name is constructed by concatenating
        the widget class and the style name with a dash.