SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::events::WindowResizeEvent Class Referencefinal

A class representing a window resize event. More...

#include <WindowEvents.h>

Inheritance diagram for spark::events::WindowResizeEvent:
spark::events::Event spark::rtti::HasRtti

Public Member Functions

 WindowResizeEvent (unsigned int width, unsigned int height)
 Instantiates a new WindowResizeEvent for the new size.
 
unsigned int width () const
 Gets the new width of the window.
 
unsigned int height () const
 Gets the new height of the window.
 
- Public Member Functions inherited from spark::events::Event
 Event (const Event &other)=default
 
 Event (Event &&other) noexcept=default
 
Eventoperator= (const Event &other)=default
 
Eventoperator= (Event &&other) noexcept=default
 
virtual EventType eventType () const =0
 Gets the type of the event.
 
virtual int eventCategoryFlags () const =0
 Gets the category flags of the event.
 
bool isInCategory (const EventCategory &category) const
 Checks if the event is in the specified category.
 
- Public Member Functions inherited from spark::rtti::HasRtti
 HasRtti (const HasRtti &other)=default
 
 HasRtti (HasRtti &&other) noexcept=default
 
HasRttioperator= (const HasRtti &other)=default
 
HasRttioperator= (HasRtti &&other) noexcept=default
 
virtual RttiBaserttiInstance () const =0
 

Additional Inherited Members

- Public Attributes inherited from spark::events::Event
bool handled = false
 

Detailed Description

A class representing a window resize event.

Constructor & Destructor Documentation

◆ WindowResizeEvent()

spark::events::WindowResizeEvent::WindowResizeEvent ( unsigned int width,
unsigned int height )
explicit

Instantiates a new WindowResizeEvent for the new size.

Parameters
widthThe new width of the window.
heightThe new height of the window.

Member Function Documentation

◆ height()

unsigned int spark::events::WindowResizeEvent::height ( ) const
nodiscard

Gets the new height of the window.

Returns
The height of the window.

◆ width()

unsigned int spark::events::WindowResizeEvent::width ( ) const
nodiscard

Gets the new width of the window.

Returns
The width of the window.