|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Configures, creates and registers Checkbox widgets. More...
#include <headers/guillaume/entities/checkbox.hpp>


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder with the default configuration (see reset()). | |
| std::shared_ptr< Checkbox > | buildEntity (void) override |
| Build a Checkbox, with its check glyph and label children, from the current configuration, without registering it. | |
| void | reset (void) override |
| Restore the default configuration. | |
| Builder & | withPose (const utility::graphic::PoseF &pose) |
| Set the position and orientation of the box. | |
| Builder & | withState (State state) |
| Set the state the checkbox starts in. | |
| Builder & | withVariant (Variant variant) |
| Set the visual variant. | |
| Builder & | withLabel (const std::string &label) |
| Set the label shown to the right of the box. | |
| std::shared_ptr< Checkbox > | makeCheckbox (std::shared_ptr< ecs::Entity > parent, State state, Variant variant, const std::string &label) |
| Build a checkbox, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< Checkbox > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< Checkbox > | 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, creates and registers Checkbox widgets.
Set options with the with... methods then call registerEntity(), or use makeCheckbox() to do both in one call.
Definition at line 107 of file checkbox.hpp.
| guillaume::entities::Checkbox::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Construct a builder with the default configuration (see reset()).
| componentRegistry | The registry that stores the components of the checkboxes to build. |
| entityRegistry | The registry the built checkboxes are added to (usually the scene's). |
Definition at line 40 of file checkbox.cpp.

|
overridevirtual |
Build a Checkbox, with its check glyph and label children, from the current configuration, without registering it.
registerEntity() calls it, then sets the parent, registers the checkbox and resets the builder.
Implements guillaume::entities::EntityBuilderBase< Checkbox >.
Definition at line 47 of file checkbox.cpp.

| std::shared_ptr< Checkbox > guillaume::entities::Checkbox::Builder::makeCheckbox | ( | std::shared_ptr< ecs::Entity > | parent, |
| State | state, | ||
| Variant | variant, | ||
| const std::string & | label ) |
Build a checkbox, register it under parent and reset the builder.
A pose set before the call with withPose() also applies.
| parent | The entity the checkbox becomes a child of. |
| state | The state the checkbox starts in. |
| variant | Enabled, Disabled or Error. |
| label | The label text; empty for a checkbox without label. |
Definition at line 99 of file checkbox.cpp.

|
overridevirtual |
Restore the default configuration.
Defaults: State::Unchecked, Variant::Enabled, no label, default pose. The box is an 18 dp square with a 2 dp corner radius and no padding, and centers its content.
Implements guillaume::ecs::EntityBuilder.
Definition at line 54 of file checkbox.cpp.

| Checkbox::Builder & guillaume::entities::Checkbox::Builder::withLabel | ( | const std::string & | label | ) |
Set the label shown to the right of the box.
| label | The label text, also used as the accessibility label. Default: empty, no label child is built. |
Definition at line 92 of file checkbox.cpp.
| Checkbox::Builder & guillaume::entities::Checkbox::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
Set the position and orientation of the box.
| pose | The pose written to the checkbox's Transform. Default: a default-constructed pose. |
Definition at line 74 of file checkbox.cpp.
| Checkbox::Builder & guillaume::entities::Checkbox::Builder::withState | ( | State | state | ) |
Set the state the checkbox starts in.
| state | The initial state. Default: State::Unchecked. |
Definition at line 80 of file checkbox.cpp.

| Checkbox::Builder & guillaume::entities::Checkbox::Builder::withVariant | ( | Variant | variant | ) |
Set the visual variant.
| variant | Enabled, Disabled (ignores input) or Error (error colors). Default: Variant::Enabled. |
Definition at line 86 of file checkbox.cpp.