]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Use triangle strips instead of quads
[libs/gltk.git] / source / widget.h
index 461cafe232781b1fb490a93bf85e19785ed4e961..4550648aebd3adbfaaebc09b5f60669b05ade595 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
 {
@@ -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; }