24#include "guillaume/ecs/system_filler.hpp"
26#include "guillaume/components/checkbox.hpp"
Stores every component of a scene, per component type and per entity identifier, and knows which ones...
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 to derive a system from: a System whose signature is the list of component types given...
~Checkbox(void) override=default
Default destructor.
static void apply(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Draw one checkbox from its component: colors, accessibility and label position.
static void install(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Make an entity behave as a checkbox.
Checkbox(void)
Create the system for the Layout phase, matching entities that have a components::Checkbox.
static void setState(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier, components::Checkbox::State state)
Set the state of a checkbox from code and show it at once.
static bool isDisabled(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Whether the checkbox ignores input and is drawn disabled.
void update(const ecs::Entity::Identifier &entityIdentifier) override
Frame entry point: call apply on one checkbox.
static void toggle(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Toggle the checkbox as a click does.
Rules. Every class here runs each frame on the entities that have the components it declares.