]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/layout.h
Add autosizing for panels
[libs/gltk.git] / source / layout.h
index cf63538413e6465c967f93063ee394e8fc09f07d..cbd763e9e5337dc7a6395d7d0b3a860c6d9ad7e1 100644 (file)
@@ -113,6 +113,12 @@ protected:
                void autosize_changed();
        };
 
+       enum SolveMode
+       {
+               UPDATE,
+               AUTOSIZE
+       };
+
        class LinearProgram;
        struct Pointers;
 
@@ -121,6 +127,7 @@ protected:
        Sides margin;
        unsigned row_spacing;
        unsigned col_spacing;
+       Geometry autosize_geom;
 
        static Pointers pointers[2];
 
@@ -146,9 +153,10 @@ public:
        void set_expand(Widget &, bool, bool);
 
        void update();
+       void autosize();
 
 protected:
-       void solve_constraints(int);
+       void solve_constraints(int, SolveMode);
 };
 
 } // namespace GLtk