From 41ea59176cebdf1dc4a0852aa421ca2096897a87 Mon Sep 17 00:00:00 2001 From: Ichthyostega Date: Thu, 2 Mar 2017 23:49:23 +0100 Subject: [PATCH] UI-top-level: include global help controller ("wizzard") --- src/gui/ctrl/global-ctx.hpp | 6 ++- src/gui/interact/navigator.hpp | 2 +- src/gui/interact/wizard.cpp | 61 ++++++++++++++++++++++++ src/gui/interact/wizard.hpp | 87 ++++++++++++++++++++++++++++++++++ wiki/thinkPad.ichthyo.mm | 52 +++++++++++++++++--- 5 files changed, 198 insertions(+), 10 deletions(-) create mode 100644 src/gui/interact/wizard.cpp create mode 100644 src/gui/interact/wizard.hpp diff --git a/src/gui/ctrl/global-ctx.hpp b/src/gui/ctrl/global-ctx.hpp index 310ebab84..e5b3d79f7 100644 --- a/src/gui/ctrl/global-ctx.hpp +++ b/src/gui/ctrl/global-ctx.hpp @@ -41,8 +41,7 @@ ** - the UiManager ** - the InteractionDirector ** - the WindowList - ** - the HelpController - ** - the Wizzard + ** - the Wizard ** ** @see gtk-lumiera.hpp ** @see ui-bus.hpp @@ -58,6 +57,7 @@ #include "gui/ui-bus.hpp" #include "gui/ctrl/ui-manager.hpp" #include "gui/ctrl/window-list.hpp" +#include "gui/interact/wizard.hpp" #include "gui/interact/interaction-director.hpp" #include @@ -89,6 +89,7 @@ namespace ctrl { WindowList windowList_; InteractionDirector director_; + interact::Wizard wizard_; public: @@ -100,6 +101,7 @@ namespace ctrl { , uiManager_{manager} , windowList_{*this} , director_{*this} + , wizard_{*this} { } private: diff --git a/src/gui/interact/navigator.hpp b/src/gui/interact/navigator.hpp index 159b25781..dae0599ac 100644 --- a/src/gui/interact/navigator.hpp +++ b/src/gui/interact/navigator.hpp @@ -26,7 +26,7 @@ ** Beyond just clicking on some buttons or issuing menu / key commands, ** the Lumiera interface allows the user to _move_ through interface space, ** to leave one _"place"_ (WorkSite) and enter another. The interact::Navigator - ** is a controller entity to implement the necessary mechanics for this navication. + ** is a controller entity to implement the necessary mechanics for this navigation. ** ** @todo WIP 2/2017 early draft / foundations of "interaction control" ** diff --git a/src/gui/interact/wizard.cpp b/src/gui/interact/wizard.cpp new file mode 100644 index 000000000..881b062af --- /dev/null +++ b/src/gui/interact/wizard.cpp @@ -0,0 +1,61 @@ +/* + Wizard - controller user help and assistance + + Copyright (C) Lumiera.org + 2017, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +* *****************************************************/ + + +/** @file wizard.cpp + ** Implementation of the global help controller to show the user manual. + ** + ** @todo WIP 3/2017 early draft of the UI top-level controllers + */ + + +//#include "gui/gtk-lumiera.hpp" +#include "gui/interact/wizard.hpp" +#include "gui/interact/spot-locator.hpp" +#include "gui/ctrl/global-ctx.hpp" +//#include "lib/util.hpp" + +//using util::cStr; +//using util::isnil; + + +namespace gui { +namespace interact { + + using ctrl::GlobalCtx; + + + // dtors via smart-ptr invoked from here... (TODO any to come here?) + Wizard::~Wizard() + { } + + + Wizard::Wizard (GlobalCtx& globals) + : globalCtx_{globals} + { } + + + /** */ + + + +}}// namespace gui::interact diff --git a/src/gui/interact/wizard.hpp b/src/gui/interact/wizard.hpp new file mode 100644 index 000000000..774265775 --- /dev/null +++ b/src/gui/interact/wizard.hpp @@ -0,0 +1,87 @@ +/* + WIZARD.hpp - controller user help and assistance + + Copyright (C) Lumiera.org + 2017, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of + the License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + + +/** @file wizard.hpp + ** Global help controller. + ** The Wizard is a global controller to handle launching the user help, + ** context sensitive help and further user assistance and support UI. + ** @remark User help is planned to rely on the [UserManual], possibly + ** using an embedded browser control or an installed local copy + ** of the manual. + ** @todo The infrastructure for context sensitive help needs to be defined + ** + ** [UserManual]: http://www.lumiera.org/documentation/user/manual.html "»User Manual«" + ** + ** @todo WIP 3/2017 early draft of the UI top-level controllers + ** + ** @see interaction-director.hpp + ** @see actions.hpp + */ + + +#ifndef GUI_INTERACT_WIZARD_H +#define GUI_INTERACT_WIZARD_H + +#include "gui/gtk-base.hpp" + +#include +//#include +//#include + + +namespace gui { +namespace ctrl { + class GlobalCtx; +} +namespace interact { + +// using std::unique_ptr; +// using std::string; + +// class GlobalCtx; +// class SpotLocator; + + + + /** + * Global cross-cutting navigation in interface space + * + * @todo initial draft as of 2/2017 -- actual implementation has to be filled in + */ + class Wizard + : boost::noncopyable + { + ctrl::GlobalCtx& globalCtx_; + + public: + Wizard (ctrl::GlobalCtx&); + ~Wizard (); + + private: + + }; + + + +}}// namespace gui::interact +#endif /*GUI_INTERACT_WIZARD_H*/ diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 4ba861d83..c792a80e6 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -2004,11 +2004,20 @@ - + + + + + + + + + + @@ -2053,12 +2062,13 @@ - + + - + @@ -2091,10 +2101,10 @@ - + - + @@ -2117,7 +2127,7 @@ - + @@ -2134,7 +2144,7 @@ - + @@ -2417,6 +2427,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +