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


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder holding the defaults of reset(). | |
| std::shared_ptr< Badge > | buildEntity (void) override |
| Build a badge and its label from the current configuration, without registering it or giving it a parent. | |
| void | reset (void) override |
| Restore the defaults: default pose, the Large variant, an empty label, and a horizontal layout centered on both axes. | |
| Builder & | withPose (const utility::graphic::PoseF &pose) |
| Set where the badge is. | |
| Builder & | withVariant (Variant variant) |
| Choose the size class of the badge. | |
| Builder & | withLabel (const std::string &label) |
| Set the text shown in the badge. | |
| std::shared_ptr< Badge > | makeBadge (std::shared_ptr< ecs::Entity > parent, const std::string &label, Variant variant) |
| Build a badge and its label, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< Badge > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< Badge > | 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 Badge widgets and registers them in the scene's entity registry.
| guillaume::entities::Badge::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
|
overridevirtual |
Build a badge and its label from the current configuration, without registering it or giving it a parent.
Implements guillaume::entities::EntityBuilderBase< Badge >.
Definition at line 43 of file badge.cpp.

| std::shared_ptr< Badge > guillaume::entities::Badge::Builder::makeBadge | ( | std::shared_ptr< ecs::Entity > | parent, |
| const std::string & | label, | ||
| Variant | variant ) |
Build a badge and its label, register it under parent and reset the builder.
| parent | The entity the badge is attached to, or nullptr for a root entity. |
| label | The text shown in the badge. Ignored by the Dot variant. |
| variant | The size class: Dot, Small or Large. |
Definition at line 81 of file badge.cpp.

|
overridevirtual |
Restore the defaults: default pose, the Large variant, an empty label, and a horizontal layout centered on both axes.
Implements guillaume::ecs::EntityBuilder.
Definition at line 49 of file badge.cpp.

| Badge::Builder & guillaume::entities::Badge::Builder::withLabel | ( | const std::string & | label | ) |
| Badge::Builder & guillaume::entities::Badge::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
| Badge::Builder & guillaume::entities::Badge::Builder::withVariant | ( | Variant | variant | ) |