Sleeping Wombat GUI
0.100
swGUI
|
Application template class. More...
#include <Application.h>
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) |
HostWindow * | CreateNativeHostWindow (uint16 width, uint16 height, const std::string &windowTitle) |
Calls CreateNativeHostWindow with default values. More... | |
HostWindow * | CreateNativeHostWindow (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 GUISystem & | Get () |
Protected Attributes inherited from sw::gui::GUISystem | |
IGraphicAPIInitializer * | m_graphicApi |
Contains object responsible for dealing with specifics graphic apis. More... | |
INativeGUI * | m_nativeGUI |
Native window system used to display main application window. More... | |
input::IInput * | m_input |
Input processor. More... | |
ResourceManager * | m_resourceManager |
Resources. More... | |
RenderingSystemOPtr | m_renderingSystem |
All rendering connceted functionalities. More... | |
std::vector< HostWindow * > | m_windows |
HostWindow * | m_focusedWindow |
Only one window can have focus and only this will be processed. More... | |
CommandLineArgs | m_cmdArgs |
Application template class.
User should implement virtual functions to use GUI.
|
explicit |
|
default |
|
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.
|
overrideprotectedvirtual |
Function invoked when application is going to close itself.
Implements sw::gui::GUISystem.
|
overrideprotectedvirtual |
Implements sw::gui::GUISystem.
|
overrideprotectedvirtual |
Function is called when GUI initialization is completed.
In this function you should initialize your application logic.
Implements sw::gui::GUISystem.