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


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder with the default configuration (see reset()). | |
| std::shared_ptr< RadioButton > | buildEntity (void) override |
| Build a RadioButton, with its dot 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 ring. | |
| Builder & | withVariant (Variant variant) |
| Set the visual variant. | |
| Builder & | withLabel (const std::string &label) |
| Set the label shown to the right of the ring. | |
| std::shared_ptr< RadioButton > | makeRadioButton (std::shared_ptr< ecs::Entity > parent, Variant variant, const std::string &label) |
| Build a radio button, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< RadioButton > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< RadioButton > | 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 RadioButton widgets.
Set options with the with... methods then call registerEntity(), or use makeRadioButton() to do both in one call.
Definition at line 99 of file radio_button.hpp.
| guillaume::entities::RadioButton::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 radio buttons to build. |
| entityRegistry | The registry the built radio buttons are added to (usually the scene's). |
Definition at line 85 of file radio_button.cpp.

|
overridevirtual |
Build a RadioButton, with its dot and label children, from the current configuration, without registering it.
registerEntity() calls it, then sets the parent, registers the radio button and resets the builder.
Implements guillaume::entities::EntityBuilderBase< RadioButton >.
Definition at line 92 of file radio_button.cpp.

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

|
overridevirtual |
Restore the default configuration.
Defaults: Variant::Enabled, no label, default pose. The ring is a 20 dp circle with no padding.
Implements guillaume::ecs::EntityBuilder.
Definition at line 99 of file radio_button.cpp.


| RadioButton::Builder & guillaume::entities::RadioButton::Builder::withLabel | ( | const std::string & | label | ) |
Set the label shown to the right of the ring.
| label | The label text, also used as the accessibility label. Default: empty, no label child is built. |
Definition at line 131 of file radio_button.cpp.
| RadioButton::Builder & guillaume::entities::RadioButton::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
Set the position and orientation of the ring.
| pose | The pose written to the radio button's Transform. Default: a default-constructed pose. |
Definition at line 118 of file radio_button.cpp.
| RadioButton::Builder & guillaume::entities::RadioButton::Builder::withVariant | ( | Variant | variant | ) |
Set the visual variant.
| variant | Enabled, Disabled (ignores input) or Error (error colors). Default: Variant::Enabled. |
Definition at line 124 of file radio_button.cpp.
