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) Lumiera.org
5  2008, Hermann Vosseler <Ichthyostega@web.de>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
39 #ifndef STAGE_NOTIFICATION_SERVICE_H
40 #define STAGE_NOTIFICATION_SERVICE_H
41 
42 
45 #include "stage/ctrl/bus-term.hpp"
46 
47 #include <memory>
48 
49 
50 
51 namespace lib {
52  namespace diff { class GenNode; }
53 }
54 namespace stage {
55 
56  namespace ctrl {
57  class UiManager;
58  class UiDispatcher;
59  }
60 
61 
62 
63  /**************************************************/
77  : public GuiNotification
78  , public ctrl::BusTerm
79  {
80 
81  std::unique_ptr<ctrl::UiDispatcher> dispatch_;
82  ctrl::UiManager& uiManager_;
83 
84  void dispatchMsg (ID, lib::diff::GenNode&&);
85 
86 
87  /* === Interface Lifecycle === */
88 
89  using ServiceInstanceHandle = lumiera::InstanceHandle< LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0)
91  > ;
92  ServiceInstanceHandle serviceInstance_;
93 
94 
95  public:
98 
99  /* === Implementation of the Facade Interface === */
100 
101  void displayInfo (NotifyLevel,string const& text) override;
102  void markError (ID uiElement, string const& text) override;
103  void markNote (ID uiElement, string const& text) override;
104  void mark (ID uiElement, GenNode&&) override;
105  void mutate (ID uiElement, MutationMessage&&) override;
106  void triggerGuiShutdown (string const& cause) override;
107  };
108 
109 
110 
111 } // namespace stage
112 #endif
Major public Interface of the Lumiera GUI.
connection point at the UI-Bus.
Definition: bus-term.hpp:105
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:46
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:102
The Lumiera UI framework and backbone object.
Definition: ui-manager.hpp:97
A handle template for automatically dealing with interface and plugin registration and deregistration...
generic data element node within a tree
Definition: gen-node.hpp:231