|
SleakEngine 0.1.0
C++23 multi-backend game engine
|
#include <Window.hpp>
Public Member Functions | |
| Window () | |
| Constructs a window with the default size and no title. | |
| Window (const Window &)=delete | |
| Window (int width, int height, std::string name) | |
| Constructs a window with the given size and title. | |
| ~Window () | |
| Destroys the SDL window and shuts down SDL. | |
| void | Close () |
| Marks the window for close; actual teardown happens in the destructor. | |
| bool | GetIsFullScreen () |
| True if the window is currently fullscreen. | |
| SDL_Window * | GetSDLWindow () |
| Returns the underlying SDL window handle. | |
| std::string | GetWindowTitle () |
| Returns the window title. | |
| bool | InitializeWindow () |
| Window & | operator= (const Window &)=delete |
| void | SetFullScreen (bool bEnable) |
| Enables or disables fullscreen mode. | |
| void | SetImGuiReady (bool ready) |
| Marks whether ImGui is ready to receive SDL events. | |
| void | SetRelativeMouseMode (bool enabled) |
| Enables or disables relative (locked, delta-only) mouse mode. | |
| bool | ShouldClose () |
| True once the window has received a close request. | |
| void | ToggleFullScreen () |
| Flips between fullscreen and windowed mode. | |
| void | Update () |
Static Public Member Functions | |
| static int | GetHeight () |
| Returns the current window height in pixels. | |
| static int | GetWidth () |
| Returns the current window width in pixels. | |
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.
| Sleak::Window::Window | ( | ) |
Constructs a window with the default size and no title.
Definition at line 17 of file Window.cpp.
| Sleak::Window::Window | ( | int | width, |
| int | height, | ||
| std::string | name ) |
Constructs a window with the given size and title.
Definition at line 19 of file Window.cpp.
| Sleak::Window::~Window | ( | ) |
Destroys the SDL window and shuts down SDL.
Definition at line 26 of file Window.cpp.
|
delete |
| void Sleak::Window::Close | ( | ) |
Marks the window for close; actual teardown happens in the destructor.
Definition at line 200 of file Window.cpp.
|
inlinestatic |
Returns the current window height in pixels.
Definition at line 63 of file Window.hpp.
|
inline |
True if the window is currently fullscreen.
Definition at line 52 of file Window.hpp.
|
inline |
Returns the underlying SDL window handle.
Definition at line 43 of file Window.hpp.
|
inlinestatic |
Returns the current window width in pixels.
Definition at line 61 of file Window.hpp.
|
inline |
Returns the window title.
Definition at line 45 of file Window.hpp.
| 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.
| void Sleak::Window::SetFullScreen | ( | bool | bEnable | ) |
Enables or disables fullscreen mode.
Definition at line 185 of file Window.cpp.
|
inline |
Marks whether ImGui is ready to receive SDL events.
Definition at line 55 of file Window.hpp.
| void Sleak::Window::SetRelativeMouseMode | ( | bool | enabled | ) |
Enables or disables relative (locked, delta-only) mouse mode.
Definition at line 196 of file Window.cpp.
|
inline |
True once the window has received a close request.
Definition at line 40 of file Window.hpp.
|
inline |
Flips between fullscreen and windowed mode.
Definition at line 50 of file Window.hpp.
| void Sleak::Window::Update | ( | ) |
Pumps the SDL event queue, dispatching engine events (resize, input, close, ...).
Definition at line 87 of file Window.cpp.