97 dispatch_->event ([=]()
107 ID errorLogID = interact::Wizard::getErrorLogID();
110 markError (errorLogID, text);
113 markNote (errorLogID, text);
116 mark (errorLogID,
GenNode{
string{MARK_Warning}, text});
120 "Given message text was '%s'"} % severity % text);
125 NotificationService::markError (ID uiElement,
string const& text)
132 NotificationService::markNote (ID uiElement,
string const& text)
139 NotificationService::mark (ID uiElement,
GenNode&& stateMarkMsg)
148 dispatch_->event ([=]()
150 this->
change (uiElement, move(unConst(diff)));
158 NOTICE (
stage,
"@GUI: shutdown triggered with explanation '%s'....",
cStr(cause));
160 dispatch_->event ([
this]()
174 ,lumieraorg_GuiNotificationFacade_descriptor
176 , LUMIERA_INTERFACE_INLINE (
name,
177 const char*, (LumieraInterface ifa),
178 { (void)ifa;
return "GuiNotification"; }
180 , LUMIERA_INTERFACE_INLINE (brief,
181 const char*, (LumieraInterface ifa),
182 { (void)ifa;
return "Stage Interface: push state update and notification of events into the GUI"; }
184 , LUMIERA_INTERFACE_INLINE (homepage,
185 const char*, (LumieraInterface ifa),
186 { (void)ifa;
return "http://www.lumiera.org/develompent.html" ;}
188 , LUMIERA_INTERFACE_INLINE (version,
189 const char*, (LumieraInterface ifa),
190 { (void)ifa;
return "0.1~pre"; }
192 , LUMIERA_INTERFACE_INLINE (author,
193 const char*, (LumieraInterface ifa),
194 { (void)ifa;
return "Hermann Vosseler"; }
196 , LUMIERA_INTERFACE_INLINE (email,
197 const char*, (LumieraInterface ifa),
198 { (void)ifa;
return "Ichthyostega@web.de"; }
200 , LUMIERA_INTERFACE_INLINE (copyright,
201 const char*, (LumieraInterface ifa),
205 "Copyright (C) Lumiera.org\n" 206 " 2008 Hermann Vosseler <Ichthyostega@web.de>";
209 , LUMIERA_INTERFACE_INLINE (license,
210 const char*, (LumieraInterface ifa),
214 "This program is free software; you can redistribute it and/or modify\n" 215 "it under the terms of the GNU General Public License as published by\n" 216 "the Free Software Foundation; either version 2 of the License, or\n" 217 "(at your option) any later version.\n" 219 "This program is distributed in the hope that it will be useful,\n" 220 "but WITHOUT ANY WARRANTY; without even the implied warranty of\n" 221 "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n" 222 "GNU General Public License for more details.\n" 224 "You should have received a copy of the GNU General Public License\n" 225 "along with this program; if not, write to the Free Software\n" 226 "Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA";
229 , LUMIERA_INTERFACE_INLINE (state,
230 int, (LumieraInterface ifa),
233 , LUMIERA_INTERFACE_INLINE (versioncmp,
234 int, (
const char* a,
const char* b),
235 {(void)a;(void)b;
return 0;}
243 using LERR_(LIFECYCLE);
250 ,lumieraorg_GuiNotificationService
251 ,
LUMIERA_INTERFACE_REF(lumieraorg_interfacedescriptor, 0, lumieraorg_GuiNotificationFacade_descriptor)
255 void, (uint severity,
const char* text),
262 , LUMIERA_INTERFACE_INLINE (markError,
263 void, (
const void* element,
const char* text),
267 _instance().markError (*static_cast<lib::idi::BareEntryID const*> (element), text);
270 , LUMIERA_INTERFACE_INLINE (markNote,
271 void, (
const void* element,
const char* text),
275 _instance().markNote (*static_cast<lib::idi::BareEntryID const*> (element), text);
278 , LUMIERA_INTERFACE_INLINE (mark,
279 void, (
const void* element,
void* stateMark),
281 if (!_instance)
lumiera_error_set (LUMIERA_ERROR_LIFECYCLE,
"passing state mark");
283 _instance().mark (*static_cast<lib::idi::BareEntryID const*> (element), move(*reinterpret_cast<GenNode*> (stateMark)));
286 , LUMIERA_INTERFACE_INLINE (mutate,
287 void, (
const void* element,
void* diff),
289 if (!_instance)
lumiera_error_set (LUMIERA_ERROR_LIFECYCLE,
"passing diff message");
291 _instance().mutate (*static_cast<lib::idi::BareEntryID const*> (element), move(*reinterpret_cast<MutationMessage*> (diff)));
295 void, (
const char* cause),
320 , uiManager_{uiManager}
321 , serviceInstance_(
LUMIERA_INTERFACE_REF (lumieraorg_GuiNotification, 0,lumieraorg_GuiNotificationService))
323 INFO (
stage,
"GuiNotification Facade opened.");
327 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...