]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/widget.h
Properly set expand flags in LinearArrangement
[libs/gltk.git] / source / widget.h
index b00849c1598873a6ae7ecdc0e76ff9a036539d76..5c81b8056e6f409641095b2303513a95eff4d3ae 100644 (file)
@@ -50,7 +50,7 @@ protected:
        bool focusable;
        Container *parent;
        std::string tooltip;
-       std::list<CachedPart> cached_parts;
+       PartCache part_cache;
 
        Widget();
 public:
@@ -61,7 +61,10 @@ public:
 
        void set_position(int, int);
        void set_size(unsigned, unsigned);
-       virtual void autosize();
+       void autosize();
+protected:
+       virtual void autosize_special(const Part &, Geometry &) { }
+public:
        void set_geometry(const Geometry &);
        const Geometry &get_geometry() const { return geom; }
 
@@ -99,7 +102,7 @@ protected:
        void set_state(State, State);
 
        void rebuild();
-       virtual void rebuild_special(const Part &, CachedPart &) { }
+       virtual void rebuild_special(const Part &);
 
 public:
        void render(GL::Renderer &) const;