]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Implement autosize() method for most widgets
[libs/gltk.git] / source / widget.h
index 64db74e85a15d4b7f4a06fe5577a29140048966d..5522ba340e60a580e21497feeba50daee03cd632 100644 (file)
@@ -66,7 +66,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 +76,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.