Sleeping Wombat GUI  0.100
swGUI
Public Member Functions | Protected Member Functions | List of all members
Application Class Reference

Application template class. More...

#include <Application.h>

Inheritance diagram for Application:
sw::gui::GUISystem

Public Member Functions

 Application (int argc, char **argv, sw::gui::INativeGUI *gui)
 
 ~Application ()=default
 
- 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...
 

Protected Member Functions

virtual void Initialize () override
 GUI subsystems initialization. More...
 
virtual void OnInitialized () override
 Function is called when GUI initialization is completed. More...
 
virtual void OnClosing () override
 Function invoked when application is going to close itself. More...
 
virtual void OnIdle () override
 
- 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...
 

Additional Inherited Members

- Static Public Member Functions inherited from sw::gui::GUISystem
static GUISystemGet ()
 
- 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

Application template class.

User should implement virtual functions to use GUI.

Constructor & Destructor Documentation

Application::Application ( int  argc,
char **  argv,
sw::gui::INativeGUI gui 
)
explicit
Application::~Application ( )
default

Member Function Documentation

void Application::Initialize ( )
overrideprotectedvirtual

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 Application::OnClosing ( )
overrideprotectedvirtual

Function invoked when application is going to close itself.

Implements sw::gui::GUISystem.

void Application::OnIdle ( )
overrideprotectedvirtual

Implements sw::gui::GUISystem.

void Application::OnInitialized ( )
overrideprotectedvirtual

Function is called when GUI initialization is completed.

In this function you should initialize your application logic.

Implements sw::gui::GUISystem.


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