diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-27 21:26:37 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2016-05-31 15:30:45 -0400 |
commit | d8b02be745be6c8575979dab8772b091436be3df (patch) | |
tree | 7109ec1198c97a42945af3d3ca6ff3819cfdd885 /libs/gtkmm2ext/gtkmm2ext | |
parent | d30266dfc33f6918709e0c8ab1cab82151927fe5 (diff) |
provide a mechanism to avoid allocating too small of a space to a Pane child
Gtk::Notebook throws an assertion if allocated too small a space during drawing (at least with Clearlooks)
Diffstat (limited to 'libs/gtkmm2ext/gtkmm2ext')
-rw-r--r-- | libs/gtkmm2ext/gtkmm2ext/pane.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libs/gtkmm2ext/gtkmm2ext/pane.h b/libs/gtkmm2ext/gtkmm2ext/pane.h index ecf466833a..4a18a49d7c 100644 --- a/libs/gtkmm2ext/gtkmm2ext/pane.h +++ b/libs/gtkmm2ext/gtkmm2ext/pane.h @@ -42,10 +42,22 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container private: class Divider; + public: + struct Child + { + Gtk::Widget* w; + int32_t minsize; + + Child (Gtk::Widget* widget, uint32_t ms) : w (widget), minsize (ms) {} + }; + + typedef std::list<Child> Children; + Pane (bool horizontal); void set_divider (std::vector<float>::size_type divider, float fract); float get_divider (std::vector<float>::size_type divider = 0); + void set_child_minsize (Children::size_type n, int32_t); GType child_type_vfunc() const; void set_drag_cursor (Gdk::Cursor); @@ -73,7 +85,6 @@ class LIBGTKMM2EXT_API Pane : public Gtk::Container void reallocate (Gtk::Allocation const &); - typedef std::list<Gtk::Widget*> Children; Children children; struct Divider : public Gtk::EventBox { |