DisplayEvaluation: skeleton of the evaluation invocation

This commit is contained in:
Fischlurch 2020-03-06 23:55:07 +01:00
parent e9f05e4ac2
commit 5ddf426add
7 changed files with 39 additions and 34 deletions

View file

@ -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 ??
}

View file

@ -177,7 +177,7 @@ namespace timeline {
protected: /* ==== Interface: LayoutElement ===== */
void establishLaylut (DisplayEvaluation&) override;
void establishLayout (DisplayEvaluation&) override;
private:/* ===== Internals ===== */

View file

@ -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);
}

View file

@ -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; }

View file

@ -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");
}

View file

@ -163,7 +163,7 @@ namespace timeline {
protected: /* ==== Interface: LayoutElement ===== */
void establishLaylut (DisplayEvaluation&) override;
void establishLayout (DisplayEvaluation&) override;
private:/* ===== Internals ===== */

View file

@ -21500,10 +21500,10 @@
</node>
</node>
</node>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1582995698667" HGAP="165" ID="ID_1849412034" MODIFIED="1583012162492" TEXT="zu Bauen" VSHIFT="27">
<icon BUILTIN="flag-pink"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582996759972" ID="ID_1795046219" MODIFIED="1583010906714" TEXT="Rahmen">
<icon BUILTIN="flag-yellow"/>
<node BACKGROUND_COLOR="#fdfdcf" COLOR="#ff0000" CREATED="1582995698667" HGAP="165" ID="ID_1849412034" MODIFIED="1583537374691" TEXT="zu Bauen" VSHIFT="27">
<icon BUILTIN="pencil"/>
<node COLOR="#338800" CREATED="1582996759972" ID="ID_1795046219" MODIFIED="1583537382866" TEXT="Rahmen">
<icon BUILTIN="button_ok"/>
<node CREATED="1582996764330" ID="ID_920127062" MODIFIED="1582996766870" TEXT="Umbau">
<node CREATED="1582996768074" ID="ID_1685131335" MODIFIED="1582996782861" TEXT="bisheriger Profil-Trigger mu&#xdf; herausgel&#xf6;st werden"/>
<node CREATED="1582996783904" ID="ID_1435982546" MODIFIED="1583008976682" TEXT="ermittelte Gr&#xf6;&#xdf;e mu&#xdf; vom Evaluation-Pass weiterverarbeitet werden">
@ -21538,16 +21538,16 @@
</node>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582995724279" ID="ID_742111018" MODIFIED="1583010908452" TEXT="Steuer-Komponente">
<icon BUILTIN="flag-yellow"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582995724279" ID="ID_742111018" MODIFIED="1583537394329" TEXT="Steuer-Komponente">
<icon BUILTIN="pencil"/>
<node CREATED="1582995734606" ID="ID_1813411794" MODIFIED="1582995739220" TEXT="lebt im Layout-Manager"/>
<node CREATED="1582995740053" ID="ID_521808189" MODIFIED="1582995755383" TEXT="stateful (evaluationPhase)"/>
<node CREATED="1583435618709" ID="ID_1501002443" MODIFIED="1583435629364" TEXT="es ist die DisplayEvaluation selber">
<icon BUILTIN="idea"/>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1582995826081" ID="ID_1814756232" MODIFIED="1583010909674" TEXT="Evaluation-Ctx?">
<icon BUILTIN="flag-yellow"/>
<node COLOR="#338800" CREATED="1582995826081" ID="ID_1814756232" MODIFIED="1583537369744" TEXT="Evaluation-Ctx?">
<icon BUILTIN="button_ok"/>
<node CREATED="1582995915117" ID="ID_1313886171" MODIFIED="1582995918612" TEXT="notwendig?">
<node CREATED="1582995919703" ID="ID_1252142092" MODIFIED="1582995927631" TEXT="k&#xf6;nnte Daten transportieren"/>
<node CREATED="1582995928331" ID="ID_1250781606" MODIFIED="1582995932606" TEXT="w&#xe4;re dann ein Visitor"/>
@ -21580,8 +21580,8 @@
</node>
</node>
</node>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1583010104257" ID="ID_82409060" MODIFIED="1583010910968" TEXT="Evaluation-Pass">
<icon BUILTIN="flag-yellow"/>
<node BACKGROUND_COLOR="#eee5c3" COLOR="#990000" CREATED="1583010104257" ID="ID_82409060" MODIFIED="1583537388690" TEXT="Evaluation-Pass">
<icon BUILTIN="pencil"/>
<node CREATED="1583010115679" ID="ID_181195318" MODIFIED="1583010181687" TEXT="alle Tracks">
<node CREATED="1583010186970" ID="ID_1754142891" MODIFIED="1583010203965" TEXT="Ping-Pong auf DisplayFrame ausl&#xf6;sen">
<node CREATED="1583010212766" ID="ID_1377321766" MODIFIED="1583010221404" TEXT="Gr&#xf6;&#xdf;e vom Header"/>