1 #ifndef LIBWTK_SDL2_BOX_HPP 2 #define LIBWTK_SDL2_BOX_HPP 6 #include "container.hpp" 25 typedef std::vector<child> children_type;
27 enum class orientation { VERTICAL, HORIZONTAL };
29 box(orientation o, children_type children);
30 box(orientation o, children_type children,
int children_spacing);
31 box(orientation o, children_type children,
bool children_homogeneous);
32 box(orientation o, children_type children,
int children_spacing,
bool children_homogeneous);
38 static bool is_orthogonal(navigation_type nt, orientation o);
39 static bool is_forward(navigation_type nt);
49 std::vector<widget const *>
get_children()
const override;
61 int relevant_distance(
point old_center,
point new_center)
const;
64 bool is_orthogonal(navigation_type nt)
const;
67 children_type _children;
68 int _children_spacing;
69 bool _children_homogeneous;
75 widget_ptr hbox(box::children_type children);
76 widget_ptr vbox(box::children_type children);
78 widget_ptr hbox(box::children_type children,
int children_spacing);
79 widget_ptr vbox(box::children_type children,
int children_spacing);
81 widget_ptr hbox(box::children_type children,
bool children_homogeneous);
82 widget_ptr vbox(box::children_type children,
bool children_homogeneous);
84 widget_ptr hbox(box::children_type children,
int children_spacing,
bool children_homogeneous);
85 widget_ptr vbox(box::children_type children,
int children_spacing,
bool children_homogeneous);
size_hint get_size_hint(int width, int height) const override
std::vector< widget * > get_children() override
bool expand
Definition: box.hpp:21
void on_box_allocated() override
Definition: container.hpp:10
widget * navigate_selectable_from_children(navigation_type nt, widget *w, point center) override
Definition: geometry.hpp:6
Definition: widget.hpp:35
widget * find_selectable(navigation_type nt, point center) override