|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Base class of the widget builders: remembers in which registries the entities it creates go. More...
#include <headers/guillaume/ecs/entity_builder.hpp>

Public Member Functions | |
| 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. | |
| virtual void | reset (void)=0 |
| Forget the configuration accumulated for the entity being built, so the builder is ready for the next one. | |
Protected Member Functions | |
| 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. | |
Base class of the widget builders: remembers in which registries the entities it creates go.
A builder is the comfortable way to create a widget in a scene: it is configured with fluent calls or a makeXxx() preset, creates the entity with its components in the component registry, and registers it in the entity registry. Each widget has its own builder (entities::Button::Builder, ...), derived from entities::EntityBuilderBase, which adds the creation step. A Scene holds one builder per widget type in its EntityBuilderManager.
This base class only stores the two registries and declares reset(). Both registries must outlive the builder.
Definition at line 52 of file entity_builder.hpp.
| guillaume::ecs::EntityBuilder::EntityBuilder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Create a builder working on a pair of registries, normally those of one scene.
| componentRegistry | The registry that receives the components of the built entities. It must outlive the builder. |
| entityRegistry | The registry that owns the built entities. It must outlive the builder. |
Definition at line 27 of file entity_builder.cpp.
|
protected |
Get the registry in which the builder creates components.
Definition at line 34 of file entity_builder.cpp.

|
protected |
Get the registry in which the builder registers the entities it creates.
Definition at line 39 of file entity_builder.cpp.
|
pure virtual |
Forget the configuration accumulated for the entity being built, so the builder is ready for the next one.
Implemented by each widget builder, which restores its options to their defaults. entities::EntityBuilderBase::registerEntity calls it after every build.
Implemented in guillaume::entities::AppBar::Builder, guillaume::entities::Badge::Builder, guillaume::entities::Button::Builder, guillaume::entities::Card::Builder, guillaume::entities::Checkbox::Builder, guillaume::entities::Chip::Builder, guillaume::entities::Dialog::Builder, guillaume::entities::Divider::Builder, guillaume::entities::ExtendedFloatingActionButton::Builder, guillaume::entities::FloatingActionButton::Builder, guillaume::entities::FloatingActionButtonMenu::Builder, guillaume::entities::Icon::Builder, guillaume::entities::IconButton::Builder, guillaume::entities::Image::Builder, guillaume::entities::List::Builder, guillaume::entities::LoadingIndicator::Builder, guillaume::entities::Menu::Builder, guillaume::entities::Mesh::Builder, guillaume::entities::NavigationBar::Builder, guillaume::entities::NavigationDrawer::Builder, guillaume::entities::ProgressIndicator::Builder, guillaume::entities::RadioButton::Builder, guillaume::entities::RadioGroup::Builder, guillaume::entities::Search::Builder, guillaume::entities::SegmentedButton::Builder, guillaume::entities::Snackbar::Builder, guillaume::entities::Surface::Builder, guillaume::entities::Switch::Builder, guillaume::entities::Text::Builder, guillaume::entities::TextField::Builder, guillaume::entities::Tooltip::Builder, and guillaume::entities::View::Builder.