]> git.tdb.fi Git - libs/gltk.git/blobdiff - source/layout.h
Ignore hidden widgets when solving a layout
[libs/gltk.git] / source / layout.h
index 230365182e1d84a881bc363a48487234215fd3a7..7ae3907c772d740f0ad1ab3e28386f5bc0042213 100644 (file)
@@ -100,7 +100,7 @@ protected:
        struct Slot: public sigc::trackable
        {
                Layout &layout;
-               unsigned index;
+               int index;
                Widget &widget;
                Geometry autosize_geom;
                Geometry geom;
@@ -112,6 +112,7 @@ protected:
                virtual ~Slot() { }
 
                void autosize_changed();
+               void visibility_changed(bool);
        };
 
        enum SolveMode
@@ -125,6 +126,7 @@ protected:
 
        Container *container;
        std::list<Slot *> slots;
+       unsigned n_active_slots;
        Sides margin;
        unsigned row_spacing;
        unsigned col_spacing;
@@ -146,6 +148,7 @@ public:
        void remove_widget(Widget &);
 protected:
        virtual Slot *create_slot(Widget &);
+       void update_slot_indices();
        Slot &get_slot_for_widget(Widget &);
        static ConstraintType complement(ConstraintType);
        void create_constraint(Widget &, ConstraintType, Widget &, int);