![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "stage/notification-service.hpp"
Actual implementation of the GuiNotification service within the Lumiera GTK GUI.
Creating an instance of this class automatically registers the interface with the Lumiera Interface/Plugin system and creates a forwarding proxy within the application core to route calls through this interface.
Definition at line 67 of file notification-service.hpp.
Public Member Functions | |
| ~NotificationService () | |
| NotificationService (ctrl::BusTerm &upLink, ctrl::UiManager &uiManager) | |
| When started, NotificationService connects to the UI-Bus via the provided connection. | |
| void | displayInfo (NotifyLevel, string const &text) override |
| push a user visible notification text | |
| void | markError (ID uiElement, string const &text) override |
| void | markNote (ID uiElement, string const &text) override |
| void | mark (ID uiElement, GenNode &&) override |
| void | mutate (ID uiElement, MutationMessage &&) override |
| void | triggerGuiShutdown (string const &cause) override |
| causes the GUI to shut down unconditionally | |
Public Member Functions inherited from GuiNotification | |
| virtual void | markError (ID uiElement, string const &text)=0 |
| highlight an element in the UI as problem location | |
| virtual void | markNote (ID uiElement, string const &text)=0 |
| attach an warning or state information element | |
| virtual void | mark (ID uiElement, GenNode &&stateMark)=0 |
| send a generic state mark message to some element | |
| virtual void | mutate (ID uiElement, MutationMessage &&)=0 |
| push a diff message up into the user interface. | |
Public Member Functions inherited from BusTerm | |
| virtual | ~BusTerm () |
| this is an interface | |
| virtual void | act (GenNode const &command) |
| prepare or trigger invocation of a command. | |
| virtual void | note (ID subject, GenNode const &mark) |
| capture and record a "state mark" for later replay for restoring UI state. | |
| virtual bool | mark (ID subject, GenNode const &mark) |
| route a state update or notification to the given subject. | |
| virtual size_t | markAll (GenNode const &mark) |
| broadcast a notification message to all currently connected bus terminals. | |
| virtual bool | change (ID subject, MutationMessage &&diff) |
| alter and reshape the designated subject by applying the given diff message. | |
| virtual | operator string () const |
| void | note (GenNode const &mark) |
| record state mark from this subject | |
| ID | getID () const |
| BusTerm | attach (ID, Tangible &newNode) |
| Builder function: establish and wire a new BusTerm. | |
| BusTerm (BusTerm &&)=default | |
| may be moved, but not copied, due to the embedded identity | |
Private Types | |
| using | ServiceInstanceHandle = lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0), GuiNotification > |
Private Member Functions | |
| void | dispatchMsg (ID, lib::diff::GenNode &&) |
Private Attributes | |
| std::unique_ptr< ctrl::UiDispatcher > | dispatch_ |
| ctrl::UiManager & | uiManager_ |
| ServiceInstanceHandle | serviceInstance_ |
Additional Inherited Members | |
Public Types inherited from BusTerm | |
| using | ID = EntryID const & |
Static Public Attributes inherited from GuiNotification | |
| static lib::Depend< GuiNotification > | facade |
| static storage for the facade access front-end | |
Protected Types inherited from BusTerm | |
| using | EntryID = lib::idi::BareEntryID |
| using | Tangible = stage::model::Tangible |
Protected Member Functions inherited from GuiNotification | |
| virtual | ~GuiNotification () |
| this is an interface | |
Protected Member Functions inherited from BusTerm | |
| BusTerm (ID identity, BusTerm &attached_to) | |
| virtual BusTerm & | routeAdd (ID, Tangible &) |
| virtual void | routeDetach (ID) noexcept |
| bool | isShortCircuit (ID) const noexcept |
Protected Attributes inherited from BusTerm | |
| EntryID | endpointID_ |
| BusTerm & | theBus_ |
| ~NotificationService | ( | ) |
Definition at line 310 of file notification-service.cpp.
| NotificationService | ( | ctrl::BusTerm & | upLink, |
| ctrl::UiManager & | uiManager | ||
| ) |
When started, NotificationService connects to the UI-Bus 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.
Definition at line 300 of file notification-service.cpp.
|
private |
Definition at line 80 of file notification-service.hpp.
|
private |
helper to move a given UI-Bus message (GenNode) into the closure of an event-lambda, which then is handed over to the UI event thread through the dispatcher queue.
Definition at line 86 of file notification-service.cpp.
References NotificationService::dispatch_, and BusTerm::mark().
Referenced by NotificationService::mark(), NotificationService::markError(), and NotificationService::markNote().
Here is the call graph for this function:
Here is the caller graph for this function:
|
overridevirtual |
push a user visible notification text
Implements GuiNotification.
Definition at line 96 of file notification-service.cpp.
References Wizard::getErrorLogID(), NotificationService::mark(), stage::MARK_Warning, NotificationService::markError(), NotificationService::markNote(), stage::NOTE_ERROR, stage::NOTE_INFO, and stage::NOTE_WARN.
Referenced by NotificationService::triggerGuiShutdown().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 116 of file notification-service.cpp.
References NotificationService::dispatchMsg(), and stage::MARK_Error.
Referenced by NotificationService::displayInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 123 of file notification-service.cpp.
References NotificationService::dispatchMsg(), and stage::MARK_Message.
Referenced by NotificationService::displayInfo().
Here is the call graph for this function:
Here is the caller graph for this function:Definition at line 130 of file notification-service.cpp.
References NotificationService::dispatchMsg().
Referenced by NotificationService::displayInfo().
Here is the call graph for this function:
Here is the caller graph for this function:
|
override |
Definition at line 137 of file notification-service.cpp.
References BusTerm::change(), and NotificationService::dispatch_.
Here is the call graph for this function:
|
overridevirtual |
causes the GUI to shut down unconditionally
| cause | user visible explanation of the reason causing this shutdown |
Implements GuiNotification.
Definition at line 147 of file notification-service.cpp.
References cStr(), NotificationService::dispatch_, NotificationService::displayInfo(), stage::NOTE_ERROR, UiManager::terminateUI(), and NotificationService::uiManager_.
Here is the call graph for this function:
|
private |
Definition at line 72 of file notification-service.hpp.
Referenced by NotificationService::dispatchMsg(), NotificationService::mutate(), and NotificationService::triggerGuiShutdown().
|
private |
Definition at line 73 of file notification-service.hpp.
Referenced by NotificationService::triggerGuiShutdown().
|
private |
Definition at line 83 of file notification-service.hpp.
Inheritance diagram for NotificationService:
Collaboration diagram for NotificationService: