Antkeeper  0.0.1
Public Member Functions | Static Public Member Functions | List of all members
app::window_manager Class Referenceabstract

#include <window-manager.hpp>

Inheritance diagram for app::window_manager:
app::sdl_window_manager

Public Member Functions

virtual ~window_manager ()=default
 Destructs a window manager. More...
 
virtual void update ()=0
 Updates all managed windows. More...
 
virtual std::shared_ptr< windowcreate_window (const std::string &title, const math::ivec2 &windowed_position, const math::ivec2 &windowed_size, bool maximized, bool fullscreen, bool v_sync)=0
 Constructs a window. More...
 
virtual std::size_t get_display_count () const =0
 Returns the number of available displays. More...
 
virtual const displayget_display (std::size_t index) const =0
 Returns the display with the given index. More...
 

Static Public Member Functions

static std::unique_ptr< window_managerinstance ()
 Allocates and returns a window manager. More...
 

Detailed Description

Definition at line 34 of file window-manager.hpp.

Constructor & Destructor Documentation

◆ ~window_manager()

virtual app::window_manager::~window_manager ( )
virtualdefault

Destructs a window manager.

Member Function Documentation

◆ create_window()

virtual std::shared_ptr<window> app::window_manager::create_window ( const std::string &  title,
const math::ivec2 windowed_position,
const math::ivec2 windowed_size,
bool  maximized,
bool  fullscreen,
bool  v_sync 
)
pure virtual

Constructs a window.

Parameters
titleTitle of the window.
windowed_positionWindowed (non-maximized, non-fullscreen) position of the window, in display units.
windowed_sizeWindowed (non-maximized, non-fullscreen) size of the window, in display units.
maximizedtrue if the window should start maximized, false otherwise.
fullscreentrue if the window should start fullscreen, false otherwise.
v_synctrue if v-sync should be enabled, false otherwise.

Implemented in app::sdl_window_manager.

◆ get_display()

virtual const display& app::window_manager::get_display ( std::size_t  index) const
pure virtual

Returns the display with the given index.

Parameters
indexIndex of a display.
Returns
Display with the given index.

Implemented in app::sdl_window_manager.

◆ get_display_count()

virtual std::size_t app::window_manager::get_display_count ( ) const
pure virtual

Returns the number of available displays.

Implemented in app::sdl_window_manager.

◆ instance()

std::unique_ptr< window_manager > app::window_manager::instance ( )
static

Allocates and returns a window manager.

Definition at line 25 of file window-manager.cpp.

◆ update()

virtual void app::window_manager::update ( )
pure virtual

Updates all managed windows.

This should be called once per frame.

Implemented in app::sdl_window_manager.


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