#include <ttauri/GUI/gui_system.hpp>
|
|
static os_handle | instance |
| |
◆ event_queue()
Get the event queue.
This queue allows for adding jobs to the queue which will be executed on the gui thread.
◆ init()
| virtual void tt::gui_system::init |
( |
| ) |
|
|
inlinevirtualnoexcept |
Initialize after construction.
Call this function directly after the constructor on the same thread.
◆ is_gui_thread()
| bool tt::gui_system::is_gui_thread |
( |
| ) |
const |
|
inlinenoexcept |
Check if this thread is the same as the gui thread.
◆ loop()
| virtual int tt::gui_system::loop |
( |
| ) |
|
|
pure virtual |
Start the GUI event loop.
This function will start the GUI event loop. The event loop will monitor keyboard & mouse event, changes in window size & position and rendering of all windows.
When all windows are closed this function will return with an exit code of zero, or the return value from the delegate. Calling exit() will also cause this function to return.
- Returns
- exit code.
Implemented in tt::gui_system_win32.
◆ make_unique()
Make a gui_system instance.
This will instantiate a gui_system instance appropriate for the current operating system.
- Parameters
-
| delegate | An optional delegate. |
- Returns
- A unique pointer to a gui_system instance.
◆ make_window()
template<typename... Args>
| gui_window & tt::gui_system::make_window |
( |
Args &&... | args | ) |
|
|
inline |
Create a new window.
- Parameters
-
- Returns
- A reference to the new window.
◆ num_windows()
| ssize_t tt::gui_system::num_windows |
( |
| ) |
|
Count the number of windows managed by the GUI.
◆ request_constrain()
| void tt::gui_system::request_constrain |
( |
| ) |
|
|
noexcept |
Request all windows to constrain.
◆ run()
| void tt::gui_system::run |
( |
std::invocable auto && | function | ) |
|
|
inlinenoexcept |
Run the function now or on from the GUI's event loop.
◆ run_from_event_queue()
| void tt::gui_system::run_from_event_queue |
( |
std::invocable auto && | function | ) |
|
|
inlinenoexcept |
Run the function from the GUI's event queue.
◆ set_theme()
| void tt::gui_system::set_theme |
( |
tt::theme const & | new_theme | ) |
|
|
noexcept |
Set the theme for the system.
- Parameters
-
| new_theme | The new theme to use for the gui system. |
◆ theme()
| tt::theme const & tt::gui_system::theme |
( |
| ) |
const |
|
noexcept |
Get the theme.
- Returns
- The current theme.
The documentation for this class was generated from the following file: