![]() |
Lumiera 0.pre.04~rc.1
»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. | |
| ~UiManager () | |
| void | createApplicationWindow () |
| Set up the first top-level application window. | |
| void | performMainLoop () |
| start the GTK Main loop and thus activate the UI. | |
| void | terminateUI () |
| Cause the main event loop to terminate, so the application as a whole unwinds. | |
| void | schedule (Operation &&task) |
| perform an action within the UI event loop (GTK loop). | |
| void | updateWindowFocusRelatedActions () |
| void | allowCloseWindow (bool yes) |
| void | configureStyle (timeline::TimelineWidget const &) |
Private Types | |
| using | UiStyle = workspace::UiStyle |
Private Attributes | |
| unique_ptr< GlobalCtx > | globals_ |
| unique_ptr< UiStyle > | uiStyle_ |
| unique_ptr< Actions > | actions_ |
| unique_ptr< Facade > | facade_ |
Additional Inherited Members | |
Protected Member Functions inherited from ApplicationBase | |
| ApplicationBase () | |
| Initialise the GTK framework libraries. | |
| ~ApplicationBase () | |
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.
References UiManager::actions_, and Actions::populateMainActions().
Here is the call graph for this function:| ~UiManager | ( | ) |
Definition at line 54 of file ui-manager.cpp.
|
private |
Definition at line 92 of file ui-manager.hpp.
| using Operation = std::function<void(void)> |
Definition at line 128 of file ui-manager.hpp.
| 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.
References UiManager::globals_.
Referenced by GtkLumiera::run().
Here is the caller graph for this function:| 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.
References UiManager::facade_, and UiManager::globals_.
Referenced by GtkLumiera::run().
Here is the caller graph for this function:| 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 WindowLocator::on_window_closed(), Actions::populateMainActions(), and NotificationService::triggerGuiShutdown().
Here is the caller graph for this function:| 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.
References UiManager::actions_, and UiManager::globals_.
Referenced by WorkspaceWindow::createUI().
Here is the caller graph for this function:| void allowCloseWindow | ( | bool | yes | ) |
Definition at line 176 of file ui-manager.cpp.
Referenced by WindowLocator::updateCloseWindowInMenus().
Here is the caller graph for this function:| void configureStyle | ( | timeline::TimelineWidget const & | timeline | ) |
Definition at line 184 of file ui-manager.cpp.
References UiManager::uiStyle_.
Referenced by InteractionDirector::injectTimeline().
Here is the caller graph for this function:
|
private |
Definition at line 94 of file ui-manager.hpp.
Referenced by UiManager::createApplicationWindow(), UiManager::performMainLoop(), and UiManager::updateWindowFocusRelatedActions().
|
private |
Definition at line 95 of file ui-manager.hpp.
Referenced by UiManager::configureStyle().
|
private |
Definition at line 96 of file ui-manager.hpp.
Referenced by UiManager::UiManager(), and UiManager::updateWindowFocusRelatedActions().
|
private |
Definition at line 97 of file ui-manager.hpp.
Referenced by UiManager::performMainLoop().
Inheritance diagram for UiManager:
Collaboration diagram for UiManager: