diff --git a/src/stage/timeline/body-canvas-widget.cpp b/src/stage/timeline/body-canvas-widget.cpp index e54567c2e..09865be6b 100644 --- a/src/stage/timeline/body-canvas-widget.cpp +++ b/src/stage/timeline/body-canvas-widget.cpp @@ -569,16 +569,20 @@ namespace timeline { getCanvas(yPos).move (widget, xPos, yPos); } - /** @todo 2/2020 */ + /** respond to the DisplayEvaluation pass. + * @remark assuming that each track has already established it own vertical space requirement, + * thereby placing the extension values into TrackBody::contentHeight_ + * @todo 2/2020 WIP + */ void - BodyCanvasWidget::establishLaylut (DisplayEvaluation& displayEvaluation) + BodyCanvasWidget::establishLayout (DisplayEvaluation& displayEvaluation) { - UNIMPLEMENTED ("respond to the DisplayEvaluation-Pass and recalculate space allocation"); - -/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1211 : need to publish those values via DisplayEvaluation -// uint contentHeight = rootBody_->establishTrackSpace (profile_); -// uint rulerHeight = rootBody_->calcRulerHeight() + TrackBody::decoration.topMar; -// adjustCanvasSize(layout_.getPixSpan().delta(), contentHeight, rulerHeight); + // Traverse TrackBody structure and populate the (track)profile + uint contentHeight = rootBody_->establishTrackSpace (profile_); + uint rulerHeight = rootBody_->calcRulerHeight() + TrackBody::decoration.topMar; + adjustCanvasSize(layout_.getPixSpan().delta(), contentHeight, rulerHeight); + + ///TODO: anything to publish into the DisplayEvaluation ?? } diff --git a/src/stage/timeline/body-canvas-widget.hpp b/src/stage/timeline/body-canvas-widget.hpp index b48b805ba..a08471c33 100644 --- a/src/stage/timeline/body-canvas-widget.hpp +++ b/src/stage/timeline/body-canvas-widget.hpp @@ -177,7 +177,7 @@ namespace timeline { protected: /* ==== Interface: LayoutElement ===== */ - void establishLaylut (DisplayEvaluation&) override; + void establishLayout (DisplayEvaluation&) override; private:/* ===== Internals ===== */ diff --git a/src/stage/timeline/display-evaluation.cpp b/src/stage/timeline/display-evaluation.cpp index c22356e54..6228a954e 100644 --- a/src/stage/timeline/display-evaluation.cpp +++ b/src/stage/timeline/display-evaluation.cpp @@ -61,23 +61,25 @@ namespace timeline { LayoutElement::~LayoutElement() { } // emit VTables here.... -//DisplayManager::DisplayManager() -// : paneSplitPosition_{topLevelContainer.property_position()} -// , bodyCanvas_{} -// , headerPane_{bodyCanvas_.get_vadjustment()} // wire the header pane (Gtk::Viewport) to follow the body vertical scroll movement -// { -// topLevelContainer.add1 (headerPane_); -// topLevelContainer.add2 (bodyCanvas_); -// } - /** - * This function is + * Conduct global passes over the wired layout elements, in order to adjust + * and coordinate the overall timeline layout. Within these passes, each element + * starts with the (vertical) extension as allocated by GTK; typically these values + * need to be increased slightly, in order to align the track headers and the track + * body display, and to accommodate the clips and effect placed into each track. + * Such local adjustments will typically re-trigger the custom drawing code, and + * thus re-invoke this function, until the overall layout is stable. In a similar + * vein, the expanding or collapsing of clips and even whole sub-track scopes + * will cause adjustments and a re-evaluation. + * @warning care has to be taken to not "overshoot" each adjustment, since this + * might lead to never ending re-invocations and "layout oscillation". */ void DisplayEvaluation::perform() { - UNIMPLEMENTED ("actually perform the Display Evaluation Pass"); + this->forkRoot_->establishLayout (*this); + this->canvas_->establishLayout (*this); } diff --git a/src/stage/timeline/display-evaluation.hpp b/src/stage/timeline/display-evaluation.hpp index e5fc98390..9441c2d6b 100644 --- a/src/stage/timeline/display-evaluation.hpp +++ b/src/stage/timeline/display-evaluation.hpp @@ -92,7 +92,7 @@ namespace timeline { public: virtual ~LayoutElement(); ///< this is an interface - virtual void establishLaylut (DisplayEvaluation&) =0; + virtual void establishLayout (DisplayEvaluation&) =0; }; @@ -107,7 +107,6 @@ namespace timeline { LayoutElement* canvas_{nullptr}; public: - /** */ void perform(); void wireForkRoot (LayoutElement& r) { forkRoot_ = &r; } diff --git a/src/stage/timeline/track-presenter.cpp b/src/stage/timeline/track-presenter.cpp index 1d1af1bd1..c22659269 100644 --- a/src/stage/timeline/track-presenter.cpp +++ b/src/stage/timeline/track-presenter.cpp @@ -200,7 +200,7 @@ namespace timeline { /** @todo 2/2020 */ void - TrackPresenter::establishLaylut (DisplayEvaluation& displayEvaluation) + TrackPresenter::establishLayout (DisplayEvaluation& displayEvaluation) { UNIMPLEMENTED ("respond to the DisplayEvaluation-Pass and pass on evaluation recursively"); } diff --git a/src/stage/timeline/track-presenter.hpp b/src/stage/timeline/track-presenter.hpp index 3b81b032a..0ee328a02 100644 --- a/src/stage/timeline/track-presenter.hpp +++ b/src/stage/timeline/track-presenter.hpp @@ -163,7 +163,7 @@ namespace timeline { protected: /* ==== Interface: LayoutElement ===== */ - void establishLaylut (DisplayEvaluation&) override; + void establishLayout (DisplayEvaluation&) override; private:/* ===== Internals ===== */ diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 4a1b30a08..66c6d2035 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -21500,10 +21500,10 @@ - - - - + + + + @@ -21538,16 +21538,16 @@ - - + + - - + + @@ -21580,8 +21580,8 @@ - - + +