|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Configures a Search, creates it and registers it in an entity registry. More...
#include <headers/guillaume/entities/search.hpp>


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Create a builder set to the defaults of reset(). | |
| std::shared_ptr< Search > | buildEntity (void) override |
| Build a search field and its children from the current configuration, without registering it or setting its parent. | |
| void | reset (void) override |
| Restore the defaults. | |
| Builder & | withPose (const utility::graphic::PoseF &pose) |
| Set where the search field is placed. | |
| Builder & | withVariant (Variant variant) |
| Set the variant. | |
| Builder & | withPlaceholder (const std::string &placeholder) |
| Set the placeholder: the hint shown while the query is empty. | |
| Builder & | withText (const std::string &text) |
| Set the initial query. | |
| std::shared_ptr< Search > | makeSearch (std::shared_ptr< ecs::Entity > parent, Variant variant, const std::string &placeholder, const std::string &text="") |
| Build a search field, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< Search > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< Search > | 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 a Search, creates it and registers it in an entity registry.
Definition at line 111 of file search.hpp.
| guillaume::entities::Search::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Create a builder set to the defaults of reset().
| componentRegistry | The registry that stores the components of the search fields built. |
| entityRegistry | The registry the search fields are added to. |
Definition at line 37 of file search.cpp.

|
overridevirtual |
Build a search field and its children from the current configuration, without registering it or setting its parent.
Implements guillaume::entities::EntityBuilderBase< Search >.
Definition at line 44 of file search.cpp.

| std::shared_ptr< Search > guillaume::entities::Search::Builder::makeSearch | ( | std::shared_ptr< ecs::Entity > | parent, |
| Variant | variant, | ||
| const std::string & | placeholder, | ||
| const std::string & | text = "" ) |
Build a search field, register it under parent and reset the builder.
| parent | The entity the field becomes a child of, or nullptr for a root entity. |
| variant | The variant of the field. |
| placeholder | The hint shown while the query is empty. |
| text | The query the field starts with. |
Definition at line 96 of file search.cpp.

|
overridevirtual |
Restore the defaults.
Defaults: SearchBar variant, empty placeholder, empty query, default pose, 360 dp wide (components::Search::DefaultWidth), 56 dp high (components::Search::BarHeight).
Implements guillaume::ecs::EntityBuilder.
Definition at line 51 of file search.cpp.


| Search::Builder & guillaume::entities::Search::Builder::withPlaceholder | ( | const std::string & | placeholder | ) |
Set the placeholder: the hint shown while the query is empty.
| placeholder | The placeholder text; it is also the accessible name of the field. Default: empty. |
Definition at line 84 of file search.cpp.
| Search::Builder & guillaume::entities::Search::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
Set where the search field is placed.
| pose | The pose of the field. Default: a default-constructed pose. |
Definition at line 71 of file search.cpp.
| Search::Builder & guillaume::entities::Search::Builder::withText | ( | const std::string & | text | ) |
Set the initial query.
| text | The query the field starts with. Default: empty. |
Definition at line 90 of file search.cpp.
| Search::Builder & guillaume::entities::Search::Builder::withVariant | ( | Variant | variant | ) |
Set the variant.
| variant | SearchBar (the default) for the 56 dp pill, FullScreen for the 72 dp field with a divider. |
Definition at line 77 of file search.cpp.
