Muto 0.0.1
Cross-Platform Application Template
GitHub Repo | Muto Updates | Muto's Author
Loading...
Searching...
No Matches
Muto::MouseMovedEvent Class Reference

Event for registering mouse movement. More...

#include <MouseEvent.h>

Inheritance diagram for Muto::MouseMovedEvent:
Muto::Event

Public Member Functions

float GetX () const
 Get the x coordinate of the mouse.
 
float GetY () const
 Get the y coordinate of the mouse.
 
 MouseMovedEvent (float x, float y)
 Construct a MouseMovedEvent with the specified x and y coordinates.
 
std::string ToString () const override
 Convert the event to a string representation.
 
- Public Member Functions inherited from Muto::Event
virtual int GetCategoryFlags () const =0
 Get the category flags of the event.
 
virtual EventType GetEventType () const =0
 Get the type of the event.
 
virtual const char * GetName () const =0
 Get the name of the event.
 
bool IsInCategory (EventCategory category)
 Check if the event is in a specific category.
 
virtual ~Event ()=default
 

Private Attributes

float m_MouseX
 
float m_MouseY
 

Additional Inherited Members

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

Detailed Description

Event for registering mouse movement.

Constructor & Destructor Documentation

◆ MouseMovedEvent()

Muto::MouseMovedEvent::MouseMovedEvent ( float  x,
float  y 
)
inline

Construct a MouseMovedEvent with the specified x and y coordinates.

Parameters
xThe x coordinate of the mouse.
yThe y coordinate of the mouse.
24 : m_MouseX(x), m_MouseY(y) {
25 }
float m_MouseY
Definition MouseEvent.h:43
float m_MouseX
Definition MouseEvent.h:43
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

References m_MouseX, and m_MouseY.

Member Function Documentation

◆ GetX()

float Muto::MouseMovedEvent::GetX ( ) const
inline

Get the x coordinate of the mouse.

28{ return m_MouseX; }

References m_MouseX.

◆ GetY()

float Muto::MouseMovedEvent::GetY ( ) const
inline

Get the y coordinate of the mouse.

30{ return m_MouseY; }

References m_MouseY.

◆ ToString()

std::string Muto::MouseMovedEvent::ToString ( ) const
inlineoverridevirtual

Convert the event to a string representation.

Reimplemented from Muto::Event.

34 {
35 std::stringstream ss;
36 ss << "MouseMovedEvent: " << m_MouseX << ", " << m_MouseY;
37 return ss.str();
38 }

References m_MouseX, and m_MouseY.

Member Data Documentation

◆ m_MouseX

float Muto::MouseMovedEvent::m_MouseX
private

Referenced by GetX(), MouseMovedEvent(), and ToString().

◆ m_MouseY

float Muto::MouseMovedEvent::m_MouseY
private

Referenced by GetY(), MouseMovedEvent(), and ToString().


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