diff --git a/src/gui/timeline/header-pane-widget.hpp b/src/gui/timeline/header-pane-widget.hpp index 3b5b6add0..e18cbc2fa 100644 --- a/src/gui/timeline/header-pane-widget.hpp +++ b/src/gui/timeline/header-pane-widget.hpp @@ -63,6 +63,9 @@ namespace gui { namespace timeline { + using PAdjustment = Glib::RefPtr; + + class TrackHeadWidget; @@ -78,10 +81,10 @@ namespace timeline { public: ~HeaderPaneWidget() { } - HeaderPaneWidget() + HeaderPaneWidget (PAdjustment const& vScroll) : Gtk::Box{Gtk::ORIENTATION_VERTICAL} , navigator_{} - , patchbay_{} + , patchbay_{vScroll} { this->pack_start (navigator_, Gtk::PACK_SHRINK); this->pack_start (patchbay_, Gtk::PACK_EXPAND_WIDGET); diff --git a/src/gui/timeline/patchbay-widget.cpp b/src/gui/timeline/patchbay-widget.cpp index 01cfa6617..e40d049d8 100644 --- a/src/gui/timeline/patchbay-widget.cpp +++ b/src/gui/timeline/patchbay-widget.cpp @@ -32,7 +32,7 @@ #include "gui/gtk-base.hpp" #include "gui/timeline/patchbay-widget.hpp" - +#include "gui/timeline/track-head-widget.hpp" //#include "gui/ui-bus.hpp" //#include "lib/format-string.hpp" //#include "lib/format-cout.hpp" @@ -46,6 +46,7 @@ //using util::_Fmt; //using util::contains; +using Gtk::Adjustment; //using Gtk::Widget; //using sigc::mem_fun; //using sigc::ptr_fun; @@ -63,25 +64,29 @@ namespace timeline { PatchbayWidget::~PatchbayWidget() { } - PatchbayWidget::PatchbayWidget () - : Gtk::Grid{} + /** + * Set up the patchbay area of the timeline UI. + * The patchbay is a container to hold the actual placement control widgets + * arranged alongside with each track, according to the nested track structure. + * The header pane and thus especially the patchbay needs to follow as a slave + * to the vertical scrolling adjustments of the Timeline display; if the users + * scrolls up or down over the more or less expanded tree of tracks, the header + * has to follow this scrolled display in sync. Thus the implementation of the + * patchbay is based on a Gtk::Viewport, which is attached to the vertical + * Gtk::Adjustment, as exposed by the Gtk::ScrolledWindow holding the + * timeline body canvas on the right side of the Timeline UI. + * @note the Patchbay is not scrollable in horizontal direction, + * thus we create a disabled Adjustment for this parameter. + */ + PatchbayWidget::PatchbayWidget (PAdjustment const& vScroll) + : Gtk::Viewport{Gtk::Adjustment::create (0,0,0,0,0,0), vScroll} { } - /** - * The Lumiera Timeline model does not rely on a list of tracks, as most conventional - * video editing software does -- rather, each sequence holds a _fork of nested scopes._ - * This recursively nested structure is reflected in the patchbay area corresponding to - * each track in the _header pane_ of the timeline display, located to the left. The - * patchbay for each track is a grid with four quadrants, and the 4th quadrant is the - * _content area,_ which is recursively extended to hold nested PatchbayWidget elements, - * corresponding to the child tracks of this track. To _fund_ this recursively extensible - * structure, we need to set up the first four quadrants - */ void PatchbayWidget::installFork (TrackHeadWidget& rootTrackHead) { - UNIMPLEMENTED ("how actually to represent the track in the patchbay"); + this->add (rootTrackHead); } diff --git a/src/gui/timeline/patchbay-widget.hpp b/src/gui/timeline/patchbay-widget.hpp index 42c33b4f1..03728a763 100644 --- a/src/gui/timeline/patchbay-widget.hpp +++ b/src/gui/timeline/patchbay-widget.hpp @@ -22,22 +22,14 @@ /** @file patchbay-widget.hpp - ** Widget to control the placement parameters of a fork within the timeline header pane UI. + ** Widget to hold the track head controls 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. + ** the timeline display as a system of nested tracks. For each of these tracks we get a header + ** section, allowing to control its placement parameters, including start time, output routing + ** level and panning. The _Patch Bay_ is the container holding all those track header controls, + ** arranged into a recursively nested structure. ** - ** @todo WIP-WIP-WIP as of 12/2016 + ** @todo WIP-WIP-WIP as of 10/2018 ** */ @@ -56,7 +48,9 @@ namespace gui { namespace timeline { - + + using PAdjustment = Glib::RefPtr; + class TrackHeadWidget; @@ -68,13 +62,13 @@ namespace timeline { * @todo WIP-WIP as of 12/2016 */ class PatchbayWidget - : public Gtk::Grid + : public Gtk::Viewport { public: - PatchbayWidget(); + PatchbayWidget (PAdjustment const& vScroll); ~PatchbayWidget(); - /** @internal Initially install the contents corresponding to this track fork */ + /** @internal Initially install the contents corresponding to the track fork root */ void installFork (TrackHeadWidget& rootTrackHead); private:/* ===== Internals ===== */ diff --git a/src/gui/timeline/timeline-layout.cpp b/src/gui/timeline/timeline-layout.cpp index a4fbface5..3028bce8f 100644 --- a/src/gui/timeline/timeline-layout.cpp +++ b/src/gui/timeline/timeline-layout.cpp @@ -63,8 +63,8 @@ namespace timeline { TimelineLayout::TimelineLayout (Gtk::Paned& topLevelContainer) : paneSplitPosition_{topLevelContainer.property_position()} - , headerPane_{} , bodyCanvas_{} + , headerPane_{bodyCanvas_.get_vadjustment()} // wire the header pane (Gtk::Viewport) to follow the body vertical scroll movement { topLevelContainer.add1 (headerPane_); topLevelContainer.add2 (bodyCanvas_); diff --git a/src/gui/timeline/timeline-layout.hpp b/src/gui/timeline/timeline-layout.hpp index 2f513eb3c..6a14b359d 100644 --- a/src/gui/timeline/timeline-layout.hpp +++ b/src/gui/timeline/timeline-layout.hpp @@ -110,8 +110,8 @@ namespace timeline { { Glib::PropertyProxy paneSplitPosition_; - HeaderPaneWidget headerPane_; BodyCanvasWidget bodyCanvas_; + HeaderPaneWidget headerPane_; public: diff --git a/src/gui/timeline/track-head-widget.cpp b/src/gui/timeline/track-head-widget.cpp index 3bb54282a..518ac9dc4 100644 --- a/src/gui/timeline/track-head-widget.cpp +++ b/src/gui/timeline/track-head-widget.cpp @@ -22,8 +22,7 @@ /** @file track-head-widget.cpp - ** Implementation details regarding display of the track heads - ** within the timeline UI. + ** Implementation details regarding display of the track heads within the timeline UI. ** ** @todo WIP-WIP-WIP as of 12/2016 ** @@ -59,17 +58,32 @@ namespace timeline { + TrackHeadWidget::~TrackHeadWidget() { } + + TrackHeadWidget::TrackHeadWidget () + : Gtk::Grid{} { } - TrackHeadWidget::~TrackHeadWidget() + /** + * @remark The Lumiera Timeline model does not rely on a list of tracks, as most conventional + * video editing software does -- rather, each sequence holds a _fork of nested scopes._ + * This recursively nested structure is reflected in the patchbay area corresponding to + * each track in the _header pane_ of the timeline display, located to the left. The + * patchbay for each track is a grid with four quadrants, and the 4th quadrant is the + * _content area,_ which is recursively extended to hold nested PatchbayWidget elements, + * corresponding to the child tracks of this track. To _fund_ this recursively extensible + * structure, we need to set up the first four quadrants + */ + void + TrackHeadWidget::injectSubFork (TrackHeadWidget& subForkHead) { + UNIMPLEMENTED ("how actually to represent the track in the patchbay"); } - }}// namespace gui::timeline diff --git a/src/gui/timeline/track-head-widget.hpp b/src/gui/timeline/track-head-widget.hpp index 3de1be01e..cb448bf51 100644 --- a/src/gui/timeline/track-head-widget.hpp +++ b/src/gui/timeline/track-head-widget.hpp @@ -22,10 +22,22 @@ /** @file track-head-widget.hpp - ** Widget to represent a track head with placement control patchbay - ** within Lumiera's timeline UI. + ** Widget to represent a track head with placement parameters, within the timeline header pane. + ** [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 + ** @todo WIP-WIP-WIP as of 10/2018 ** */ @@ -47,14 +59,22 @@ namespace timeline { /** + * Header pane control area corresponding to a Track with nested child Tracks. + * This structure is used recursively to build up the Fork of nested Tracks. + * - first row: Placement + Property pane + * - second row: content or nested tracks. * @todo WIP-WIP as of 12/2016 */ class TrackHeadWidget + : public Gtk::Grid { public: TrackHeadWidget (); ~TrackHeadWidget(); - + + /** Integrate the control area for a nested sub track fork. */ + void injectSubFork (TrackHeadWidget& subForkHead); + private:/* ===== Internals ===== */ }; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index d6ed8a34f..6f6782833 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -19088,9 +19088,12 @@ - + - + + + + @@ -19108,6 +19111,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + +