![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "stage/ctrl/notification-hub.hpp"
Service to receive and display error, warning and notification messages.
These are sent over the UI-Bus through the NotificationService; after receiving such a message, this controller ensures to display the message and alert the user, while not blocking the overall UI.
Definition at line 79 of file notification-hub.hpp.
Public Types | |
| using | WidgetAllocator = std::function< widget::ErrorLogDisplay &(void)> |
Public Types inherited from Tangible | |
| using | ID = ctrl::BusTerm::ID |
| using | LuidH = lib::hash::LuidH |
Public Member Functions | |
| NotificationHub (ID identity, ctrl::BusTerm &nexus, WidgetAllocator wa) | |
| ~NotificationHub () | |
Public Member Functions inherited from Controller | |
| Tangible (ID identity, ctrl::BusTerm &nexus) | |
Public Member Functions inherited from Tangible | |
| virtual | ~Tangible () |
| this is an interface | |
| operator string () const | |
| diagnostic representation. | |
| operator LuidH () const | |
| ID | getID () const |
| void | reset () |
| invoke the generic reset hook | |
| void | clearMsg () |
| invoke the hook to clear notification messages | |
| void | clearErr () |
| invoke the hook to clear error markers | |
| template<typename... ARGS> | |
| void | invoke (Symbol cmdID, ARGS &&...) |
| void | invoke (Symbol cmdID, Rec &&arguments) |
| Perform a command or action, once the execution context has been established. | |
| void | slotExpand () |
| Expand this element and remember the expanded state. | |
| void | slotCollapse () |
| Collapse or minimise this element and remember the collapsed state. | |
| void | slotReveal () |
| Cause the element to be brought into sight. | |
| void | markFlash () |
| highlight the element visually to catch the user's attention | |
| void | markMsg (string message) |
| push a notification (or warning) message to the element. | |
| void | markErr (string error) |
| push an error state tag to the element | |
| void | mark (GenNode const &) |
| generic handler for all incoming "state mark" messages | |
| void | installExpander (Expander::ProbeFun, Expander::ChangeFun) |
| Configure the (optional) functionality to expand or collapse the UI-Element. | |
| void | installRevealer (Revealer::RevealeItFun) |
| Configure the (optional) functionality to bring the UI-Element into sight. | |
| template<typename... ARGS> | |
| void | invoke (Symbol cmdID, ARGS &&... args) |
| convenience shortcut to issue a command with several arguments | |
Public Member Functions inherited from DiffMutable | |
| virtual | ~DiffMutable () |
| this is an interface | |
Private Member Functions | |
| void | buildMutator (lib::diff::TreeMutator::Handle buffer) override |
| population and manipulation of persistent content via UI-Bus | |
| virtual bool | doReset () override |
| virtual bool | doMsg (string text) override |
| virtual bool | doClearMsg () override |
| virtual bool | doErr (string text) override |
| virtual bool | doClearErr () override |
| virtual void | doMark (GenNode const &stateMark) override |
adds special treatment for a state mark tagged as "Warning" | |
| virtual void | doFlash () override |
| widget::ErrorLogDisplay & | getWidget () |
Private Attributes | |
| WidgetAllocator | allocateWidget_ |
| external operation to find or allocate an log display widget | |
| WLink< widget::ErrorLogDisplay > | widget_ |
| collaboration with a log display allocated elsewhere | |
Additional Inherited Members | |
Protected Types inherited from Tangible | |
| using | Rec = lib::diff::Rec |
| using | GenNode = lib::diff::GenNode |
Protected Member Functions inherited from Tangible | |
| Tangible (ID identity, ctrl::BusTerm &nexus) | |
| virtual bool | doExpand (bool yes) |
| generic default implementation of the expand/collapse functionality. | |
| virtual void | doReveal () |
| generic default implementation of the "reveal" functionality. | |
Protected Attributes inherited from Tangible | |
| ctrl::BusTerm | uiBus_ |
| Expander | expand_ |
| Revealer | reveal_ |
|
inline |
Definition at line 161 of file notification-hub.hpp.
References ErrorLogDisplay::expand, NotificationHub::getWidget(), Tangible::installExpander(), Tangible::installRevealer(), ErrorLogDisplay::reveal, and NotificationHub::widget_.
Here is the call graph for this function:
|
inline |
Definition at line 176 of file notification-hub.hpp.
| using WidgetAllocator = std::function<widget::ErrorLogDisplay&(void)> |
Definition at line 158 of file notification-hub.hpp.
|
inlineoverrideprivatevirtual |
population and manipulation of persistent content via UI-Bus
Implements Tangible.
Definition at line 86 of file notification-hub.hpp.
References TreeMutator::build(), and PlantingHandle< BA, DEFAULT >::emplace().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 98 of file notification-hub.hpp.
References NotificationHub::widget_.
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 108 of file notification-hub.hpp.
References ErrorLogDisplay::addInfo(), and NotificationHub::getWidget().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 115 of file notification-hub.hpp.
References NotificationHub::widget_.
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 123 of file notification-hub.hpp.
References ErrorLogDisplay::addError(), and NotificationHub::getWidget().
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 130 of file notification-hub.hpp.
References NotificationHub::widget_.
|
inlineoverrideprivatevirtual |
adds special treatment for a state mark tagged as "Warning"
Reimplemented from Controller.
Definition at line 139 of file notification-hub.hpp.
References ErrorLogDisplay::addWarn(), GenNode::data, DataCap::get(), BareEntryID::getSym(), NotificationHub::getWidget(), GenNode::idi, and stage::MARK_Warning.
Here is the call graph for this function:
|
inlineoverrideprivatevirtual |
Reimplemented from Controller.
Definition at line 149 of file notification-hub.hpp.
References NotificationHub::widget_.
|
inlineprivate |
Definition at line 188 of file notification-hub.hpp.
References NotificationHub::allocateWidget_, and NotificationHub::widget_.
Referenced by NotificationHub::NotificationHub(), NotificationHub::doErr(), NotificationHub::doMark(), and NotificationHub::doMsg().
Here is the caller graph for this function:
|
private |
external operation to find or allocate an log display widget
Definition at line 181 of file notification-hub.hpp.
Referenced by NotificationHub::getWidget().
|
private |
collaboration with a log display allocated elsewhere
Definition at line 184 of file notification-hub.hpp.
Referenced by NotificationHub::NotificationHub(), NotificationHub::doClearErr(), NotificationHub::doClearMsg(), NotificationHub::doFlash(), NotificationHub::doReset(), and NotificationHub::getWidget().
Inheritance diagram for NotificationHub:
Collaboration diagram for NotificationHub: