Event
#include <Event.hpp>Inherits:
variant< KeyEvent, MousePressEvent, MouseReleaseEvent, MouseMoveEvent, ResizeEvent >
A tagged union of all possible input events.
Use std::get_if to check the active type and access its fields:
bool [Widget::onEvent](/api/core/widget#onevent)(const Event& e) { if (auto* k = std::get_if<KeyEvent>(&e)) { // handle key } return false;}