diff --git a/src/gui/timeline/timeline-controller.cpp b/src/gui/timeline/timeline-controller.cpp new file mode 100644 index 000000000..880df1f97 --- /dev/null +++ b/src/gui/timeline/timeline-controller.cpp @@ -0,0 +1,80 @@ +/* + TimelineController - coordinate operation of timeline display + + Copyright (C) Lumiera.org + 2016, 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 timeline-widget.cpp + ** Implementation details of Lumiera's timeline display widget. + ** + ** @todo as of 12/2016 a complete rework of the timeline display is underway + ** + */ + + +#include "gui/gtk-lumiera.hpp" +#include "gui/timeline/timeline-widget.hpp" + +//#include "gui/workspace/workspace-window.hpp" +//#include "gui/ui-bus.hpp" +//#include "lib/format-string.hpp" +//#include "lib/format-cout.hpp" + +//#include "lib/util.hpp" +//#include +//#include + + + +//using util::_Fmt; +//using std::shared_ptr; +//using std::weak_ptr; +//using util::contains; +//using Gtk::Widget; +//using sigc::mem_fun; +//using sigc::ptr_fun; +//using std::cout; +//using std::endl; + + +namespace gui { +namespace timeline { + +//const int TimelineWidget::TrackPadding = 1; +//const int TimelineWidget::HeaderWidth = 150; +//const int TimelineWidget::HeaderIndentWidth = 10; + + + + + TimelineController::TimelineController () + { + } + + + TimelineController::~TimelineController() + { + } + + + + + +}}// namespace gui::timeline diff --git a/src/gui/timeline/timeline-controller.hpp b/src/gui/timeline/timeline-controller.hpp new file mode 100644 index 000000000..ce30e286a --- /dev/null +++ b/src/gui/timeline/timeline-controller.hpp @@ -0,0 +1,82 @@ +/* + TIMELINE-WIDGET.hpp - custom widget for timeline display of the project + + Copyright (C) Lumiera.org + 2016, 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 timeline-widget.hpp + ** This file defines the core component of the Lumiera GUI. + ** Timelines are the top level elements within Lumiera's high-level-model ("the session"). + ** In the UI workspace, there is a timeline pane with several tabs, each of which holds an + ** instance of the TimelineWidget. Each of these tabs either represents one of the top-level + ** timelines in the model, or it represents a (focussed / slave) view into some timeline. + ** + ** @todo as of 12/2016 a complete rework of the timeline display is underway + ** + */ + + +#ifndef GUI_TIMELINE_TIMELINE_WIDGET_H +#define GUI_TIMELINE_TIMELINE_WIDGET_H + +#include "gui/gtk-base.hpp" + +#include "lib/time/timevalue.hpp" + +//#include +//#include + + + +namespace gui { +namespace timeline { + + + /** + * Core timeline display (custom widget). + * @todo WIP-WIP-rewrite as of 12/2016 + * @remarks At top level, this widget is split into a header pane (left) + * and a scrollable timeline body (right). The layout of both parts is aligned. + */ + class TimelineController + { + public: + /** + * @param source_state state to be used used as the + * data source (model) for this timeline widget. + */ + TimelineController (); + ~TimelineController(); + + + + public: /* ===== Control interface ===== */ + + public: /* ===== Signals ===== */ + + private:/* ===== Events ===== */ + + private:/* ===== Internals ===== */ + + }; + + +}}// namespace gui::timeline +#endif /*GUI_TIMELINE_TIMELINE_WIDGET_H*/ diff --git a/src/gui/timeline/timeline-widget-empty.cpp b/src/gui/timeline/timeline-widget-empty.cpp new file mode 100644 index 000000000..5b1cd7657 --- /dev/null +++ b/src/gui/timeline/timeline-widget-empty.cpp @@ -0,0 +1,80 @@ +/* + TimelineWidgetEmpty - coordinate operation of timeline display + + Copyright (C) Lumiera.org + 2016, 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 timeline-widget.cpp + ** Implementation details of Lumiera's timeline display widget. + ** + ** @todo as of 12/2016 a complete rework of the timeline display is underway + ** + */ + + +#include "gui/gtk-lumiera.hpp" +#include "gui/timeline/timeline-widget.hpp" + +//#include "gui/workspace/workspace-window.hpp" +//#include "gui/ui-bus.hpp" +//#include "lib/format-string.hpp" +//#include "lib/format-cout.hpp" + +//#include "lib/util.hpp" +//#include +//#include + + + +//using util::_Fmt; +//using std::shared_ptr; +//using std::weak_ptr; +//using util::contains; +//using Gtk::Widget; +//using sigc::mem_fun; +//using sigc::ptr_fun; +//using std::cout; +//using std::endl; + + +namespace gui { +namespace timeline { + +//const int TimelineWidget::TrackPadding = 1; +//const int TimelineWidget::HeaderWidth = 150; +//const int TimelineWidget::HeaderIndentWidth = 10; + + + + + TimelineController::TimelineController () + { + } + + + TimelineController::~TimelineController() + { + } + + + + + +}}// namespace gui::timeline diff --git a/src/gui/timeline/timeline-widget-empty.hpp b/src/gui/timeline/timeline-widget-empty.hpp new file mode 100644 index 000000000..ce30e286a --- /dev/null +++ b/src/gui/timeline/timeline-widget-empty.hpp @@ -0,0 +1,82 @@ +/* + TIMELINE-WIDGET.hpp - custom widget for timeline display of the project + + Copyright (C) Lumiera.org + 2016, 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 timeline-widget.hpp + ** This file defines the core component of the Lumiera GUI. + ** Timelines are the top level elements within Lumiera's high-level-model ("the session"). + ** In the UI workspace, there is a timeline pane with several tabs, each of which holds an + ** instance of the TimelineWidget. Each of these tabs either represents one of the top-level + ** timelines in the model, or it represents a (focussed / slave) view into some timeline. + ** + ** @todo as of 12/2016 a complete rework of the timeline display is underway + ** + */ + + +#ifndef GUI_TIMELINE_TIMELINE_WIDGET_H +#define GUI_TIMELINE_TIMELINE_WIDGET_H + +#include "gui/gtk-base.hpp" + +#include "lib/time/timevalue.hpp" + +//#include +//#include + + + +namespace gui { +namespace timeline { + + + /** + * Core timeline display (custom widget). + * @todo WIP-WIP-rewrite as of 12/2016 + * @remarks At top level, this widget is split into a header pane (left) + * and a scrollable timeline body (right). The layout of both parts is aligned. + */ + class TimelineController + { + public: + /** + * @param source_state state to be used used as the + * data source (model) for this timeline widget. + */ + TimelineController (); + ~TimelineController(); + + + + public: /* ===== Control interface ===== */ + + public: /* ===== Signals ===== */ + + private:/* ===== Events ===== */ + + private:/* ===== Internals ===== */ + + }; + + +}}// namespace gui::timeline +#endif /*GUI_TIMELINE_TIMELINE_WIDGET_H*/ diff --git a/src/gui/timeline/timeline-widget.cpp b/src/gui/timeline/timeline-widget.cpp index b4df53798..03f4ae263 100644 --- a/src/gui/timeline/timeline-widget.cpp +++ b/src/gui/timeline/timeline-widget.cpp @@ -25,6 +25,7 @@ ** Implementation details of Lumiera's timeline display widget. ** ** @todo as of 12/2016 a complete rework of the timeline display is underway + ** @see timeline-controller.cpp ** */ diff --git a/src/gui/timeline/timeline-widget.hpp b/src/gui/timeline/timeline-widget.hpp index 0dcc4d0c2..d09a88f78 100644 --- a/src/gui/timeline/timeline-widget.hpp +++ b/src/gui/timeline/timeline-widget.hpp @@ -26,7 +26,12 @@ ** Timelines are the top level elements within Lumiera's high-level-model ("the session"). ** In the UI workspace, there is a timeline pane with several tabs, each of which holds an ** instance of the TimelineWidget. Each of these tabs either represents one of the top-level - ** timelines in the model, or it represents a (focussed / slave) view into some timeline. + ** timelines in the model, or it represents a (focused / slave) view into some timeline. + ** + ** The TimelineWidget is the top level entry point to a significant part of the UI, anything + ** related to timeline display and editing operations: each instance of this widget is dedicated + ** to a single session::Timeline, known by its ID. The widget creates a TimelineController + ** right away, which takes initiative to populate the display with that Timeline's contents. ** ** @todo as of 12/2016 a complete rework of the timeline display is underway ** @@ -37,6 +42,7 @@ #define GUI_TIMELINE_TIMELINE_WIDGET_H #include "gui/gtk-base.hpp" +#include "gui/timeline/timeline-controller.hpp" #include "lib/time/timevalue.hpp" @@ -51,6 +57,7 @@ namespace timeline { /** * Core timeline display (custom widget). + * Top level entry point to the timeline display component. * @todo WIP-WIP-rewrite as of 12/2016 * @remarks At top level, this widget is split into a header pane (left) * and a scrollable timeline body (right). The layout of both parts is aligned. diff --git a/wiki/renderengine.html b/wiki/renderengine.html index 7f8722aa6..bf80fef43 100644 --- a/wiki/renderengine.html +++ b/wiki/renderengine.html @@ -2797,7 +2797,7 @@ Now, when invoking an operation on some public interface, the code in the lower
A specially configured LumieraPlugin, which actually contains or loads the complete code of the (GTK)GUI, and additionally is linked dynamically against the application core lib. During the [[UI startup process|GuiStart]], loading of this Plugin is triggered from {{{main()}}}. Actually this causes spawning of the GTK event thread and execution of the GTK main loop.
 
-
+
Within the Lumieara GUI, the [[Timeline]] structure(s) from the HighLevelModel are arranged and presented according to the following principles and conventions.
 Several timeline views may be present at the same time -- and there is not necessarily a relation between them, since »a Timeline« is the top-level concept within the [[Session]]. Obviously, there can also be several //views// based on the same »Timeline« model element, and in this latter case, these //coupled views// behave according to a linked common state. An entity »Timeline« as represented through the GUI, emerges from the combination of several model elements
 * a root level [[Binding|BindingMO]] acts as framework
@@ -2831,6 +2831,14 @@ This collapsed, expanded and possibly nested workspace structure is always exact
 
 
 
+!!!lifecycle and instances
+A given instance of the {{{TimelineWidget}}} is always dedicated to render the contents of //one specific timeline.// We never switch the data model while retaining the UI entities. This also means, a given instance is tied to one conversation with the core; it is created when the core tells us about this timeline with an initial population diff, and it lives until either this timeline is discarded in the core model, or the whole session is shut down.
+
+The dockable ''timeline pannel'' manages the existing {{{TimelineWidget}}} instances, and this effectively put the former into the role of representing the [[model root|ModelRootMO]]. We might consider to transfer this role to the workspace manager eventually, but {{red{right now 12/2016}}} this doesn't feel like a problem, since the workspace manager has to care for global concerns of the UI, not the session. We can assume there also is an ''asset pannel'', allowing the timeline pannel to delegate anything related asset modelling.
+
+In case the UI starts with no session present in the core, an //empty timeline placeholder// will be displayed, which provides UI for creating a new session...
+
+
 !!!nesting
 By principle, this workspace structure is //not a list of "Tracks"// -- it is a system of ''nested scopes''. The nesting emerges on demand.
 In the most general case, there can be per-track content and nested content at the same point in time. The GUI is able to represent this state. But, due to the semantics of Lumiera's HighLevelModel,  top-level content and nested content are siblings //within the same scope.// Thus, at a suitable point {{red{to be defined}}}, an equivalence transformation is applied to the GUI model, by prepending a new sibling track and moving top-level content there.