DemoGuiRoundtrip: first successful complete roundtrip GUI->Proc->GUI (see #1099)
A communication chain, triggered from a button in a non-modal dialog box, passing invocation into another thread, dispatched by the ProcDispatcher, then again passing thread boundaries to push a response back into the UI. This is a milestone, and integrates several components built during the last years.
This commit is contained in:
parent
abfb897336
commit
5fd3fb3d7b
4 changed files with 48 additions and 16 deletions
|
|
@ -62,11 +62,11 @@ namespace facade {
|
|||
|
||||
//----Proxy-Implementation-of-GuiNotification--------
|
||||
|
||||
void displayInfo (Level level, string const& text) override { _i_.displayInfo (level, cStr(text)); }
|
||||
void markError (ID uiElement, string const& text) override { _i_.markError(uiElement.getHash().get(), cStr(text)); }
|
||||
void markNote (ID uiElement, string const& text) override { _i_.markNote (uiElement.getHash().get(), cStr(text)); }
|
||||
void mutate (ID uiElement, MutationMessage&& diff) override { _i_.mutate (uiElement.getHash().get(), &diff); }
|
||||
void triggerGuiShutdown (string const& cause) override { _i_.triggerGuiShutdown (cStr(cause)); }
|
||||
void displayInfo (Level level, string const& text) override { _i_.displayInfo (level, cStr(text)); }
|
||||
void markError (ID uiElement, string const& text) override { _i_.markError(&uiElement, cStr(text)); }
|
||||
void markNote (ID uiElement, string const& text) override { _i_.markNote (&uiElement, cStr(text)); }
|
||||
void mutate (ID uiElement, MutationMessage&& diff) override { _i_.mutate (&uiElement, &diff); }
|
||||
void triggerGuiShutdown (string const& cause) override { _i_.triggerGuiShutdown (cStr(cause)); }
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -232,27 +232,27 @@ namespace gui {
|
|||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (markError,
|
||||
void, (LumieraUid element, const char* text),
|
||||
void, (const void* element, const char* text),
|
||||
{
|
||||
if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, text);
|
||||
else
|
||||
_instance().markError (reinterpret_cast<ID> (*element), text);
|
||||
_instance().markError (*static_cast<lib::idi::BareEntryID const*> (element), text);
|
||||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (markNote,
|
||||
void, (LumieraUid element, const char* text),
|
||||
void, (const void* element, const char* text),
|
||||
{
|
||||
if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, text);
|
||||
else
|
||||
_instance().markNote (reinterpret_cast<ID> (*element), text);
|
||||
_instance().markNote (*static_cast<lib::idi::BareEntryID const*> (element), text);
|
||||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (mutate,
|
||||
void, (LumieraUid element, void* diff),
|
||||
void, (const void* element, void* diff),
|
||||
{
|
||||
if (!_instance) lumiera_error_set (LUMIERA_ERROR_LIFECYCLE, "passing diff message");
|
||||
else
|
||||
_instance().mutate (reinterpret_cast<ID> (*element), move(*reinterpret_cast<MutationMessage*> (diff)));
|
||||
_instance().mutate (*static_cast<lib::idi::BareEntryID const*> (element), move(*reinterpret_cast<MutationMessage*> (diff)));
|
||||
}
|
||||
)
|
||||
, LUMIERA_INTERFACE_INLINE (triggerGuiShutdown,
|
||||
|
|
|
|||
|
|
@ -129,9 +129,9 @@ extern "C" {
|
|||
|
||||
LUMIERA_INTERFACE_DECLARE (lumieraorg_GuiNotification, 0,
|
||||
LUMIERA_INTERFACE_SLOT (void, displayInfo, (uint, const char*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, markError, (LumieraUid, const char*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, markNote, (LumieraUid, const char*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, mutate, (LumieraUid, void*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, markError, (const void*, const char*)), ////////////TICKET #1175 : need a way to pass EntryID
|
||||
LUMIERA_INTERFACE_SLOT (void, markNote, (const void*, const char*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, mutate, (const void*, void*)),
|
||||
LUMIERA_INTERFACE_SLOT (void, triggerGuiShutdown, (const char*)),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -2835,8 +2835,8 @@
|
|||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1537835015601" ID="ID_1684094906" MODIFIED="1537835021881" TEXT="direkte Bus-Aufrufe">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node COLOR="#338800" CREATED="1537835015601" ID="ID_1684094906" MODIFIED="1538234774766" TEXT="direkte Bus-Aufrufe">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node COLOR="#338800" CREATED="1537835220978" ID="ID_1439086949" MODIFIED="1538220877346" TEXT="markError">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
|
|
@ -2865,11 +2865,43 @@
|
|||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1538230509179" HGAP="22" ID="ID_657255465" MODIFIED="1538232922694" TEXT="Problem ID-Übergabe" VSHIFT="14">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
<node CREATED="1538230525641" ID="ID_1999133642" MODIFIED="1538230536846" TEXT="wieder mal das Scheiß Interface-System">
|
||||
<icon BUILTIN="smiley-angry"/>
|
||||
</node>
|
||||
<node CREATED="1538230675997" ID="ID_1672501842" MODIFIED="1538232718759" TEXT="bräuchte eine C-Repräsentation für BareEntryID"/>
|
||||
<node CREATED="1538232816534" ID="ID_712541347" MODIFIED="1538232905703" TEXT="habe den Anspruch aber bereits aufgegeben">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
...und zwar an dem Punkt, an dem ich eine DiffMessage in das GUI schicke.
|
||||
</p>
|
||||
<p>
|
||||
DiffMessage repräsentiert einen für den User verdeckten Callback
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1538234760471" ID="ID_1256781554" MODIFIED="1538234766447" TEXT="#1175 consider EntryID as external entity ID">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1534721737507" ID="ID_1467431829" MODIFIED="1534721762112" TEXT="verifizieren">
|
||||
<icon BUILTIN="full-6"/>
|
||||
<node COLOR="#338800" CREATED="1538234826126" ID="ID_1989018475" MODIFIED="1538234837334" TEXT="Round-Trip über Thrad-Grenzen hinweg">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1538234843916" ID="ID_1672079020" MODIFIED="1538234869369" TEXT="Argument-Übergabe per Kopie">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1534721764680" ID="ID_237796687" MODIFIED="1537961523677" TEXT="Belegen der View">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
</node>
|
||||
|
|
|
|||
Loading…
Reference in a new issue