Antkeeper  0.0.1
Public Member Functions | Protected Attributes | Friends | List of all members
app::window Class Referenceabstract

#include <window.hpp>

Inheritance diagram for app::window:
app::sdl_window

Public Member Functions

virtual void set_title (const std::string &title)=0
 Changes the title of the window. More...
 
virtual void set_position (const math::ivec2 &position)=0
 Changes the position of the window. More...
 
virtual void set_size (const math::ivec2 &size)=0
 Changes the size of the window. More...
 
virtual void set_minimum_size (const math::ivec2 &size)=0
 Sets the minimum size of the window. More...
 
virtual void set_maximum_size (const math::ivec2 &size)=0
 Sets the maximum size of the window. More...
 
virtual void set_maximized (bool maximized)=0
 Maximizes or unmaximizes the window. More...
 
virtual void set_fullscreen (bool fullscreen)=0
 Enables or disables fullscreen mode. More...
 
virtual void set_v_sync (bool v_sync)=0
 Enables or disables v-sync. More...
 
virtual void make_current ()=0
 Makes the window's graphics context current. More...
 
virtual void swap_buffers ()=0
 Swaps the front and back buffers of the window's graphics context. More...
 
const std::string & get_title () const noexcept
 Returns the title of the window. More...
 
const math::ivec2get_windowed_position () const noexcept
 Returns the windowed (non-maximized, non-fullscreen) position of the window, in display units. More...
 
const math::ivec2get_position () const noexcept
 Returns the current position of the window, in display units. More...
 
const math::ivec2get_windowed_size () const noexcept
 Returns the windowed (non-maximized, non-fullscreen) size of the window, in display units. More...
 
const math::ivec2get_size () const noexcept
 Returns the current size of the window, in display units. More...
 
const math::ivec2get_minimum_size () const noexcept
 Returns the minimum size of the window, in display units. More...
 
const math::ivec2get_maximum_size () const noexcept
 Returns the maximum size of the window, in display units. More...
 
const math::ivec2get_viewport_size () const noexcept
 Returns the current size of the window's drawable viewport, in pixels. More...
 
bool is_maximized () const noexcept
 Returns true if the window is maximized, false otherwise. More...
 
bool is_fullscreen () const noexcept
 Returns true if the window is in fullscreen mode, false otherwise. More...
 
bool get_v_sync () const noexcept
 Returns true if the v-sync is enabled, false otherwise. More...
 
event::channel< window_closed_event > & get_closed_channel () noexcept
 Returns the channel through which window closed events are published. More...
 
event::channel< window_focus_changed_event > & get_focus_changed_channel () noexcept
 Returns the channel through which window focus changed events are published. More...
 
event::channel< window_maximized_event > & get_maximized_channel () noexcept
 Returns the channel through which window maximized events are published. More...
 
event::channel< window_minimized_event > & get_minimized_channel () noexcept
 Returns the channel through which window minimized events are published. More...
 
event::channel< window_moved_event > & get_moved_channel () noexcept
 Returns the channel through which window moved events are published. More...
 
event::channel< window_resized_event > & get_resized_channel () noexcept
 Returns the channel through which window resized events are published. More...
 
event::channel< window_restored_event > & get_restored_channel () noexcept
 Returns the channel through which window restored events are published. More...
 
virtual const gl::pipelineget_graphics_pipeline () const noexcept=0
 Returns the graphics pipeline associated with this window. More...
 
virtual gl::pipelineget_graphics_pipeline () noexcept=0
 Returns the graphics pipeline associated with this window. More...
 

Protected Attributes

std::string m_title
 
math::ivec2 m_windowed_position {0, 0}
 
math::ivec2 m_position {0, 0}
 
math::ivec2 m_windowed_size {0, 0}
 
math::ivec2 m_size {0, 0}
 
math::ivec2 m_minimum_size {0, 0}
 
math::ivec2 m_maximum_size {0, 0}
 
math::ivec2 m_viewport_size {0, 0}
 
bool m_maximized {false}
 
bool m_fullscreen {false}
 
bool m_v_sync {false}
 
event::publisher< window_closed_eventm_closed_publisher
 
event::publisher< window_focus_changed_eventm_focus_changed_publisher
 
event::publisher< window_maximized_eventm_maximized_publisher
 
event::publisher< window_minimized_eventm_minimized_publisher
 
event::publisher< window_moved_eventm_moved_publisher
 
event::publisher< window_resized_eventm_resized_publisher
 
event::publisher< window_restored_eventm_restored_publisher
 

Friends

class window_manager
 

Detailed Description

Definition at line 41 of file window.hpp.

Member Function Documentation

◆ get_closed_channel()

event::channel<window_closed_event>& app::window::get_closed_channel ( )
inlinenoexcept

Returns the channel through which window closed events are published.

Definition at line 183 of file window.hpp.

◆ get_focus_changed_channel()

event::channel<window_focus_changed_event>& app::window::get_focus_changed_channel ( )
inlinenoexcept

Returns the channel through which window focus changed events are published.

Definition at line 189 of file window.hpp.

◆ get_graphics_pipeline() [1/2]

virtual const gl::pipeline& app::window::get_graphics_pipeline ( ) const
pure virtualnoexcept

Returns the graphics pipeline associated with this window.

Implemented in app::sdl_window.

◆ get_graphics_pipeline() [2/2]

virtual gl::pipeline& app::window::get_graphics_pipeline ( )
pure virtualnoexcept

Returns the graphics pipeline associated with this window.

Implemented in app::sdl_window.

◆ get_maximized_channel()

event::channel<window_maximized_event>& app::window::get_maximized_channel ( )
inlinenoexcept

Returns the channel through which window maximized events are published.

Definition at line 195 of file window.hpp.

◆ get_maximum_size()

const math::ivec2& app::window::get_maximum_size ( ) const
inlinenoexcept

Returns the maximum size of the window, in display units.

Definition at line 147 of file window.hpp.

◆ get_minimized_channel()

event::channel<window_minimized_event>& app::window::get_minimized_channel ( )
inlinenoexcept

Returns the channel through which window minimized events are published.

Definition at line 201 of file window.hpp.

◆ get_minimum_size()

const math::ivec2& app::window::get_minimum_size ( ) const
inlinenoexcept

Returns the minimum size of the window, in display units.

Definition at line 141 of file window.hpp.

◆ get_moved_channel()

event::channel<window_moved_event>& app::window::get_moved_channel ( )
inlinenoexcept

Returns the channel through which window moved events are published.

Definition at line 207 of file window.hpp.

◆ get_position()

const math::ivec2& app::window::get_position ( ) const
inlinenoexcept

Returns the current position of the window, in display units.

Definition at line 123 of file window.hpp.

◆ get_resized_channel()

event::channel<window_resized_event>& app::window::get_resized_channel ( )
inlinenoexcept

Returns the channel through which window resized events are published.

Definition at line 213 of file window.hpp.

◆ get_restored_channel()

event::channel<window_restored_event>& app::window::get_restored_channel ( )
inlinenoexcept

Returns the channel through which window restored events are published.

Definition at line 219 of file window.hpp.

◆ get_size()

const math::ivec2& app::window::get_size ( ) const
inlinenoexcept

Returns the current size of the window, in display units.

Definition at line 135 of file window.hpp.

◆ get_title()

const std::string& app::window::get_title ( ) const
inlinenoexcept

Returns the title of the window.

Definition at line 111 of file window.hpp.

◆ get_v_sync()

bool app::window::get_v_sync ( ) const
inlinenoexcept

Returns true if the v-sync is enabled, false otherwise.

Definition at line 171 of file window.hpp.

◆ get_viewport_size()

const math::ivec2& app::window::get_viewport_size ( ) const
inlinenoexcept

Returns the current size of the window's drawable viewport, in pixels.

Definition at line 153 of file window.hpp.

◆ get_windowed_position()

const math::ivec2& app::window::get_windowed_position ( ) const
inlinenoexcept

Returns the windowed (non-maximized, non-fullscreen) position of the window, in display units.

Definition at line 117 of file window.hpp.

◆ get_windowed_size()

const math::ivec2& app::window::get_windowed_size ( ) const
inlinenoexcept

Returns the windowed (non-maximized, non-fullscreen) size of the window, in display units.

Definition at line 129 of file window.hpp.

◆ is_fullscreen()

bool app::window::is_fullscreen ( ) const
inlinenoexcept

Returns true if the window is in fullscreen mode, false otherwise.

Definition at line 165 of file window.hpp.

◆ is_maximized()

bool app::window::is_maximized ( ) const
inlinenoexcept

Returns true if the window is maximized, false otherwise.

Definition at line 159 of file window.hpp.

◆ make_current()

virtual void app::window::make_current ( )
pure virtual

Makes the window's graphics context current.

Implemented in app::sdl_window.

◆ set_fullscreen()

virtual void app::window::set_fullscreen ( bool  fullscreen)
pure virtual

Enables or disables fullscreen mode.

Parameters
fullscreentrue if the window should be in fullscreen mode, false otherwise.

Implemented in app::sdl_window.

◆ set_maximized()

virtual void app::window::set_maximized ( bool  maximized)
pure virtual

Maximizes or unmaximizes the window.

Parameters
maximizedtrue if the window should be maximized, false otherwise.

Implemented in app::sdl_window.

◆ set_maximum_size()

virtual void app::window::set_maximum_size ( const math::ivec2 size)
pure virtual

Sets the maximum size of the window.

Parameters
sizeMaximum size of the window, in display units.

Implemented in app::sdl_window.

◆ set_minimum_size()

virtual void app::window::set_minimum_size ( const math::ivec2 size)
pure virtual

Sets the minimum size of the window.

Parameters
sizeMinimum size of the window, in display units.

Implemented in app::sdl_window.

◆ set_position()

virtual void app::window::set_position ( const math::ivec2 position)
pure virtual

Changes the position of the window.

Parameters
positionPosition of the window, in display units.

Implemented in app::sdl_window.

◆ set_size()

virtual void app::window::set_size ( const math::ivec2 size)
pure virtual

Changes the size of the window.

Parameters
sizeSize of the window, in display units.

Implemented in app::sdl_window.

◆ set_title()

virtual void app::window::set_title ( const std::string &  title)
pure virtual

Changes the title of the window.

Parameters
titleWindow title.

Implemented in app::sdl_window.

◆ set_v_sync()

virtual void app::window::set_v_sync ( bool  v_sync)
pure virtual

Enables or disables v-sync.

Parameters
v_synctrue if the v-sync should be enabled, false otherwise.

Implemented in app::sdl_window.

◆ swap_buffers()

virtual void app::window::swap_buffers ( )
pure virtual

Swaps the front and back buffers of the window's graphics context.

Implemented in app::sdl_window.

Friends And Related Function Documentation

◆ window_manager

friend class window_manager
friend

Definition at line 225 of file window.hpp.

Member Data Documentation

◆ m_closed_publisher

event::publisher<window_closed_event> app::window::m_closed_publisher
protected

Definition at line 239 of file window.hpp.

◆ m_focus_changed_publisher

event::publisher<window_focus_changed_event> app::window::m_focus_changed_publisher
protected

Definition at line 240 of file window.hpp.

◆ m_fullscreen

bool app::window::m_fullscreen {false}
protected

Definition at line 236 of file window.hpp.

◆ m_maximized

bool app::window::m_maximized {false}
protected

Definition at line 235 of file window.hpp.

◆ m_maximized_publisher

event::publisher<window_maximized_event> app::window::m_maximized_publisher
protected

Definition at line 241 of file window.hpp.

◆ m_maximum_size

math::ivec2 app::window::m_maximum_size {0, 0}
protected

Definition at line 233 of file window.hpp.

◆ m_minimized_publisher

event::publisher<window_minimized_event> app::window::m_minimized_publisher
protected

Definition at line 242 of file window.hpp.

◆ m_minimum_size

math::ivec2 app::window::m_minimum_size {0, 0}
protected

Definition at line 232 of file window.hpp.

◆ m_moved_publisher

event::publisher<window_moved_event> app::window::m_moved_publisher
protected

Definition at line 243 of file window.hpp.

◆ m_position

math::ivec2 app::window::m_position {0, 0}
protected

Definition at line 229 of file window.hpp.

◆ m_resized_publisher

event::publisher<window_resized_event> app::window::m_resized_publisher
protected

Definition at line 244 of file window.hpp.

◆ m_restored_publisher

event::publisher<window_restored_event> app::window::m_restored_publisher
protected

Definition at line 245 of file window.hpp.

◆ m_size

math::ivec2 app::window::m_size {0, 0}
protected

Definition at line 231 of file window.hpp.

◆ m_title

std::string app::window::m_title
protected

Definition at line 227 of file window.hpp.

◆ m_v_sync

bool app::window::m_v_sync {false}
protected

Definition at line 237 of file window.hpp.

◆ m_viewport_size

math::ivec2 app::window::m_viewport_size {0, 0}
protected

Definition at line 234 of file window.hpp.

◆ m_windowed_position

math::ivec2 app::window::m_windowed_position {0, 0}
protected

Definition at line 228 of file window.hpp.

◆ m_windowed_size

math::ivec2 app::window::m_windowed_size {0, 0}
protected

Definition at line 230 of file window.hpp.


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