|
QuasarEngine
Cross-platform 3D engine and editor
|
Base class of each event class, which gives the event its type and its categories. More...
#include <quasar/events/Event.h>
Public Member Functions | |
| EventType | GetType () const override |
| Returns the type of the event. | |
| EventCategory | GetCategories () const override |
| Returns all the categories of the event. | |
| Public Member Functions inherited from Quasar::Event | |
| virtual std::string | ToString () const |
| Returns a readable description of the event, for debugging. | |
| const char * | GetName () const |
| Returns the name of the type of the event, for example "KeyPressed". | |
| bool | IsInCategory (EventCategory category) const |
| Returns true if the event belongs to the given category. | |
| bool | IsHandled () const |
| Returns true if the event was handled. | |
| void | SetHandled (bool handled) |
| Marks the event as handled, or not handled. | |
Static Public Member Functions | |
| static constexpr EventType | GetStaticType () |
| Returns the type of this event class. | |
Additional Inherited Members | |
| Protected Member Functions inherited from Quasar::Event | |
| Event ()=default | |
| Creates an event that is not handled. | |
Base class of each event class, which gives the event its type and its categories.
For example: class KeyPressedEvent : public EventOf<EventType::KeyPressed, EventCategory::Input | EventCategory::Keyboard>. GetStaticType() gives the type without an event object, which lets the code check the type of an event before converting it.
|
inlineoverridevirtual |
Returns the type of the event.
Implements Quasar::Event.
|
inlineoverridevirtual |
Returns all the categories of the event.
Implements Quasar::Event.