30#include "guillaume/entities/icon_button.hpp"
31#include "guillaume/entities/builder_base.hpp"
33#include "guillaume/theme.hpp"
34#include "guillaume/systems/icon_button.hpp"
49 _selectedIconGlyphName, _iconStyle, _isToggle, _variant, _size,
50 _isDisabled, _accessibilityLabel, _onClick);
56 _iconGlyphName.clear();
57 _selectedIconGlyphName.clear();
58 _iconStyle = components::Glyph::Style::Outlined;
60 _variant = Variant::Standard;
63 _accessibilityLabel.clear();
70 _iconGlyphName = iconGlyphName;
75 const std::string &selectedIconGlyphName)
77 _selectedIconGlyphName = selectedIconGlyphName;
84 _iconStyle = iconStyle;
91 _onClick = std::move(onClick);
122 const std::string &accessibilityLabel)
124 _accessibilityLabel = accessibilityLabel;
129 std::shared_ptr<Entity> parent,
const std::string &iconGlyphName,
130 std::function<
void(
void)> onClick,
Variant variant,
Size size)
133 .withOnClick(onClick)
134 .withVariant(variant)
136 .registerEntity(parent);
140 const std::string &iconGlyphName,
141 const std::string &selectedIconGlyphName,
145 const std::string &accessibilityLabel,
146 std::function<
void(
void)> onClick)
147 :
ButtonBase(registry, iconGlyphName, iconStyle,
"", isToggle, false,
148 isDisabled, false, accessibilityLabel, std::move(onClick))
Style
Family of the Material Symbols font the icon belongs to.
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
ComponentType & getComponent(const Entity::Identifier &entityIdentifier)
Get a component of an entity, to read or modify it.
ComponentType & addComponent(const Entity::Identifier &entityIdentifier, Args &&...args)
Construct a component for an entity, replacing the one it already has, if any.
ComponentRegistry & getComponentRegistry(void)
Get the registry in which the builder creates components.
Owns entities and gives the systems the list of entities to visit.
Entity::Signature getSignature(void) const noexcept
Get the set of component types the entity declares.
static Signature getSignatureFromTypes(void)
Build the signature that has exactly the bits of the given component types.
Entity::Identifier getIdentifier(void) const noexcept
Get the identifier of the entity.
void setSignature(void)
Replace the signature by the one made of the given component types.
guillaume::ecs::ParentEntityFiller< components::Transform, components::Bound, components::Color, components::Borders, components::Focus, components::HandButtonInteraction, components::HandHoverInteraction, components::MouseHoverInteraction, components::MouseButtonInteraction, components::StyleState, components::Accessibility, components::Button >::getComponentRegistry ComponentRegistry & getComponentRegistry(void)
EntityBuilderBase(ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry)
Makes the color helpers callable from guillaume::entities without qualification.
Widgets: the classes used to create entities with the right components and children.