|
|
widget_ptr | _child |
| |
|
widget * | _parent |
| |
◆ find_selectable()
| widget* bin::find_selectable |
( |
navigation_type |
nt, |
|
|
point |
center |
|
) |
| |
|
overridevirtual |
Should return the first selectable widget according to the navigation type. If a widget is selectable it should return itself. Containers should return the first selectable child widget. Otherwise nullptr is returned.
The point may serve as a hint to provide a more accurate selection.
Reimplemented from widget.
◆ get_children()
| std::vector<widget *> bin::get_children |
( |
| ) |
|
|
overridevirtual |
Return child widgets in Z-order. Should be implemented by containers.
Reimplemented from widget.
◆ get_size_hint()
| size_hint bin::get_size_hint |
( |
int |
width, |
|
|
int |
height |
|
) |
| const |
|
overridevirtual |
Computes the widgets preferred minimal and natural size. When given a specific width or height the widget might use that to give a more accurate size.
Implements widget.
Reimplemented in padding.
◆ navigate_selectable_from_children()
| widget* bin::navigate_selectable_from_children |
( |
navigation_type |
nt, |
|
|
widget * |
w, |
|
|
point |
center |
|
) |
| |
|
overridevirtual |
When a child widget has exhausted its selectable widgets it may ask its parent for the next widget according to the navigation. The coordinates of the widget are provided to get a more accurate result for some navigation types (i.e. 2-dimensional). The widget passed has to be the direct child, otherwise the parent is not able to find it.
Only containers should implement this.
Reimplemented from widget.
◆ on_box_allocated()
| void bin::on_box_allocated |
( |
| ) |
|
|
overridepure virtual |
Refresh layout with existing box. This should not be called if the widget does not have a box already. Otherwise no space is allocated.
Reimplemented from widget.
Implemented in padding.
◆ on_draw()
Draw the widget. No children should be drawn here.
Implements widget.
The documentation for this struct was generated from the following file:
- /home/moritz/Programmieren/C++/libwtk-sdl2/include/bin.hpp