27#include "guillaume/ecs/system_filler.hpp"
29#include "guillaume/components/search.hpp"
194 const std::string &
text);
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...
static void clear(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Empty the query as a press on the clear icon would.
static bool isVisible(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Whether the search field is shown.
~Search(void) override=default
Default destructor.
static void pressIcon(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Activate the leading icon as a press on it would.
static void hide(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Hide the search field.
static void installClearIcon(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Make the clear icon a button that calls clear().
Search(void)
Create the system in the Layout phase.
static void apply(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Style one search field and lay out its children.
static void installIcon(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Make the leading icon a button that calls pressIcon().
void update(const ecs::Entity::Identifier &entityIdentifier) override
Run apply() on one search field; called by the frame loop.
static void setText(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier, const std::string &text)
Replace the query and restyle the field.
static std::string text(const ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Get the query the field holds.
static void install(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Give a search field its accessibility role and make its icons pressable.
static void pressTrailingIcon(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Activate the trailing icon as a press on it would.
static void show(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Show the search field.
static void installTrailingIcon(ecs::ComponentRegistry &componentRegistry, const ecs::Entity::Identifier &entityIdentifier)
Make the trailing icon a button that calls pressTrailingIcon().
Rules. Every class here runs each frame on the entities that have the components it declares.