28#include <utility/logging/loggable.hpp>
29#include <utility/logging/default_logger.hpp>
31#include <utility/event/event.hpp>
66 protected utility::logging::Loggable<EventHandler,
67 utility::logging::DefaultLogger>
77 std::function<void(std::shared_ptr<utility::event::Event> &)>;
123 template<
typename Type>
EventHandler(void)
Create an event source with no callback.
void setEventCallback(const Handler &callback)
Choose the function that receives the events.
std::function< void(std::shared_ptr< utility::event::Event > &)> Handler
The callback type: a function called with each event read from the platform.
virtual void pollEvents(void)=0
Read the events the platform has pending and report each one through the callback.
Handler & getEventCallback(void)
Get the callback, for pollEvents() to call.
virtual ~EventHandler(void)=default
Virtual destructor.
Constrains a template parameter to a type derived from EventHandler.
A C++20 UI framework for desktop and XR, built as an entity-component-system.