|
guillaume 2026.6.1
A C++ UI framework designed for modern desktop and extended reality (XR) applications.
|
Configures, creates and registers FloatingActionButtonMenu widgets. More...
#include <headers/guillaume/entities/floating_action_button_menu.hpp>


Public Member Functions | |
| Builder (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder with the default configuration (see reset()). | |
| std::shared_ptr< FloatingActionButtonMenu > | buildEntity (void) override |
| Build a FloatingActionButtonMenu, with its trigger and action buttons, from the current configuration, without registering it. | |
| void | reset (void) override |
| Restore the default configuration. | |
| Builder & | withIcon (const std::string &iconGlyphName) |
| Set the icon of the trigger while the menu is closed. | |
| Builder & | addAction (const std::string &iconGlyphName, std::function< void(void)> onClick) |
| Add an action shown as a small icon-only FAB. | |
| Builder & | addAction (const std::string &iconGlyphName, const std::string &label, std::function< void(void)> onClick) |
| Add an action shown with a label next to its icon (Paper FAB.Group label). | |
| Builder & | withAccessibilityLabel (const std::string &accessibilityLabel) |
| Set the label of the trigger read by assistive technology. | |
| std::shared_ptr< FloatingActionButtonMenu > | makeFloatingActionButtonMenu (std::shared_ptr< Entity > parent, const std::string &iconGlyphName) |
| Build a menu with the actions added so far, register it under parent and reset the builder. | |
| Public Member Functions inherited from guillaume::entities::EntityBuilderBase< FloatingActionButtonMenu > | |
| EntityBuilderBase (ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry) | |
| Construct a builder bound to two registries. | |
| ~EntityBuilderBase (void) override=default | |
| Default destructor. | |
| std::shared_ptr< FloatingActionButtonMenu > | 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, creates and registers FloatingActionButtonMenu widgets.
Add the actions with addAction(), then call makeFloatingActionButtonMenu() or registerEntity().
Definition at line 105 of file floating_action_button_menu.hpp.
| guillaume::entities::FloatingActionButtonMenu::Builder::Builder | ( | ecs::ComponentRegistry & | componentRegistry, |
| ecs::EntityRegistry & | entityRegistry ) |
Construct a builder with the default configuration (see reset()).
| componentRegistry | The registry that stores the components of the menus to build. |
| entityRegistry | The registry the built menus are added to (usually the scene's). |
Definition at line 34 of file floating_action_button_menu.cpp.

| FloatingActionButtonMenu::Builder & guillaume::entities::FloatingActionButtonMenu::Builder::addAction | ( | const std::string & | iconGlyphName, |
| const std::string & | label, | ||
| std::function< void(void)> | onClick ) |
Add an action shown with a label next to its icon (Paper FAB.Group label).
| iconGlyphName | The glyph name of the action icon. |
| label | The text shown next to the icon, also used as the accessibility label. When empty, the action is icon-only. |
| onClick | The function called when the user clicks the action (may be empty). |
Definition at line 76 of file floating_action_button_menu.cpp.
| FloatingActionButtonMenu::Builder & guillaume::entities::FloatingActionButtonMenu::Builder::addAction | ( | const std::string & | iconGlyphName, |
| std::function< void(void)> | onClick ) |
Add an action shown as a small icon-only FAB.
| iconGlyphName | The glyph name of the action icon. |
| onClick | The function called when the user clicks the action (may be empty). |
Definition at line 68 of file floating_action_button_menu.cpp.
|
overridevirtual |
Build a FloatingActionButtonMenu, with its trigger and action buttons, from the current configuration, without registering it.
registerEntity() calls it, then sets the parent, registers the menu and resets the builder.
Implements guillaume::entities::EntityBuilderBase< FloatingActionButtonMenu >.
Definition at line 44 of file floating_action_button_menu.cpp.

| std::shared_ptr< FloatingActionButtonMenu > guillaume::entities::FloatingActionButtonMenu::Builder::makeFloatingActionButtonMenu | ( | std::shared_ptr< Entity > | parent, |
| const std::string & | iconGlyphName ) |
Build a menu with the actions added so far, register it under parent and reset the builder.
| parent | The entity the menu becomes a child of. |
| iconGlyphName | The glyph name of the trigger icon while the menu is closed. |
Definition at line 93 of file floating_action_button_menu.cpp.

|
overridevirtual |
Restore the default configuration.
Defaults: empty trigger icon, no action, empty accessibility label.
Implements guillaume::ecs::EntityBuilder.
Definition at line 52 of file floating_action_button_menu.cpp.

| FloatingActionButtonMenu::Builder & guillaume::entities::FloatingActionButtonMenu::Builder::withAccessibilityLabel | ( | const std::string & | accessibilityLabel | ) |
Set the label of the trigger read by assistive technology.
| accessibilityLabel | The accessibility label of the trigger. Default: empty. |
Definition at line 85 of file floating_action_button_menu.cpp.
| FloatingActionButtonMenu::Builder & guillaume::entities::FloatingActionButtonMenu::Builder::withIcon | ( | const std::string & | iconGlyphName | ) |
Set the icon of the trigger while the menu is closed.
| iconGlyphName | The glyph name of the trigger icon (for example "add"). Default: empty. |
Definition at line 60 of file floating_action_button_menu.cpp.
