Lumiera 0.pre.04~rc.1
»edit your freedom«
Loading...
Searching...
No Matches
wizard.cpp
Go to the documentation of this file.
1/*
2 Wizard - controller user help and assistance
3
4 Copyright (C)
5 2017, 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
14
22#include "stage/gtk-base.hpp"
23#include "stage/config-keys.hpp"
31#include "lib/format-string.hpp"
32//#include "lib/util.hpp"
33
34#include <boost/algorithm/string/classification.hpp>
35#include <boost/algorithm/string/split.hpp>
36#include <vector>
37#include <string>
38
39//using util::cStr;
40//using util::isnil;
41using ::util::_Fmt;
42using std::vector;
43using std::string;
44
45
46namespace stage {
47namespace interact {
48
49 using boost::algorithm::is_any_of;
50 using boost::algorithm::split;
51 using workspace::WorkspaceWindow;
52 using ctrl::NotificationHub;
53 using ctrl::GlobalCtx;
54 using Gtk::AboutDialog;
55
56
57 // dtors via smart-ptr invoked from here... (TODO any to come here?)
60
61
63 : globalCtx_{globals}
64 , notificationHub_{new NotificationHub{getErrorLogID()
65 ,globals.uiBus_.getAccessPoint()
66 ,[&]() -> widget::ErrorLogDisplay&
67 {
70 .getLog();
71 }} }
72 { }
73
74
75
80 void
81 Wizard::show_HelpAbout()
82 {
83 // Configure the about dialog
84 AboutDialog dialog;
85
86 cuString copyrightNotice {_Fmt(_("© %s the original Authors\n"
87 "-- Lumiera Team --\n"
88 "Lumiera is Free Software (GPL)"))
89 % Config::get (KEY_COPYRIGHT)};
90
91 string authors = Config::get (KEY_AUTHORS);
92 vector<uString> authorsList;
93 split (authorsList, authors, is_any_of (",|"));
94
95
96 dialog.set_program_name(Config::get (KEY_TITLE));
97 dialog.set_version(Config::get (KEY_VERSION));
98 dialog.set_copyright(copyrightNotice);
99 dialog.set_website(Config::get (KEY_WEBSITE));
100 dialog.set_authors(authorsList);
101
102 WorkspaceWindow& currentWindow = globalCtx_.windowLoc_.findActiveWindow();
103 dialog.set_transient_for (currentWindow);
104
105 // Show the about dialog
106 dialog.run();
107 }
108
109
116 void
117 Wizard::launchTestCtrl()
118 {
119 if (testControlWindow_)
120 testControlWindow_->present(); // just (re)show the existing window
121 else
122 testControlWindow_ = std::make_unique<dialog::TestControl> (globalCtx_.uiBus_.getAccessPoint(),
123 globalCtx_.windowLoc_.findActiveWindow());
124 }
125
126
127
128}}// namespace stage::interact
A global circle of top-level UI management facilities.
WindowLocator windowLoc_
Service to receive and display error, warning and notification messages.
PAN & find_or_create()
lookup or allocate "the" instance of the indicated Panel(subtype).
ctrl::GlobalCtx & globalCtx_
Definition wizard.hpp:79
Wizard(ctrl::GlobalCtx &)
Definition wizard.cpp:62
Widget to display log and error messages.
The main Lumiera workspace window.
A front-end for using printf-style formatting.
Definition of access keys for global UI configuration.
Front-end for printf-style string template interpolation.
Dependency context to hold all the global UI top-level entities.
A set of basic GTK includes for the UI.
#define _(String)
Definition gtk-base.hpp:68
A (dockable) panel to display and manage information and parameters.
Lumiera GTK UI implementation root.
Definition guifacade.cpp:37
Literal KEY_TITLE
Literal KEY_COPYRIGHT
Literal KEY_VERSION
Literal KEY_WEBSITE
const uString cuString
Definition gtk-base.hpp:93
Literal KEY_AUTHORS
Controller to receive and handle notification messages for the user.
Navigating a centre of user activity globally.
Non-modal dialog window to trigger diagnostics and self test routines.
Global help controller.
This file contains the definition of the main workspace window parent, which is the toplevel parent o...