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

Base class for mouse button events. More...

#include <MouseEvent.h>

Inheritance diagram for Raven::MouseButtonEvent:
Raven::Event Raven::MouseButtonPressedEvent Raven::MouseButtonReleasedEvent

Public Member Functions

MouseCode GetMouseButton () const
 Gets the mouse button 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

 MouseButtonEvent (const MouseCode button)
 Constructs a MouseButtonEvent with the specified mouse button.

Protected Attributes

MouseCode m_Button

Additional Inherited Members

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

Detailed Description

Base class for mouse button events.

This is a base class for all mouse button-related events, containing the mouse button code. It is inherited by specific mouse button events such as button press and release events.

Constructor & Destructor Documentation

◆ MouseButtonEvent()

Raven::MouseButtonEvent::MouseButtonEvent ( const MouseCode button)
inlineprotected

Constructs a MouseButtonEvent with the specified mouse button.

Parameters
buttonThe mouse button code.

Member Function Documentation

◆ GetMouseButton()

MouseCode Raven::MouseButtonEvent::GetMouseButton ( ) const
inlinenodiscard

Gets the mouse button associated with this event.

Returns
The mouse button code. Event categories for mouse button events

Member Data Documentation

◆ m_Button

MouseCode Raven::MouseButtonEvent::m_Button
protected

The mouse button code associated with this event


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