GuiNotification: demote this service to be just a BusTerm
in fact it just does not fulfil any of the behavioural properties of a full-fledged UI-Element. All it needs is an uplink bus connection, so let's just keep it as that Sidenote: I've realised today that such a "free standing" BusTerm without registration in Nexus is a good idea and acceptable solution.
This commit is contained in:
parent
8f2023dea3
commit
8105be399e
3 changed files with 51 additions and 23 deletions
|
|
@ -43,7 +43,7 @@ extern "C" {
|
|||
namespace gui {
|
||||
|
||||
using lib::diff::TreeMutator;
|
||||
using model::Controller;
|
||||
using gui::ctrl::BusTerm;
|
||||
using std::string;
|
||||
using util::cStr;
|
||||
|
||||
|
|
@ -64,13 +64,6 @@ namespace gui {
|
|||
}
|
||||
|
||||
|
||||
void
|
||||
NotificationService::buildMutator (TreeMutator::Handle buffer)
|
||||
{
|
||||
UNIMPLEMENTED ("in which way to bind the Notification service for diff messages??");
|
||||
}
|
||||
|
||||
|
||||
|
||||
namespace { // facade implementation details
|
||||
|
||||
|
|
@ -184,8 +177,15 @@ namespace gui {
|
|||
|
||||
|
||||
|
||||
NotificationService::NotificationService (ctrl::BusTerm& nexus)
|
||||
: Controller{lib::idi::EntryID<NotificationService>{}, nexus}
|
||||
/**
|
||||
* When started, NotificationService connects to the [UI-Bus](ui-bus.hpp) via
|
||||
* the provided connection. This is a simple, unidirectional up-link connection,
|
||||
* without actively adding NotificationService into the routing tables in [Nexus].
|
||||
* Yet this simple connection is sufficient to implement this service by talking
|
||||
* to other facilities within the UI layer.
|
||||
*/
|
||||
NotificationService::NotificationService (ctrl::BusTerm& upLink)
|
||||
: BusTerm{lib::idi::EntryID<NotificationService>{}, upLink}
|
||||
, implInstance_(this,_instance)
|
||||
, serviceInstance_( LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 0,lumieraorg_GuiNotificationService))
|
||||
{
|
||||
|
|
@ -193,6 +193,4 @@ namespace gui {
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
||||
} // namespace gui
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
#include "include/gui-notification-facade.h"
|
||||
#include "common/instancehandle.hpp"
|
||||
#include "gui/model/controller.hpp"
|
||||
#include "gui/ctrl/bus-term.hpp"
|
||||
#include "lib/singleton-ref.hpp"
|
||||
|
||||
|
||||
|
|
@ -58,13 +58,14 @@ namespace gui {
|
|||
* a forwarding proxy within the application core to
|
||||
* route calls through this interface.
|
||||
*
|
||||
* @todo the ctor of this class should take references
|
||||
* to any internal service providers within the
|
||||
* GUI which are needed to implement the service.
|
||||
* @note the ctor of this class establishes an "up-link"
|
||||
* connection to the [UI-Bus](ui-bus.hpp), which
|
||||
* enables the service implementation to talk to
|
||||
* other facilities within the UI.
|
||||
*/
|
||||
class NotificationService
|
||||
: public GuiNotification
|
||||
, public model::Controller
|
||||
, public ctrl::BusTerm
|
||||
{
|
||||
|
||||
/* === Implementation of the Facade Interface === */
|
||||
|
|
@ -83,13 +84,9 @@ namespace gui {
|
|||
ServiceInstanceHandle serviceInstance_;
|
||||
|
||||
|
||||
/* === Control Interface === */
|
||||
|
||||
/** set up a binding to respond to mutation messages via UiBus */
|
||||
virtual void buildMutator (lib::diff::TreeMutator::Handle) override;
|
||||
|
||||
public:
|
||||
NotificationService(ctrl::BusTerm& nexus);
|
||||
NotificationService (ctrl::BusTerm& upLink);
|
||||
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -337,7 +337,7 @@
|
|||
<icon BUILTIN="pencil"/>
|
||||
<node CREATED="1484797663121" ID="ID_134980216" MODIFIED="1484797669469" TEXT="braucht Bus-Connection">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
<node CREATED="1484797863862" ID="ID_464230340" MODIFIED="1484797870255" TEXT="zum Controller machen">
|
||||
<node CREATED="1484797863862" FOLDED="true" ID="ID_464230340" MODIFIED="1484876070975" TEXT="zum Controller machen">
|
||||
<icon BUILTIN="help"/>
|
||||
<node CREATED="1484797872109" ID="ID_1877007933" MODIFIED="1484797877960" TEXT="Controller ist Tangible"/>
|
||||
<node CREATED="1484797878364" ID="ID_93289471" MODIFIED="1484797887414" TEXT="hat damit automatisch BusTerm"/>
|
||||
|
|
@ -353,6 +353,32 @@
|
|||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1484876010871" ID="ID_175784507" MODIFIED="1484876038858" TEXT="Design-Problem: restliches Tangible-Protokoll">
|
||||
<richcontent TYPE="NOTE"><html>
|
||||
<head>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<p>
|
||||
wirkt alles mehr oder weniger beliebig...
|
||||
</p>
|
||||
</body>
|
||||
</html>
|
||||
</richcontent>
|
||||
</node>
|
||||
<node CREATED="1484875935505" ID="ID_1341415727" MODIFIED="1484875940799" TEXT="nein">
|
||||
<icon BUILTIN="button_cancel"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1484875946312" FOLDED="true" ID="ID_271363232" MODIFIED="1484875993627" TEXT="ist ein BusTerm">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
<node CREATED="1484875959342" ID="ID_1202046492" MODIFIED="1484875967689" TEXT="nur unidirektional zum Bus verbunden"/>
|
||||
<node CREATED="1484875968557" ID="ID_1406569407" MODIFIED="1484875989502" TEXT="ist hier genau angemessen">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
</node>
|
||||
<node CREATED="1484875972588" ID="ID_1887863793" MODIFIED="1484875984841" TEXT="damit kann der Service mit dem UI reden">
|
||||
<icon BUILTIN="idea"/>
|
||||
</node>
|
||||
</node>
|
||||
<node COLOR="#338800" CREATED="1484799525344" FOLDED="true" ID="ID_640788614" MODIFIED="1484875268468" TEXT="muß sauber vom Nexus disconnecten">
|
||||
<icon BUILTIN="button_ok"/>
|
||||
|
|
@ -502,6 +528,13 @@
|
|||
</node>
|
||||
</node>
|
||||
</node>
|
||||
<node CREATED="1484876114521" ID="ID_1082250595" MODIFIED="1484876121540" TEXT="Protokoll zur Kommunikation">
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1484876122960" ID="ID_31825421" MODIFIED="1484876140752" TEXT="UI-Bus nur im GUI-Thread">
|
||||
<icon BUILTIN="messagebox_warning"/>
|
||||
</node>
|
||||
<node CREATED="1484876143949" ID="ID_558559630" MODIFIED="1484876153688" TEXT="muß Nachrichten explizit übergeben"/>
|
||||
<node CREATED="1484876154492" ID="ID_669377427" MODIFIED="1484876157575" TEXT="an Locking denken"/>
|
||||
</node>
|
||||
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1484797900185" ID="ID_1895372084" MODIFIED="1484797910297" TEXT="Protokoll zum Schließen">
|
||||
<icon BUILTIN="flag-yellow"/>
|
||||
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1484797911392" ID="ID_286857196" MODIFIED="1484797917672" TEXT="muß ich definieren">
|
||||
|
|
|
|||
Loading…
Reference in a new issue