88 dispatch_->event ([=]()
98 ID errorLogID = interact::Wizard::getErrorLogID();
101 markError (errorLogID, text);
104 markNote (errorLogID, text);
107 mark (errorLogID,
GenNode{
string{MARK_Warning}, text});
111 "Given message text was '%s'"} % severity % text);
116 NotificationService::markError (ID uiElement,
string const& text)
123 NotificationService::markNote (ID uiElement,
string const& text)
130 NotificationService::mark (ID uiElement,
GenNode&& stateMarkMsg)
139 dispatch_->event ([=]()
141 this->
change (uiElement, move(unConst(diff)));
149 NOTICE (
stage,
"@GUI: shutdown triggered with explanation '%s'....",
cStr(cause));
151 dispatch_->event ([
this]()
165 ,lumieraorg_GuiNotificationFacade_descriptor
167 , LUMIERA_INTERFACE_INLINE (
name,
168 const char*, (LumieraInterface ifa),
169 { (void)ifa;
return "GuiNotification"; }
171 , LUMIERA_INTERFACE_INLINE (brief,
172 const char*, (LumieraInterface ifa),
173 { (void)ifa;
return "Stage Interface: push state update and notification of events into the GUI"; }
175 , LUMIERA_INTERFACE_INLINE (homepage,
176 const char*, (LumieraInterface ifa),
177 { (void)ifa;
return "http://www.lumiera.org/develompent.html" ;}
179 , LUMIERA_INTERFACE_INLINE (version,
180 const char*, (LumieraInterface ifa),
181 { (void)ifa;
return "0.1~pre"; }
183 , LUMIERA_INTERFACE_INLINE (author,
184 const char*, (LumieraInterface ifa),
185 { (void)ifa;
return "Hermann Vosseler"; }
187 , LUMIERA_INTERFACE_INLINE (email,
188 const char*, (LumieraInterface ifa),
189 { (void)ifa;
return "Ichthyostega@web.de"; }
191 , LUMIERA_INTERFACE_INLINE (copyright,
192 const char*, (LumieraInterface ifa),
197 " 2008, Hermann Vosseler <Ichthyostega@web.de>";
200 , LUMIERA_INTERFACE_INLINE (license,
201 const char*, (LumieraInterface ifa),
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,
213 int, (LumieraInterface ifa),
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)
238 void, (uint severity,
const char* text),
245 , LUMIERA_INTERFACE_INLINE (markError,
246 void, (
const void* element,
const char* text),
250 _instance().markError (*static_cast<lib::idi::BareEntryID const*> (element), text);
253 , LUMIERA_INTERFACE_INLINE (markNote,
254 void, (
const void* element,
const char* text),
258 _instance().markNote (*static_cast<lib::idi::BareEntryID const*> (element), 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");
266 _instance().mark (*static_cast<lib::idi::BareEntryID const*> (element), move(*reinterpret_cast<GenNode*> (stateMark)));
269 , LUMIERA_INTERFACE_INLINE (mutate,
270 void, (
const void* element,
void* diff),
272 if (!_instance)
lumiera_error_set (LUMIERA_ERROR_LIFECYCLE,
"passing diff message");
274 _instance().mutate (*static_cast<lib::idi::BareEntryID const*> (element), move(*reinterpret_cast<MutationMessage*> (diff)));
278 void, (
const char* cause),
303 , uiManager_{uiManager}
304 , serviceInstance_(
LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 0,lumieraorg_GuiNotificationService))
306 INFO (
stage,
"GuiNotification Facade opened.");
310 NotificationService::~NotificationService() { }
Generic Message with an embedded diff, to describe changes to model elements.
Hard wired key constants and basic definitions for communication with the GUI.
connection point at the UI-Bus.
CStr cStr(std::string const &rendered)
convenience shortcut: forced conversion to c-String via string.
NotificationService(ctrl::BusTerm &upLink, ctrl::UiManager &uiManager)
When started, NotificationService connects to the UI-Bus via the provided connection.
void dispatchMsg(ID, lib::diff::GenNode &&)
void terminateUI()
Cause the main event loop to terminate, so the application as a whole unwinds.
typed symbolic and hash ID for asset-like position accounting.
A public service provided by the GUI, implementing the stage::GuiNotification facade interface...
void triggerGuiShutdown(string const &cause) override
causes the GUI to shut down unconditionally
This header is for including and configuring NoBug.
Helper to dispatch code blocks into the UI event thread for execution.
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...
A front-end for using printf-style formatting.
Access point to singletons and other kinds of dependencies designated by type.
Not finished development code.
#define LUMIERA_INTERFACE_INSTANCE(iname, version, name, descriptor, acquire, release,...)
Define an interface instance.
Derived specific exceptions within Lumiera's exception hierarchy.
Manager for global user interface concerns, framework integration and global state.
virtual bool mark(ID subject, GenNode const &mark)
route a state update or notification to the given subject.
#define LUMIERA_INTERFACE_REF(iname, version, dname)
Return a reference (pointer) to an interface implementation.
Lumiera GTK UI implementation root.
Tiny helper functions and shortcuts to be used everywhere Consider this header to be effectively incl...
virtual bool change(ID subject, MutationMessage &&diff)
alter and reshape the designated subject by applying the given diff message.
Generic building block for tree shaped (meta)data structures.
Allow dispatch of self-contained code blocks (lambdas) into the main UI event thread.
Singleton services and Dependency Injection.
lumiera_err lumiera_error_set(lumiera_err nerr, const char *extra)
Set error state for the current thread.
A data record to describe interface, interface instances and plug-in instances.
The Lumiera UI framework and backbone object.
severe condition to be indicated prominently
possibly interesting info that can be safely ignored
void displayInfo(NotifyLevel, string const &text) override
push a user visible notification text
lib::Depend< NotificationService > _instance
a backdoor for the C Language impl to access the actual SessionCommand implementation...
generic data element node within a tree
Customisable intermediary to abstract mutating operations on arbitrary, hierarchical object-like data...