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::Window Class Referenceabstract

Abstract interface representing an application window. More...

#include <Window.h>

Inheritance diagram for Vesper::Window:
Vesper::WindowsWindow

Public Types

using EventCallbackFn = std::function<void(Event&)>

Public Member Functions

virtual ~Window ()
virtual void OnUpdate ()=0
 Called every frame to update the window.
virtual uint32_t GetWidth () const =0
 Retrieves the width of the window.
virtual uint32_t GetHeight () const =0
 Retrieves the height of the window.
virtual void SetEventCallback (const EventCallbackFn &callback)=0
 Sets the callback function for window events.
virtual void SetVSync (bool enabled)=0
 Sets whether vertical synchronization (VSync) is enabled.
virtual bool IsVSync () const =0
 Checks if vertical synchronization (VSync) is enabled.
virtual void * GetNativeWindow () const =0
 Retrieves the native window handle.

Static Public Member Functions

static Scope< WindowCreate (const WindowProps &props=WindowProps())
 Creates a window instance with the specified properties.

Detailed Description

Abstract interface representing an application window.

Todo
Add Window mode functionality

Member Typedef Documentation

◆ EventCallbackFn

using Vesper::Window::EventCallbackFn = std::function<void(Event&)>

Constructor & Destructor Documentation

◆ ~Window()

virtual Vesper::Window::~Window ( )
inlinevirtual
47{}

Member Function Documentation

◆ Create()

Scope< Window > Vesper::Window::Create ( const WindowProps & props = WindowProps())
static

Creates a window instance with the specified properties.

Parameters
propsThe properties to initialize the window with.
Returns
A scoped pointer to the created window instance.
21 {
22 return CreateScope<WindowsWindow>(props);
23 }
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:52

◆ GetHeight()

virtual uint32_t Vesper::Window::GetHeight ( ) const
pure virtual

Retrieves the height of the window.

Implemented in Vesper::WindowsWindow.

Referenced by Vesper::ImGuiLayer::End().

◆ GetNativeWindow()

virtual void * Vesper::Window::GetNativeWindow ( ) const
pure virtual

◆ GetWidth()

virtual uint32_t Vesper::Window::GetWidth ( ) const
pure virtual

Retrieves the width of the window.

Implemented in Vesper::WindowsWindow.

Referenced by Vesper::ImGuiLayer::End().

◆ IsVSync()

virtual bool Vesper::Window::IsVSync ( ) const
pure virtual

Checks if vertical synchronization (VSync) is enabled.

Implemented in Vesper::WindowsWindow.

◆ OnUpdate()

virtual void Vesper::Window::OnUpdate ( )
pure virtual

Called every frame to update the window.

Implemented in Vesper::WindowsWindow.

◆ SetEventCallback()

virtual void Vesper::Window::SetEventCallback ( const EventCallbackFn & callback)
pure virtual

Sets the callback function for window events.

Implemented in Vesper::WindowsWindow.

◆ SetVSync()

virtual void Vesper::Window::SetVSync ( bool enabled)
pure virtual

Sets whether vertical synchronization (VSync) is enabled.

Implemented in Vesper::WindowsWindow.


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