Lumiera  0.pre.03
»edit your freedom«
notification-hub.hpp File Reference

Go to the source code of this file.

Description

Controller to receive and handle notification messages for the user.

This component is addressed in order to show error, warning and notification messages in the UI. It is responsible for maintaining a local log of these messages, and to allocate an appropriate display widgets, to show such notifications asynchronously. On first use, an InfoboxPanel is allocated to hold an ErrorLogDisplay widget for presentation of those messages

Notification Controller Behaviour

This controller serves the purpose to present information and error messages to the user. For the actual display, it allocates an appropriate view, placed into a docking pane reserved for information display, in accordance to the configured screen layout

Todo:
8/2018 for now we just use and possibly create a hard wired display within the first (primary) application window. Moreover, we do so directly, instead of consulting the (not yet fully implemented) ViewSpec mechanism. (via ViewLocator).

The actual widget for information display is prepared, but it is actually allocated when the need for information display arises. Which means, the user may close this display widget, thereby discarding its current information content – but when the next notification needs to be shown, the controller will ensure to allocate an appropriate widget again. Moreover, the widget can be expanded or collapsed, without affecting its content.

  • information messages are just added to the buffer without much ado. No attempt is made to reveal or expand the widget (but if necessary, a new widget is allocated)
  • error messages also set an error marker state, and cause expansion of the display widget.
  • the error state can be cleared, which also demotes all error messages to mere information.
  • information content can also be cleared, which removes all mere information messages, while retaining the error entries.
  • the doReset() operation completely clears the log contents, collapses the widget and clears state.
  • expanding of the display widget is state marked, irrespective if it happened by user interaction or as result of some display. However, the actual message content is not state marked; it needs to be persisted elsewhere (in the session) and replayed from there if desired.
See also
error-log-display.hpp
notification-service.hpp

Definition in file notification-hub.hpp.

Classes

class  NotificationHub
 Service to receive and display error, warning and notification messages. More...
 

Namespaces

 stage
 Lumiera GTK UI implementation root.
 
 stage::ctrl
 Backbone of the Lumiera GTK UI.