Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
quori_face::Window Class Reference

#include <Window.hpp>

Inheritance diagram for quori_face::Window:
Inheritance graph
[legend]

Public Types

typedef std::shared_ptr< const WindowConstPtr
 
typedef std::shared_ptr< WindowPtr
 

Public Member Functions

void bind ()
 
void close ()
 
void draw (const std::function< void()> &f)
 
template<typename T >
execute (const std::function< T()> &f)
 
void execute (const std::function< void()> &f)
 
std::uint32_t getHeight () const
 
std::uint32_t getWidth () const
 
bool isClosed () const
 
void swapBuffers ()
 
void unbind ()
 
 ~Window ()
 

Static Public Member Functions

template<typename... Args>
static Ptr open (Args &&...args)
 
static void pollEvents ()
 

Private Member Functions

void close_impl ()
 
GLFWwindow * getHandle ()
 
const GLFWwindow * getHandle () const
 
 Window (const std::uint32_t width, const std::uint32_t height, const std::string &name)
 
 Window (const std::uint32_t width, const std::uint32_t height, const std::string &name, const Monitor::ConstPtr &monitor)
 

Private Attributes

GLFWwindow * window_
 

Friends

class WindowManager
 

Detailed Description

Represents an operating system Window backed by an OpenGL context

Definition at line 21 of file Window.hpp.

Member Typedef Documentation

◆ ConstPtr

typedef std::shared_ptr<const Window> quori_face::Window::ConstPtr

Definition at line 27 of file Window.hpp.

◆ Ptr

typedef std::shared_ptr<Window> quori_face::Window::Ptr

Definition at line 26 of file Window.hpp.

Constructor & Destructor Documentation

◆ ~Window()

Window::~Window ( )

Definition at line 45 of file Window.cpp.

◆ Window() [1/2]

Window::Window ( const std::uint32_t  width,
const std::uint32_t  height,
const std::string name 
)
private

Definition at line 20 of file Window.cpp.

◆ Window() [2/2]

Window::Window ( const std::uint32_t  width,
const std::uint32_t  height,
const std::string name,
const Monitor::ConstPtr monitor 
)
private

Definition at line 32 of file Window.cpp.

Member Function Documentation

◆ bind()

void Window::bind ( )

Definition at line 95 of file Window.cpp.

◆ close()

void Window::close ( )

Close the window. All calls that use the underlying window handle will fail.

Definition at line 51 of file Window.cpp.

◆ close_impl()

void Window::close_impl ( )
private

Definition at line 127 of file Window.cpp.

◆ draw()

void Window::draw ( const std::function< void()> &  f)

Definition at line 119 of file Window.cpp.

◆ execute() [1/2]

template<typename T >
T quori_face::Window::execute ( const std::function< T()> &  f)
inline

Definition at line 56 of file Window.hpp.

◆ execute() [2/2]

void Window::execute ( const std::function< void()> &  f)

Definition at line 110 of file Window.cpp.

◆ getHandle() [1/2]

const GLFWwindow * Window::getHandle ( )
private

Definition at line 85 of file Window.cpp.

◆ getHandle() [2/2]

const GLFWwindow* quori_face::Window::getHandle ( ) const
private

◆ getHeight()

std::uint32_t Window::getHeight ( ) const

Definition at line 76 of file Window.cpp.

◆ getWidth()

std::uint32_t Window::getWidth ( ) const

Definition at line 67 of file Window.cpp.

◆ isClosed()

bool Window::isClosed ( ) const
Returns
True if close() has been called, false otherwise

Definition at line 57 of file Window.cpp.

◆ open()

template<typename... Args>
static Ptr quori_face::Window::open ( Args &&...  args)
inlinestatic

Definition at line 72 of file Window.hpp.

◆ pollEvents()

void Window::pollEvents ( )
static

Definition at line 62 of file Window.cpp.

◆ swapBuffers()

void Window::swapBuffers ( )

Definition at line 105 of file Window.cpp.

◆ unbind()

void Window::unbind ( )

Definition at line 100 of file Window.cpp.

Friends And Related Function Documentation

◆ WindowManager

friend class WindowManager
friend

Definition at line 24 of file Window.hpp.

Member Data Documentation

◆ window_

GLFWwindow* quori_face::Window::window_
private

Definition at line 86 of file Window.hpp.


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


quori_face
Author(s):
autogenerated on Wed Mar 2 2022 00:53:20