UI-top-level: the former Application Object (GtkLumiera) is obsoleted now

All the backbone functionality has been factored out into dedicated facilities
This commit is contained in:
Fischlurch 2017-05-03 21:13:17 +02:00
parent e59e8d0ab5
commit 1ed4bd2c4c
64 changed files with 145 additions and 216 deletions

View file

@ -31,7 +31,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/config-keys.hpp"
#include "gui/ctrl/ui-manager.hpp"
#include "gui/ctrl/global-ctx.hpp"
@ -104,9 +104,7 @@ namespace ctrl {
void
UiManager::terminateUI()
{
Gtk::Main *main = Gtk::Main::instance(); /////////////////////////////////////TICKET #1032 : use gtk::Application instead of gtk::Main
REQUIRE(main);
main->quit();
gtkMain_.quit();
}
void

View file

@ -27,7 +27,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/ctrl/ui-state.hpp"
#include "gui/ctrl/state-manager.hpp"
#include "gui/interact/focus-tracker.hpp"

View file

@ -27,7 +27,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/dialog/name-chooser.hpp"
#include "gui/dialog/dialog.hpp"

View file

@ -29,7 +29,7 @@
#ifndef GUI_DIALOG_NAME_CHOOSER_H
#define GUI_DIALOG_NAME_CHOOSER_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
namespace gui {

View file

@ -33,7 +33,7 @@
#define GUI_DIALOG_PREFERENCES_DIALOG_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/dialog/dialog.hpp"
namespace gui {

View file

@ -27,7 +27,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/dialog/render.hpp"
#include "gui/dialog/dialog.hpp"

View file

@ -29,7 +29,7 @@
#ifndef GUI_DIALOG_RENDER_H
#define GUI_DIALOG_RENDER_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
namespace gui {

View file

@ -23,18 +23,34 @@
/** @file gtk-base.hpp
** A set of basic GTK includes.
** A set of basic GTK includes for the UI.
** There are some tricky points to consider when including the
** basic GTKmm headers. Especially, GTK tries to shadow the ERROR macro
** from Microsoft Windows. Unfortunately this breaks the ERROR macro from NoBug;
** thus we need to include NoBug \em after GTK
** thus we need to include NoBug _after_ GTK
**
** Besides, this header defines the basic NLS. Most parts of the GUI rely either
** directly on this header, or through the inclusion of gtk-lumiera.hpp
** Besides, this header defines the basic NLS. Most parts of the GUI rely on this header.
**
**
** ## configuration and resource search
**
** The GUI backbone retrieves the necessary configuration values from lumiera::Config,
** the config facade in the application core. Currently as of 2/2011 these values are
** loaded from setup.ini, because the full-blown config system is not yet implemented.
** Amongst others, this configuration defines a _search path_ for icons and a
** separate search path for resources. These path specs may use the token `$ORIGIN`
** to refer to the installation directory of the currently executing program.
** This allows for a relocatable Lumiera installation bundle.
**
** @warning include here only what is absolutely necessary,
** for sake of compilation times and (debug) executable size.
** @see GtkLumiera
**
** @see guistart.cpp the plugin to pull up this GUI
** @see gui::GuiFacade access point for starting the GUI
** @see gui::GuiNotification interface for communication with the gui from the lower layers
** @see lumiera::Config
** @see lumiera::BasicSetup definition of the acceptable configuration values
** @see lumiera::AppState general Lumiera application main
*/
@ -64,10 +80,78 @@
#endif
/* ======= Namespace Definitions ======= */
/** Lumiera GTK UI implementation root. */
namespace gui {
typedef Glib::ustring uString;
typedef const uString cuString;
/** Backbone of the Lumiera GTK UI.
* All interface elements and controllers of global relevance
* are connected to a communication structure known as UI-Bus.
* This structure allows to address interface elements by ID
* and to process command invocations with asynchronous feedback
* in a uniform way.
*/
namespace ctrl {}
/** UI interaction control.
* Any overarching concerns of interaction patterns,
* selecting the subject, forming and binding of commands,
* management of focus and perspective, keybindings and gestures.
*/
namespace interact {}
/** The Lumiera GTK-GUI uses a thin proxy layer data model
* on top of the actual "high-level-model", which lives in the
* Proc-Layer below. GUI operations interact with these proxy model
* entities, which in turn forward the calls to the actual objects
* in the Proc-Layer, through the Command system (which enables UNDO).
*
* @todo: as of 1/2011 this connection between the GUI proxy model and
* the Proc-Layer model needs to be set up. Currently, the GUI model
* entities are just created standalone and thus dysfunctional.
* @todo: as of 11/2015 this connection between UI and Proc-Layer is actually
* in the works, and it is clear by now that we won't use proxy objects,
* but rather a generic bus-like connection and symbolic IDs to designate
* the model elements
* @todo: and as of 2/2017 the new structure is basically set, but we need actually
* to implement a new timeline display in accordance to this reworked design.
* After this is done, most of the model elements in this packare are obsolete.
*/
namespace model {}
/** Video output implementation. */
namespace output {}
/** Dialog box classes. */
namespace dialog {}
/** Docking panel classes. */
namespace panel {}
/** The asset management, configuration and project settings. */
namespace setting {}
/** The timeline display and editing operations. */
namespace timeline {}
/** The global workspace with top-level windows. */
namespace workspace {}
/** Lumiera custom widgets. */
namespace widget {}
/** GUI helpers, utility functions and classes. */
namespace util {}
}// namespace gui
#endif
#endif /*GUI_GTK_BASE_H*/

View file

@ -1,79 +0,0 @@
/*
GtkLumiera - The Lumiera GUI Application Object
Copyright (C) Lumiera.org
2008, Joel Holdsworth <joel@airwebreathe.org.uk>
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 gtk-lumiera.cpp
*/
#include "gui/gtk-base.hpp"
#include "gui/ctrl/ui-manager.hpp"
#include "gui/ui-bus.hpp"
#include "lib/depend.hpp"
#include "include/config-facade.h"
#include <gdlmm.h>
namespace gui {
namespace error = lumiera::error;
using std::string;
namespace {
/** storage for the Main Application object */
lib::Depend<GtkLumiera> theApplicationInstance;
}
GtkLumiera&
GtkLumiera::application()
{
return theApplicationInstance();
}
/** @remarks this function blocks until shutdown of the UI */
void
GtkLumiera::run()
{
//////////////////////TICKET #959 : establish the new backbone here / replaces Project and Controller
UiBus uiBus;
ctrl::UiManager uiManager(uiBus);
uiManager.createApplicationWindow();
uiManager.performMainLoop();
}
}// namespace gui

View file

@ -56,75 +56,8 @@
#include <boost/noncopyable.hpp>
/* ======= Namespace Definitions ======= */
/** Lumiera GTK UI implementation root. */
namespace gui {
/** Backbone of the Lumiera GTK UI.
* All interface elements and controllers of global relevance
* are connected to a communication structure known as UI-Bus.
* This structure allows to address interface elements by ID
* and to process command invocations with asynchronous feedback
* in a uniform way.
*/
namespace ctrl {}
/** UI interaction control.
* Any overarching concerns of interaction patterns,
* selecting the subject, forming and binding of commands,
* management of focus and perspective, keybindings and gestures.
*/
namespace interact {}
/** The Lumiera GTK-GUI uses a thin proxy layer data model
* on top of the actual "high-level-model", which lives in the
* Proc-Layer below. GUI operations interact with these proxy model
* entities, which in turn forward the calls to the actual objects
* in the Proc-Layer, through the Command system (which enables UNDO).
*
* @todo: as of 1/2011 this connection between the GUI proxy model and
* the Proc-Layer model needs to be set up. Currently, the GUI model
* entities are just created standalone and thus dysfunctional.
* @todo: as of 11/2015 this connection between UI and Proc-Layer is actually
* in the works, and it is clear by now that we won't use proxy objects,
* but rather a generic bus-like connection and symbolic IDs to designate
* the model elements
* @todo: and as of 2/2017 the new structure is basically set, but we need actually
* to implement a new timeline display in accordance to this reworked design.
* After this is done, most of the model elements in this packare are obsolete.
*/
namespace model {}
/** Video output implementation. */
namespace output {}
/** Dialog box classes. */
namespace dialog {}
/** Docking panel classes. */
namespace panel {}
/** The asset management, configuration and project settings. */
namespace setting {}
/** The timeline display and editing operations. */
namespace timeline {}
/** The global workspace with top-level windows. */
namespace workspace {}
/** Lumiera custom widgets. */
namespace widget {}
/** GUI helpers, utility functions and classes. */
namespace util {}

View file

@ -29,7 +29,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/focus-tracker.hpp"
#include "gui/interact/navigator.hpp"
//#include "gui/ctrl/global-ctx.hpp"

View file

@ -28,7 +28,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/navigator.hpp"
#include "gui/interact/spot-locator.hpp"
//#include "gui/ctrl/global-ctx.hpp"

View file

@ -28,7 +28,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/spot-locator.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"

View file

@ -28,7 +28,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/work-site-trail.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"

View file

@ -29,7 +29,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/interact/work-site.hpp"
//#include "gui/ctrl/global-ctx.hpp"
//#include "lib/util.hpp"

View file

@ -30,7 +30,7 @@
#ifndef GUI_MODEL_CLIP_H
#define GUI_MODEL_CLIP_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "lib/time/timevalue.hpp"
#include <string>

View file

@ -28,7 +28,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include <memory>
#include <list>

View file

@ -35,7 +35,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/output/displayer.hpp"
#include "gui/output/xvdisplayer.hpp"
#include "gui/output/gdkdisplayer.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/output/gdkdisplayer.hpp"
#if false ///////////////////////////////////////////////////////////////////////////////////////////////////TICKET #950 : new solution for video display

View file

@ -33,7 +33,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/output/xvdisplayer.hpp"
#include "include/logging.h"

View file

@ -25,7 +25,7 @@
** Implementation of a (dockable) panel to organise the assets of a project.
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/panel/assets-panel.hpp"
namespace gui {

View file

@ -26,7 +26,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/panel/panel.hpp"
#include "gui/workspace/panel-manager.hpp"
#include "gui/workspace/workspace-window.hpp"

View file

@ -30,7 +30,7 @@
#ifndef GUI_PANEL_PANEL_H
#define GUI_PANEL_PANEL_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/panel-bar.hpp"
#include <gdlmm.h>

View file

@ -21,7 +21,7 @@
* *****************************************************/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/panel/timeline-panel-obsolete.hpp"
#include "gui/widget/timeline/timeline-zoom-scale.hpp"
#include "gui/workspace/workspace-window.hpp"

View file

@ -31,7 +31,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/panel/timeline-panel.hpp"
//#include "gui/workspace/workspace-window.hpp"

View file

@ -25,7 +25,7 @@
** Implementation of a dockable panel to hold the video viewers
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/panel/viewer-panel.hpp"
#include "gui/workspace/workspace-window.hpp"

View file

@ -29,7 +29,6 @@
*/
//#include "gui/gtk-lumiera.hpp"
#include "gui/setting/asset-controller.hpp"
//#include "gui/ctrl/global-ctx.hpp"
#include "lib/diff/tree-mutator.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/body-canvas-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/clip-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"

View file

@ -34,7 +34,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/clip-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/header-pane-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/layout-manager.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/marker-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/navigator-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/patchbay-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/pipe-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/ruler-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -38,7 +38,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/timeline-controller.hpp"
#include "gui/timeline/track-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/timeline-widget-empty.hpp"
//#include "gui/workspace/workspace-window.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/timeline-widget.hpp"
//#include "gui/workspace/workspace-window.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/track-body.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/track-head-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/track-presenter.hpp"
#include "gui/timeline/clip-presenter.hpp"
#include "gui/timeline/marker-widget.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/timeline/transition-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -103,7 +103,7 @@
#define GUI_UI_BUS_H
#include "gui/gtk-lumiera.hpp" //////////////////////////////////////////////////////TODO remove any GTK dependency if possible
#include "gui/gtk-base.hpp" //////////////////////////////////////////////////////TODO remove any GTK dependency if possible
#include "gui/ctrl/playback-controller.hpp"
#include <boost/noncopyable.hpp>

View file

@ -29,7 +29,7 @@
#ifndef GUI_UTIL_RECTANGLE_H
#define GUI_UTIL_RECTANGLE_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
namespace gui {
namespace util {

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/bin-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/label-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/mixer-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -29,7 +29,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/player-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -30,7 +30,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/switchboard-widget.hpp"
//#include "gui/ui-bus.hpp"

View file

@ -28,7 +28,7 @@
#ifndef GUI_WIDGET_TIMELINE_BODY_H
#define GUI_WIDGET_TIMELINE_BODY_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/timeline/timeline-tool.hpp"
#include "lib/time/timevalue.hpp"

View file

@ -28,7 +28,7 @@
#ifndef GUI_WIDGET_TIMELINE_CLIP_H
#define GUI_WIDGET_TIMELINE_CLIP_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/model/clip.hpp"
#include "include/logging.h"
#include "lib/time/timevalue.hpp"

View file

@ -27,7 +27,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/timeline/timeline-entity.hpp"
#include "gui/widget/timeline/draw-strategy.hpp"

View file

@ -32,7 +32,7 @@
#ifndef GUI_WIDGET_TIMELINE_HEADER_CONTAINER_H
#define GUI_WIDGET_TIMELINE_HEADER_CONTAINER_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "timeline-layout-helper.hpp"
namespace gui {

View file

@ -30,7 +30,7 @@
#ifndef GUI_WIDGET_HEADER_WIDGET_H
#define GUI_WIDGET_HEADER_WIDGET_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
namespace gui {
namespace widget {

View file

@ -29,7 +29,7 @@
#ifndef GUI_WIDGET_TIMELINE_LAYOUT_HELPER_H
#define GUI_WIDGET_TIMELINE_LAYOUT_HELPER_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "lib/util-coll.hpp"
#include "lib/tree.hpp"

View file

@ -30,7 +30,7 @@
#ifndef GUI_WIDGET_TIMELINE_RULER_H
#define GUI_WIDGET_TIMELINE_RULER_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "lib/time/timevalue.hpp"
#include "gui/widget/timeline/timeline-state.hpp"

View file

@ -32,7 +32,7 @@
#ifndef GUI_WIDGET_TIMELINE_TOOL_H
#define GUI_WIDGET_TIMELINE_TOOL_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include <memory>

View file

@ -33,7 +33,7 @@
#define GUI_WIDGET_TIMELINE_TRACK_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/model/track.hpp"
#include "gui/widget/menu-button.hpp"
#include "gui/widget/mini-button.hpp"

View file

@ -31,7 +31,7 @@
#ifndef GUI_WIDGET_TIMELINE_VIEW_WINDOW_H
#define GUI_WIDGET_TIMELINE_VIEW_WINDOW_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "lib/time/timevalue.hpp"
namespace gui {

View file

@ -31,7 +31,7 @@
#ifndef GUI_WIDGET_TIMELINE_ZOOM_SCALE_H
#define GUI_WIDGET_TIMELINE_ZOOM_SCALE_H
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/widget/mini-button.hpp"
#include "gui/widget/timeline-widget.hpp"
#include "gui/widget/timeline/timeline-state.hpp"

View file

@ -26,7 +26,7 @@
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/output/xvdisplayer.hpp"
#include "gui/output/gdkdisplayer.hpp"

View file

@ -25,7 +25,7 @@
** Implementation of base functionality for workspace windows.
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/gtk-base.hpp"
#include "gui/config-keys.hpp"
#include "gui/workspace/workspace-window.hpp"
#include "gui/workspace/panel-manager.hpp"