Sleeping Wombat GUI  0.100
swGUI
Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::gui::WinAPIGUI Class Reference

#include <WinAPIGUI.h>

Inheritance diagram for sw::gui::WinAPIGUI:
sw::gui::INativeGUI

Public Member Functions

 WinAPIGUI ()
 
virtual ~WinAPIGUI ()=default
 
virtual bool MainLoop (bool blockingMode) override
 Invokes main loop of native GUI. More...
 
virtual bool Init (const NativeGUIInitData &initData) override
 Initializes native GUI. More...
 
virtual sw::input::IInputUseNativeInput () override
 Initalize native api for this gui system and return IInput object. GUI can use native input api for specific gui system or provide different library to deal directly with hardware. Classes derived from INativeGUI are reposible for updating native inputs in main loop. In case of using separate hardware input library INativeGUI does nothing. More...
 
virtual INativeWindowCreateWindow (NativeWindowDescriptor &descriptor) override
 Creates native GUI window. More...
 
void HandleEvent (HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
 Captures important events like changing focus. More...
 
- Public Member Functions inherited from sw::gui::INativeGUI
 INativeGUI ()=default
 
 ~INativeGUI ()=default
 

Static Public Member Functions

static WinAPIGUICreate ()
 Creates WinAPIGUI object. More...
 
static void PrintLastError ()
 Gets last win api error and prints to debug window. More...
 
static const wchar_t * GetWindowClassName ()
 Window class registered in WinAPI. More...
 

Private Member Functions

void RegisterWindowClass ()
 Registers window class. More...
 
bool MainLoopCore (MSG *msg)
 Core functionality of main loop function. More...
 

Private Attributes

sw::input::WinApiInputProxym_input
 
NativeGUIInitData m_initData
 

Constructor & Destructor Documentation

sw::gui::WinAPIGUI::WinAPIGUI ( )
explicit
virtual sw::gui::WinAPIGUI::~WinAPIGUI ( )
virtualdefault

Member Function Documentation

WinAPIGUI * sw::gui::WinAPIGUI::Create ( )
static

Creates WinAPIGUI object.

INativeWindow * sw::gui::WinAPIGUI::CreateWindow ( NativeWindowDescriptor descriptor)
overridevirtual

Creates native GUI window.

Implements sw::gui::INativeGUI.

const wchar_t * sw::gui::WinAPIGUI::GetWindowClassName ( )
static

Window class registered in WinAPI.

void sw::gui::WinAPIGUI::HandleEvent ( HWND  hWnd,
UINT  message,
WPARAM  wParam,
LPARAM  lParam 
)

Captures important events like changing focus.

bool sw::gui::WinAPIGUI::Init ( const NativeGUIInitData initData)
overridevirtual

Initializes native GUI.

Returns
Returns false if initialization failed.

Implements sw::gui::INativeGUI.

bool sw::gui::WinAPIGUI::MainLoop ( bool  blockingMode)
overridevirtual

Invokes main loop of native GUI.

Returns
Returns true if application should close.

Implements sw::gui::INativeGUI.

bool sw::gui::WinAPIGUI::MainLoopCore ( MSG *  msg)
private

Core functionality of main loop function.

void sw::gui::WinAPIGUI::PrintLastError ( )
static

Gets last win api error and prints to debug window.

void sw::gui::WinAPIGUI::RegisterWindowClass ( )
private

Registers window class.

sw::input::IInput * sw::gui::WinAPIGUI::UseNativeInput ( )
overridevirtual

Initalize native api for this gui system and return IInput object. GUI can use native input api for specific gui system or provide different library to deal directly with hardware. Classes derived from INativeGUI are reposible for updating native inputs in main loop. In case of using separate hardware input library INativeGUI does nothing.

Implements sw::gui::INativeGUI.

Member Data Documentation

NativeGUIInitData sw::gui::WinAPIGUI::m_initData
private
sw::input::WinApiInputProxy* sw::gui::WinAPIGUI::m_input
private

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