Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/ctrl/ui-manager.hpp"
The Lumiera UI framework and backbone object.
Initialises the GTK and GLib framework, starts and stops the GTK event loop, and manages global concerns regarding a coherent user interface. Offers access to some global UI resources, and establishes further global services to create workspace windows, to bind menu / command actions and to create interface widgets for working with the the top-level model parts.
Definition at line 88 of file ui-manager.hpp.
Public Types | |
using | Operation = std::function< void(void)> |
Public Member Functions | |
UiManager (UiBus &bus) | |
Initialise the GTK framework and the Lumiera UI backbone. More... | |
void | allowCloseWindow (bool yes) |
void | configureStyle (timeline::TimelineWidget const &) |
void | createApplicationWindow () |
Set up the first top-level application window. More... | |
void | performMainLoop () |
start the GTK Main loop and thus activate the UI. More... | |
void | schedule (Operation &&task) |
perform an action within the UI event loop (GTK loop). More... | |
void | terminateUI () |
Cause the main event loop to terminate, so the application as a whole unwinds. More... | |
void | updateWindowFocusRelatedActions () |
Private Types | |
using | UiStyle = workspace::UiStyle |
Private Attributes | |
unique_ptr< Actions > | actions_ |
unique_ptr< Facade > | facade_ |
unique_ptr< GlobalCtx > | globals_ |
unique_ptr< UiStyle > | uiStyle_ |
Additional Inherited Members | |
Protected Member Functions inherited from ApplicationBase | |
ApplicationBase () | |
Initialise the GTK framework libraries. More... | |
Initialise the GTK framework and the Lumiera UI backbone.
There is one global UiManager instance, which is created by the Application.
Definition at line 95 of file ui-manager.cpp.
void createApplicationWindow | ( | ) |
Set up the first top-level application window.
This triggers the build-up of the user interface widgets.
Definition at line 112 of file ui-manager.cpp.
void performMainLoop | ( | ) |
start the GTK Main loop and thus activate the UI.
Run the GTK UI.
Also activate the UI the external interfaces.
g_main_loop_run()
, which in turn ends up polling the main context via g_main_context_iterate()
, until the use count drops to zero. This is the "event loop". Definition at line 129 of file ui-manager.cpp.
void terminateUI | ( | ) |
Cause the main event loop to terminate, so the application as a whole unwinds.
gtk_main_quit()
. The latter will finish processing of the current event and then return from the UiManager::performmainLoop() call, which eventually causes the UI subsystem to signal termination to the Lumiera application as a whole. Definition at line 147 of file ui-manager.cpp.
Referenced by NotificationService::triggerGuiShutdown().
void schedule | ( | Operation && | task | ) |
perform an action within the UI event loop (GTK loop).
op | a completely closed lambda or functor |
Definition at line 161 of file ui-manager.cpp.
void updateWindowFocusRelatedActions | ( | ) |
Definition at line 168 of file ui-manager.cpp.