Lumiera  0.pre.03
»edit your freedom«
notification-interface-proxy.cpp
Go to the documentation of this file.
1 /*
2  Notification(Proxy) - public service 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 
14 
15 
28 
29 namespace stage {
32 }
33 namespace lumiera {
34 namespace facade {
35  using stage::ID;
36  using lib::diff::GenNode;
38 
39 
40 
41  /* ==================== SessionCommand =================================== */
42 
43  using Interface = LUMIERA_INTERFACE_INAME(lumieraorg_GuiNotification, 0);
44  using Facade = stage::GuiNotification;
45 
46  using IHandle = InstanceHandle<Interface, Facade>;
47 
48 
49  template<>
50  class Proxy<IHandle>
51  : public Binding<IHandle>
52  {
53  using Level = stage::NotifyLevel;
54 
55  //----Proxy-Implementation-of-GuiNotification--------
56 
57  void displayInfo (Level level, string const& text) override { _i_.displayInfo (level, cStr(text)); }
58  void markError (ID uiElement, string const& text) override { _i_.markError(&uiElement, cStr(text)); }
59  void markNote (ID uiElement, string const& text) override { _i_.markNote (&uiElement, cStr(text)); }
60  void mark (ID uiElement, GenNode&& stateMark) override { _i_.mark (&uiElement, &stateMark); }
61  void mutate (ID uiElement, MutationMessage&& diff) override { _i_.mutate (&uiElement, &diff); }
62  void triggerGuiShutdown (string const& cause) override { _i_.triggerGuiShutdown (cStr(cause)); }
63 
64 
65  public:
66  using Binding<IHandle>::Binding;
67  };
68 
69 
71  template
72  class Link<Interface,Facade>;
73 
74 }} //namespace facade::lumiera
Major public Interface of the Lumiera GUI.
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
Definition: symbol.hpp:59
Opaque message to effect a structural change on a target, which is likewise only known in an abstract...
Access point to singletons and other kinds of dependencies designated by type.
Definition: depend.hpp:280
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
Implementation of C++ binding proxies on top of the (plain-C based) interface system.
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
Lumiera public interface.
Definition: advice.cpp:104
static lib::Depend< GuiNotification > facade
static storage for the facade access front-end
generic data element node within a tree
Definition: gen-node.hpp:222