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

Class used as application entry point in tests. More...

#include <TestFramework.h>

Inheritance diagram for sw::gui::TestFramework:
sw::gui::GUISystem

Public Member Functions

 TestFramework (int argc, char **argv)
 
virtual ~TestFramework ()=default
 
virtual void Initialize ()
 GUI subsystems initialization. More...
 
Test writer API
input::EventCaptureGetEventCapturer ()
 Returns event capturer which can emulate events. More...
 
input::IInputGetInput ()
 
bool TesterMainStep ()
 Calls main loop but returns after making full step. More...
 
- Public Member Functions inherited from sw::gui::GUISystem
 GUISystem (int argc, char **argv, INativeGUI *gui)
 
virtual ~GUISystem ()
 
Size GetMemorySize ()
 
int NumCommandLineArgs ()
 Gets number of commnad line arguments. More...
 
const char * CommandLineArg (int num)
 Returns command line argument. 0 is first argument not program name. More...
 
const char * ProgramPath ()
 Returns program name retrived from 0 command line argument. More...
 
void OnFocusChanged (INativeWindow *window, bool value)
 Changes focused window. More...
 
void OnResized (INativeWindow *window, uint16 newWidth, uint16 newHeight)
 
void OnMaximized (INativeWindow *window)
 
void OnMinimized (INativeWindow *window)
 
HostWindowCreateNativeHostWindow (uint16 width, uint16 height, const std::string &windowTitle)
 Calls CreateNativeHostWindow with default values. More...
 
HostWindowCreateNativeHostWindow (NativeWindowDescriptor &windowDesc)
 Creates host window based on native window. Window will be added to windows list. More...
 
void Init ()
 Invoke this function in application entry point (main). More...
 
int MainLoop ()
 Application main loop. More...
 
bool MainLoopCore ()
 One step of main loop. More...
 
void HandleEvents ()
 Processes messages and passes them to focused window. More...
 

Private Member Functions

bool InitTesterNativeGUI ()
 
void InitTesterDebugInput ()
 
virtual void OnInitialized () override
 
virtual void OnClosing () override
 
virtual void OnIdle () override
 

Private Attributes

input::EventCapturem_eventCapture
 

Additional Inherited Members

- Static Public Member Functions inherited from sw::gui::GUISystem
static GUISystemGet ()
 
- Protected Member Functions inherited from sw::gui::GUISystem
void DefaultInitWithoutWindow ()
 Makes initialization but leaves window creation for user. More...
 
void DefaultInit (uint16 width, uint16 height, const std::string &windowTitle)
 Default GUI system initialization function. More...
 
bool DefaultInitNativeGUI ()
 Default native GUI initialization. More...
 
bool DefaultInitGraphicAPI ()
 Default graphic api initialization. More...
 
bool DefaultInitRenderingSystem ()
 Initializes rendering system. More...
 
- Protected Attributes inherited from sw::gui::GUISystem
IGraphicAPIInitializerm_graphicApi
 Contains object responsible for dealing with specifics graphic apis. More...
 
INativeGUIm_nativeGUI
 Native window system used to display main application window. More...
 
input::IInputm_input
 Input processor. More...
 
ResourceManagerm_resourceManager
 Resources. More...
 
RenderingSystemOPtr m_renderingSystem
 All rendering connceted functionalities. More...
 
std::vector< HostWindow * > m_windows
 
HostWindowm_focusedWindow
 Only one window can have focus and only this will be processed. More...
 
CommandLineArgs m_cmdArgs
 

Detailed Description

Class used as application entry point in tests.

TestFramework initializes graphic API as MockAPI,

Constructor & Destructor Documentation

sw::gui::TestFramework::TestFramework ( int  argc,
char **  argv 
)
explicit
virtual sw::gui::TestFramework::~TestFramework ( )
virtualdefault

Member Function Documentation

input::EventCapture* sw::gui::TestFramework::GetEventCapturer ( )
inline

Returns event capturer which can emulate events.

input::IInput* sw::gui::TestFramework::GetInput ( )
inline
void sw::gui::TestFramework::Initialize ( )
virtual

GUI subsystems initialization.

If you need specific gui initialization in your application override this function. You can set different GraphicApi or input api.

Reimplemented from sw::gui::GUISystem.

void sw::gui::TestFramework::InitTesterDebugInput ( )
private
bool sw::gui::TestFramework::InitTesterNativeGUI ( )
private
virtual void sw::gui::TestFramework::OnClosing ( )
inlineoverrideprivatevirtual

Implements sw::gui::GUISystem.

virtual void sw::gui::TestFramework::OnIdle ( )
inlineoverrideprivatevirtual

Implements sw::gui::GUISystem.

virtual void sw::gui::TestFramework::OnInitialized ( )
inlineoverrideprivatevirtual

Implements sw::gui::GUISystem.

bool sw::gui::TestFramework::TesterMainStep ( )

Calls main loop but returns after making full step.

Member Data Documentation

input::EventCapture* sw::gui::TestFramework::m_eventCapture
private

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