Horizon
Loading...
Searching...
No Matches
reflow_box.hpp
1#include <gtkmm/container.h>
2#include <glibmm/property.h>
3
4namespace horizon {
5class ReflowBox : public Gtk::Container {
6public:
7 ReflowBox();
8 virtual ~ReflowBox();
9
10 void append(Gtk::Widget &child);
11
12 Glib::PropertyProxy<int> property_spacing()
13 {
14 return p_property_spacing.get_proxy();
15 }
16 Glib::PropertyProxy<int> property_row_spacing()
17 {
18 return p_property_row_spacing.get_proxy();
19 }
20
21protected:
22 // Overrides:
23 Gtk::SizeRequestMode get_request_mode_vfunc() const override;
24 void get_preferred_width_vfunc(int &minimum_width, int &natural_width) const override;
25 void get_preferred_height_for_width_vfunc(int width, int &minimum_height, int &natural_height) const override;
26 void get_preferred_height_vfunc(int &minimum_height, int &natural_height) const override;
27 void get_preferred_width_for_height_vfunc(int height, int &minimum_width, int &natural_width) const override;
28 void on_size_allocate(Gtk::Allocation &allocation) override;
29
30 void forall_vfunc(gboolean include_internals, GtkCallback callback, gpointer callback_data) override;
31
32 void on_add(Gtk::Widget *child) override;
33 void on_remove(Gtk::Widget *child) override;
34 GType child_type_vfunc() const override;
35
36 Glib::Property<int> p_property_spacing;
37 Glib::Property<int> p_property_row_spacing;
38
39 std::vector<Gtk::Widget *> m_children;
40};
41
42} // namespace horizon
Definition reflow_box.hpp:5