31#include "guillaume/ecs/component_registry.hpp"
32#include "guillaume/entities/builder_base.hpp"
33#include "guillaume/ecs/entity_builder.hpp"
34#include "guillaume/ecs/parent_entity_filler.hpp"
36#include "guillaume/components/transform.hpp"
37#include "guillaume/components/bound.hpp"
38#include "guillaume/components/borders.hpp"
39#include "guillaume/components/layout.hpp"
40#include "guillaume/components/segmented_button.hpp"
42#include "guillaume/entities/button_base.hpp"
85 class SegmentedButton:
86 public std::enable_shared_from_this<SegmentedButton>,
89 components::SegmentedButton>
117 std::shared_ptr<SegmentedButton>
119 std::vector<std::string>
126 std::function<void(std::size_t)>
152 std::shared_ptr<SegmentedButton>
buildEntity(
void)
override;
160 void reset(
void)
override;
214 std::shared_ptr<SegmentedButton>
216 const std::vector<std::string> &labels,
218 std::function<
void(std::size_t)> onChange);
246 template<
typename... Arguments>
247 static std::shared_ptr<SegmentedButton>
create(Arguments &&...arguments)
249 std::shared_ptr<SegmentedButton> entity(
250 new SegmentedButton(std::forward<Arguments>(arguments)...));
322 const std::vector<std::string> &labels,
324 std::function<
void(std::size_t)> onChange);
336 const std::vector<Segment> &segments,
338 std::function<
void(std::size_t)> onChange);
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
Owns entities and gives the systems the list of entities to visit.
std::size_t Identifier
The key under which an entity's components are stored. Systems and components refer to entities by th...
The base class of a widget with children: an EntityFiller that is also a ParentEntity.
EntityBuilderBase(ecs::ComponentRegistry &componentRegistry, ecs::EntityRegistry &entityRegistry)
Widgets: the classes used to create entities with the right components and children.