guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
Loading...
Searching...
No Matches
guillaume::entities::LoadingIndicator::Builder Class Reference

Configures a LoadingIndicator, then builds it and registers it in the entity registry given at construction. More...

#include <headers/guillaume/entities/loading_indicator.hpp>

Inheritance diagram for guillaume::entities::LoadingIndicator::Builder:
Collaboration diagram for guillaume::entities::LoadingIndicator::Builder:

Public Member Functions

 Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry)
 Create a builder set to the defaults of reset().
std::shared_ptr< LoadingIndicator > buildEntity (void) override
 Build a loading indicator and its animated child from the current configuration, without registering it or setting its parent.
void reset (void) override
 Restore the defaults: Circular variant, a 48 dp diameter and a default pose.
Builder & withPose (const utility::graphic::PoseF &pose)
 Set the pose the indicator is created with.
Builder & withVariant (Variant variant)
 Set the indicator variant.
Builder & withSize (float size)
 Set the diameter of the Circular variant.
std::shared_ptr< LoadingIndicator > makeLoadingIndicator (std::shared_ptr< ecs::Entity > parent, Variant variant)
 Build a loading indicator, register it under parent and reset the builder.
Public Member Functions inherited from guillaume::entities::EntityBuilderBase< LoadingIndicator >
 EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry)
 Construct a builder bound to two registries.
 ~EntityBuilderBase (void) override=default
 Default destructor.
std::shared_ptr< LoadingIndicator > 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.

Detailed Description

Configures a LoadingIndicator, then builds it and registers it in the entity registry given at construction.

Definition at line 103 of file loading_indicator.hpp.

Constructor & Destructor Documentation

◆ Builder()

guillaume::entities::LoadingIndicator::Builder::Builder ( ecs::ComponentRegistry & componentRegistry,
ecs::EntityRegistry & entityRegistry )

Create a builder set to the defaults of reset().

Parameters
componentRegistryThe registry the indicator's components are created in.
entityRegistryThe registry the built indicators are added to.

Definition at line 107 of file loading_indicator.cpp.

Here is the call graph for this function:

Member Function Documentation

◆ buildEntity()

std::shared_ptr< LoadingIndicator > guillaume::entities::LoadingIndicator::Builder::buildEntity ( void )
overridevirtual

Build a loading indicator and its animated child from the current configuration, without registering it or setting its parent.

Returns
The new indicator, already animating.

Implements guillaume::entities::EntityBuilderBase< LoadingIndicator >.

Definition at line 116 of file loading_indicator.cpp.

Here is the call graph for this function:

◆ makeLoadingIndicator()

std::shared_ptr< LoadingIndicator > guillaume::entities::LoadingIndicator::Builder::makeLoadingIndicator ( std::shared_ptr< ecs::Entity > parent,
Variant variant )

Build a loading indicator, register it under parent and reset the builder.

variant replaces the variant set before; the pose and the size are kept.

Parameters
parentThe entity the indicator is attached to.
variantThe indicator variant.
Returns
The registered indicator, already animating.

Definition at line 170 of file loading_indicator.cpp.

Here is the call graph for this function:

◆ reset()

void guillaume::entities::LoadingIndicator::Builder::reset ( void )
overridevirtual

Restore the defaults: Circular variant, a 48 dp diameter and a default pose.

Implements guillaume::ecs::EntityBuilder.

Definition at line 131 of file loading_indicator.cpp.

Here is the caller graph for this function:

◆ withPose()

LoadingIndicator::Builder & guillaume::entities::LoadingIndicator::Builder::withPose ( const utility::graphic::PoseF & pose)

Set the pose the indicator is created with.

Parameters
poseThe position and orientation of the widget. Default: a default-constructed pose.
Returns
This builder, for chaining.

Definition at line 150 of file loading_indicator.cpp.

◆ withSize()

LoadingIndicator::Builder & guillaume::entities::LoadingIndicator::Builder::withSize ( float size)

Set the diameter of the Circular variant.

Parameters
sizeThe diameter, in dp; it must be positive, the builder does not check it. Default: 48. The Linear variant ignores it.
Returns
This builder, for chaining.

Definition at line 163 of file loading_indicator.cpp.

◆ withVariant()

LoadingIndicator::Builder & guillaume::entities::LoadingIndicator::Builder::withVariant ( Variant variant)

Set the indicator variant.

Parameters
variantThe variant. Default: Variant::Circular.
Returns
This builder, for chaining.

Definition at line 157 of file loading_indicator.cpp.

Here is the caller graph for this function:

The documentation for this class was generated from the following files: