sculpto
Public Member Functions | List of all members
scl::windows_window Class Reference

#include <windows_window.h>

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

Public Member Functions

 windows_window (int Width, int Height, const std::string &Title)
 
void Update () override
 
void FlipFullscreen () override
 
void ChangeTitle (const std::string &NewTitle) override
 
void ShutDown () override
 
- Public Member Functions inherited from scl::window
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
 

Additional Inherited Members

- Static Public Member Functions inherited from scl::window
static unique< windowCreate (int Width, int Height, const std::string &Title)
 
- Static Public Attributes inherited from scl::window
static const int ViewportId = 0
 
- Protected Attributes inherited from scl::window
window_handle Handle {}
 
bool IsInitialised { false }
 
bool IsFullscreen { false }
 
data Data {}
 

Detailed Description

Definition at line 16 of file windows_window.h.

Constructor & Destructor Documentation

◆ windows_window()

scl::windows_window::windows_window ( int  Width,
int  Height,
const std::string &  Title 
)

Windows window class methods.

  • 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 48 of file windows_window.cpp.

48 :
49 window(Width, Height, Title)
50{
51 this->Create();
52}
window(const window &)=delete

Member Function Documentation

◆ ChangeTitle()

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

Reimplemented from scl::window.

Definition at line 70 of file windows_window.cpp.

71{
72 SetWindowText(Handle, NewTitle.c_str());
73}
window_handle Handle
Definition: window.h:41

◆ FlipFullscreen()

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

Reimplemented from scl::window.

Definition at line 66 of file windows_window.cpp.

67{
68}

◆ ShutDown()

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

Implements scl::window.

Definition at line 75 of file windows_window.cpp.

76{
77 PostMessage(Handle, WM_CLOSE, 0, 0);
78}

◆ Update()

void scl::windows_window::Update ( )
overridevirtual
  • Window update function.
Parameters
None.
Returns
None.

Reimplemented from scl::window.

Definition at line 54 of file windows_window.cpp.

55{
56 MSG msg;
57 while (PeekMessage(&msg, nullptr, 0, 0, PM_REMOVE))
58 {
59 if (msg.message == WM_QUIT)
60 return;
61 TranslateMessage(&msg);
62 DispatchMessage(&msg);
63 }
64}

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