Raven Engine v0.1
Loading...
Searching...
No Matches
Raven::KeyEvent Class Reference

Abstract base class for keyboard-related events. More...

#include <KeyEvent.h>

Inheritance diagram for Raven::KeyEvent:
Raven::Event Raven::KeyPressedEvent Raven::KeyReleasedEvent

Public Member Functions

int GetKeyCode () const
 Returns the key code associated with this event.
Public Member Functions inherited from Raven::Event
virtual ~Event ()=default
virtual EventType GetEventType () const =0
 Returns the runtime event type.
virtual const char * GetName () const =0
 Returns the name of the event.
virtual EventCategory GetCategoryFlags () const =0
 Returns the category flags of the event.
virtual std::string ToString () const
 Converts the event to a string for logging or debugging.
bool IsInCategory (EventCategory category) const
 Checks if the event belongs to the specified category.

Protected Member Functions

 KeyEvent (int keycode)
 Protected constructor for KeyEvent.

Protected Attributes

int m_KeyCode

Additional Inherited Members

Public Attributes inherited from Raven::Event
bool Handled = false
 Indicates whether the event has been handled.

Detailed Description

Abstract base class for keyboard-related events.

Stores the key code and defines the common interface for key events. Not intended to be instantiated directly.

Constructor & Destructor Documentation

◆ KeyEvent()

Raven::KeyEvent::KeyEvent ( int keycode)
inlineexplicitprotected

Protected constructor for KeyEvent.

Parameters
keycodeThe key code associated with this event.

Member Function Documentation

◆ GetKeyCode()

int Raven::KeyEvent::GetKeyCode ( ) const
inlinenodiscard

Returns the key code associated with this event.

Returns
The key code (int).

Member Data Documentation

◆ m_KeyCode

int Raven::KeyEvent::m_KeyCode
protected

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