guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::components::LayoutExtent Class Reference

Space a widget takes in its parent's layout beyond its Bound. More...

#include <headers/guillaume/components/layout_extent.hpp>

Inheritance diagram for guillaume::components::LayoutExtent:
Collaboration diagram for guillaume::components::LayoutExtent:

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.

Detailed Description

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.

Member Function Documentation

◆ getTrailingWidth()

float guillaume::components::LayoutExtent::getTrailingWidth ( void ) const
noexcept

Get the extra width reserved after the Bound.

Returns
The width, in dp.

Definition at line 29 of file layout_extent.cpp.

◆ setTrailingWidth()

LayoutExtent & guillaume::components::LayoutExtent::setTrailingWidth ( float width)

Set the extra width reserved after the Bound.

Marks the component changed only when the value differs.

Parameters
widthThe width, in dp; negative values are treated as 0.
Returns
Reference to this component for chaining.

Definition at line 34 of file layout_extent.cpp.

Here is the call graph for this function:

The documentation for this class was generated from the following files: