Capycore Engine  0.1.0
A simple and lightweight game engine written in C++ based on the Unity API architecture.
Loading...
Searching...
No Matches
Window Class Reference

Represents the game window and provides methods to modify its properties. The window encapsulates an SDL_Window, but it does not own it. The Window class is less of a wrapper and more of a controller. The actual owning is done by the Renderer.

Note that the Window class provides explicit set_xyz methods. This is to avoid juggling with boolean parameters. You describe the desired state, you do not tell it how to get there. More...

#include <window.h>

Public Member Functions

 Window (unsigned min_width, unsigned min_height)
 
Windowset_window_fullscreen ()
 
Windowset_window_windowed ()
 
Windowset_window_bordered ()
 
Windowset_window_borderless ()
 
Windowset_window_unresizable ()
 
Windowset_window_resizable ()
 
Windowset_window_width (unsigned width)
 
Windowset_window_height (unsigned height)
 
int get_window_width () const
 Gets the current width of the window.
 
int get_window_height () const
 Gets the current height of the window.
 

Friends

class Renderer
 

Detailed Description

Represents the game window and provides methods to modify its properties. The window encapsulates an SDL_Window, but it does not own it. The Window class is less of a wrapper and more of a controller. The actual owning is done by the Renderer.

Note that the Window class provides explicit set_xyz methods. This is to avoid juggling with boolean parameters. You describe the desired state, you do not tell it how to get there.

Constructor & Destructor Documentation

◆ Window()

Window::Window ( unsigned  min_width,
unsigned  min_height 
)
explicit

Member Function Documentation

◆ get_window_height()

int Window::get_window_height ( ) const

Gets the current height of the window.

◆ get_window_width()

int Window::get_window_width ( ) const

Gets the current width of the window.

◆ set_window_bordered()

Window & Window::set_window_bordered ( )

◆ set_window_borderless()

Window & Window::set_window_borderless ( )

◆ set_window_fullscreen()

Window & Window::set_window_fullscreen ( )

◆ set_window_height()

Window & Window::set_window_height ( unsigned  height)

◆ set_window_resizable()

Window & Window::set_window_resizable ( )

◆ set_window_unresizable()

Window & Window::set_window_unresizable ( )

◆ set_window_width()

Window & Window::set_window_width ( unsigned  width)

◆ set_window_windowed()

Window & Window::set_window_windowed ( )

Friends And Related Symbol Documentation

◆ Renderer

friend class Renderer
friend

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