111 "Given message text was '%s'"} % severity % text);
141 this->
change (uiElement, move(unConst(diff)));
149 NOTICE (
stage,
"@GUI: shutdown triggered with explanation '%s'....",
cStr(cause));
165 ,lumieraorg_GuiNotificationFacade_descriptor
167 , LUMIERA_INTERFACE_INLINE (name,
169 { (void)ifa;
return "GuiNotification"; }
171 , LUMIERA_INTERFACE_INLINE (brief,
173 { (void)ifa;
return "Stage Interface: push state update and notification of events into the GUI"; }
175 , LUMIERA_INTERFACE_INLINE (homepage,
177 { (void)ifa;
return "http://www.lumiera.org/develompent.html" ;}
179 , LUMIERA_INTERFACE_INLINE (version,
181 { (void)ifa;
return "0.1~pre"; }
183 , LUMIERA_INTERFACE_INLINE (author,
185 { (void)ifa;
return "Hermann Vosseler"; }
187 , LUMIERA_INTERFACE_INLINE (email,
189 { (void)ifa;
return "Ichthyostega@web.de"; }
191 , LUMIERA_INTERFACE_INLINE (copyright,
197 " 2008, Hermann Vosseler <Ichthyostega@web.de>";
200 , LUMIERA_INTERFACE_INLINE (license,
205 "**Lumiera** is free software; you can redistribute it and/or modify it\n"
206 "under the terms of the GNU General Public License as published by the\n"
207 "Free Software Foundation; either version 2 of the License, or (at your\n"
208 "option) any later version. See the file COPYING for further details."
212 , LUMIERA_INTERFACE_INLINE (state,
216 , LUMIERA_INTERFACE_INLINE (versioncmp,
217 int, (
const char* a,
const char* b),
218 {(void)a;(void)b;
return 0;}
226 using LERR_(LIFECYCLE);
233 ,lumieraorg_GuiNotificationService
234 ,
LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_GuiNotificationFacade_descriptor)
237 , LUMIERA_INTERFACE_INLINE (displayInfo,
238 void, (
uint severity,
const char* text),
245 , LUMIERA_INTERFACE_INLINE (markError,
246 void, (
const void* element,
const char* text),
253 , LUMIERA_INTERFACE_INLINE (markNote,
254 void, (
const void* element,
const char* text),
261 , LUMIERA_INTERFACE_INLINE (mark,
262 void, (
const void* element,
void* stateMark),
264 if (!_instance)
lumiera_error_set (LUMIERA_ERROR_LIFECYCLE,
"passing state mark");
269 , LUMIERA_INTERFACE_INLINE (mutate,
270 void, (
const void* element,
void* diff),
272 if (!_instance)
lumiera_error_set (LUMIERA_ERROR_LIFECYCLE,
"passing diff message");
277 , LUMIERA_INTERFACE_INLINE (triggerGuiShutdown,
278 void, (
const char* cause),
302 , dispatch_{
new UiDispatcher{[
this](
string msg){ displayInfo (NOTE_ERROR, msg); }}}
303 , uiManager_{uiManager}
304 , serviceInstance_(
LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 0,lumieraorg_GuiNotificationService))
306 INFO (
stage,
"GuiNotification Facade opened.");
310 NotificationService::~NotificationService() { }
Access point to singletons and other kinds of dependencies designated by type.
Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data...
type erased baseclass for building a combined hash and symbolic ID.
Actual implementation of the GuiNotification service within the Lumiera GTK GUI.
void mutate(ID uiElement, MutationMessage &&) override
void triggerGuiShutdown(string const &cause) override
causes the GUI to shut down unconditionally
void markError(ID uiElement, string const &text) override
ctrl::UiManager & uiManager_
NotificationService(ctrl::BusTerm &upLink, ctrl::UiManager &uiManager)
When started, NotificationService connects to the UI-Bus via the provided connection.
void mark(ID uiElement, GenNode &&) override
void displayInfo(NotifyLevel, string const &text) override
push a user visible notification text
void markNote(ID uiElement, string const &text) override
std::unique_ptr< ctrl::UiDispatcher > dispatch_
void dispatchMsg(ID, lib::diff::GenNode &&)
connection point at the UI-Bus.
virtual bool mark(ID subject, GenNode const &mark)
route a state update or notification to the given subject.
virtual bool change(ID subject, MutationMessage &&diff)
alter and reshape the designated subject by applying the given diff message.
Helper to dispatch code blocks into the UI event thread for execution.
The Lumiera UI framework and backbone object.
void terminateUI()
Cause the main event loop to terminate, so the application as a whole unwinds.
static ID getErrorLogID()
A front-end for using printf-style formatting.
Singleton services and Dependency Injection.
lumiera_err lumiera_error_set(lumiera_err nerr, const char *extra)
Set error state for the current thread.
Generic building block for tree shaped (meta)data structures.
A data record to describe interface, interface instances and plug-in instances.
@ LUMIERA_INTERFACE_EXPERIMENTAL
Not finished development code.
#define LUMIERA_INTERFACE_REF(iname, version, dname)
Return a reference (pointer) to an interface implementation.
#define LUMIERA_INTERFACE_INSTANCE(iname, version, name, descriptor, acquire, release,...)
Define an interface instance.
lumiera_interface * LumieraInterface
This header is for including and configuring NoBug.
Generic Message with an embedded diff, to describe changes to model elements.
Implementation namespace for support and library code.
LumieraError< LERR_(LOGIC)> Logic
lib::Depend< NotificationService > _instance
a backdoor for the C Language impl to access the actual SessionCommand implementation....
Lumiera GTK UI implementation root.
@ 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
const Symbol MARK_Message
const Symbol MARK_Warning
A public service provided by the GUI, implementing the stage::GuiNotification facade interface.
generic data element node within a tree
Opaque message to effect a structural change on a target, which is likewise only known in an abstract...
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
Allow dispatch of self-contained code blocks (lambdas) into the main UI event thread.
Manager for global user interface concerns, framework integration and global state.
Hard wired key constants and basic definitions for communication with the GUI.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...