|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Configures a Tooltip, then builds it and registers it in the entity registry given at construction. More...
#include <headers/guillaume/entities/tooltip.hpp>


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Create a builder set to the defaults of reset(). | |
| std::shared_ptr< Tooltip > | buildEntity (void) override |
| Build a tooltip and its children from the current configuration, without registering it or setting its parent. | |
| void | reset (void) override |
| Restore the defaults: Plain variant, no text, no title, a default pose and a width that follows the content. | |
| Builder & | withPose (const utility::graphic::PoseF &pose) |
| Set the pose the tooltip is created with. | |
| Builder & | withVariant (Variant variant) |
| Set the tooltip variant. | |
| Builder & | withText (const std::string &text) |
| Set the body text. | |
| Builder & | withTitle (const std::string &title) |
| Set the title shown above the text. | |
| Builder & | withFixedWidth (float width) |
| Give the tooltip a fixed width. | |
| std::shared_ptr< Tooltip > | makeTooltip (std::shared_ptr< ecs::Entity > parent, Variant variant, const std::string &text, const std::string &title="") |
Build a tooltip, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< Tooltip > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< Tooltip > | 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 Tooltip, then builds it and registers it in the entity registry given at construction.
Definition at line 132 of file tooltip.hpp.
| guillaume::entities::Tooltip::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Create a builder set to the defaults of reset().
| componentRegistry | The registry the tooltip's components are created in. |
| entityRegistry | The registry the built tooltips are added to. |
Definition at line 37 of file tooltip.cpp.

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

| std::shared_ptr< Tooltip > guillaume::entities::Tooltip::Builder::makeTooltip | ( | std::shared_ptr< ecs::Entity > | parent, |
| Variant | variant, | ||
| const std::string & | text, | ||
| const std::string & | title = "" ) |
Build a tooltip, register it under parent and reset the builder.
The arguments replace the variant, text and title set before; the pose and fixed width are kept.
| parent | The entity the tooltip is attached to. It is not the anchor: call Tooltip::setAnchor() for that. |
| variant | The tooltip variant. |
| text | The body text. |
| title | The title, used by the Rich variant only. |
Definition at line 100 of file tooltip.cpp.

|
overridevirtual |
Restore the defaults: Plain variant, no text, no title, a default pose and a width that follows the content.
Implements guillaume::ecs::EntityBuilder.
Definition at line 51 of file tooltip.cpp.

| Tooltip::Builder & guillaume::entities::Tooltip::Builder::withFixedWidth | ( | float | width | ) |
Give the tooltip a fixed width.
| width | The width, in dp. Default: none, the width follows the content. |
Definition at line 92 of file tooltip.cpp.
| Tooltip::Builder & guillaume::entities::Tooltip::Builder::withPose | ( | const utility::graphic::PoseF & | pose | ) |
Set the pose the tooltip is created with.
| pose | The position and orientation of the label. Default: a default-constructed pose. Showing an anchored tooltip replaces it. |
Definition at line 68 of file tooltip.cpp.
| Tooltip::Builder & guillaume::entities::Tooltip::Builder::withText | ( | const std::string & | text | ) |
Set the body text.
| text | The text. Default: empty, which builds no text child. |
Definition at line 80 of file tooltip.cpp.
| Tooltip::Builder & guillaume::entities::Tooltip::Builder::withTitle | ( | const std::string & | title | ) |
Set the title shown above the text.
| title | The title. Used by the Rich variant only; an empty title builds no title child. Default: empty. |
Definition at line 86 of file tooltip.cpp.
| Tooltip::Builder & guillaume::entities::Tooltip::Builder::withVariant | ( | Variant | variant | ) |
Set the tooltip variant.
| variant | The variant. Default: Variant::Plain. |
Definition at line 74 of file tooltip.cpp.
