sculpto
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Attributes | List of all members
scl::window Class Referenceabstract

#include <window.h>

Inheritance diagram for scl::window:
scl::windows_window

Classes

struct  data
 

Public Member Functions

const dataGetWindowData () const
 
const window_handleGetHandle () const
 
bool GetIsInitialised () const
 
 window (const window &)=delete
 
 window (const window &&)=delete
 
windowoperator= (const window &)=delete
 
windowoperator= (const window &&)=delete
 
window operator= (const window &) const =delete
 
window operator= (const window &&) const =delete
 
 window (int Width, int Height, const std::string &Title)
 
virtual void Update ()
 
virtual void FlipFullscreen ()
 
virtual void ChangeTitle (const std::string &NewTitle)
 
virtual void ShutDown ()=0
 

Static Public Member Functions

static unique< windowCreate (int Width, int Height, const std::string &Title)
 

Static Public Attributes

static const int ViewportId = 0
 

Protected Attributes

window_handle Handle {}
 
bool IsInitialised { false }
 
bool IsFullscreen { false }
 
data Data {}
 

Detailed Description

Abstarct, platfomr independent window class.

Definition at line 18 of file window.h.

Constructor & Destructor Documentation

◆ window() [1/3]

scl::window::window ( const window )
delete

Abstratc, platform independent window methods.

** Copying and moving constructors, lvalue and rvalue copy assigment and move assigment operators removal due to window concept (window loop execution at runtime).

◆ window() [2/3]

scl::window::window ( const window &&  )
delete

◆ window() [3/3]

scl::window::window ( int  Width,
int  Height,
const std::string &  Title 
)
  • Windows OS specific window construcotor. Initialise window, but don't shows it and don't start message loop. If initialisation successful 'IsStartupSuccess' would be set to true and then window message loop could be started.
Parameters
Width- Width of the creating window in pixels.
Height- Height of creating window in pixels.
Name- Title of the creating window.
VSync- vertical syncrosination enabling flag.

Definition at line 15 of file window.cpp.

15 :
16 Data(Width, Height, Title)
17{
18}
data Data
Definition: window.h:44

Member Function Documentation

◆ ChangeTitle()

virtual void scl::window::ChangeTitle ( const std::string &  NewTitle)
inlinevirtual
  • Change window title to specified.
Parameters
NewTitle- new window title.
Returns
None.

Reimplemented in scl::windows_window.

Definition at line 113 of file window.h.

113{}

◆ Create()

scl::unique< scl::window > scl::window::Create ( int  Width,
int  Height,
const std::string &  Title 
)
static
  • Create window depends on platform function.
Parameters
Width- Width of the creating window in pixels.
Height- Height of creating window in pixels.
Title- Title of the creating window.
VSync- vertical syncrosination enabling flag. \Return Created window pointer.

!SCL_PLATFORM_WINDOWS

Definition at line 20 of file window.cpp.

21{
22#ifdef SCL_PLATFORM_WINDOWS
23 return CreateUnique<windows_window>(Width, Height, Title);
24#else
25 SCL_CORE_ASSERT(false, "Unknown platform!");
26 return nullptr;
27#endif
28}
#define SCL_CORE_ASSERT(expr,...)
Definition: assert.h:69

◆ FlipFullscreen()

virtual void scl::window::FlipFullscreen ( )
inlinevirtual
  • Woggle window display mode (fullscreen/windowed) function.
Parameters
None.
Returns
None.

Reimplemented in scl::windows_window.

Definition at line 105 of file window.h.

105{}

◆ GetHandle()

const window_handle & scl::window::GetHandle ( ) const
inline

Window handle getter function.

Definition at line 50 of file window.h.

50{ return Handle; }
window_handle Handle
Definition: window.h:41

◆ GetIsInitialised()

bool scl::window::GetIsInitialised ( ) const
inline

Window initilised flag getter function.

Definition at line 52 of file window.h.

52{ return IsInitialised; }
bool IsInitialised
Definition: window.h:42

◆ GetWindowData()

const data & scl::window::GetWindowData ( ) const
inline

Abstract, platform independent window data getters/setters.

Window data getting function.

Definition at line 48 of file window.h.

48{ return Data; }

◆ operator=() [1/4]

window scl::window::operator= ( const window &&  ) const
delete

◆ operator=() [2/4]

window & scl::window::operator= ( const window &&  )
delete

◆ operator=() [3/4]

window scl::window::operator= ( const window ) const
delete

◆ operator=() [4/4]

window & scl::window::operator= ( const window )
delete

◆ ShutDown()

virtual void scl::window::ShutDown ( )
pure virtual
  • Window shut down function. Closes window and create window close event.
Parameters
None.
Returns
None.

Implemented in scl::windows_window.

◆ Update()

virtual void scl::window::Update ( )
inlinevirtual
  • Window update function.
Parameters
None.
Returns
None.

Reimplemented in scl::windows_window.

Definition at line 97 of file window.h.

97{}

Member Data Documentation

◆ Data

data scl::window::Data {}
protected

Definition at line 44 of file window.h.

◆ Handle

window_handle scl::window::Handle {}
protected

Definition at line 41 of file window.h.

◆ IsFullscreen

bool scl::window::IsFullscreen { false }
protected

Definition at line 43 of file window.h.

◆ IsInitialised

bool scl::window::IsInitialised { false }
protected

Definition at line 42 of file window.h.

◆ ViewportId

const int scl::window::ViewportId = 0
static

Application main window viewport id.

Definition at line 38 of file window.h.


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