UI-Lifecycle: invstigate where to issue the trigger (#1151)
This commit is contained in:
parent
9a39781667
commit
d3daed9a18
7 changed files with 172 additions and 22 deletions
|
|
@ -26,7 +26,7 @@
|
|||
** There is a small number of management facilities, responsible for conducting all the
|
||||
** global concerns of the Lumiera UI. The circle of these _top level managers_ is quite cohesive,
|
||||
** insofar each knows each other and is aware of each others responsibilities. When starting the UI,
|
||||
** this global context is established and wired in one shot, any any failure here immediately terminates
|
||||
** this global context is established and wired in one shot, and any failure here immediately terminates
|
||||
** the UI-Layer. It is the UiManager's responsibility to install this management circle and this task is
|
||||
** what effectively brings the UI into operative state.
|
||||
**
|
||||
|
|
@ -61,9 +61,6 @@
|
|||
#include "gui/interact/interaction-director.hpp"
|
||||
#include "lib/nocopy.hpp"
|
||||
|
||||
//#include <string>
|
||||
//#include <memory>
|
||||
|
||||
|
||||
namespace gui {
|
||||
namespace ctrl {
|
||||
|
|
|
|||
|
|
@ -159,6 +159,21 @@ namespace ctrl {
|
|||
gtk_main_quit();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @remarks moves the given operation into our private dispatcher queue and then
|
||||
* schedules dequeuing and invocation into the UI event thread.
|
||||
* @param op a completely closed lambda or functor
|
||||
* @warning closure need to be by value or equivalent, since
|
||||
* the operation will be executed within another call stack
|
||||
*/
|
||||
void
|
||||
UiManager::schedule (Operation&& task)
|
||||
{
|
||||
UNIMPLEMENTED ("TICKET #1151 build a suitable dispatcher into the GTK loop");
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
UiManager::updateWindowFocusRelatedActions()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -50,8 +50,9 @@
|
|||
#include "gui/gtk-base.hpp"
|
||||
#include "lib/nocopy.hpp"
|
||||
|
||||
#include <string>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
||||
|
||||
namespace gui {
|
||||
|
|
@ -130,6 +131,14 @@ namespace ctrl {
|
|||
*/
|
||||
void terminateUI();
|
||||
|
||||
|
||||
using Operation = std::function<void(void)>;
|
||||
/**
|
||||
* perform an action within the UI event loop (GTK loop).
|
||||
*/
|
||||
void schedule (Operation&& task);
|
||||
|
||||
|
||||
/** @todo find a solution how to enable/disable menu entries according to focus
|
||||
* /////////////////////////////////////////////////TICKET #1076 find out how to handle this properly
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -81,6 +81,14 @@ namespace interact {
|
|||
{ }
|
||||
|
||||
|
||||
/**
|
||||
* Setup and initialise all representations of "global-ness".
|
||||
* @param globals wiring to the circle of top-level UI managers (including ourselves)
|
||||
* @warning this ctor is performed within the UI thread, yet _prior_ to entering the GTK event loop.
|
||||
* For this reason, all initialisation performed here must be wiring-only; any tasks requiring an
|
||||
* actually operative UI need to be scheduled, by means of the NotificationService.
|
||||
* @todo 7/2018 STOP no, can't be the NotificationService. ////////////////////////////////////////////TICKET #1151 : Need a new dedicated service in UiManager
|
||||
*/
|
||||
InteractionDirector::InteractionDirector (GlobalCtx& globals)
|
||||
: model::Controller(session::Root::getID(), globals.uiBus_.getAccessPoint())
|
||||
, globalCtx_(globals)
|
||||
|
|
|
|||
|
|
@ -24,16 +24,16 @@
|
|||
/** @file interaction-director.hpp
|
||||
** The top-level controller to connect model and user interaction state.
|
||||
** Within the Lumiera UI, relevant entities from the session model are mapped onto and represented
|
||||
** by corresponding [UI-Elements](\ref Tangible). Consequently, there is a hierarchy of
|
||||
** interrelated UI elements mirroring the hierarchy within the session model. And, while in the
|
||||
** latter, there is a _conceptual root node_ to correspond to the session itself, within the UI
|
||||
** there is a top-level controller to mirror and represent that root element: The InteractionDirector.
|
||||
** by corresponding [UI-Elements](\ref Tangible). Consequently, there is a hierarchy of interrelated
|
||||
** UI elements mirroring the hierarchy within the session model. And, while in the latter, there is
|
||||
** a _conceptual root node_ to correspond to the session itself, within the UI there is a top-level
|
||||
** controller to mirror and represent that root element: The InteractionDirector.
|
||||
**
|
||||
** For one, the InteractionDirector represents and exposes parts of the model as seen from top level.
|
||||
** Especially this means that, through the InteractionDirector, it is possible to open and enter the
|
||||
** UI to work with the timeline(s), with the assets and with the global session configuration.
|
||||
** Moreover, this top-level controller allows to issue likewise global actions regarding those
|
||||
** entities:
|
||||
** More specifically, through the InteractionDirector, it is possible to open and enter the UI
|
||||
** to work with the timeline(s), with the assets and with the global session configuration.
|
||||
** Moreover, this top-level controller allows to issue likewise global actions regarding
|
||||
** those top-level entities:
|
||||
** - create / modify / delete timeline(s)
|
||||
** - create / modify / sequences
|
||||
** - save, close, open and create a session
|
||||
|
|
@ -53,11 +53,9 @@
|
|||
#ifndef GUI_INTERACT_INTERACTION_DIRECTOR_H
|
||||
#define GUI_INTERACT_INTERACTION_DIRECTOR_H
|
||||
|
||||
//#include "gui/gtk-base.hpp"
|
||||
#include "gui/model/controller.hpp"
|
||||
#include "lib/depend-inject.hpp"
|
||||
|
||||
//#include <cairomm/cairomm.h>
|
||||
//#include <string>
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
|
|
|
|||
|
|
@ -64,7 +64,8 @@ namespace interact {
|
|||
|
||||
|
||||
/**
|
||||
* Global cross-cutting navigation in interface space
|
||||
* Global cross-cutting navigation in interface space,
|
||||
* foundation to implement user assistance and context sensitive help.
|
||||
*
|
||||
* @todo initial draft as of 2/2017 -- actual implementation has to be filled in
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -15880,7 +15880,7 @@
|
|||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1532788645307" ID="ID_254810710" MODIFIED="1532788655288" TEXT="Trigger-Technik klären">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1532788681197" ID="ID_32192034" MODIFIED="1532788722848" TEXT="bei GTK selber abschauen">
|
||||
<node CREATED="1532788681197" FOLDED="true" ID="ID_32192034" MODIFIED="1533218445055" TEXT="bei GTK selber abschauen">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
|
|
@ -15897,7 +15897,8 @@
|
|||
</richcontent>
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1532793805646" ID="ID_1917720417" MODIFIED="1532793811649" TEXT="Gtk::Application">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1532794470116" ID="ID_539459561" MODIFIED="1532794471965" TEXT="TODO">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1532794470116" ID="ID_539459561" MODIFIED="1533218296183" TEXT="TODO">
|
||||
<linktarget COLOR="#dc217a" DESTINATION="ID_539459561" ENDARROW="Default" ENDINCLINATION="33;201;" ID="Arrow_ID_601982135" SOURCE="ID_1901487140" STARTARROW="None" STARTINCLINATION="-55;-186;"/>
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node CREATED="1532794476795" ID="ID_1999030504" MODIFIED="1532794483438" TEXT="gibt es statische Funktionen?"/>
|
||||
<node CREATED="1532794485778" ID="ID_86543147" MODIFIED="1532794494804" TEXT="was für on-start-Callbacks gibt es?"/>
|
||||
|
|
@ -15938,8 +15939,51 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1533218310967" ID="ID_955496166" MODIFIED="1533218319204" TEXT="nicht mehr nötig">
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
<node CREATED="1533218320846" ID="ID_533086066" MODIFIED="1533218324233" TEXT="abgebrochen"/>
|
||||
<node CREATED="1533218324829" ID="ID_1592564377" MODIFIED="1533218328713" TEXT="nur noch zu dokumentieren"/>
|
||||
</node>
|
||||
<node CREATED="1532788727680" ID="ID_889790361" MODIFIED="1532788735546" TEXT="Gtk::Main auf aktuellem Stand">
|
||||
<node CREATED="1533218330252" ID="ID_1616633221" MODIFIED="1533218339147" TEXT="hab's erraten">
|
||||
<icon BUILTIN="ksmiletris"/>
|
||||
<node CREATED="1533218341027" ID="ID_805779569" MODIFIED="1533218349822" TEXT="Glib::Dispatcher"/>
|
||||
<node CREATED="1533218355929" ID="ID_489375421" MODIFIED="1533218433083" TEXT="glaube ich...">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
will sagen,
|
||||
</p>
|
||||
<p>
|
||||
ich gebe mir jetzt nicht mal mehr die Mühe,
|
||||
</p>
|
||||
<p>
|
||||
meine erratene Lösung zu verifizieren.
|
||||
</p>
|
||||
<p>
|
||||
|
||||
</p>
|
||||
<p>
|
||||
Sie erscheint mir einfach so absolut offensichtlich,
|
||||
</p>
|
||||
<p>
|
||||
daß es keine weitere Mühe lohnt.
|
||||
</p>
|
||||
<p>
|
||||
Glib::Dispatcher ist genau das richtige Ding für diesen Zweck
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="12"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1532788727680" FOLDED="true" ID="ID_889790361" MODIFIED="1533218449273" TEXT="Gtk::Main auf aktuellem Stand">
|
||||
<arrowlink COLOR="#f3396a" DESTINATION="ID_1283695968" ENDARROW="Default" ENDINCLINATION="-81;-236;" ID="Arrow_ID_1530325920" STARTARROW="None" STARTINCLINATION="119;-5;"/>
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1532788737366" ID="ID_1527913663" MODIFIED="1532788745870" TEXT="aktuellen Code bereitlegen in Eclipse">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
|
|
@ -16129,11 +16173,23 @@
|
|||
<node CREATED="1532796692445" ID="ID_1979586408" MODIFIED="1532796706398" TEXT="Wrapper-Mechanismus für Gtk+-"Objekte" initialisieren"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1532797168836" ID="ID_1283695968" MODIFIED="1532797178971" TEXT="TODO: diesen Stand dokumentieren">
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1532797168836" ID="ID_1283695968" MODIFIED="1533218227864" TEXT="TODO: diesen Stand dokumentieren">
|
||||
<linktarget COLOR="#f3396a" DESTINATION="ID_1283695968" ENDARROW="Default" ENDINCLINATION="-81;-236;" ID="Arrow_ID_1530325920" SOURCE="ID_889790361" STARTARROW="None" STARTINCLINATION="119;-5;"/>
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node CREATED="1532797180066" ID="ID_687615166" MODIFIED="1532797192496" TEXT="siehe Ticket #1032">
|
||||
<icon BUILTIN="info"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533218052308" ID="ID_1734927969" MODIFIED="1533218091117" TEXT="neue Kategorie: technical/code base/ GTK">
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533218096245" ID="ID_1901487140" MODIFIED="1533218296183" TEXT="dort Seite startup">
|
||||
<arrowlink COLOR="#dc217a" DESTINATION="ID_539459561" ENDARROW="Default" ENDINCLINATION="33;201;" ID="Arrow_ID_601982135" STARTARROW="None" STARTINCLINATION="-55;-186;"/>
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1533218137447" ID="ID_59387223" MODIFIED="1533218142874" TEXT="lose Notizen dorthin"/>
|
||||
<node CREATED="1533218147981" ID="ID_1385133985" MODIFIED="1533218153417" TEXT="Main vs Application"/>
|
||||
<node CREATED="1533218154141" ID="ID_511849124" MODIFIED="1533218165327" TEXT="unser Ansatz"/>
|
||||
<node CREATED="1533218170914" ID="ID_1610394794" MODIFIED="1533218176629" TEXT="was macht Main?"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
@ -16146,8 +16202,8 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1532788656585" ID="ID_99363690" MODIFIED="1532788661346" TEXT="geeignet ansiedeln">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1532788656585" ID="ID_99363690" MODIFIED="1533223405882" TEXT="geeignet ansiedeln">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1532794614249" ID="ID_884179844" MODIFIED="1532794617028" TEXT="Plan">
|
||||
<node CREATED="1532794617968" ID="ID_1917693631" MODIFIED="1532794659877" TEXT="geeigneten Zugang über die Notification-facade">
|
||||
<icon BUILTIN="full-1"/>
|
||||
|
|
@ -16159,6 +16215,72 @@
|
|||
<icon BUILTIN="full-3"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533221103349" ID="ID_1053145038" MODIFIED="1533223398404" TEXT="Anker">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node BACKGROUND_COLOR="#ccb59b" COLOR="#6e2a38" CREATED="1533221107205" ID="ID_1202141905" MODIFIED="1533221141349" TEXT="es muß der InteractionDirector sein">
|
||||
<font ITALIC="true" NAME="SansSerif" SIZE="14"/>
|
||||
<icon BUILTIN="yes"/>
|
||||
<node CREATED="1533221115139" ID="ID_1655397510" MODIFIED="1533221117607" TEXT="wer sonst?"/>
|
||||
<node CREATED="1533221118267" ID="ID_517862983" MODIFIED="1533221132317" TEXT="er verkörpert "das Globale""/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533221145295" ID="ID_45639892" MODIFIED="1533221166358" TEXT="Problem: Zugang zum NotificationService">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1533221554888" ID="ID_1545304194" MODIFIED="1533221603239" TEXT="wird explizit erst von UiManager::performMainLoop() installiert">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
</node>
|
||||
<node CREATED="1533221577485" ID="ID_890031207" MODIFIED="1533221596939" TEXT="Problem für allen Setup-Code aus InteractionDirector et al">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1533221649380" ID="ID_727991171" MODIFIED="1533221669408">
|
||||
<richcontent TYPE="NODE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
das ist ein <i>akzidentelles Problem</i>
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
<node CREATED="1533221681199" ID="ID_979914270" MODIFIED="1533221738765" TEXT="Folge unserer Architektur">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
denn es ist gradezu der Sinn von Glib::Dispatcher,
|
||||
</p>
|
||||
<p>
|
||||
schon vor der Loop verfügbar zu sein (?)
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1533221742343" ID="ID_1970220536" MODIFIED="1533221747599" TEXT="Alternativen gesucht">
|
||||
<icon BUILTIN="flag-pink"/>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533221752837" ID="ID_583598881" MODIFIED="1533221770083" TEXT="verifizieren: ist Glib::Dispatcher die richtige Technik">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533221770859" ID="ID_1962039642" MODIFIED="1533221828924" TEXT="ggfs dafür einen dedizierten Service bauen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1533221796823" ID="ID_179436166" MODIFIED="1533221810377" TEXT="dann im UiManager"/>
|
||||
<node CREATED="1533221813285" ID="ID_1627865297" MODIFIED="1533221816584" TEXT="aus logischen Gründen"/>
|
||||
<node CREATED="1533221818572" ID="ID_806537689" MODIFIED="1533221826270" TEXT="paßt auch thematisch dort hin"/>
|
||||
</node>
|
||||
<node CREATED="1533223360183" ID="ID_1309454354" MODIFIED="1533223389415" TEXT="Idee">
|
||||
<icon BUILTIN="idea"/>
|
||||
<node CREATED="1533223371534" ID="ID_891597430" MODIFIED="1533223376721" TEXT="UiDispatcher"/>
|
||||
<node CREATED="1533223377381" ID="ID_1197977205" MODIFIED="1533223383568" TEXT="einfach eine weitere Instanz davon"/>
|
||||
<node CREATED="1533223384180" ID="ID_141172630" MODIFIED="1533223387239" TEXT="geht das?"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue