define and document the building blocks of the new timeline UI

these are just empty class files, but writing a basic description
for each made me flesh out a lot of organisational aspects of what
I am about to build now
This commit is contained in:
Fischlurch 2016-12-01 23:58:47 +01:00
parent 67beeab25a
commit 0b1bc6a579
40 changed files with 2841 additions and 727 deletions

View file

@ -0,0 +1,74 @@
/*
BodyCanvasWidget - custom drawing canvas to display the timeline body
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 body-canvas-widget.cpp
** Implementation details of timeline custom drawing.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/body-canvas-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
BodyCanvasWidget::BodyCanvasWidget ()
{
}
BodyCanvasWidget::~BodyCanvasWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,88 @@
/*
BODY-CANVAS-WIDGET.hpp - custom drawing canvas to display the timeline body
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 body-canvas-widget.hpp
** Widget to render the body of timeline display, by custom drawing into
** a canvas control. The body part of the timeline display can not be sensibly
** implemented with automatic layout by the UI toolkit set. Rather, we need to
** control a precise temporal display grid, and we need to limit the actual widgets
** added for display, since a given timeline may easily hold several hundred up to
** thousands of elements. To ease such tasks, a _canvas control_ -- here implemented
** on top of Gtk::Layout, allows to combine _custom drawing_ with the placement of
** embedded child widgets, where the latter's layout is again managed automatically
** by the toolkit set. This approach allows us to circumvent some of the perils of
** custom drawing, where we might forfeit several of the benefits of using a toolkit
** unintentionally, and create an UI which feels foreign and brittle in comparison
** to standard software.
**
** # Layout management
**
** To create a consistent layout of the timeline, header pane and body need to react
** to the same scrolling adjustments, and use the same vertical size allocations for
** each embedded track. Such a consistent global layout needs to be built up in a
** *display evaluation pass*, carried out collaboratively between the building blocks
** of the timeline. To this end, the TrackPresenter and ClipPresenter elements act
** as (view) model entities, visited by the timeline::LayoutManager to establish
** coherent display parameters. From within this evaluation pass, the individual
** presenters communicate with their _slave widgets,_ which are inserted into the
** display context of the track header pane or this body widget respectively. As
** a result, some new widgets may be injected, existing widgets may be removed or
** hidden, and other widgets may be relocated to different virtual canvas coordinates.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_BODY_CANVAS_WIDGET_H
#define GUI_TIMELINE_BODY_CANVAS_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class BodyCanvasWidget
{
public:
BodyCanvasWidget();
~BodyCanvasWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_BODY_CANVAS_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
ClipPresenter - presentation control element for a clip within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 clip-presenter.cpp
** Implementation details of clip presentation management.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/clip-presenter.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
ClipPresenter::ClipPresenter ()
{
}
ClipPresenter::~ClipPresenter()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,82 @@
/*
CLIP-PRESENTER.hpp - presentation control element for a clip within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 clip-presenter.hpp
** Presentation control element to model and manage a clip within the timeline UI.
** In the Lumiera timeline UI, we are mixing two different scope of concerns: For one,
** we have the globally tangible scope of actual session elements an operations performed
** on those. And then there are more local considerations regarding the "mechanics" of the
** UI elements, their state and immediate feedback to user interactions. The _Presenter_ --
** as known from the [MVP pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter) --
** serves as link between both levels. For the global angle of view, it is a model::Tangible and thus
** plays the role of the _View_, while the _Model_ and _Controler_ roles are mediated through the
** gui::UiBus, exchanging command, state and mutation messages. On the other hand, for the local
** angle of view, the _Presenter_ is a structural model element, kind of a _view model_, and corresponds
** to the respective element within the session. In addition, it manages actively the collaborative
** part of layout building, delegating to a mostly passive GTK widget for the actual display.
** This way it becomes possible to manage the actual UI resources on a global level, avoiding to
** represent potentially several thousand individual elements as GTK entities, while at any time
** only several can be visible and active as far as user interaction is concerned.
**
** Especially the ClipPresenter plays a crucial role when it comes to deciding which *clip appearance style*
** to use for the actual display. Depending on the zoom level, the ClipPresenter may even decide to hide
** the individual clip and join it into a combined placeholder for degraded display of a hole strike of
** clips, just to indicate some content is actually present in this part of the timeline.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_CLIP_PRESENTER_H
#define GUI_TIMELINE_CLIP_PRESENTER_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class ClipPresenter
{
public:
ClipPresenter();
~ClipPresenter();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_CLIP_PRESENTER_H*/

View file

@ -0,0 +1,79 @@
/*
ClipWidget - display of a clip in timeline or media bin view
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 v.cpp
** Implementation details of _clip display_ within the Lumiera UI.
**
** @note a "clip" can be a media clip proper, or just some part
** of the former, a channel, or even an effect attached to
** a clip. Moreover, this clip display can be used both
** within the context of the timeline or as element in a
** media bin in the asset management section.
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/clip-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
ClipWidget::ClipWidget ()
{
}
ClipWidget::~ClipWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,132 @@
/*
CLIP-WIDGET.hpp - display of a clip in timeline or media bin view
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 clip-widget.hpp
** This widget provides the concrete rendering of a clip-like entity.
** Such can appear in various contexts within the UI, be it a media bin
** in the asset management section, or rather the timeline display proper,
** which is at the heart of the Lumiera UI. Moreover, such a "clip" might
** represent a media clip as a whole, or just recursively some part of it.
** It might be a channel, or even an effect attached to some clip. Combined
** with the various temporal zoom levels, we thus need the ability to adapt
** this display to a wide variety of *clip appearance styles*. And another
** consequence is that the ClipWidget itself needs to be mostly passive,
** supervised by a dedicated ClipPresenter.
**
** # Appearance styles
**
** According to the requirements of the given context, the ClipWidget is
** able to conform to several styles of appearance. All of these can be
** implemented from a single common base structure, and thus it is possible
** to switch those styles dynamically, so to expand or collapse the visible
** entity in place
**
** \par abridged form
** To start with, a clip can be rendered in *abridged form*, which means that the
** content is stylised and the temporal extension does not matter. In this form,
** the clip is reduced to an icon, an expand widget and a ID label. This is the
** standard representation encountered within the _media bins._ The intent of this
** representation is to save on screen area, especially to minimise vertical extension.
** But as a derivative of this layout style, a clip may be shown in abridged form, but
** in fact _with proper representation of the temporal extension;_ to this end, the
** enclosing box is extended horizontally as needed, while the compound of icon,
** control and label is aligned such as to remain in sight.
**
** \par compact form
** The next step in a series of progressively more detailed clip representations is the
** *compact form*, which still focuses on handling the clip as an unit, while at least
** indicating some of the inherent structuring. Essentially, the clip here is represented
** as a _strip of rendered preview content,_ decorated with some overlays. One of these
** overlays is the _ID pane,_ which resembles the arrangement known from the abridged form:
** The icon here is always the _placement icon,_ followed by the expand widget and the ID
** label. Again, this pane is aligned such as to remain in sight. Then, there is a pair
** of overlays, termed the _boundary panes,_ which indicate the begin and the end of the
** clip respectively. Graphically, these overlays should be rendered in a more subtle way,
** just enough to be recognisable. The boundary panes are the attachment areas for
** _trimming gestures,_ as opposed to moving and dragging the whole clip or shuffle editing
** of the content. Moreover, these boundary panes compensate for the alignment of the ID pane,
** which mostly keeps the latter in sight. As this might counterfeit the visual perception
** of scrolling, the boundary panes serve to give a clear visual clue when reaching the
** boundary of an extended clip. Optionally, another overlay is rendered at the upper side
** of the clip's area, to indicate attached effect(s). It is quite possible for these effect
** decorations not to cover the whole temporal span of the clip.
**
** \par expanded form
** A yet more detailed display of the clip's internals is exposed in the *expanded form*.
** Here, the clip is displayed as an window pane holding nested clip displays, which in turn
** might again be abridged, compact or _(TODO not sure 11/16)_ even expanded. This enclosing
** clip window pane should be rendered semi transparent, just to indicate the enclosing whole.
** The individual clip displays embedded therein serve to represent individual media parts or
** channels, or individual attached effects. Due to the recursive nature of Lumiera's
** High-Level-Model, each of these parts exposes essentially the same controls, allowing to
** control the respective aspects of the part in question
**
** \par degraded form
** Finally, there can be a situation where it is just not possible to render any of the
** aforementioned display styles properly, due to size constraints. Especially, this happens
** when zooming out such as to show a whole sequence or even timeline in overview. We need to
** come up with a scheme of ''graceful display degradation'' to deal with this situation --
** just naively attempting to render any form might easily send our UI thread into a minute long
** blocking render state, for no good reason. Instead, in such cases display should fall back to
** - showing just a placeholder rectangle, when the clip (or any other media element) will cover
** a temporal span relating to at least 1 pixel width (configurable trigger condition)
** - even further collapsing several entities into a strike of elements, to indicate at least
** that some content is present in this part of the timeline.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_CLIP_WIDGET_H
#define GUI_TIMELINE_CLIP_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class ClipWidget
{
public:
ClipWidget();
~ClipWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_CLIP_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
HeaderPaneWidget - display pane for track headers within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 header-pane-widget.cpp
** Implementation of the track header pane within the timeline UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/header-pane-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
HeaderPaneWidget::HeaderPaneWidget ()
{
}
HeaderPaneWidget::~HeaderPaneWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,74 @@
/*
HEADER-PANE-WIDGET.hpp - display pane for track headers within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 header-pane-widget.hpp
** Widget to show an always visible track header area within the timeline UI.
** [The fork](\ref session::Fork), a recursively nested system of scopes, is rendered within
** the timeline display as a system of nested tracks. Each of these tracks possibly holds some
** child tracks plus some actual media clips, which all inherit parameters of placement from
** this fork ("track"). These parameters address various aspects of how content is attached
** ("placed") into the model at large. So, for each track, we create a
** ["patchbay" area](\ref timeline::PatchbayWidget) to manage those placement parameters.
**
** The HeaderPaneWidget aggregates those patchbay elements into a nested, collapsable tree
** structure in accordance with the nesting of scopes. For the actual layout, it has to collaborate
** with the timeline::LayoutManager to work out the space available for each individual track head
** and to keep these parts aligned with the tracks in the [timeline body](BodyCanvasWidget).
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_HEADER_PANE_WIDGET_H
#define GUI_TIMELINE_HEADER_PANE_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class HeaderPaneWidget
{
public:
HeaderPaneWidget();
~HeaderPaneWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_HEADER_PANE_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
LayoutManager - global timeline layout management and display control
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 layout-manager.cpp
** Implementation details of global timeline layout management.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/layout-manager.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
LayoutManager::LayoutManager ()
{
}
LayoutManager::~LayoutManager()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,110 @@
/*
LAYOUT-MANAGER.hpp - global timeline layout management and display control
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 layout-manager.hpp
** A core service of the timeline UI to ensure consistent display and layout
** of all components within the timeline. The content of the timeline is organised
** into several nested collections, possibly holding several thousand individual elements.
** Together with the requirement to show media elements within a precisely defined, regular
** time grid, this forces us to control various aspects of the layout and display style
** manually, instead of letting the UI toolkit work out the details automatically. Note
** especially that the typical UI toolkit is not prepared to handle such a high number of
** individual elements smoothly. Even more so, when most of those elements are not even
** visible most of the time. Unfortunately, doing a manual display forces us to perform
** the task usually serviced by a table grid widget, that is, to keep flexible elements
** aligned in columns or (as is the case here) in rows. Basically we split our display
** horizontally, where the right part is just a custom drawing canvas. Consequently we
** have to ensure all tracks are perfectly aligned between the track header pane and
** the scrollable working space in the timeline body display.
**
** # Architecture
**
** A naive approach would have a global layout manager drill down into some model storage
** and reach into the components to manipulate and adjust the layout to fit. Doing so can
** be considered, since this links together details scattered all over the model into a
** huge global process carried out at a single code location. Any further extension or
** evolution of details of the UI presentation are bound to be worked into this core
** global piece of code, which soon becomes brittle, hard to understand and generally
** a liability and maintenance burden. We have seen this happen in numerous existing
** code bases (and in fact even our own initial approach started to go down that route).
** Thus we strive to break up the whole process of controlling the layout into several
** local concerns, each of which can be made self contained. The backbone is formed by
** a recursive collaboration between two abstractions (interfaces)
** - the building blocks of the timeline expose the interface timeline::Element
** - the global timeline widget implements a timeline::LayoutManager interface
**
** ## Display evaluation pass
**
** Whenever the layout of timeline contents has to be (re)established, we trigger a recursive
** evaluation pass, which in fact is a tree walk. The layout manager creates a DisplayEvaluation
** record, which is passed to the [Element's allocate function](Element::allocate). The element
** in turn has the liability to walks its children and recursively initiate a nested evaluation
** by invoking DisplayEvaluation::evaluateChild(Element), which in turn calls back to
** LayoutManager::evaluate() to initiate a recursive evaluation pass. Within the recursively
** created DisplayEvaluation elements, we are able to transport and aggregate information
** necessary to give each element it' screen allocation. And this in turn allows us to
** decide upon a suitable display strategy for each individual element.
**
** For this to work, the _element_ can not be the actual widget, since the result of this whole
** process might be to create or retract an actual GTK widget. For this reason, the timeline
** layout management relies on a _Presenter_ entity, which in turn controls a mostly passive
** view -- our solution in fact relies on some flavour of the
** [MVP pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter) here.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_LAYOUT_MANAGER_H
#define GUI_TIMELINE_LAYOUT_MANAGER_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class LayoutManager
{
public:
LayoutManager ();
~LayoutManager();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_LAYOUT_MANAGER_H*/

View file

@ -0,0 +1,75 @@
/*
NavigatorWidget - display of navigation controls in the timeline UI
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 navigator-widget.cpp
** Implementation detail of the navigation control elements presented
** at top of the timeline UI's header pane.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/navigator-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
NavigatorWidget::NavigatorWidget ()
{
}
NavigatorWidget::~NavigatorWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,72 @@
/*
NAVIGATOR-WIDGET.hpp - display of navigation controls in the timeline UI
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 navigator-widget.hpp
** Widget for navigation controls within the timeline UI.
** Since the timeline is effectively some kind of table grid, with a track header pane
** on the right and the timeline body display to the left, and since the latter has a
** [time ruler](\ref timeline::RulerWidget) running along it's top, there is a basically
** unused screen area in the first cell within the typical timeline layout of any media
** handling application. Lumiera uses this area to render a navigation control, since
** the player control (which also would be a natural choice of usage for this area) is
** already located in the timeline pane's general toolbar, or alternatively in the
** viewer pane. Since this area is always prominently visible, it is very attractive
** for global navigation controls
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_NAVIGATOR_WIDGET_H
#define GUI_TIMELINE_NAVIGATOR_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class NavigatorWidget
{
public:
NavigatorWidget ();
~NavigatorWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_NAVIGATOR_WIDGET_H*/

View file

@ -0,0 +1,75 @@
/*
PatchbayWidget - display of the patchbay to control track placement parameters
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 patchbay-widget.cpp
** Implementation details of the _patchbay_, allowing to tweak
** parameters of a fork's placement.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/patchbay-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
PatchbayWidget::PatchbayWidget ()
{
}
PatchbayWidget::~PatchbayWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,76 @@
/*
PATCHBAY-WIDGET.hpp - display of the patchbay to control track placement parameters
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 patchbay-widget.hpp
** Widget to control the placement parameters of a fork within the timeline header pane UI.
** [The fork](\ref session::Fork), a recursively nested system of scopes, is rendered within
** the timeline display as a system of nested tracks. Each of these tracks possibly holds some
** child tracks plus some actual media clips, which all inherit parameters of placement from
** this fork ("track"). These parameters address various aspects of how content is attached
** ("placed") into the model at large, examples being
** - how to route the output
** - how to "place" this content into an _output space_, like e.g.
** + sound panning
** + video overlay parameters (additive, opaque, transparent)
** + video or audio _level_ (=fader)
** - how to locate this content in time (e.g. relative to some marker)
** For each track, we show a patchbay in the timeline header pane, which serves to control
** such aspects relevant for all content contained within the scope of this track.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_PATCHBAY_WIDGET_H
#define GUI_TIMELINE_PATCHBAY_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class PatchbayWidget
{
public:
PatchbayWidget ();
~PatchbayWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_PATCHBAY_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
PipeWidget - display of pipe configuration with effect processing components
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 pipe-widget.cpp
** Implementation details of a pipe configuration UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/pipe-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
PipeWidget::PipeWidget ()
{
}
PipeWidget::~PipeWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,70 @@
/*
PIPE-WIDGET.hpp - display of pipe configuration with effect processing components
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 pipe-widget.hpp
** A component to show and manipulate the processing pipe configuration.
** Such a (processing) pipe is a conceptual entity within the Lumiera session model.
** It is conceived as a sequence of processing steps applied to a data stream, where
** the processing steps are typically effects or codecs (media decoder or encoder).
** Whenever a clip is added somewhere into a sequence, the automatically triggered
** build process forms a pipe corresponding to the clip; this pipe can be tweaked
** to some extent within the UI, like toggling and re-ordering of processing steps
** or accessing the latter's parameter UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_PIPE_WIDGET_H
#define GUI_TIMELINE_PIPE_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class PipeWidget
{
public:
PipeWidget();
~PipeWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_PIPE_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
RulerWidget - display of the time ruler at the top of the timeline UI
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 ruler-widget.cpp
** Implementation details of the time ruler present at top of the timeline display.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/ruler-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
RulerWidget::RulerWidget ()
{
}
RulerWidget::~RulerWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,63 @@
/*
RULER-WIDGET.hpp - display of the time ruler at the top of the timeline UI
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 ruler-widget.hpp
** The time overview ruler presented at top of the timeline UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_RULER_WIDGET_H
#define GUI_TIMELINE_RULER_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class RulerWidget
{
public:
RulerWidget ();
~RulerWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_RULER_WIDGET_H*/

View file

@ -57,513 +57,25 @@
namespace gui {
namespace timeline {
const int TimelineWidget::TrackPadding = 1;
const int TimelineWidget::HeaderWidth = 150;
const int TimelineWidget::HeaderIndentWidth = 10;
//const int TimelineWidget::TrackPadding = 1;
//const int TimelineWidget::HeaderWidth = 150;
//const int TimelineWidget::HeaderIndentWidth = 10;
TimelineWidget::TimelineWidget (shared_ptr<timeline::TimelineState> source_state)
: Table(2, 2)
, layoutHelper(*this)
, headerContainer(NULL)
, body(NULL)
, ruler(NULL)
, horizontalAdjustment(Gtk::Adjustment::create(0, 0, 0))
, verticalAdjustment(Gtk::Adjustment::create(0, 0, 0))
, horizontalScroll(horizontalAdjustment)
, verticalScroll(verticalAdjustment)
, update_tracks_frozen(false)
TimelineWidget::TimelineWidget ()
: Gtk::Paned{Gtk::ORIENTATION_VERTICAL}
{
body = manage(new TimelineBody(*this));
ENSURE(body != NULL);
headerContainer = manage(new TimelineHeaderContainer(*this));
ENSURE(headerContainer != NULL);
ruler = manage(new TimelineRuler(*this));
ENSURE(ruler != NULL);
horizontalAdjustment->signal_value_changed().connect( sigc::mem_fun(
this, &TimelineWidget::on_scroll) );
verticalAdjustment->signal_value_changed().connect( sigc::mem_fun(
this, &TimelineWidget::on_scroll) );
body->signal_motion_notify_event().connect( sigc::mem_fun(
this, &TimelineWidget::on_motion_in_body_notify_event) );
update_tracks();
attach(*body, 1, 2, 1, 2, FILL|EXPAND, FILL|EXPAND);
attach(*ruler, 1, 2, 0, 1, FILL|EXPAND, SHRINK);
attach(*headerContainer, 0, 1, 1, 2, SHRINK, FILL|EXPAND);
attach(horizontalScroll, 1, 2, 2, 3, FILL|EXPAND, SHRINK);
attach(verticalScroll, 2, 3, 1, 2, SHRINK, FILL|EXPAND);
set_state(source_state);
set_tool(timeline::Arrow);
}
TimelineWidget::~TimelineWidget()
{
REQUIRE(headerContainer);
headerContainer->clear_headers();
trackMap.clear();
}
/* ===== Data Access ===== */
/** @deprecated for #955 */
shared_ptr<timeline::TimelineState>
TimelineWidget::get_state()
{
return state;
}
/** @deprecated for #955 */
void
TimelineWidget::set_state (shared_ptr<timeline::TimelineState> new_state)
{
state = new_state;
// Clear the track tree
trackMap.clear();
if (state)
{
// Hook up event handlers
state->getViewWindow().changed_signal().connect( sigc::mem_fun(
this, &TimelineWidget::on_view_window_changed) );
state->getSequence()->get_child_track_list().signal_changed().
connect(sigc::mem_fun(
this, &TimelineWidget::on_track_list_changed ) );
state->selectionChangedSignal().connect(mem_fun(*this,
&TimelineWidget::on_body_changed));
state->playbackChangedSignal().connect(mem_fun(*this,
&TimelineWidget::on_body_changed));
}
update_tracks();
// Send the state changed signal
stateChangedSignal.emit (state);
}
void
TimelineWidget::zoom_view (double timescale_ratio)
{
if(state)
{
const int view_width = body->get_allocation().get_width();
state->getViewWindow().zoom_view(view_width / 2, timescale_ratio);
}
}
ToolType
TimelineWidget::get_tool() const
{
REQUIRE(body != NULL);
return body->get_tool();
}
void
TimelineWidget::set_tool(ToolType tool_type)
{
REQUIRE(body != NULL);
body->set_tool(tool_type);
}
shared_ptr<timeline::Track>
TimelineWidget::get_hovering_track() const
{
return hoveringTrack;
}
/* ===== Signals ===== */
sigc::signal<void, Time>
TimelineWidget::mouse_hover_signal() const
{
return mouseHoverSignal;
}
sigc::signal<void>
TimelineWidget::playback_period_drag_released_signal() const
{
return playbackPeriodDragReleasedSignal;
}
sigc::signal<void, shared_ptr<timeline::Track> >
TimelineWidget::hovering_track_changed_signal() const
{
return hoveringTrackChangedSignal;
}
TimelineWidget::TimelineStateChangeSignal
TimelineWidget::state_changed_signal() const
{
return stateChangedSignal;
}
/* ===== Events ===== */
void
TimelineWidget::on_scroll()
{
if(state)
{
TimeValue newStartOffset ((gavl_time_t)horizontalAdjustment->get_value());
state->getViewWindow().set_time_offset(Time(newStartOffset));
}
}
void
TimelineWidget::on_size_allocate(Allocation& allocation)
{
Widget::on_size_allocate(allocation);
update_scroll();
}
void
TimelineWidget::on_view_window_changed()
{
REQUIRE(ruler != NULL);
if(state)
{
timeline::TimelineViewWindow &window = state->getViewWindow();
const int view_width = body->get_allocation().get_width();
horizontalAdjustment->set_page_size(
window.get_time_scale() * view_width);
horizontalAdjustment->set_value(_raw(window.get_time_offset()));
}
}
void
TimelineWidget::on_body_changed()
{
REQUIRE(ruler != NULL);
REQUIRE(body != NULL);
ruler->queue_draw();
body->queue_draw();
}
void
TimelineWidget::on_add_track_command()
{
// # TEST CODE
if(sequence())
sequence()->get_child_track_list().push_back(
shared_ptr<model::Track>(new model::ClipTrack()));
}
/* ===== Internals ===== */
void
TimelineWidget::update_tracks()
{
if(update_tracks_frozen)
return;
if(state)
{
// Remove any tracks which are no longer present in the model
remove_orphaned_tracks();
// Create timeline tracks from all the model tracks
create_timeline_tracks();
// Update the layout helper
layoutHelper.clone_tree_from_sequence();
layoutHelper.update_layout();
}
else
trackMap.clear();
}
void
TimelineWidget::freeze_update_tracks()
{
update_tracks_frozen = true;
}
void
TimelineWidget::thaw_update_tracks()
{
update_tracks_frozen = false;
}
void
TimelineWidget::create_timeline_tracks()
{
REQUIRE(state);
BOOST_FOREACH(shared_ptr<model::Track> child,
sequence()->get_child_tracks())
create_timeline_tracks_from_branch(child);
// Update the header container
REQUIRE(headerContainer != NULL);
headerContainer->update_headers();
}
/** @deprecated for #955 */
void
TimelineWidget::create_timeline_tracks_from_branch(
shared_ptr<model::Track> modelTrack)
{
REQUIRE(modelTrack);
// Is a timeline UI track present in the map already?
if (!contains(trackMap, modelTrack))
{
// The timeline UI track is not present
// We will need to create one
trackMap[modelTrack] =
create_timeline_track_from_modelTrack(modelTrack);
}
// Recurse to child tracks
BOOST_FOREACH(shared_ptr<model::Track> child,
modelTrack->get_child_tracks())
create_timeline_tracks_from_branch(child);
}
/** @deprecated for #955 */
shared_ptr<timeline::Track>
TimelineWidget::create_timeline_track_from_modelTrack(
shared_ptr<model::Track> modelTrack)
{
REQUIRE(modelTrack);
// Choose a corresponding timeline track class from the model track's
// class
if(typeid(*modelTrack) == typeid(model::ClipTrack))
return shared_ptr<timeline::Track>(new timeline::ClipTrack(
*this, dynamic_pointer_cast<model::ClipTrack>(modelTrack)));
else if(typeid(*modelTrack) == typeid(model::GroupTrack))
return shared_ptr<timeline::Track>(new timeline::GroupTrack(
*this, dynamic_pointer_cast<model::GroupTrack>(modelTrack)));
ASSERT(NULL); // Unknown track type;
return shared_ptr<timeline::Track>();
}
/** @deprecated for #955 */
void
TimelineWidget::remove_orphaned_tracks()
{
std::map<shared_ptr<model::Track>,
shared_ptr<timeline::Track> >
orphan_track_map(trackMap);
// Remove all tracks which are still present in the sequence
BOOST_FOREACH(shared_ptr<model::Track> child,
sequence()->get_child_tracks())
search_orphaned_tracks_in_branch(child, orphan_track_map);
// orphan_track_map now contains all the orphaned tracks
// Remove them
std::pair<shared_ptr<model::Track>, shared_ptr<timeline::Track> >
pair;
BOOST_FOREACH( pair, orphan_track_map )
{
ENSURE(pair.first);
trackMap.erase(pair.first);
}
}
/** @deprecated for #955 */
void
TimelineWidget::search_orphaned_tracks_in_branch(
shared_ptr<model::Track> modelTrack,
std::map<shared_ptr<model::Track>,
shared_ptr<timeline::Track> > &orphan_track_map)
{
REQUIRE(modelTrack);
// Is the timeline UI still present?
if(contains(orphan_track_map, modelTrack))
orphan_track_map.erase(modelTrack);
// Recurse to child tracks
BOOST_FOREACH(shared_ptr<model::Track> child,
modelTrack->get_child_tracks())
search_orphaned_tracks_in_branch(child, orphan_track_map);
}
/** @deprecated for #955 */
shared_ptr<timeline::Track>
TimelineWidget::lookup_timeline_track(
shared_ptr<model::Track> modelTrack) const
{
REQUIRE(modelTrack);
REQUIRE(modelTrack != sequence()); // The sequence isn't
// really a track
std::map<shared_ptr<model::Track>, shared_ptr<timeline::Track> >::
const_iterator iterator = trackMap.find(modelTrack);
if (iterator == trackMap.end())
{
// The track is not present in the map
// We are in an error condition if the timeline track is not found
// - the timeline tracks must always be synchronous with the model
// tracks.
ENSURE(0);
return shared_ptr<timeline::Track>();
}
ENSURE(iterator->second != NULL);
return iterator->second;
}
void
TimelineWidget::on_layout_changed()
{
REQUIRE(headerContainer != NULL);
REQUIRE(body != NULL);
headerContainer->on_layout_changed();
body->queue_draw();
update_scroll();
}
void
TimelineWidget::update_scroll()
{
REQUIRE(body != NULL);
const Allocation body_allocation = body->get_allocation();
if(state)
{
///////////////////////////////////////////////TICKET #861 shoudln't that be performed by TimelineViewWindow, instead of manipulating values from the outside?
timeline::TimelineViewWindow &window = state->getViewWindow();
//----- Horizontal Scroll ------//
// TEST CODE
horizontalAdjustment->set_upper( 1000 * GAVL_TIME_SCALE / 200);
horizontalAdjustment->set_lower(-1000 * GAVL_TIME_SCALE / 200);
// Set the page size
horizontalAdjustment->set_page_size(
window.get_time_scale() * body_allocation.get_width());
//----- Vertical Scroll -----//
// Calculate the vertical length that can be scrolled:
// the total height of all the tracks minus one screenful
int y_scroll_length = layoutHelper.get_total_height() -
body_allocation.get_height();
if(y_scroll_length < 0) y_scroll_length = 0;
// If by resizing we're now over-scrolled, scroll back to
// maximum distance
if((int)verticalAdjustment->get_value() > y_scroll_length)
verticalAdjustment->set_value(y_scroll_length);
verticalAdjustment->set_upper(y_scroll_length);
// Hide the scrollbar if no scrolling is possible
// Having this code included seems to cause a layout loop as the
// window is shrunk
if(y_scroll_length <= 0 && verticalScroll.get_visible())
verticalScroll.hide();
else if(y_scroll_length > 0 && !verticalScroll.get_visible())
verticalScroll.show();
}
}
int
TimelineWidget::get_y_scroll_offset() const
{
return (int)verticalAdjustment->get_value();
}
void
TimelineWidget::set_y_scroll_offset(const int offset)
{
verticalAdjustment->set_value(offset);
}
bool
TimelineWidget::on_motion_in_body_notify_event(GdkEventMotion *event)
{
REQUIRE(event != NULL);
ruler->set_mouse_chevron_offset(event->x);
if(state)
{
timeline::TimelineViewWindow &window = state->getViewWindow();
mouseHoverSignal.emit(window.x_to_time(event->x));
}
return true;
}
/** @deprecated for #955 */
shared_ptr<model::Sequence>
TimelineWidget::sequence() const
{
if(!state)
return shared_ptr<model::Sequence>();
shared_ptr<model::Sequence> sequence = state->getSequence();
ENSURE(sequence);
return sequence;
}
void
TimelineWidget::on_track_list_changed()
{
update_tracks();
}
void
TimelineWidget::on_playback_period_drag_released()
{
playbackPeriodDragReleasedSignal.emit();
}
void
TimelineWidget::set_hovering_track(shared_ptr<timeline::Track> hovering_track)
{
hoveringTrack = hovering_track;
hoveringTrackChangedSignal.emit(hovering_track);
}
}}// namespace gui::timeline

View file

@ -22,7 +22,11 @@
/** @file timeline-widget.hpp
** This file defines the core component of the Lumiera GUI
** 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
**
@ -47,243 +51,31 @@ namespace timeline {
/**
* Core timeline display (custom widget).
* @remarks This widget is a composite of several widgets contained
* within the timeline namespace.
* @deprecated dysfunctional and broken by switch to GTK-3. Needs to be rewritten
* @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 TimelineWidget
: public Gtk::Table
: public Gtk::Paned
{
public:
/**
* @param source_state state to be used used as the
* data source (model) for this timeline widget.
*/
TimelineWidget (shared_ptr<timeline::TimelineState> source_state);
virtual ~TimelineWidget();
TimelineWidget ();
~TimelineWidget();
public: /* ===== Data Access ===== */
/**
* Gets a pointer to the current state object.
* @return The state object that the timeline widget is currently
* working with.
*/
shared_ptr<timeline::TimelineState> get_state();
public: /* ===== Control interface ===== */
/**
* Replaces the current TimelineState object with another.
* @param new_state The new state to swap in.
*/
void set_state(shared_ptr<timeline::TimelineState> new_state);
public: /* ===== Signals ===== */
/**
* Zooms the view in or out as by a number of steps while keeping a
* given point on the timeline still.
* @param zoom_size The number of steps to zoom by. The scale factor
* is 1.25^(-zoom_size).
*/
void zoom_view(double timescale_ratio);
private:/* ===== Events ===== */
/**
* Gets the type of the tool currently active.
*/
timeline::ToolType get_tool() const;
/**
* Sets the type of the tool currently active.
*/
void set_tool(timeline::ToolType tool_type);
shared_ptr<timeline::Track>
get_hovering_track() const;
public:
/* ===== Signals ===== */
typedef sigc::signal<void, shared_ptr<timeline::TimelineState> > TimelineStateChangeSignal;
typedef sigc::signal<void, shared_ptr<timeline::Track> > HoveringTrackChangedSignal;
sigc::signal<void, lib::time::Time> mouse_hover_signal() const;
sigc::signal<void> playback_period_drag_released_signal() const;
HoveringTrackChangedSignal hovering_track_changed_signal() const;
TimelineStateChangeSignal state_changed_signal() const;
/* ===== Events ===== */
protected:
void on_scroll();
void on_size_allocate(Gtk::Allocation& allocation);
void on_view_window_changed();
void on_body_changed();
void on_add_track_command();
/* ===== Utilities ===== */
protected:
/* ===== Internals ===== */
private:
// ----- Track Mapping Functions ----- //
/**
* Updates the timeline widget to match the state of the track tree.
*/
void update_tracks();
void freeze_update_tracks();
void thaw_update_tracks();
/**
* Ensures timeline UI tracks have been created for every model track
* present in sequence.
*/
void create_timeline_tracks();
/**
* Iterates through a branch of tracks, recursing into each sub-branch
* creating UI timeline tracks for each model track if they don't
* already exist in trackMap.
* @param list The parent track of the branch.
*/
void
create_timeline_tracks_from_branch (shared_ptr<model::Track> modelTrack);
/**
* Creates a timeline UI track to correspond to a model track.
* @param modelTrack The model track to create a timeline track from.
* @return The timeline track created, or an empty shared_ptr if
* modelTrack has an unreckognised type (this is an error condition).
*/
shared_ptr<timeline::Track>
create_timeline_track_from_modelTrack(shared_ptr<model::Track> modelTrack);
/**
* Removes any UI tracks which no longer have corresponding model
* tracks present in the sequence.
*/
void remove_orphaned_tracks();
void
search_orphaned_tracks_in_branch (shared_ptr<model::Track> modelTrack,
std::map<shared_ptr<model::Track>,
shared_ptr<timeline::Track> > &orphan_track_map);
/**
* Looks up a timeline UI track in trackMap that corresponds to a
* given modelTrack.
* @param modelTrack The model track to look up.
* @returns The timeline UI track found, or an empty shared_ptr if
* modelTrack has no corresponding timeline UI track (this is an
* error condition).
*/
shared_ptr<timeline::Track>
lookup_timeline_track (shared_ptr<model::Track> modelTrack) const;
// ----- Layout Functions ----- //
void on_layout_changed();
void update_scroll();
int get_y_scroll_offset() const;
void set_y_scroll_offset(const int offset);
// ----- Event Handlers -----//
/**
* An event handler that receives notifications for when the
* sequence's track tree has been changed.
*/
void on_track_list_changed();
void on_playback_period_drag_released();
bool on_motion_in_body_notify_event(GdkEventMotion *event);
// ----- Helper Functions ----- //
/**
* Helper to get the sequence object from the state.
* @return Returns a shared pointer to the sequence.
*/
shared_ptr<model::Sequence> sequence() const;
// ----- Other Functions ----- //
void
set_hovering_track (shared_ptr<timeline::Track> hovering_track);
protected:
/**
* The state that will be used as the data source for this timeline
* widget.
* @deprecated for #955
*/
shared_ptr<timeline::TimelineState> state;
// Model Data
/**
* The trackMap maps model tracks to timeline widget tracks which are
* responsible for the UI representation of a track.
* @remarks The tree structure is maintained by the model, and as the
* widget is updated with update_tracks, timeline tracks are added and
* removed from the map in correspondence with the tree.
* @deprecated for #955
*/
std::map<shared_ptr<model::Track>
,shared_ptr<timeline::Track> >
trackMap;
shared_ptr<timeline::Track> hoveringTrack;
// Helper Classes
timeline::TimelineLayoutHelper layoutHelper;
// Child Widgets
timeline::TimelineHeaderContainer *headerContainer;
timeline::TimelineBody *body;
timeline::TimelineRuler *ruler;
Glib::RefPtr<Gtk::Adjustment> horizontalAdjustment, verticalAdjustment;
Gtk::HScrollbar horizontalScroll;
Gtk::VScrollbar verticalScroll;
// Signals
sigc::signal<void, Time> mouseHoverSignal;
sigc::signal<void> playbackPeriodDragReleasedSignal;
HoveringTrackChangedSignal hoveringTrackChangedSignal;
TimelineStateChangeSignal stateChangedSignal;
bool update_tracks_frozen;
/* ===== Constants ===== */
protected:
static const int TrackPadding;
static const int HeaderWidth;
static const int HeaderIndentWidth;
friend class timeline::TimelineBody;
friend class timeline::TimelineHeaderContainer;
friend class timeline::TimelineHeaderWidget;
friend class timeline::TimelineLayoutHelper;
friend class timeline::TimelineRuler;
friend class timeline::GroupTrack;
private:/* ===== Internals ===== */
};

View file

@ -0,0 +1,75 @@
/*
TrackBody - track body area within the timeline display canvas
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-body.cpp
** Implementation details regarding display management of the
** track body area within the timeline display canvas.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/track-body.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
TrackBody::TrackBody ()
{
}
TrackBody::~TrackBody()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,71 @@
/*
TRACK-BODY.hpp - track body area within the timeline display canvas
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-body.hpp
** This helper class serves to manage the layout and display of the
** horizontally extended space of a "track" within the timeline.
** Actually, this space is just a working area and created by custom
** drawing on the [timeline canvas](\ref timeline::BodyCanvasWidget);
** yet for coordination of a globally consistent timeline layout, each
** track display is coordinated by a TrackPresenter, which corresponds
** to a session::Fork and directly controls the respective display elements
** in the [header pane](timeline::HeaderPaneWidget) and the display of the
** timeline body, which is actually a canvas for custom drawing.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_TRACK_BODY_H
#define GUI_TIMELINE_TRACK_BODY_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class TrackBody
{
public:
TrackBody ();
~TrackBody();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_TRACK_BODY_H*/

View file

@ -0,0 +1,75 @@
/*
TrackHeadWidget - display of track heads within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-head-widget.cpp
** Implementation details regarding display of the track heads
** within the timeline UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/track-head-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
TrackHeadWidget::TrackHeadWidget ()
{
}
TrackHeadWidget::~TrackHeadWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,64 @@
/*
TRACK-HEAD-WIDGET.hpp - display of track heads within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-head-widget.hpp
** Widget to represent a track head with placement control patchbay
** within Lumiera's timeline UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_TRACK_HEAD_WIDGET_H
#define GUI_TIMELINE_TRACK_HEAD_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class TrackHeadWidget
{
public:
TrackHeadWidget ();
~TrackHeadWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_TRACK_HEAD_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
TrackPresenter - presentation control element for a track within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-presenter.cpp
** Implementation details of track presentation management.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/track-presenter.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
TrackPresenter::TrackPresenter ()
{
}
TrackPresenter::~TrackPresenter()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,77 @@
/*
TRACK-PRESENTER.hpp - presentation control element for a track within the timeline
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 track-presenter.hpp
** Presentation control element to model and manage a track within the timeline UI.
** In the Lumiera timeline UI, we are mixing two different scope of concerns: For one,
** we have the globally tangible scope of actual session elements an operations performed
** on those. And then there are more local considerations regarding the "mechanics" of the
** UI elements, their state and immediate feedback to user interactions. The _Presenter_ --
** as known from the [MVP pattern](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter) --
** serves as link between both levels. For the global angle of view, it is a model::Tangible and thus
** plays the role of the _View_, while the _Model_ and _Controler_ roles are mediated through the
** gui::UiBus, exchanging command, state and mutation messages. On the other hand, for the local
** angle of view, the _Presenter_ is a structural model element, kind of a _view model_, and corresponds
** to the respective element within the session. In addition, it manages actively the collaborative
** part of layout building, delegating to a mostly passive GTK widget for the actual display.
** This way it becomes possible to manage the actual UI resources on a global level, avoiding to
** represent potentially several thousand individual elements as GTK entities, while at any time
** only several can be visible and active as far as user interaction is concerned.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_TRACK_PRESENTER_H
#define GUI_TIMELINE_TRACK_PRESENTER_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class TrackPresenter
{
public:
TrackPresenter ();
~TrackPresenter();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_TRACK_PRESENTER_H*/

View file

@ -0,0 +1,74 @@
/*
TransitionWidget - display of a transition or blend of media elements
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 transition-widget.cpp
** Implementation details of transition UI control
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/timeline/transition-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace timeline {
TransitionWidget::TransitionWidget ()
{
}
TransitionWidget::TransitionWidget()
{
}
}}// namespace gui::timeline

View file

@ -0,0 +1,63 @@
/*
TRANSITION-WIDGET.hpp - display of a transition or blend of media elements
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 transition-widget.hpp
** UI representation of a transition to blend several media elements.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_TIMELINE_TRANSITION_WIDGET_H
#define GUI_TIMELINE_TRANSITION_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace timeline {
/**
* @todo WIP-WIP as of 12/2016
*/
class TransitionWidget
{
public:
TransitionWidget ();
~TransitionWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::timeline
#endif /*GUI_TIMELINE_TRANSITION_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
BinWidget - display of a media bin
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 bin-widget.cpp
** Implementation details of a media bin UI.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/widget/bin-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace widget {
BinWidget::BinWidget ()
{
}
BinWidget::~BinWidget()
{
}
}}// namespace gui::widget

View file

@ -0,0 +1,79 @@
/*
BIN-WIDGET.hpp - display of a media bin
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 bin-widget.hpp
** Widget to render a media bin display in the Lumiera GUI.
** A media bin is a grouping device, used in the asset management section
** to organise various "things", like clips, media, effect plugins, labels
** sequences, processing patterns and also other nested bins. In the Lumiera
** session model, media bins and tracks are visual renderings of the same
** entity, a [grouping fork](\ref session::Fork). This wide array of possible
** usage gives rise to some complexity and several display styles, ranging
** from a simple list to a working area to arrange elements, with drag-n-drop
** support, searching and establishing of an element order. The generality
** of this element and the shared common implementation are intentional;
** we're aiming at a common workspace metaphor, and we want to support
** a fluent working style, where a rough arrangement of media elements
** can be turned into a preliminary cut.
**
** @todo WIP-WIP-WIP as of 12/2016 we have only very vague preliminary plans
** regarding the asset management section; also the asset management
** within the session subsystem will be rewritten to fit our increased
** understanding of the editing process. So for now, this widget is a
** mere placeholder in a largely preliminary UI (need more weasel words?)
**
*/
#ifndef GUI_WIDGET_BIN_WIDGET_H
#define GUI_WIDGET_BIN_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace widget {
/**
* @todo WIP-WIP as of 12/2016
*/
class BinWidget
{
public:
BinWidget ();
~BinWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::widget
#endif /*GUI_WIDGET_BIN_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
LabelWidget - display an ID label, possibly with icon
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 label-widget.cpp
** Implementation details of the UI building block to display an ID label.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/widget/label-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace widget {
LabelWidget::LabelWidget ()
{
}
LabelWidget::~LabelWidget()
{
}
}}// namespace gui::widget

View file

@ -0,0 +1,71 @@
/*
LABEL-WIDGET.hpp - display an ID label, possibly with icon
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 label-widget.hpp
** Widget to render an ID label with associated icon.
** This is a UI building block used at various places, e.g. to show
** the name of a clip in the media bins or in the timeline, to indicate
** the kind of an effect, or to render a marker label in the tracks or
** the timeline ruler. The common denominator of all those elements is
** that they combine some icon with a possibly abridged text and render
** them with a given indicator style, configurable via CSS. There is
** support for picking the icon and the indicator style based on some
** notion of _"type"._
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_WIDGET_LABEL_WIDGET_H
#define GUI_WIDGET_LABEL_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace widget {
/**
* @todo WIP-WIP as of 12/2016
*/
class LabelWidget
{
public:
LabelWidget ();
~LabelWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::widget
#endif /*GUI_WIDGET_LABEL_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
MixerWidget - display of a channel mixer control
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 mixer-widget.cpp
** Implementation details of a mixing desk control.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/widget/mixer-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace widget {
MixerWidget::MixerWidget ()
{
}
MixerWidget::~MixerWidget()
{
}
}}// namespace gui::widget

View file

@ -0,0 +1,82 @@
/*
MIXER-WIDGET.hpp - display of a channel mixer control
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 mixer-widget.hpp
** Widget to render a channel mixer within the Lumiera GUI.
** A typical mixing desk combines several _mixer strips_ with
** faders, where some are used to control the master level, while
** others are used to control _sub groups_ and possibly even
** individual channels. In addition, this UI allows to access the
** configuration and parameters of processing entities wired into
** the processing chain _before_ ("pre fader") or _after_ ("post fader")
** the main level control fader.
**
** In Lumiera, the High-Level-Model (session model) allows for several
** top level session::Timeline elements, and the semi-automatic output
** management calculates the appropriate output sinks as indicated by
** those timeline's contents. In the typical standard situation, this
** will be a video master and a audio master output. These are termed
** "the global pipes". This mixing desk display defined here shall be
** used to expose a control UI for these global sinks; moreover it is
** possible to create additional _sub group_ collecting busses, together
** with additional processing steps. In a similar way as the video viewer
** widgets are _allocated_ for display, also a mixing desk display will
** be _allocated_ and thus associated with a given timeline.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#ifndef GUI_WIDGET_MIXER_WIDGET_H
#define GUI_WIDGET_MIXER_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace widget {
/**
* @todo WIP-WIP as of 12/2016
*/
class MixerWidget
{
public:
MixerWidget();
~MixerWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::widget
#endif /*GUI_WIDGET_MIXER_WIDGET_H*/

View file

@ -0,0 +1,74 @@
/*
PlayerWidget - display of a playback control element
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 player-widget.cpp
** Implementation details of the playback control widget.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/widget/player-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace widget {
PlayerWidget::PlayerWidget ()
{
}
PlayerWidget::~PlayerWidget()
{
}
}}// namespace gui::widget

View file

@ -0,0 +1,81 @@
/*
PLAYER-WIDGET.hpp - display of a playback control element
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 player-widget.hpp
** Widget to render the typical playback control element in the UI.
** When a running playback process is created within the core and a
** _viewer display connection_ is established, a viewer, some timeline
** and a player control entity are collaborating. The latter is the
** typical setup of play, stop, jump and fast forward / fast backward
** buttons, and in addition it allows to control loop playback and
** single stepping. Of course, there is also a key binding to control
** these operations, and in addition, Lumiera may be connected with
** some hardware control surface (TODO obviously we need that, but
** as of 12/2016 we don't even know remotely how to implement it).
** Typically, the PlayerWidget is also combined with a timecode
** display, and when several player widgets are connected to the
** same playback process, their UI controls are "ganged together".
**
** @todo WIP-WIP-WIP as of 12/2016 -- the initial version of our
** UI implemented these controls directly within the timeline
** pane's button bar. We need to extract this common setup,
** since it is consensus that there is no consensus regarding
** the "best" position of such a control within the UI. So
** we need to offer the option to have "a player" either in
** the timeline, in the viewer(s) or as a standalone UI element.
**
*/
#ifndef GUI_WIDGET_PLAYER_WIDGET_H
#define GUI_WIDGET_PLAYER_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace widget {
/**
* @todo WIP-WIP as of 12/2016
*/
class PlayerWidget
{
public:
PlayerWidget ();
~PlayerWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::widget
#endif /*GUI_WIDGET_PLAYER_WIDGET_H*/

View file

@ -0,0 +1,75 @@
/*
SwitchboardWidget - display of a video viewer control switchboard
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 switchboard-widget.cpp
** Implementation details of the switchboard to control source
** and overlays of the video viewer.
**
** @todo WIP-WIP-WIP as of 12/2016
**
*/
#include "gui/gtk-lumiera.hpp"
#include "gui/widget/switchboard-widget.hpp"
//#include "gui/ui-bus.hpp"
//#include "lib/format-string.hpp"
//#include "lib/format-cout.hpp"
//#include "lib/util.hpp"
//#include <algorithm>
//#include <vector>
//using util::_Fmt;
//using util::contains;
//using Gtk::Widget;
//using sigc::mem_fun;
//using sigc::ptr_fun;
//using std::cout;
//using std::endl;
namespace gui {
namespace widget {
SwitchboardWidget::SwitchboardWidget()
{
}
SwitchboardWidget::~SwitchboardWidget()
{
}
}}// namespace gui::widget

View file

@ -0,0 +1,85 @@
/*
SWITCHBOARD-WIDGET.hpp - display of a video viewer control switchboard
Copyright (C) Lumiera.org
2016, Hermann Vosseler <Ichthyostega@web.de>
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 switchboard-widget.hpp
** Widget to render a switchboard for controlling the video display
** sources and overlays. The generic viewer widget can be _allocated_
** to several playback processes, and in fact multiple playback or
** render processes may be running at the same time. For any playback
** and display to become possible, a _viewer display connection_ needs
** to be established; in the typical usage situation with a single timeline
** this happens automatically. The result of such a connection is that some
** player widget is hooked up with the playback process in the application
** core, and the corresponding timeline gets a _playhead cursor._
**
** While playback is running, the switchboard allows to connect to several
** playback processes dynamically, and it especially allows to tap into
** any _probe points_ inserted into the processing network. Moreover,
** the viewer allows to show several running displays in _overlay,_ so to
** compare or relate them in partial view. An example would be to place
** a probe point before some effect processing chain, hook it up to the
** switchboard and then to compare the processed and unprocessed video
** side by side by moving a slider
**
** @todo WIP-WIP-WIP as of 12/2016 this is a plan (yes, we most definitively
** want that!), but we do not even remotely know how to implement such
** a feature. It is only clear by now that we'll build a output processing
** graph on top of the core render nodes network, and this output processing
** will care e.g. for scaling the output to fit into the viewer window.
** Activating the switchboard needs to extend this output processing graph.
**
*/
#ifndef GUI_WIDGET_SWITCHBOARD_WIDGET_H
#define GUI_WIDGET_SWITCHBOARD_WIDGET_H
#include "gui/gtk-base.hpp"
//#include "lib/util.hpp"
//#include <memory>
//#include <vector>
namespace gui {
namespace widget {
/**
* @todo WIP-WIP as of 12/2016
*/
class SwitchboardWidget
{
public:
SwitchboardWidget ();
~SwitchboardWidget();
private:/* ===== Internals ===== */
};
}}// namespace gui::widget
#endif /*GUI_WIDGET_SWITCHBOARD_WIDGET_H*/

View file

@ -2452,7 +2452,7 @@ we need a test setup for this investigation.
* realistic: shall reflect the situation in our actual UI
</pre>
</div>
<div title="GuiClipWidget" creator="Ichthyostega" modifier="Ichthyostega" created="201611180114" modified="201612011708" tags="GuiPattern design draft" changecount="20">
<div title="GuiClipWidget" creator="Ichthyostega" modifier="Ichthyostega" created="201611180114" modified="201612012311" tags="GuiPattern design draft" changecount="22">
<pre>//The representation of a [[media clip|Clip]] for manipulation by the user within the UI.//
Within Lumiera, a clip is conceived as a //chunk of media,// which can be handled in compound. Clip as such is an abstract concept, which is treated with minimal assumptions...
* we know that a clip has //media content,// which need not be uniform and can be inherently structured (e.g. several media, several channels)
@ -2463,13 +2463,13 @@ Due to this unspecific nature, a clip might take on various //appearances// with
!clip appearances
To start with, a clip can be rendered in ''abridged form'', which means that the content is stylised and the temporal extension does not matter. In this form, the clip is reduced to an icon, an expand widget and a ID label. This is the standard representation encountered within the //media bins.// The intent of this representation is to save on screen area, especially to minimise vertical extension. As a derivative of this layout style, a clip may be shown in abridged form, but with proper representation of the temporal extension; to this end, the enclosing box is extended horizontally as needed, while the compound of icon, control and label is aligned such as to remain in sight.
The next step in a series of progressively more detailed clip representations is the ''compact form'', which still focusses on handling the clip as an unit, while at least indicating some of the inherent structuring. Essentially, the clip here is represented as a //strip of rendered preview content,// decorated with some overlays. One of these overlays is the //ID pane,// which resembles the arrangement known from the abridged form: The icon here is always the [[Placement]] icon, followed by the expand widget and the ID label. Again, this pane is aligned such as to remain in sight. Then, there is a pair of overlays, termed the //boundary panes,// which indicate the begin and the end of the clip respectively. Graphically, these overlays should be rendered in a more subtle way, just enough to be recognisable. The boundary panes are the attachment areas for //trimming gestures,// as opposed to moving and dragging the whole clip or shuffle editing of the content. Moreover, these boundary panes compensate for the alignment of the ID pane, which mostly keeps the latter in sight. As this might counterfeit the visual perception of scrolling, the boundary panes serve to give a clear visual clue when reaching the boundary of an extended clip. Optionally, another overlay is rendered at the upper side of the clip's area, to indicate attached effect(s). It is quite possible for these effect decorations not to cover the whole temporal span of the clip.
The next step in a series of progressively more detailed clip representations is the ''compact form'', which still focuses on handling the clip as an unit, while at least indicating some of the inherent structuring. Essentially, the clip here is represented as a //strip of rendered preview content,// decorated with some overlays. One of these overlays is the //ID pane,// which resembles the arrangement known from the abridged form: The icon here is always the [[Placement]] icon, followed by the expand widget and the ID label. Again, this pane is aligned such as to remain in sight. Then, there is a pair of overlays, termed the //boundary panes,// which indicate the begin and the end of the clip respectively. Graphically, these overlays should be rendered in a more subtle way, just enough to be recognisable. The boundary panes are the attachment areas for //trimming gestures,// as opposed to moving and dragging the whole clip or shuffle editing of the content. Moreover, these boundary panes compensate for the alignment of the ID pane, which mostly keeps the latter in sight. As this might counterfeit the visual perception of scrolling, the boundary panes serve to give a clear visual clue when reaching the boundary of an extended clip. Optionally, another overlay is rendered at the upper side of the clip's area, to indicate attached effect(s). It is quite possible for these effect decorations not to cover the whole temporal span of the clip.
A yet more detailed display of the clip's internals is exposed in the ''expanded form.'' Here, the clip is displayed as an window pane holding nested clip displays, which in turn might again be abridged, compact or ({{red{maybe 11/16}}}) even expanded. This enclosing clip window pane should be rendered semi transparent, just to indicate the enclosing whole. The individual clip displays embedded therein serve to represent individual media parts or channels, or individual attached effects. Due to the recursive nature of Lumiera's HighLevelModel, each of these parts exposes essentially the same controls, allowing to control the respective aspects of the part in question. We may even consider {{red{unclear as of 11/16}}} to allow accessing the parts of a VirtualClip, this way turning the enclosing clip into a lightweight container ({{red{11/2016 give proper credit for this concept! Who proposed this initially in 2008? was this Thosten Wilms?}}}
Finally, there can be a situation where it is just not possible to render any of the aforementioned display styles properly, due to size constraints. Especially, this happens when zooming out such as to show a whole sequence or even timeline in overview. We need to come up with a scheme of ''graceful display degradation'' to deal with this situation -- just naively attempting to render any form might easily send our UI thread into a minute long blocking render state, for no good reason. Instead, in such cases display should fall back to
Finally, there can be a situation where it is just not possible to render any of the aforementioned display styles properly, due to size constraints. Especially, this happens when zooming out such as to show a whole sequence or even timeline in overview. We need to come up with a scheme of ''graceful display degradation'' to deal with this situation -- just naively attempting to render any form might easily send our UI thread into a minute long blocking render state, for no good reason. Instead, in such cases display should fall back to a ''degraded form''
* showing just a placeholder rectangle, when the clip (or any other media element) will cover a temporal span relating to at least 1 pixel width (configurable trigger condition)
* even further collapsing several entities into a strike of elements, to indicate at least that something is there.
* even further collapsing several entities into a strike of elements,to indicate at least that some content is present in this part of the timeline.
Together this shows we have to decide on a ''display strategy'' //before we even consider to add// a specific widget to the enclosing GTK container....
!!!strategy decision how to show a clip
@ -8242,10 +8242,12 @@ Placements are __resolved__ resulting in an ExplicitPlacement. In most cases thi
&amp;rarr; [[Definition|Pipe]] and [[handling of Pipes|PipeHandling]]
</pre>
</div>
<div title="TrackPresenter" creator="Ichthyostega" modifier="Ichthyostega" created="201611280207" modified="201611280224" tags="def GuiPattern" changecount="3">
<div title="TrackPresenter" creator="Ichthyostega" modifier="Ichthyostega" created="201611280207" modified="201612020050" tags="def GuiPattern" changecount="4">
<pre>//mediating entity used to guide and control the track-like nested working space in the timeline display of the UI.//
Similar to the ClipPresenter, from a global angle this element fulfils a model like role, while also guiding and controlling a mostly passive view component implemented as GTK widget. Here, the authority of the presenter over the widget must be total, since display management //needs to work automatically,// due to model updates and mutations arriving as [[diff messages|MutationMessage]]. In addition, this structure is prerequisite for (possibly) implementing UI rendering optimisations, since it allows us to leave out widgets entirely, when it is clear they won't become visible: A ''display evaluation pass'', which is effectively a //tree walk,// consecutively visits each part of the timeline structure, to negotiate its concrete display properties in collaboration with a global TimelineDisplayManager. As a result, the presenter knows where to show its corresponding view, and it knows if to show it at all, allowing to either adjust, create or destroy actual GTK widgets within its local reference frame.
A special twist arises from the fact that track display has to happen aligned and in sync within the two display panes of the timeline at the same time. This means that each TrackPresenter has to hold and manage //two slave display elements,// each of which is inserted within a disjoint hierarchy of display elements. For one, there is the {{{timeline::TrackHeadWidget}}} which in turn renders a {{{PatchbayWidget}}}, and on the other side there is a {{{TrackBody}}} element, which is not strictly a widget of itself, but inserted into our custom drawing {{{timeline::BodyCanvasWidget}}} to manage the custom drawing of the respective track working area.
</pre>
</div>
<div title="TransitionsHandling" modifier="Ichthyostega" created="200712080417" modified="200805300100" tags="def design">

View file

@ -21,7 +21,16 @@
</node>
</node>
<node CREATED="1476376882857" HGAP="193" ID="ID_1420903777" MODIFIED="1477784783964" TEXT="Kern-Elemente" VSHIFT="-34">
<node CREATED="1476376913589" HGAP="18" ID="ID_1887326939" MODIFIED="1479434878937" TEXT="Timeline" VSHIFT="-5">
<node CREATED="1480639237820" HGAP="-42" ID="ID_138717265" MODIFIED="1480639353634" TEXT="Bausteine" VSHIFT="-11">
<node CREATED="1480639254498" ID="ID_601165955" MODIFIED="1480639257302" TEXT="Placement"/>
<node CREATED="1480639279591" ID="ID_887618627" MODIFIED="1480639281395" TEXT="Timecode"/>
<node CREATED="1480639276064" ID="ID_1418536459" MODIFIED="1480639277747" TEXT="Fader"/>
<node CREATED="1480639258169" ID="ID_1876553930" MODIFIED="1480639259909" TEXT="Label"/>
<node CREATED="1480639267600" ID="ID_671046048" MODIFIED="1480639269220" TEXT="Clip"/>
<node CREATED="1480639365715" ID="ID_743867283" MODIFIED="1480639368365" TEXT="Bin"/>
</node>
<node CREATED="1480639327169" HGAP="36" ID="ID_700485676" MODIFIED="1480639350283" TEXT="Assets" VSHIFT="-2"/>
<node CREATED="1476376913589" HGAP="42" ID="ID_1887326939" MODIFIED="1480639340628" TEXT="Timeline" VSHIFT="-17">
<node CREATED="1477599995452" ID="ID_97568136" MODIFIED="1477599999383" TEXT="Bestandteile">
<node CREATED="1476377043180" ID="ID_1179709828" MODIFIED="1476377047495" TEXT="Head">
<node CREATED="1476377067729" ID="ID_896843893" MODIFIED="1476377070268" TEXT="Patchbay"/>
@ -368,19 +377,34 @@
</node>
<node CREATED="1480606888860" HGAP="25" ID="ID_899101975" MODIFIED="1480606903105" TEXT="Implementierung" VSHIFT="14">
<icon BUILTIN="pencil"/>
<node CREATED="1480606950372" ID="ID_1502878943" MODIFIED="1480606953527" TEXT="Grundstruktur"/>
<node CREATED="1480606950372" ID="ID_1502878943" MODIFIED="1480606953527" TEXT="Grundstruktur">
<node CREATED="1480639404070" ID="ID_506539007" MODIFIED="1480639407842" TEXT="HeaderPane">
<node CREATED="1480639435010" ID="ID_892799964" MODIFIED="1480639437997" TEXT="Navigator"/>
<node CREATED="1480639438921" ID="ID_1668884794" MODIFIED="1480639446269" TEXT="Baum">
<node CREATED="1480639447736" ID="ID_1842963526" MODIFIED="1480639450508" TEXT="Expander"/>
<node CREATED="1480639450960" ID="ID_1468387103" MODIFIED="1480639454795" TEXT="Patchbay"/>
</node>
</node>
<node CREATED="1480639411109" ID="ID_520199505" MODIFIED="1480639417248" TEXT="ScrolledPane">
<node CREATED="1480639423116" ID="ID_1226894709" MODIFIED="1480639428735" TEXT="Ruler"/>
<node CREATED="1480639429307" ID="ID_1922498247" MODIFIED="1480639431270" TEXT="Canvas"/>
</node>
</node>
<node CREATED="1480606954115" ID="ID_1178000371" MODIFIED="1480606960326" TEXT="Struktur-Modell"/>
<node CREATED="1480606985087" ID="ID_885244508" MODIFIED="1480639465600" TEXT="Layout-Manager">
<node CREATED="1480639469981" ID="ID_983391388" MODIFIED="1480639472833" TEXT="Abstraktionen"/>
<node CREATED="1480639473324" ID="ID_191170582" MODIFIED="1480639510996" TEXT="eval pass"/>
</node>
<node CREATED="1480606973713" ID="ID_163713350" MODIFIED="1480606978899" TEXT="Track-Presenter"/>
<node CREATED="1480607029673" ID="ID_619470641" MODIFIED="1480607052500" TEXT="Track-Anzeige">
<node CREATED="1480607033512" ID="ID_1815699851" MODIFIED="1480607035268" TEXT="Kopf"/>
<node CREATED="1480607035712" ID="ID_1405339006" MODIFIED="1480607037355" TEXT="Rumpf"/>
</node>
<node CREATED="1480606985087" ID="ID_885244508" MODIFIED="1480606989354" TEXT="Layout-Manager"/>
<node CREATED="1480621574221" ID="ID_1217785331" MODIFIED="1480621619049" TEXT="ClipPresenter"/>
<node CREATED="1480607059909" ID="ID_703281238" MODIFIED="1480607061944" TEXT="Control"/>
</node>
</node>
<node CREATED="1476376943985" HGAP="22" ID="ID_1422206856" MODIFIED="1479434895083" TEXT="Viewer" VSHIFT="10"/>
<node CREATED="1479434763643" HGAP="25" ID="ID_1572413636" MODIFIED="1479434887744" TEXT="Clip" VSHIFT="31">
<node CREATED="1479434763643" HGAP="48" ID="ID_1572413636" MODIFIED="1480639177882" TEXT="Clip" VSHIFT="32">
<node CREATED="1479434774138" ID="ID_912862507" MODIFIED="1479601717907" TEXT="Grundlagen">
<node CREATED="1479434780105" ID="ID_239720378" MODIFIED="1479434829990" TEXT="apperances">
<richcontent TYPE="NOTE"><html>
@ -507,6 +531,8 @@
</node>
</node>
</node>
<node CREATED="1476376943985" HGAP="52" ID="ID_1422206856" MODIFIED="1480639197111" TEXT="Viewer" VSHIFT="10"/>
<node CREATED="1480639186172" HGAP="45" ID="ID_838667304" MODIFIED="1480639193064" TEXT="Mixer" VSHIFT="28"/>
<node CREATED="1476376927660" HGAP="35" ID="ID_688318446" MODIFIED="1479434903774" TEXT="Docks" VSHIFT="12"/>
<node CREATED="1477342616175" HGAP="37" ID="ID_954058801" MODIFIED="1477342623660" TEXT="Workspace" VSHIFT="33">
<node CREATED="1477342624942" ID="ID_56920104" MODIFIED="1477342628449" TEXT="ist-Zustand">