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
;
52
using
lib::diff::MutationMessage
;
53
54
using
ID =
lib::idi::BareEntryID
const
&;
55
56
enum
NotifyLevel
{
57
NOTE_INFO
,
58
NOTE_WARN
,
59
NOTE_ERROR
60
};
61
62
63
/*****************************************************************/
73
class
GuiNotification
74
{
75
protected
:
76
virtual
~GuiNotification
() {}
77
friend
class
lib::DependencyFactory
<GuiNotification>;
78
79
public
:
80
static
lib::Depend<GuiNotification>
facade
;
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*/
lib::idi::BareEntryID
type erased baseclass for building a combined hash and symbolic ID.
Definition:
entry-id.hpp:133
stage::NotifyLevel
NotifyLevel
Definition:
gui-notification-facade.h:56
LUMIERA_INTERFACE_DECLARE
#define LUMIERA_INTERFACE_DECLARE(name, version,...)
Declare an interface.
Definition:
interface.h:154
stage::NOTE_WARN
something to be aware of, to be indicated unobtrusively
Definition:
gui-notification-facade.h:58
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:124
lib::Depend
Access point to singletons and other kinds of dependencies designated by type.
Definition:
depend.hpp:280
lib
Implementation namespace for support and library code.
Definition:
common-services.cpp:54
interface.h
Lumiera interface macros and structures.
stage
Lumiera GTK UI implementation root.
Definition:
guifacade.cpp:37
stage::GuiNotification::~GuiNotification
virtual ~GuiNotification()
this is an interface
Definition:
gui-notification-facade.h:76
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:73
lib::DependencyFactory
Helper to abstract creation and lifecycle of a dependency.
Definition:
depend.hpp:125
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:59
stage::GuiNotification::facade
static lib::Depend< GuiNotification > facade
static storage for the facade access front-end
Definition:
gui-notification-facade.h:80
stage::NOTE_INFO
possibly interesting info that can be safely ignored
Definition:
gui-notification-facade.h:57
lib::diff::GenNode
generic data element node within a tree
Definition:
gen-node.hpp:222
include
gui-notification-facade.h
Generated on Fri Dec 13 2024 05:05:33 for Lumiera by
1.8.13