SleakEngine 1.0.0
C++23 multi-backend game engine
Loading...
Searching...
No Matches
Sleak::Window Class Reference

#include <Window.hpp>

Public Member Functions

 Window ()
 Window (const Window &)=delete
 Window (int width, int height, std::string name)
 ~Window ()
void Close ()
 Marks the window for close; actual teardown happens in the destructor.
bool GetIsFullScreen ()
SDL_Window * GetSDLWindow ()
std::string GetWindowTitle ()
bool InitializeWindow ()
 Creates the SDL window and picks the graphics API flag for the active renderer.
Windowoperator= (const Window &)=delete
void SetFullScreen (bool bEnable)
void SetImGuiReady (bool ready)
void SetRelativeMouseMode (bool enabled)
bool ShouldClose ()
void ToggleFullScreen ()
void Update ()
 Pumps the SDL event queue, dispatching engine events (resize, input, close, ...).

Static Public Member Functions

static int GetHeight ()
static int GetWidth ()

Detailed Description

SDL window wrapper: owns the native window and pumps SDL events into engine Events. Application owns exactly one.

Definition at line 18 of file Window.hpp.

Constructor & Destructor Documentation

◆ Window() [1/3]

Sleak::Window::Window ( )

Definition at line 17 of file Window.cpp.

◆ Window() [2/3]

Sleak::Window::Window ( int width,
int height,
std::string name )

Definition at line 19 of file Window.cpp.

◆ ~Window()

Sleak::Window::~Window ( )

Definition at line 26 of file Window.cpp.

◆ Window() [3/3]

Sleak::Window::Window ( const Window & )
delete

Member Function Documentation

◆ Close()

void Sleak::Window::Close ( )

Marks the window for close; actual teardown happens in the destructor.

Definition at line 200 of file Window.cpp.

◆ GetHeight()

int Sleak::Window::GetHeight ( )
inlinestatic

Definition at line 48 of file Window.hpp.

◆ GetIsFullScreen()

bool Sleak::Window::GetIsFullScreen ( )
inline

Definition at line 41 of file Window.hpp.

◆ GetSDLWindow()

SDL_Window * Sleak::Window::GetSDLWindow ( )
inline

Definition at line 36 of file Window.hpp.

◆ GetWidth()

int Sleak::Window::GetWidth ( )
inlinestatic

Definition at line 47 of file Window.hpp.

◆ GetWindowTitle()

std::string Sleak::Window::GetWindowTitle ( )
inline

Definition at line 37 of file Window.hpp.

◆ InitializeWindow()

bool Sleak::Window::InitializeWindow ( )

Creates the SDL window and picks the graphics API flag for the active renderer.

Definition at line 35 of file Window.cpp.

◆ operator=()

Window & Sleak::Window::operator= ( const Window & )
delete

◆ SetFullScreen()

void Sleak::Window::SetFullScreen ( bool bEnable)

Definition at line 184 of file Window.cpp.

◆ SetImGuiReady()

void Sleak::Window::SetImGuiReady ( bool ready)
inline

Definition at line 43 of file Window.hpp.

◆ SetRelativeMouseMode()

void Sleak::Window::SetRelativeMouseMode ( bool enabled)

Definition at line 196 of file Window.cpp.

◆ ShouldClose()

bool Sleak::Window::ShouldClose ( )
inline

Definition at line 34 of file Window.hpp.

◆ ToggleFullScreen()

void Sleak::Window::ToggleFullScreen ( )
inline

Definition at line 40 of file Window.hpp.

◆ Update()

void Sleak::Window::Update ( )

Pumps the SDL event queue, dispatching engine events (resize, input, close, ...).

Definition at line 86 of file Window.cpp.