OpenEnroth 73e68f7
Loading...
Searching...
No Matches
Public Member Functions | List of all members
PlatformWindow Class Referenceabstract

#include <PlatformWindow.h>

Inheritance diagram for PlatformWindow:
ProxyBase< PlatformWindow > NullWindow SdlWindow ProxyWindow ApplicationProxy

Public Member Functions

virtual ~PlatformWindow ()=default
 
virtual void setTitle (const std::string &title)=0
 
virtual std::string title () const =0
 
virtual void resize (const Sizei &size)=0
 
virtual Sizei size () const =0
 
virtual void setPosition (const Pointi &pos)=0
 
virtual Pointi position () const =0
 
virtual void setVisible (bool visible)=0
 
virtual bool isVisible () const =0
 
virtual void setResizable (bool resizable)=0
 
virtual bool isResizable () const =0
 
virtual void setWindowMode (PlatformWindowMode mode)=0
 
virtual PlatformWindowMode windowMode ()=0
 
virtual void setGrabsMouse (bool grabsMouse)=0
 
virtual bool grabsMouse () const =0
 
virtual void setOrientations (PlatformWindowOrientations orientations)=0
 
virtual PlatformWindowOrientations orientations ()=0
 
virtual Marginsi frameMargins () const =0
 
virtual void * nativeHandle () const =0
 
virtual void activate ()=0
 
virtual std::unique_ptr< PlatformOpenGLContextcreateOpenGLContext (const PlatformOpenGLOptions &options)=0
 

Detailed Description

Abstraction for accessing platform-specific window API.

This class is essentially an API handle and doesn't hold any state. Windows users can think about it as a thin wrapper atop of HWND, so a name like PlatformWindowApiHandle might've been more suitable here. Fortunately we're not writing in Java and prefer shorter names.

Event processing & state storage can be done by subclassing PlatformEventHandler and then using it when calling into PlatformEventLoop.

Constructor & Destructor Documentation

◆ ~PlatformWindow()

virtual PlatformWindow::~PlatformWindow ( )
virtualdefault

Member Function Documentation

◆ activate()

virtual void PlatformWindow::activate ( )
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ createOpenGLContext()

virtual std::unique_ptr< PlatformOpenGLContext > PlatformWindow::createOpenGLContext ( const PlatformOpenGLOptions options)
pure virtual

◆ frameMargins()

virtual Marginsi PlatformWindow::frameMargins ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ grabsMouse()

virtual bool PlatformWindow::grabsMouse ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ isResizable()

virtual bool PlatformWindow::isResizable ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ isVisible()

virtual bool PlatformWindow::isVisible ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ nativeHandle()

virtual void * PlatformWindow::nativeHandle ( ) const
pure virtual
Returns
Pointer to the native window, e.g. SDL_window on SDL.

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ orientations()

virtual PlatformWindowOrientations PlatformWindow::orientations ( )
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ position()

virtual Pointi PlatformWindow::position ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ resize()

virtual void PlatformWindow::resize ( const Sizei size)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setGrabsMouse()

virtual void PlatformWindow::setGrabsMouse ( bool  grabsMouse)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setOrientations()

virtual void PlatformWindow::setOrientations ( PlatformWindowOrientations  orientations)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setPosition()

virtual void PlatformWindow::setPosition ( const Pointi pos)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setResizable()

virtual void PlatformWindow::setResizable ( bool  resizable)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setTitle()

virtual void PlatformWindow::setTitle ( const std::string &  title)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setVisible()

virtual void PlatformWindow::setVisible ( bool  visible)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ setWindowMode()

virtual void PlatformWindow::setWindowMode ( PlatformWindowMode  mode)
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ size()

virtual Sizei PlatformWindow::size ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ title()

virtual std::string PlatformWindow::title ( ) const
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.

◆ windowMode()

virtual PlatformWindowMode PlatformWindow::windowMode ( )
pure virtual

Implemented in NullWindow, ProxyWindow, and SdlWindow.


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