Vesper 0.5.1
Vesper is short form for the Latin word for "Bat", as Vesper is designed to be small, lightweight, and easily handle things like particles and flocking behaviors in accordance with the nature of bats. \n It is meant to be a particle simulation, VFX editor, and CAN be used secondarily as a small game engine.
GitHub | Vesper Updates | Creator
Loading...
Searching...
No Matches
Vesper::WindowResizeEvent Class Reference

Event for registering window resize. More...

#include <ApplicationEvent.h>

Inheritance diagram for Vesper::WindowResizeEvent:
Vesper::Event

Public Member Functions

 WindowResizeEvent (unsigned int width, unsigned int height)
 Construct a WindowResizeEvent with the specified width and height.
unsigned int GetWidth () const
 Get the new width of the window.
unsigned int GetHeight () const
 Get the new height of the window.
std::string ToString () const override
 Convert the event to a string representation.
Public Member Functions inherited from Vesper::Event
virtual ~Event ()=default
virtual EventType GetEventType () const =0
 Get the type of the event.
virtual const char * GetName () const =0
 Get the name of the event.
virtual int GetCategoryFlags () const =0
 Get the category flags of the event.
bool IsInCategory (EventCategory category)
 Check if the event is in a specific category.

Private Attributes

unsigned int m_Width
unsigned int m_Height

Additional Inherited Members

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

Detailed Description

Event for registering window resize.

Constructor & Destructor Documentation

◆ WindowResizeEvent()

Vesper::WindowResizeEvent::WindowResizeEvent ( unsigned int width,
unsigned int height )
inline

Construct a WindowResizeEvent with the specified width and height.

Parameters
widthThe new width of the window.
heightThe new height of the window.
24 : m_Width(width), m_Height(height) {}
unsigned int m_Height
Definition ApplicationEvent.h:43
unsigned int m_Width
Definition ApplicationEvent.h:43

References m_Height, and m_Width.

Member Function Documentation

◆ GetHeight()

unsigned int Vesper::WindowResizeEvent::GetHeight ( ) const
inline

Get the new height of the window.

29{ return m_Height; }

References m_Height.

Referenced by Vesper::Application::OnWindowResize(), and Vesper::OrthographicCameraController::OnWindowResized().

◆ GetWidth()

unsigned int Vesper::WindowResizeEvent::GetWidth ( ) const
inline

Get the new width of the window.

27{ return m_Width; }

References m_Width.

Referenced by Vesper::Application::OnWindowResize(), and Vesper::OrthographicCameraController::OnWindowResized().

◆ ToString()

std::string Vesper::WindowResizeEvent::ToString ( ) const
inlineoverridevirtual

Convert the event to a string representation.

Reimplemented from Vesper::Event.

33 {
34 std::stringstream ss;
35 ss << "WindowResizeEvent: " << m_Width << ", " << m_Height;
36 return ss.str();
37 }

References m_Height, and m_Width.

Member Data Documentation

◆ m_Height

unsigned int Vesper::WindowResizeEvent::m_Height
private

◆ m_Width

unsigned int Vesper::WindowResizeEvent::m_Width
private

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