Lumiera  0.pre.03
»edit your freedom«
notification-service.hpp
Go to the documentation of this file.
1 /*
2  NOTIFICATION-SERVICE.hpp - public service allowing to push information into the GUI
3 
4  Copyright (C)
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
30 #ifndef STAGE_NOTIFICATION_SERVICE_H
31 #define STAGE_NOTIFICATION_SERVICE_H
32 
33 
36 #include "stage/ctrl/bus-term.hpp"
37 
38 #include <memory>
39 
40 
41 
42 namespace lib {
43  namespace diff { class GenNode; }
44 }
45 namespace stage {
46 
47  namespace ctrl {
48  class UiManager;
49  class UiDispatcher;
50  }
51 
52 
53 
54  /**************************************************/
68  : public GuiNotification
69  , public ctrl::BusTerm
70  {
71 
72  std::unique_ptr<ctrl::UiDispatcher> dispatch_;
73  ctrl::UiManager& uiManager_;
74 
75  void dispatchMsg (ID, lib::diff::GenNode&&);
76 
77 
78  /* === Interface Lifecycle === */
79 
80  using ServiceInstanceHandle = lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0)
82  > ;
83  ServiceInstanceHandle serviceInstance_;
84 
85 
86  public:
89 
90  /* === Implementation of the Facade Interface === */
91 
92  void displayInfo (NotifyLevel,string const& text) override;
93  void markError (ID uiElement, string const& text) override;
94  void markNote (ID uiElement, string const& text) override;
95  void mark (ID uiElement, GenNode&&) override;
96  void mutate (ID uiElement, MutationMessage&&) override;
97  void triggerGuiShutdown (string const& cause) override;
98  };
99 
100 
101 
102 } // namespace stage
103 #endif
Major public Interface of the Lumiera GUI.
connection point at the UI-Bus.
Definition: bus-term.hpp:96
Opaque message to effect a structural change on a target, which is likewise only known in an abstract...
Implementation namespace for support and library code.
Attachment point to the UI-Bus.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
Actual implementation of the GuiNotification service within the Lumiera GTK GUI.
Global access point to push state update and notification of events from the lower layers into the Lu...
#define LUMIERA_INTERFACE_INAME(name, version)
Construct a type identifier for an interface.
Definition: interface.h:93
The Lumiera UI framework and backbone object.
Definition: ui-manager.hpp:88
A handle template for automatically dealing with interface and plugin registration and deregistration...
generic data element node within a tree
Definition: gen-node.hpp:222