SpiecsEngine
 
Loading...
Searching...
No Matches
Spices::Event Class Referenceabstract

This Class is the basic Event Class. Inherit from it and create specific event class. More...

#include <Event.h>

Inheritance diagram for Spices::Event:
Spices::KeyEvent Spices::MouseButtonEvent Spices::MouseMovedEvent Spices::MouseScrolledEvent Spices::SlateResizeEvent Spices::WindowCloseEvent Spices::WindowResizeEvent Spices::WindowResizeOverEvent Spices::WorldEvent

Public Types

using EventCallbackFn = std::function<void(Event&)>
 Helper type of Function pointer.
 

Public Member Functions

virtual ~Event ()=default
 Destructor Function.
 
virtual EventType GetEventType () const =0
 Event Information Function, must be implemented by EVENT_CLASS_TYPE and EVENT_CLASS_CATEGORY.
 
virtual const char * GetName () const =0
 
virtual int GetCategoryFlags () const =0
 
virtual std::string ToString () const
 
bool IsInCategory (EventCategory category) const
 Judgement if a given category is contained by this event class.
 

Static Public Member Functions

static EventCallbackFn GetEventCallbackFn ()
 Get Global Root Event Function Pointer.
 
static void SetEventCallbackFn (const EventCallbackFn &callback)
 Set Global Root Event Function Pointer.
 

Public Attributes

bool Handled = false
 True if this event is handled.
 

Friends

class EventDispatcher
 Allow EventDispatcher access all data of this.
 

Detailed Description

This Class is the basic Event Class. Inherit from it and create specific event class.

Definition at line 95 of file Event.h.


The documentation for this class was generated from the following files: