|
HikoGUI
A low latency retained GUI
|
#include <ttauri/application.hpp>
Public Member Functions | |
| application (std::weak_ptr< application_delegate > const &delegate, std::vector< std::string > const &arguments, os_handle instance) | |
| This function will take ownership of the delegate and delete it during destruction. | |
| virtual int | main () |
| Start the application. | |
| application (const application &)=delete | |
| application & | operator= (const application &)=delete |
| application (application &&)=delete | |
| application & | operator= (application &&)=delete |
| virtual void | run_from_main_loop (std::function< void()> function)=0 |
| virtual void | exit (int exit_code=0)=0 |
| Exit the main loop and exit the application. | |
Data Fields | |
| std::weak_ptr< application_delegate > | delegate |
| std::vector< std::string > | arguments |
| os_handle | instance |
| Handle to the operating system's application-instance. | |
| gui_window_size | initial_window_size = gui_window_size::normal |
| The initial window size for the first application window. | |
| datum | configuration |
| The global configuration. | |
| date::time_zone const * | timeZone = nullptr |
| The system timezone. | |
| thread_id | main_thread_id |
| Thread id of the main thread. | |
| std::atomic< bool > | inLoop |
Static Public Attributes | |
| static application * | global |
A singleton that represents the application. An application should be instantiated in a local variable in main. This will allow the application to destruct application systems in the correct order when main() goes out of scope and before the global variables are destructed.
| tt::application::application | ( | std::weak_ptr< application_delegate > const & | delegate, |
| std::vector< std::string > const & | arguments, | ||
| os_handle | instance ) |
This function will take ownership of the delegate and delete it during destruction.
| delegate | A pointer to an application delegate. |
| arguments | A list of command line arguments. On posix this is simply each argument, for win32 it needs to be processed to process quotes and escaping correctly.. |
|
pure virtual |
Exit the main loop and exit the application.
Implemented in tt::application_win32.
|
virtual |
Start the application.
|
pure virtual |
Run the given function on the main thread.
Implemented in tt::application_win32.
| std::vector<std::string> tt::application::arguments |
Command line arguments.
| datum tt::application::configuration |
The global configuration.
| std::weak_ptr<application_delegate> tt::application::delegate |
application delegate
| gui_window_size tt::application::initial_window_size = gui_window_size::normal |
The initial window size for the first application window.
| os_handle tt::application::instance |
Handle to the operating system's application-instance.
| thread_id tt::application::main_thread_id |
Thread id of the main thread.
| date::time_zone const* tt::application::timeZone = nullptr |
The system timezone.