|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
State of a divider: a thin horizontal line separating content. More...
#include <headers/guillaume/components/divider.hpp>


Public Types | |
| enum class | Variant { FullWidth , Inset , Middle } |
| Which ends of the divider are inset. More... | |
Public Member Functions | |
| Divider (void)=default | |
| Create the state of a full-width hairline divider, 100 dp long. | |
| ~Divider (void)=default | |
| Default destructor. | |
| Variant | getVariant (void) const |
| Get which ends are inset. | |
| Divider & | setVariant (Variant variant) |
| Choose which ends are inset. | |
| float | getLength (void) const |
| Get the total length, insets included. | |
| Divider & | setLength (float length) |
| Set the total length, insets included. | |
| float | getThickness (void) const |
| Get the stroke thickness. | |
| Divider & | setThickness (float thickness) |
| Set the stroke thickness. | |
| float | getInset (void) const |
| Get the inset applied to an inset end. | |
| Divider & | setInset (float inset) |
| Set the inset applied to an inset end. | |
| const utility::graphic::Color32Bit & | getColor (void) const |
| Get the stroke color. | |
| Divider & | setColor (const utility::graphic::Color32Bit &color) |
| Set the stroke color. | |
| const utility::graphic::PoseF & | getOriginPose (void) const |
| Get the pose of the divider before the leading inset. | |
| Divider & | setOriginPose (const utility::graphic::PoseF &pose) |
| Set the pose of the divider before the leading inset. | |
| const utility::graphic::PoseF & | getAppliedPose (void) const |
| Get the pose systems::Divider last wrote to the Transform. | |
| Divider & | setAppliedPose (const utility::graphic::PoseF &pose) |
| Record the pose written to the Transform. | |
| float | getLeadingInset (void) const |
| Get the inset applied on the leading (left) end for the current variant. | |
| float | getTrailingInset (void) const |
| Get the inset applied on the trailing (right) end for the current variant. | |
| 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. | |
Static Public Attributes | |
| static constexpr float | HairlineThickness = 0.5f |
| Default stroke thickness, in dp. | |
| static constexpr float | BoldThickness = 1.0f |
| Thickness of a bold stroke, in dp. | |
State of a divider: a thin horizontal line separating content.
It holds the variant, the length, the thickness, the inset, the color and the pose of the divider.
Role in the frame:
Watch out: the Transform, Bound, Line thickness and Color of the entity are overwritten every frame from this component, so change the divider here. Moving the entity through its Transform is supported: the system notices the move and adopts it as the new origin pose.
Definition at line 58 of file divider.hpp.
|
strong |
Which ends of the divider are inset.
FullWidth: none. Inset: the leading (left) end. Middle: both ends.
Definition at line 67 of file divider.hpp.
| const utility::graphic::PoseF & guillaume::components::Divider::getAppliedPose | ( | void | ) | const |
Get the pose systems::Divider last wrote to the Transform.
Definition at line 114 of file divider.cpp.

| const utility::graphic::Color32Bit & guillaume::components::Divider::getColor | ( | void | ) | const |
| float guillaume::components::Divider::getInset | ( | void | ) | const |
Get the inset applied to an inset end.
Definition at line 72 of file divider.cpp.
| float guillaume::components::Divider::getLeadingInset | ( | void | ) | const |
Get the inset applied on the leading (left) end for the current variant.
Definition at line 125 of file divider.cpp.
| float guillaume::components::Divider::getLength | ( | void | ) | const |
Get the total length, insets included.
Definition at line 42 of file divider.cpp.
| const utility::graphic::PoseF & guillaume::components::Divider::getOriginPose | ( | void | ) | const |
Get the pose of the divider before the leading inset.
Definition at line 99 of file divider.cpp.
| float guillaume::components::Divider::getThickness | ( | void | ) | const |
Get the stroke thickness.
Definition at line 57 of file divider.cpp.
| float guillaume::components::Divider::getTrailingInset | ( | void | ) | const |
Get the inset applied on the trailing (right) end for the current variant.
Definition at line 130 of file divider.cpp.
| Divider::Variant guillaume::components::Divider::getVariant | ( | void | ) | const |
Get which ends are inset.
Definition at line 27 of file divider.cpp.
| Divider & guillaume::components::Divider::setAppliedPose | ( | const utility::graphic::PoseF & | pose | ) |
Record the pose written to the Transform.
Bookkeeping of systems::Divider: when the Transform differs from it, something else moved the entity. It does not mark the component changed.
| pose | The applied pose. |
Definition at line 119 of file divider.cpp.


| Divider & guillaume::components::Divider::setColor | ( | const utility::graphic::Color32Bit & | color | ) |
Set the stroke color.
Unlike the other setters, it marks the component changed on every call, even when the color is the same.
| color | The stroke color. |
Definition at line 92 of file divider.cpp.

| Divider & guillaume::components::Divider::setInset | ( | float | inset | ) |
Set the inset applied to an inset end.
It has no visible effect on a FullWidth divider. Marks the component changed when the inset differs.
| inset | The inset, in dp. |
Definition at line 77 of file divider.cpp.

| Divider & guillaume::components::Divider::setLength | ( | float | length | ) |
Set the total length, insets included.
The stroke drawn is this length minus the insets of the variant, and never negative. Marks the component changed when the length differs.
| length | The length, in dp. |
Definition at line 47 of file divider.cpp.

| Divider & guillaume::components::Divider::setOriginPose | ( | const utility::graphic::PoseF & | pose | ) |
Set the pose of the divider before the leading inset.
The system writes this pose, shifted right by the leading inset, to the Transform. Marks the component changed when the pose differs.
| pose | The pose of the left end of the full-width divider. |
Definition at line 104 of file divider.cpp.

| Divider & guillaume::components::Divider::setThickness | ( | float | thickness | ) |
Set the stroke thickness.
Marks the component changed when the thickness differs.
| thickness | The thickness, in dp, for example HairlineThickness or BoldThickness. |
Definition at line 62 of file divider.cpp.

Choose which ends are inset.
Marks the component changed when the variant differs.
| variant | FullWidth, Inset or Middle. |
Definition at line 32 of file divider.cpp.

|
staticconstexpr |
Thickness of a bold stroke, in dp.
Definition at line 73 of file divider.hpp.
|
staticconstexpr |
Default stroke thickness, in dp.
Definition at line 70 of file divider.hpp.