Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
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
43namespace lib {
44 namespace diff {
45 class GenNode;
46 class MutationMessage;
47} }
48namespace stage {
49
50 using std::string;
53
54 using ID = lib::idi::BareEntryID const&;
55
61
62
63 /*****************************************************************/
74 {
75 protected:
76 virtual ~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
121extern "C" {
122#endif /* =========================== CL Interface ===================== */
123
124
125#include "common/interface.h"
126#include "lib/hash-value.h"
127
128
129LUMIERA_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*/
Access point to singletons and other kinds of dependencies designated by type.
Definition depend.hpp:281
Helper to abstract creation and lifecycle of a dependency.
Definition depend.hpp:127
type erased baseclass for building a combined hash and symbolic ID.
Definition entry-id.hpp:134
Global access point to push state update and notification of events from the lower layers into the Lu...
static lib::Depend< GuiNotification > facade
static storage for the facade access front-end
virtual void displayInfo(NotifyLevel, string const &text)=0
push a user visible notification text
virtual void mark(ID uiElement, GenNode &&stateMark)=0
send a generic state mark message to some element
virtual void triggerGuiShutdown(string const &cause)=0
causes the GUI to shut down unconditionally
virtual ~GuiNotification()
this is an interface
virtual void mutate(ID uiElement, MutationMessage &&)=0
push a diff message up into the user interface.
virtual void markNote(ID uiElement, string const &text)=0
attach an warning or state information element
virtual void markError(ID uiElement, string const &text)=0
highlight an element in the UI as problem location
Singleton services and Dependency Injection.
Bare symbolic and hash ID used for accounting of asset like entries.
Hash value types and utilities.
unsigned int uint
Definition integral.hpp:29
Lumiera interface macros and structures.
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition interface.h:154
Implementation namespace for support and library code.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
lib::idi::BareEntryID const & ID
@ NOTE_INFO
possibly interesting info that can be safely ignored
@ NOTE_ERROR
severe condition to be indicated prominently
@ NOTE_WARN
something to be aware of, to be indicated unobtrusively
generic data element node within a tree
Definition gen-node.hpp:224
Opaque message to effect a structural change on a target, which is likewise only known in an abstract...