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

This Class is inherited from KeyEvent Class. More...

#include <KeyEvent.h>

Inheritance diagram for Spices::KeyPressedEvent:
Spices::KeyEvent Spices::Event

Public Types

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

Public Member Functions

 KeyPressedEvent (int keycode, int repeatCount)
 Constructor Function.
 
virtual ~KeyPressedEvent () override=default
 Destructor Function.
 
const int & GetRepeatCount () const
 Get Input Key repeat count.
 
virtual std::string ToString () const override
 Serialize this Event Class to string.
 
const int & GetKeyCode () const
 Get Key Input Code.
 
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
 
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.
 

Protected Attributes

int m_KeyCode
 Input KeyCode.
 

Private Attributes

int m_RepeatCount
 Specific this Class Type with KeyPressed.
 

Detailed Description

This Class is inherited from KeyEvent Class.

Definition at line 56 of file KeyEvent.h.


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