Sizes a layout forced on its children, so a child gets its own size back when the layout stops forcing it, e.g. a grid row after its tallest child is hidden.
More...
#include <layout.h>
|
| float | natural (const Widget &w, float current) const |
| | The child's own size: its current size, unless that is still the size this layout forced on it last time.
|
| |
| void | record (const Widget &w, float natural, float forced) |
| | Record the size forced on a child this layout.
|
| |
| void | keep (const Widget &w) |
| | Keep last layout's record for a child skipped this layout, e.g. a hidden one.
|
| |
| void | finish () |
| | End the layout. Records not made or kept this layout are dropped.
|
| |
Sizes a layout forced on its children, so a child gets its own size back when the layout stops forcing it, e.g. a grid row after its tallest child is hidden.
Definition at line 44 of file layout.h.
◆ find()
◆ finish()
| void asw::ui::detail::ForcedSizes::finish |
( |
| ) |
|
End the layout. Records not made or kept this layout are dropped.
Definition at line 40 of file layout.cpp.
◆ keep()
| void asw::ui::detail::ForcedSizes::keep |
( |
const Widget & | w | ) |
|
Keep last layout's record for a child skipped this layout, e.g. a hidden one.
- Parameters
-
Definition at line 33 of file layout.cpp.
◆ natural()
| float asw::ui::detail::ForcedSizes::natural |
( |
const Widget & | w, |
|
|
float | current ) const |
The child's own size: its current size, unless that is still the size this layout forced on it last time.
- Parameters
-
| w | The child. |
| current | The child's current size. |
- Returns
- The child's own size.
Definition at line 19 of file layout.cpp.
◆ record()
| void asw::ui::detail::ForcedSizes::record |
( |
const Widget & | w, |
|
|
float | natural, |
|
|
float | forced ) |
Record the size forced on a child this layout.
- Parameters
-
| w | The child. |
| natural | The child's own size. |
| forced | The size the layout gave it. |
Definition at line 28 of file layout.cpp.
◆ _cursor
| std::size_t asw::ui::detail::ForcedSizes::_cursor = 0 |
|
mutableprivate |
◆ _last
| std::vector<Entry> asw::ui::detail::ForcedSizes::_last |
|
private |
◆ _next
| std::vector<Entry> asw::ui::detail::ForcedSizes::_next |
|
private |
The documentation for this class was generated from the following files: