Lumiera  0.pre.03
»edit your freedom«
gui-notification-facade.h
Go to the documentation of this file.
1 /*
2  GUI-NOTIFICATION-FACADE.h - access point for pushing 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_GUI_NOTIFICATION_H
31 #define STAGE_GUI_NOTIFICATION_H
32 
33 
34 
35 #ifdef __cplusplus /* ============== C++ Interface ================= */
36 
37 #include "lib/depend.hpp"
38 #include "lib/idi/entry-id.hpp"
39 
40 #include <string>
41 
42 
43 namespace lib {
44  namespace diff {
45  class GenNode;
46  class MutationMessage;
47 } }
48 namespace stage {
49 
50  using std::string;
51  using lib::diff::GenNode;
53 
54  using ID = lib::idi::BareEntryID const&;
55 
56  enum NotifyLevel {
60  };
61 
62 
63  /*****************************************************************/
74  {
75  protected:
76  virtual ~GuiNotification() {}
77  friend class lib::DependencyFactory<GuiNotification>;
78 
79  public:
81 
82 
84  virtual void displayInfo (NotifyLevel, string const& text) =0;
85 
87  virtual void markError (ID uiElement, string const& text) =0;
88 
90  virtual void markNote (ID uiElement, string const& text) =0;
91 
93  virtual void mark (ID uiElement, GenNode&& stateMark) =0;
94 
104  virtual void mutate (ID uiElement, MutationMessage&&) =0;
105 
112  virtual void triggerGuiShutdown (string const& cause) =0;
113 
114  };
115 
116 
117 
118 } // namespace stage
119 
120 
121 extern "C" {
122 #endif /* =========================== CL Interface ===================== */
123 
124 
125 #include "common/interface.h"
126 #include "lib/hash-value.h"
127 
128 
129 LUMIERA_INTERFACE_DECLARE (lumieraorg_GuiNotification, 0,
130  LUMIERA_INTERFACE_SLOT (void, displayInfo, (uint, const char*)),
131  LUMIERA_INTERFACE_SLOT (void, markError, (const void*, const char*)),
132  LUMIERA_INTERFACE_SLOT (void, markNote, (const void*, const char*)),
133  LUMIERA_INTERFACE_SLOT (void, mark, (const void*, void*)),
134  LUMIERA_INTERFACE_SLOT (void, mutate, (const void*, void*)),
135  LUMIERA_INTERFACE_SLOT (void, triggerGuiShutdown, (const char*)),
136 );
137 
138 
139 #ifdef __cplusplus
140 }// extern "C"
141 #endif
142 #endif /*STAGE_GUI_NOTIFICATION_H*/
type erased baseclass for building a combined hash and symbolic ID.
Definition: entry-id.hpp:133
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition: interface.h:154
something to be aware of, to be indicated unobtrusively
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
Implementation namespace for support and library code.
Lumiera interface macros and structures.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:37
virtual ~GuiNotification()
this is an interface
Singleton services and Dependency Injection.
Hash value types and utilities.
Global access point to push state update and notification of events from the lower layers into the Lu...
Helper to abstract creation and lifecycle of a dependency.
Definition: depend.hpp:125
Bare symbolic and hash ID used for accounting of asset like entries.
severe condition to be indicated prominently
static lib::Depend< GuiNotification > facade
static storage for the facade access front-end
possibly interesting info that can be safely ignored
generic data element node within a tree
Definition: gen-node.hpp:222