30 return registry_.
append(std::move(event));
42 return registry_.
select(
id);
53 return afterEffects_.
select(
id);
65 return afterEffects_.
append(std::move(event));
73 return itemWithId.item.value()(itemWithId.id);
82 return itemWithId.item.value()(itemWithId.id);
87 return itemWithId.item.value()(itemWithId.id);
93 std::vector<EventIdType> invalidIds;
94 for (
auto const& itemWithId : registry_.
rawRange())
98 if (!
static_cast<bool>(itemWithId.item.value()))
99 invalidIds.push_back(itemWithId.id);
102 for (
auto const&
id : invalidIds)
108 afterEffects_.
erase(
id);
114 afterEffects_.
clear();
Definition: event_registry.hpp:14
EventRegistry(EventRegistry &&)=default
EventIdType registerAfterEffect(Event event)
After effects are used to cause something to happen after all other events have been processed.
Definition: event_registry.hpp:63
EventRegistry & operator=(EventRegistry &&)=default
void executeEvent(EventIdType id)
Definition: event_registry.hpp:68
void clear()
Definition: event_registry.hpp:111
constexpr static EventIdType invalidEventId
Definition: event_registry.hpp:18
RegistryType::SelectionResult activateEvent(EventIdType id)
Returns a pointer to the selected event (only valid until the next activation or event execution).
Definition: event_registry.hpp:40
SelectablesRegistry< Event >::IdType EventIdType
Definition: event_registry.hpp:17
SelectablesRegistry< Event > RegistryType
Definition: event_registry.hpp:16
EventRegistry & operator=(const EventRegistry &)=delete
void cleanInvalidEvents()
Definition: event_registry.hpp:91
void removeAfterEffect(EventIdType id)
Definition: event_registry.hpp:106
void executeActiveEvents()
Definition: event_registry.hpp:77
EventRegistry(const EventRegistry &)=delete
RegistryType::SelectionResult activateAfterEffect(EventIdType id)
Activate an after effect.
Definition: event_registry.hpp:51
EventIdType registerEvent(Event event)
Definition: event_registry.hpp:28
IteratorType erase(IdType id)
Erase/Remove an item from the container.
Definition: selectables_registry.hpp:312
std::size_t deselectAll(std::invocable< ItemWithId const & > auto const &callback)
Deselects all items.
Definition: selectables_registry.hpp:390
bool deselect(IdType id, std::invocable< ItemWithId const & > auto const &callback)
Deselects item with id.
Definition: selectables_registry.hpp:420
SelectionResult select(IdType id)
Select an item.
Definition: selectables_registry.hpp:363
RawRangeWrap< SelectablesRegistry< T > * > rawRange()
Helper for range based for loops.
Definition: selectables_registry.hpp:639
IdType append(T const &element)
Append an item to the container.
Definition: selectables_registry.hpp:259
void clear()
Definition: selectables_registry.hpp:442
Definition: file_dialog.hpp:6