1 #include "gaze/gui/event_manager.h"
5 #include "dlib/gui_core.h"
12 EventManager::EventManager() {
21 for (dlib::base_window* subscriber : this->subscribers) {
22 subscriber->trigger_user_event(data, event);
31 this->subscribers.
erase(
33 this->subscribers.
end(),
35 this->subscribers.
end());
static EventManager & instance()
iterator erase(const_iterator __position)
void publish(void *data, Events event)
_ForwardIterator remove(_ForwardIterator __first, _ForwardIterator __last, const _Tp &__value)
void unsubscribe(dlib::base_window *subscriber)
Handles communication between non-gui and gui processes in a safe way.
iterator begin() noexcept
void push_back(const value_type &__x)
void subscribe(dlib::base_window *subscriber)
An enum of events to make it easy to distinguish them with names instead of numbers.