|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Configures Divider widgets and registers them in the scene's entity registry. More...
#include <headers/guillaume/entities/divider.hpp>


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder holding the defaults of reset(). | |
| std::shared_ptr< Divider > | buildEntity (void) override |
| Build a divider from the current configuration, without registering it or giving it a parent. | |
| void | reset (void) override |
| Restore the defaults: default pose, the OutlineVariant color of the active theme, length 100 dp, hairline thickness (HairlineThickness), inset 16 dp, and the FullWidth variant. | |
| Builder & | withPose (const utility::graphic::PoseF &pose) |
| Set where the line starts. | |
| Builder & | withColor (const utility::graphic::Color32Bit &color) |
| Set the stroke color. | |
| Builder & | withLength (float length) |
| Set the total length. | |
| Builder & | withThickness (float thickness) |
| Set the stroke thickness. | |
| Builder & | withInset (float inset) |
| Set how much an inset end is shortened. | |
| Builder & | withVariant (Variant variant) |
| Choose which ends of the line are inset. | |
| std::shared_ptr< Divider > | makeDivider (std::shared_ptr< Entity > parent, float length, Variant variant) |
| Build a divider, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< Divider > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< Divider > | registerEntity (std::shared_ptr< ecs::Entity > parent) |
| Build the widget, attach it to its parent, hand it to the entity registry, then reset the builder to its defaults. | |
| Public Member Functions inherited from guillaume::ecs::EntityBuilder | |
| EntityBuilder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Create a builder working on a pair of registries, normally those of one scene. | |
| virtual | ~EntityBuilder (void)=default |
| Virtual destructor. | |
Additional Inherited Members | |
| Protected Member Functions inherited from guillaume::ecs::EntityBuilder | |
| ComponentRegistry & | getComponentRegistry (void) |
| Get the registry in which the builder creates components. | |
| EntityRegistry & | getEntityRegistry (void) |
| Get the registry in which the builder registers the entities it creates. | |
Configures Divider widgets and registers them in the scene's entity registry.
Definition at line 113 of file divider.hpp.
| guillaume::entities::Divider::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Construct a builder holding the defaults of reset().
| componentRegistry | The registry the components of the built dividers are stored in. |
| entityRegistry | The registry that owns the dividers built by makeDivider. |
Definition at line 33 of file divider.cpp.

|
overridevirtual |
Build a divider from the current configuration, without registering it or giving it a parent.
Implements guillaume::entities::EntityBuilderBase< Divider >.
Definition at line 40 of file divider.cpp.

| std::shared_ptr< Divider > guillaume::entities::Divider::Builder::makeDivider | ( | std::shared_ptr< Entity > | parent, |
| float | length, | ||
| Variant | variant ) |
Build a divider, register it under parent and reset the builder.
The pose, color, thickness and inset set with the with... methods apply to the built divider.
| parent | The entity the divider is attached to, or nullptr for a root entity. |
| length | The total length, insets included, in dp. |
| variant | Which ends of the line are inset. |
Definition at line 97 of file divider.cpp.

|
overridevirtual |
Restore the defaults: default pose, the OutlineVariant color of the active theme, length 100 dp, hairline thickness (HairlineThickness), inset 16 dp, and the FullWidth variant.
Implements guillaume::ecs::EntityBuilder.
Definition at line 48 of file divider.cpp.


| Divider::Builder & guillaume::entities::Divider::Builder::withColor | ( | const utility::graphic::Color32Bit & | color | ) |
Set the stroke color.
| color | The color (RGBA). By default the OutlineVariant color the active theme had when the builder was last reset. |
Definition at line 66 of file divider.cpp.
| Divider::Builder & guillaume::entities::Divider::Builder::withInset | ( | float | inset | ) |
Set how much an inset end is shortened.
| inset | The inset, in dp, applied to the ends the variant insets. 16 by default. |
Definition at line 84 of file divider.cpp.
| Divider::Builder & guillaume::entities::Divider::Builder::withLength | ( | float | length | ) |
Set the total length.
| length | The length, insets included, in dp. 100 by default. |
Definition at line 72 of file divider.cpp.

| Divider::Builder & guillaume::entities::Divider::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
Set where the line starts.
| pose | The pose of the line before the leading inset is applied. A default-constructed pose by default. |
Definition at line 59 of file divider.cpp.
| Divider::Builder & guillaume::entities::Divider::Builder::withThickness | ( | float | thickness | ) |
Set the stroke thickness.
| thickness | The thickness, in dp. HairlineThickness by default. |
Definition at line 78 of file divider.cpp.
| Divider::Builder & guillaume::entities::Divider::Builder::withVariant | ( | Variant | variant | ) |
Choose which ends of the line are inset.
| variant | The variant. FullWidth by default. |
Definition at line 90 of file divider.cpp.