From 43bd5c3f578e57780825566fa4ec81313c92c600 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 26 Jan 2017 20:51:43 +0100 Subject: [PATCH] further decisions regarting the UI top-level --- src/gui/gtk-lumiera.cpp | 2 +- src/gui/workspace/ui-manager.cpp | 6 +++ src/gui/workspace/ui-manager.hpp | 14 ++++++- wiki/renderengine.html | 24 ++++++++++- wiki/thinkPad.ichthyo.mm | 69 ++++++++++++++++++++++++++++---- 5 files changed, 105 insertions(+), 10 deletions(-) diff --git a/src/gui/gtk-lumiera.cpp b/src/gui/gtk-lumiera.cpp index e76f4b42e..667e4af5d 100644 --- a/src/gui/gtk-lumiera.cpp +++ b/src/gui/gtk-lumiera.cpp @@ -100,7 +100,7 @@ namespace gui { //////////////////////TICKET #959 : establish the new backbone here / replaces Project and Controller UiBus uiBus; - workspace::UiManager uiManager; + workspace::UiManager uiManager(uiBus); uiManager.init (Config::get (KEY_ICON_PATH), Config::get (KEY_UIRES_PATH)); uiManager.setTheme (Config::get (KEY_STYLESHEET)); diff --git a/src/gui/workspace/ui-manager.cpp b/src/gui/workspace/ui-manager.cpp index 7087edb49..44e740347 100644 --- a/src/gui/workspace/ui-manager.cpp +++ b/src/gui/workspace/ui-manager.cpp @@ -28,6 +28,7 @@ #include "gui/gtk-lumiera.hpp" +#include "gui/ui-bus.hpp" #include "gui/workspace/ui-manager.hpp" #include "lib/searchpath.hpp" #include "lib/util.hpp" @@ -54,6 +55,11 @@ namespace workspace { IconSize UiManager::MenuIconSize = Gtk::ICON_SIZE_INVALID; + UiManager::UiManager (UiBus& bus) + : Gtk::UIManager() + , uiBus_(bus) + { } + void UiManager::init (string const& iconPath, string const& resourcePath) { diff --git a/src/gui/workspace/ui-manager.hpp b/src/gui/workspace/ui-manager.hpp index 5147a7079..bfb2a7c2a 100644 --- a/src/gui/workspace/ui-manager.hpp +++ b/src/gui/workspace/ui-manager.hpp @@ -63,11 +63,14 @@ namespace workspace { * icons and resources within Lumiera's GUI. */ class UiManager - : boost::noncopyable + : Gtk::UIManager + , boost::noncopyable { string iconSearchPath_; string resourceSerachPath_; + UiBus& uiBus_; + public: @@ -85,6 +88,15 @@ namespace workspace { public: + /** + * There is one global UiManager instance, + * which is created by [the Application](\ref GtkLumiera) + * and allows access to the UI-Bus backbone. The UiManager itself + * is _not a ctrl::Controller,_ and thus not directly connected to the Bus. + * Rather, supports the top-level windows for creating a consistent interface. + */ + UiManager (UiBus& bus); + /** * Initialise the window manager on application start. * Register the icon configuration and sizes and lookup diff --git a/wiki/renderengine.html b/wiki/renderengine.html index d538e5e36..fa3e075fe 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -2795,7 +2795,7 @@ The most fundamental principle is that of ''subsidiarity'': we understand both & Based on these foundations, we shape and form the core part of the interface, which is the [[timeline display|GuiTimelineView]] -
+
Starting up the GUI is optional and is considered part of the Application start/stop and lifecycle.
 * main and AppState activate the lifecyle methods on the ~GuiSubsysDescriptor, accessible via the GuiFacade
 * loading a GuiStarterPlugin actually
@@ -2814,6 +2814,9 @@ Note that we retain strict isolation in the other direction: no part of the lowe
 * these service objects in turn hold an ~InstanceHandle, which cares to register and open the corresponding C Language Interface
 * additionally this InstanceHandle is configured such as to create an "facade proxy" object, which is implemented within liblumieracommon.so
 Now, when invoking an operation on some public interface, the code in the lower layers actually executes an implementation of this operation //on the facade proxy,// which in turn forwards the call through the CL interface into the GUI, where it is actually implemented by the corresponding service object instance.
+
+!!!UI top level
+Regarding the internal organisation of Lumiera's ~UI-Layer, there is a [[top level structure|GuiTopLevel]] to manage application lifecycle
 
@@ -2914,6 +2917,25 @@ Applying a diff changes the structure, that is, the structure of the local model Together this means we get a fix up stage after model changes, where the display is re-adjusted to fit the new situation. This works in concert with the [[display manager|TimelineDisplayManager]] representing only those elements as actual widgets, which get a real chance to become visible. This way we can build on the assumption that the actual number of widgets to be managed any time remains so small as to get away with simple linear list processing. It remains to be seen how far this assumption can be pushed -- the problem is that the GTK container components don't support anything beyond such simple linear list processing; there isn't even a call to remove all child widgets of a container in a single pass.
+
+
To a large extent, the Lumiera user interface is built around a //backbone structure,// known as the UI-Bus.
+But there are some dedicated top-level entities, collaborating to maintain a consistent application lifecycle
+;Application
+:the application object, {{{GtkLumiera}}} is what executes within the GuiStarterPlugin and thus within the Gtk event thread
+:it is of no further relevance for any of the other UI entities, insofar it just creates and wires the top level constituents and encompasses their lifetime
+;~UI-Bus
+:the backbone of the user interface
+:as central communication system, the UI-Bus has a star shaped topology with a central router and attached CoreService
+;UI Manager
+:maintain a coherent global interface
+:responsible for all global framework concerns, resources and global application state
+;Window Manager
+:manage the top level workspace windows
+;Notification Façade
+:attachment point for lower layers and anyone in need to "talk to the UI"
+:the GuiNotificationFacade is a LayerSeparationInterface and integrated with Lumiera's interface system
+
+
While the low-level model holds the data used for carrying out the actual media data processing (=rendering), the high-level model is what the user works upon when performing edit operations through the GUI (or script driven in »headless mode«). Its building blocks and combination rules determine largely what structures can be created within the [[Session]].
 On the whole, it is a collection of [[media objects|MObjects]] stuck together and arranged by [[placements|Placement]].
diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm
index be314b402..bf23601da 100644
--- a/wiki/thinkPad.ichthyo.mm
+++ b/wiki/thinkPad.ichthyo.mm
@@ -647,8 +647,7 @@
       }
     

- - + @@ -660,13 +659,22 @@ - + + + + + + + + + + @@ -1628,7 +1636,6 @@ - @@ -1647,9 +1654,57 @@ - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ ...denn das ist das vereinfachte Setup für "einfache" Applikationen +

+ + +
+ +
+ +