Event
This class defines the core interface for all event types. Derived event types extend this interface with additional data specific to their category.
Events are typically dispatched through the Scene hierarchy, where nodes can override event handlers and optionally mark events as handled.
Types
Event::Type enum
Enumerates all event types.
Each event subclass identifies its type through Event::GetType, allowing runtime checks to distinguish between different kinds of events.
| Value | Description |
|---|---|
| Keyboard | Event triggered by keyboard input. |
| Mouse | Event triggered by mouse input. |
| Scene | Event related to scene updates or lifecycle. |
| Undefined | Fallback for undefined or uninitialized event types. |
Properties
handled bool
Indicates whether the event has been handled. When set to true, this flag prevents the event from propagating further to other nodes in the scene graph. Handlers should set this to true if no other node should respond to the event.
bool handled {false};Functions
GetType() Event::Type virtual
Returns the default event type.
Derived classes should override this to return their corresponding event type.
virtual Type vglx::Event::GetType() const;