|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Space a widget takes in its parent's layout beyond its Bound. More...
#include <headers/guillaume/components/layout_extent.hpp>


Public Member Functions | |
| LayoutExtent (void)=default | |
| Default constructor: no extra space. | |
| ~LayoutExtent (void)=default | |
| Default destructor. | |
| float | getTrailingWidth (void) const noexcept |
| Get the extra width reserved after the Bound. | |
| LayoutExtent & | setTrailingWidth (float width) |
| Set the extra width reserved after the Bound. | |
| Public Member Functions inherited from guillaume::ecs::Component | |
| bool | hasChanged (void) const |
| Tell whether a value of the component changed since the flags were last reset (the end of the previous frame). | |
| void | setHasChanged (bool hasChanged) |
| Raise or lower the changed flag. | |
| Component (void)=default | |
| Create a component that is not marked as changed. | |
| virtual | ~Component (void)=default |
| Virtual destructor, so components can be destroyed through the base class. | |
Space a widget takes in its parent's layout beyond its Bound.
The Bound is what the shape renderers draw. Some widgets draw a small shape and place a child beside it: a checkbox draws an 18 dp box and its label to the right. Without this component the parent layout would reserve only the box and the label would overlap the next widget.
Written by the widget system that places the outside child (systems::Checkbox, RadioButton, Switch); read by systems::Layout, which adds it to the child's width when arranging a parent.
Definition at line 43 of file layout_extent.hpp.
|
noexcept |
Get the extra width reserved after the Bound.
Definition at line 29 of file layout_extent.cpp.
| LayoutExtent & guillaume::components::LayoutExtent::setTrailingWidth | ( | float | width | ) |
Set the extra width reserved after the Bound.
Marks the component changed only when the value differs.
| width | The width, in dp; negative values are treated as 0. |
Definition at line 34 of file layout_extent.cpp.
