UI-Lifecycle: define a new Proc-Command to implement the population trigger (#1150)
This commit is contained in:
parent
eca06a8309
commit
d58890e2d5
7 changed files with 130 additions and 12 deletions
|
|
@ -109,7 +109,7 @@ namespace interact {
|
|||
void
|
||||
InteractionDirector::populateContent_afterStart()
|
||||
{
|
||||
UNIMPLEMENTED ("issue content population request as command into the session");
|
||||
invoke (cmd::meta_activateContentDiff);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ namespace gui {
|
|||
* asynchronously and triggered by events within the lower layers.
|
||||
*
|
||||
* This is a layer separation facade interface. Clients should use
|
||||
* the embedded #facade factory, which yields a proxy routing any
|
||||
* the embedded #facade factory, which yields a proxy routing any
|
||||
* calls through the lumieraorg_GuiNotification interface
|
||||
* @throws lumiera::error::State when interface is not opened
|
||||
*/
|
||||
|
|
@ -113,14 +113,14 @@ namespace gui {
|
|||
virtual void triggerGuiShutdown (string const& cause) =0;
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
||||
|
||||
extern "C" {
|
||||
#endif /* =========================== CL Interface ===================== */
|
||||
#endif /* =========================== CL Interface ===================== */
|
||||
|
||||
|
||||
#include "common/interface.h"
|
||||
|
|
|
|||
|
|
@ -71,5 +71,12 @@ namespace cmd {
|
|||
|
||||
|
||||
|
||||
/* ========= meta actions ======= */
|
||||
|
||||
extern CommandSetup meta_activateContentDiff;
|
||||
extern CommandSetup meta_deactivateContentDiff;
|
||||
|
||||
|
||||
|
||||
}} // namespace proc::cmd
|
||||
#endif /*PROC_CMD_H*/
|
||||
|
|
|
|||
101
src/proc/cmd/meta-cmd.cpp
Normal file
101
src/proc/cmd/meta-cmd.cpp
Normal file
|
|
@ -0,0 +1,101 @@
|
|||
/*
|
||||
MetaCmd - actual proc command scripts for internal meta and control activities
|
||||
|
||||
Copyright (C) Lumiera.org
|
||||
2018, Hermann Vosseler <Ichthyostega@web.de>
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License as
|
||||
published by the Free Software Foundation; either version 2 of
|
||||
the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
* *****************************************************/
|
||||
|
||||
|
||||
/** @file meta-cmd.cpp
|
||||
** Actual definition of Proc-Layer command scripts for meta/ctrl actions.
|
||||
** Any actions issued by the UI-Layer to control internal application state
|
||||
** @todo WIP 8/2018 early draft
|
||||
**
|
||||
** @see cmd.hpp
|
||||
** @see command.hpp
|
||||
** @see command-def.hpp
|
||||
** @see cmd-context.hpp
|
||||
** @see SessionCommandFunction_test
|
||||
**
|
||||
*/
|
||||
|
||||
|
||||
#include "proc/cmd.hpp"
|
||||
#include "proc/control/command-def.hpp"
|
||||
//#include "proc/mobject/session.hpp"
|
||||
//#include "lib/symbol.hpp"
|
||||
#include "lib/idi/entry-id.hpp"
|
||||
//#include "lib/format-string.hpp"
|
||||
|
||||
//#include <string>
|
||||
|
||||
using lib::hash::LuidH;
|
||||
//using std::string;
|
||||
//using util::cStr;
|
||||
//using util::_Fmt;
|
||||
|
||||
|
||||
namespace proc {
|
||||
namespace cmd {
|
||||
namespace error = lumiera::error;
|
||||
|
||||
//using mobject::Session;
|
||||
|
||||
namespace { // implementation helper...
|
||||
}//(End) implementation helper
|
||||
|
||||
|
||||
|
||||
|
||||
/** instruct the session to start keeping the UI up-to-date through diff messages.
|
||||
* @remarks we assume the UI is _empty_ when issuing this command. Thus the session
|
||||
* will commence by sending a _population diff_, to reflect all the UI relevant
|
||||
* structures currently present within the session data. Moreover, from that point
|
||||
* on, any changes within the session structure and contents will be reflected by
|
||||
* pushing appropriate diff messages upwards through the GuiNotification façade.
|
||||
* @note to UNDO this action means to waive the live-update state. In addition,
|
||||
* the session will push up a status change to mark the session-root as defunct.
|
||||
*/
|
||||
COMMAND_DEFINITION (meta_activateContentDiff)
|
||||
{
|
||||
def.operation ([]()
|
||||
{
|
||||
TODO ("send a population diff starting from scratch");
|
||||
TODO ("activate life-update service within the session");
|
||||
})
|
||||
.captureUndo ([]() -> bool
|
||||
{
|
||||
return false;
|
||||
})
|
||||
.undoOperation ([](bool wasActive)
|
||||
{
|
||||
if (not wasActive)
|
||||
{
|
||||
UNIMPLEMENTED ("send a status update diff into the root node, to mark it as defunct");
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
/** more to come here...*/
|
||||
|
||||
|
||||
|
||||
}} // namespace proc::cmd
|
||||
|
|
@ -65,7 +65,7 @@ namespace cmd {
|
|||
|
||||
|
||||
|
||||
/** @todo placeholder 4/2017
|
||||
/** @todo placeholder 4/2017 -- need to build a timeline display first...
|
||||
*/
|
||||
//COMMAND_DEFINITION (session_newSequence)
|
||||
// {
|
||||
|
|
|
|||
|
|
@ -76,7 +76,7 @@ namespace cmd {
|
|||
{
|
||||
return addedTrack;
|
||||
})
|
||||
.undoOperation ([](LuidH context, LuidH addedTrack, LuidH newID)
|
||||
.undoOperation ([](LuidH context, LuidH newID, LuidH addedTrack)
|
||||
{
|
||||
REQUIRE (addedTrack == newID);
|
||||
UNIMPLEMENTED ("how to remove a sub-track from the given context");
|
||||
|
|
|
|||
|
|
@ -15876,10 +15876,20 @@
|
|||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1531423717866" ID="ID_1400324647" MODIFIED="1531423724074" TEXT="#1150 GUI content connector">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1531423582548" ID="ID_751311895" MODIFIED="1531423728817" TEXT="Aktivierungs-Command">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1531423582548" ID="ID_751311895" MODIFIED="1533392488074" TEXT="Aktivierungs-Command">
|
||||
<icon BUILTIN="pencil"/>
|
||||
<node COLOR="#338800" CREATED="1531423597642" ID="ID_1814328528" MODIFIED="1533395218014" TEXT="definieren">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533395230685" ID="ID_556592297" MODIFIED="1533395237572" TEXT="Ausführung sicherstellen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node CREATED="1531423597642" ID="ID_1814328528" MODIFIED="1531423600109" TEXT="definieren"/>
|
||||
<node CREATED="1531423600722" ID="ID_311523916" MODIFIED="1531423613236" TEXT="Implementierung klären"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533392476019" ID="ID_1798579710" MODIFIED="1533392483674" TEXT="vorläufige Dummy-Implementierung">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1531423600722" ID="ID_311523916" MODIFIED="1533392474052" TEXT="Implementierung klären">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1531423632949" ID="ID_1724879903" MODIFIED="1531423730233" TEXT="Content-Listener">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
|
|
@ -16318,7 +16328,7 @@
|
|||
<icon BUILTIN="yes"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1532788656585" ID="ID_99363690" MODIFIED="1533388668090" TEXT="geeignet ansiedeln">
|
||||
<node COLOR="#338800" CREATED="1532788656585" FOLDED="true" ID="ID_99363690" MODIFIED="1533391739771" TEXT="geeignet ansiedeln">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1532794614249" ID="ID_884179844" MODIFIED="1532794617028" TEXT="Plan">
|
||||
<node CREATED="1532794617968" ID="ID_1917693631" MODIFIED="1533310766197" TEXT="geeigneten Zugang vom Ctor-Code">
|
||||
|
|
@ -16339,7 +16349,7 @@
|
|||
<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="1533310691940" TEXT="Problem: Zugang zum NotificationService">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1533221145295" FOLDED="true" ID="ID_45639892" MODIFIED="1533391725964" TEXT="Problem: Zugang zum NotificationService">
|
||||
<icon BUILTIN="stop-sign"/>
|
||||
<node CREATED="1533221554888" ID="ID_1545304194" MODIFIED="1533221603239" TEXT="wird explizit erst von UiManager::performMainLoop() installiert">
|
||||
<icon BUILTIN="broken-line"/>
|
||||
|
|
@ -32353,7 +32363,7 @@
|
|||
<linktarget COLOR="#677ab7" DESTINATION="ID_782313223" ENDARROW="Default" ENDINCLINATION="-652;20;" ID="Arrow_ID_315633048" SOURCE="ID_1894791438" STARTARROW="None" STARTINCLINATION="-2111;0;"/>
|
||||
<linktarget COLOR="#677ab7" DESTINATION="ID_782313223" ENDARROW="Default" ENDINCLINATION="-1088;-39;" ID="Arrow_ID_234165792" SOURCE="ID_433225506" STARTARROW="None" STARTINCLINATION="-2111;0;"/>
|
||||
<linktarget COLOR="#677ab7" DESTINATION="ID_782313223" ENDARROW="Default" ENDINCLINATION="-981;-106;" ID="Arrow_ID_1912776282" SOURCE="ID_1636078216" STARTARROW="None" STARTINCLINATION="-2111;0;"/>
|
||||
<node CREATED="1533388030963" ID="ID_1973994334" MODIFIED="1533388353007" TEXT="main context">
|
||||
<node CREATED="1533388030963" FOLDED="true" ID="ID_1973994334" MODIFIED="1533391711295" TEXT="main context">
|
||||
<node CREATED="1533388053839" ID="ID_970610402" MODIFIED="1533388063674" TEXT="abstrahierte "main loop"">
|
||||
<node CREATED="1533388065237" ID="ID_1853196275" MODIFIED="1533388071944" TEXT="es gibt einen default_main_context"/>
|
||||
<node CREATED="1533388072628" ID="ID_1382049092" MODIFIED="1533388077743" TEXT="dieser wird on demand erzeugt"/>
|
||||
|
|
|
|||
Loading…
Reference in a new issue