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) 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_GUI_NOTIFICATION_H
40
#define STAGE_GUI_NOTIFICATION_H
41
42
43
44
#ifdef __cplusplus
/* ============== C++ Interface ================= */
45
46
#include "
lib/depend.hpp
"
47
#include "
lib/idi/entry-id.hpp
"
48
49
#include <string>
50
51
52
namespace
lib
{
53
namespace
diff {
54
class
GenNode;
55
class
MutationMessage;
56
} }
57
namespace
stage
{
58
59
using
std::string;
60
using
lib::diff::GenNode
;
61
using
lib::diff::MutationMessage
;
62
63
using
ID =
lib::idi::BareEntryID
const
&;
64
65
enum
NotifyLevel
{
66
NOTE_INFO
,
67
NOTE_WARN
,
68
NOTE_ERROR
69
};
70
71
72
/*****************************************************************/
82
class
GuiNotification
83
{
84
protected
:
85
virtual
~GuiNotification
() {}
86
friend
class
lib::DependencyFactory
<GuiNotification>;
87
88
public
:
89
static
lib::Depend<GuiNotification>
facade
;
90
91
93
virtual
void
displayInfo (
NotifyLevel
,
string
const
& text) =0;
94
96
virtual
void
markError (ID uiElement,
string
const
& text) =0;
97
99
virtual
void
markNote (ID uiElement,
string
const
& text) =0;
100
102
virtual
void
mark (ID uiElement,
GenNode
&& stateMark) =0;
103
113
virtual
void
mutate (ID uiElement,
MutationMessage
&&) =0;
114
121
virtual
void
triggerGuiShutdown (
string
const
& cause) =0;
122
123
};
124
125
126
127
}
// namespace stage
128
129
130
extern
"C"
{
131
#endif
/* =========================== CL Interface ===================== */
132
133
134
#include "
common/interface.h
"
135
#include "
lib/hash-value.h
"
136
137
138
LUMIERA_INTERFACE_DECLARE
(lumieraorg_GuiNotification, 0,
139
LUMIERA_INTERFACE_SLOT (
void
, displayInfo, (uint,
const
char
*)),
140
LUMIERA_INTERFACE_SLOT (
void
, markError, (
const
void
*,
const
char
*)),
141
LUMIERA_INTERFACE_SLOT (
void
, markNote, (
const
void
*,
const
char
*)),
142
LUMIERA_INTERFACE_SLOT (
void
, mark, (
const
void
*,
void
*)),
143
LUMIERA_INTERFACE_SLOT (
void
, mutate, (
const
void
*,
void
*)),
144
LUMIERA_INTERFACE_SLOT (
void
, triggerGuiShutdown, (
const
char
*)),
145
);
146
147
148
#ifdef __cplusplus
149
}
// extern "C"
150
#endif
151
#endif
/*STAGE_GUI_NOTIFICATION_H*/
lib::idi::BareEntryID
type erased baseclass for building a combined hash and symbolic ID.
Definition:
entry-id.hpp:142
stage::NotifyLevel
NotifyLevel
Definition:
gui-notification-facade.h:65
LUMIERA_INTERFACE_DECLARE
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition:
interface.h:163
stage::NOTE_WARN
something to be aware of, to be indicated unobtrusively
Definition:
gui-notification-facade.h:67
lib::diff::MutationMessage
Opaque message to effect a structural change on a target, which is likewise only known in an abstract...
Definition:
mutation-message.hpp:133
lib::Depend
Access point to singletons and other kinds of dependencies designated by type.
Definition:
depend.hpp:289
lib
Implementation namespace for support and library code.
Definition:
common-services.cpp:63
interface.h
Lumiera interface macros and structures.
stage
Lumiera GTK UI implementation root.
Definition:
guifacade.cpp:46
stage::GuiNotification::~GuiNotification
virtual ~GuiNotification()
this is an interface
Definition:
gui-notification-facade.h:85
depend.hpp
Singleton services and Dependency Injection.
hash-value.h
Hash value types and utilities.
stage::GuiNotification
Global access point to push state update and notification of events from the lower layers into the Lu...
Definition:
gui-notification-facade.h:82
lib::DependencyFactory
Helper to abstract creation and lifecycle of a dependency.
Definition:
depend.hpp:134
entry-id.hpp
Bare symbolic and hash ID used for accounting of asset like entries.
stage::NOTE_ERROR
severe condition to be indicated prominently
Definition:
gui-notification-facade.h:68
stage::GuiNotification::facade
static lib::Depend< GuiNotification > facade
static storage for the facade access front-end
Definition:
gui-notification-facade.h:89
stage::NOTE_INFO
possibly interesting info that can be safely ignored
Definition:
gui-notification-facade.h:66
lib::diff::GenNode
generic data element node within a tree
Definition:
gen-node.hpp:231
include
gui-notification-facade.h
Generated on Sat Apr 20 2024 02:03:39 for Lumiera by
1.8.13