CoriEngine
Loading...
Searching...
No Matches
Cori::Core::MouseButtonEvent Class Referenceabstract

#include <MouseEvent.hpp>

Inheritance diagram for Cori::Core::MouseButtonEvent:
Collaboration diagram for Cori::Core::MouseButtonEvent:

Public Member Functions

CoriMouseKeycode GetMouseButton () const
uint32_t GetCategoryFlags () const override
 Gives the flags of particular Event.
virtual constexpr std::type_index GetEventType () const =0
 Gives the return type of the Event.
virtual const char * GetName () const =0
 This will give you the string version of EventType.
virtual std::string ToString () const
 Returns the name of the Event.
bool IsInCategory (const EventCategory category) const
 Checks if the Event is in specific category.

Public Attributes

bool m_Handled = false

Protected Member Functions

 MouseButtonEvent (const CoriMouseKeycode button)

Protected Attributes

CoriMouseKeycode m_Button { CORI_MOUSEBUTTON_UNKNOWN }

Detailed Description

Definition at line 45 of file MouseEvent.hpp.

Constructor & Destructor Documentation

◆ MouseButtonEvent()

Cori::Core::MouseButtonEvent::MouseButtonEvent ( const CoriMouseKeycode button)
inlineexplicitprotected

Definition at line 50 of file MouseEvent.hpp.

Member Function Documentation

◆ GetCategoryFlags()

uint32_t Cori::Core::MouseButtonEvent::GetCategoryFlags ( ) const
inlineoverridevirtual

Gives the flags of particular Event.

Note
You shouldn't overload this, it is overloaded by EVENT_CLASS_CATEGORY macro!
Returns
Flag variable that stores all the relevant EventCategory flags.

Implements Cori::Core::Event.

Definition at line 48 of file MouseEvent.hpp.

◆ GetEventType()

virtual constexpr std::type_index Cori::Core::Event::GetEventType ( ) const
nodiscardconstexprpure virtualinherited

Gives the return type of the Event.

Note
You shouldn't overload this, it is overloaded by EVENT_CLASS_TYPE macro!
Returns
Type index of derived event type.

Implemented in Cori::Core::KeyPressedEvent, Cori::Core::KeyReleasedEvent, Cori::Core::MouseButtonPressedEvent, Cori::Core::MouseButtonReleasedEvent, Cori::Core::MouseMovedEvent, Cori::Core::MouseScrolledEvent, Cori::Core::WindowCloseEvent, and Cori::Core::WindowResizeEvent.

◆ GetMouseButton()

CoriMouseKeycode Cori::Core::MouseButtonEvent::GetMouseButton ( ) const
inline

Definition at line 47 of file MouseEvent.hpp.

◆ GetName()

virtual const char * Cori::Core::Event::GetName ( ) const
nodiscardpure virtualinherited

This will give you the string version of EventType.

Note
You shouldn't overload this, it is overloaded by EVENT_CLASS_TYPE macro!
Returns
EventType name.

Implemented in Cori::Core::KeyPressedEvent, Cori::Core::KeyReleasedEvent, Cori::Core::MouseButtonPressedEvent, Cori::Core::MouseButtonReleasedEvent, Cori::Core::MouseMovedEvent, Cori::Core::MouseScrolledEvent, Cori::Core::WindowCloseEvent, and Cori::Core::WindowResizeEvent.

◆ IsInCategory()

bool Cori::Core::Event::IsInCategory ( const EventCategory category) const
inlinenodiscardinherited

Checks if the Event is in specific category.

Parameters
categoryBitmask that we need to check presence of.
Returns
True is present, false otherwise.

Definition at line 59 of file Event.hpp.

Here is the call graph for this function:

◆ ToString()

virtual std::string Cori::Core::Event::ToString ( ) const
inlinenodiscardvirtualinherited

Returns the name of the Event.

Note
This is up to the user to overload, by default return the same thing GetName() does.
Returns
Event name.

Reimplemented in Cori::Core::KeyPressedEvent, Cori::Core::KeyReleasedEvent, Cori::Core::MouseButtonPressedEvent, Cori::Core::MouseButtonReleasedEvent, Cori::Core::MouseMovedEvent, Cori::Core::MouseScrolledEvent, Cori::Core::WindowCloseEvent, and Cori::Core::WindowResizeEvent.

Definition at line 51 of file Event.hpp.

Here is the call graph for this function:

Member Data Documentation

◆ m_Button

CoriMouseKeycode Cori::Core::MouseButtonEvent::m_Button { CORI_MOUSEBUTTON_UNKNOWN }
protected

Definition at line 53 of file MouseEvent.hpp.

◆ m_Handled

bool Cori::Core::Event::m_Handled = false
inherited

Definition at line 63 of file Event.hpp.


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