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

Abstract interface representing an application window. More...

#include <Window.h>

Inheritance diagram for Muto::Window:
Muto::WindowsWindow

Public Types

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

Public Member Functions

virtual uint32_t GetHeight () const =0
 Retrieves the height of the window.
 
virtual void * GetNativeWindow () const =0
 Retrieves the native window handle.
 
virtual uint32_t GetWidth () const =0
 Retrieves the width of the window.
 
virtual bool IsVSync () const =0
 Checks if vertical synchronization (VSync) is enabled.
 
virtual void OnUpdate ()=0
 Called every frame to update 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 ~Window ()
 

Static Public Member Functions

static Scope< Window > Create (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

Constructor & Destructor Documentation

◆ ~Window()

virtual Muto::Window::~Window ( )
inlinevirtual
46{}

Member Function Documentation

◆ Create()

Scope< Window > Muto::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 {
23 }
constexpr Scope< T > CreateScope(Args &&... args)
Creates a Scope (unique_ptr) for the given type and constructor arguments.
Definition Defines_Macros.h:51

◆ GetHeight()

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

Retrieves the height of the window.

Implemented in Muto::WindowsWindow.

Referenced by Muto::ImGuiLayer::End(), and Sandbox2D::OnUpdate().

◆ GetNativeWindow()

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

Retrieves the native window handle.

Implemented in Muto::WindowsWindow.

Referenced by Muto::Input::GetMousePosition(), Muto::Input::IsKeyPressed(), and Muto::Input::IsMouseButtonPressed().

◆ GetWidth()

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

Retrieves the width of the window.

Implemented in Muto::WindowsWindow.

Referenced by Muto::ImGuiLayer::End(), and Sandbox2D::OnUpdate().

◆ IsVSync()

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

Checks if vertical synchronization (VSync) is enabled.

Implemented in Muto::WindowsWindow.

◆ OnUpdate()

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

Called every frame to update the window.

Implemented in Muto::WindowsWindow.

◆ SetEventCallback()

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

Sets the callback function for window events.

Implemented in Muto::WindowsWindow.

◆ SetVSync()

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

Sets whether vertical synchronization (VSync) is enabled.

Implemented in Muto::WindowsWindow.


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