diff --git a/src/stage/timeline/body-canvas-widget.cpp b/src/stage/timeline/body-canvas-widget.cpp index eb1b43672..a4ddbea8e 100644 --- a/src/stage/timeline/body-canvas-widget.cpp +++ b/src/stage/timeline/body-canvas-widget.cpp @@ -461,6 +461,13 @@ namespace timeline { rootBody_ = &rootTrackBody; } + void + BodyCanvasWidget::disable() + { + profile_.clear(); + rootBody_ = nullptr; + } + /** force rebuilding of theTrackProfile whenever the global timeline structure changes */ void diff --git a/src/stage/timeline/body-canvas-widget.hpp b/src/stage/timeline/body-canvas-widget.hpp index 6a8238ea5..fa134307e 100644 --- a/src/stage/timeline/body-canvas-widget.hpp +++ b/src/stage/timeline/body-canvas-widget.hpp @@ -120,6 +120,7 @@ namespace timeline { /** @internal Initially install the contents corresponding to the root track fork */ void installForkRoot (TrackBody& rootTrackBody); + void disable(); /** @internal allow the header pane to follow our vertical scrolling movement */ auto diff --git a/src/stage/timeline/header-pane-widget.hpp b/src/stage/timeline/header-pane-widget.hpp index de2c37606..eec365d52 100644 --- a/src/stage/timeline/header-pane-widget.hpp +++ b/src/stage/timeline/header-pane-widget.hpp @@ -101,6 +101,13 @@ namespace timeline { patchbay_.installFork (rootTrackHead); } + void + disable() + { + patchbay_.disable(); + } + + private:/* ===== Internals ===== */ }; diff --git a/src/stage/timeline/patchbay-widget.cpp b/src/stage/timeline/patchbay-widget.cpp index 93dcb23a9..ee0210db3 100644 --- a/src/stage/timeline/patchbay-widget.cpp +++ b/src/stage/timeline/patchbay-widget.cpp @@ -89,6 +89,12 @@ namespace timeline { this->add (rootTrackHead); } + void + PatchbayWidget::disable() + { + this->remove(); + } + }}// namespace stage::timeline diff --git a/src/stage/timeline/patchbay-widget.hpp b/src/stage/timeline/patchbay-widget.hpp index ae827613e..4ca102c28 100644 --- a/src/stage/timeline/patchbay-widget.hpp +++ b/src/stage/timeline/patchbay-widget.hpp @@ -76,6 +76,7 @@ namespace timeline { /** @internal Initially install the contents corresponding to the track fork root */ void installFork (TrackHeadWidget& rootTrackHead); + void disable(); private:/* ===== Internals ===== */ diff --git a/src/stage/timeline/timeline-layout.cpp b/src/stage/timeline/timeline-layout.cpp index dadc28c1d..61420b053 100644 --- a/src/stage/timeline/timeline-layout.cpp +++ b/src/stage/timeline/timeline-layout.cpp @@ -101,7 +101,7 @@ namespace timeline { /* ==== Interface: LayoutManager===== */ - + PixSpan TimelineLayout::getPixSpan() { @@ -121,6 +121,67 @@ namespace timeline { { TODO ("actually visit all parts and negotiate the Layout"); } + + + + /* ==== Interface: ViewHook ===== */ + + void + TimelineLayout::hook (TrackHeadWidget& head, int xPos, int yPos) + { + headerPane_.installForkRoot (head); + } + + void + TimelineLayout::hook (TrackBody& body, int xPos, int yPos) + { + bodyCanvas_.installForkRoot (body); + + // detect changes of the track structure + body.signalStructureChange_ = signalStructureChange_; + signalStructureChange_(); // this _is_ such a change + } + + + void + TimelineLayout::remove (TrackHeadWidget& head) + { + headerPane_.disable(); + } + + void + TimelineLayout::remove (TrackBody& body) + { + bodyCanvas_.disable(); + } + + + void + TimelineLayout::rehook (model::ViewHooked&) noexcept + { + NOTREACHED ("TimelineLayout: top-Level must not be re-ordered"); + } + + void + TimelineLayout::rehook (model::ViewHooked&) noexcept + { + NOTREACHED ("TimelineLayout: top-Level must not be re-ordered"); + } + + + void + TimelineLayout::move (TrackHeadWidget& head, int xPos, int yPos) + { + UNIMPLEMENTED ("ViewHooked: not supported -- refactor?"); + } + + void + TimelineLayout::move (TrackBody& body, int xPos, int yPos) + { + UNIMPLEMENTED ("ViewHooked: not supported -- refactor?"); + } + + diff --git a/src/stage/timeline/timeline-layout.hpp b/src/stage/timeline/timeline-layout.hpp index 2f4186f3e..e48f9546a 100644 --- a/src/stage/timeline/timeline-layout.hpp +++ b/src/stage/timeline/timeline-layout.hpp @@ -86,6 +86,7 @@ #include "stage/timeline/display-manager.hpp" #include "stage/timeline/header-pane-widget.hpp" #include "stage/timeline/body-canvas-widget.hpp" +#include "stage/model/view-hook.hpp" //#include "lib/util.hpp" @@ -100,6 +101,8 @@ namespace timeline { class TrackHeadWidget; class TrackBody; + using model::ViewHooked; + /** * Top-level anchor point for the timeline display (widgets). @@ -109,6 +112,8 @@ namespace timeline { */ class TimelineLayout : public DisplayManager + , protected model::ViewHook + , protected model::ViewHook { Glib::PropertyProxy paneSplitPosition_; @@ -130,11 +135,23 @@ namespace timeline { /////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this - protected:/* ==== Interface: LayoutManager===== */ + protected: /* ==== Interface: LayoutManager===== */ PixSpan getPixSpan() override; void triggerDisplayEvaluation() override; + protected: /* ==== Interface: ViewHook ===== */ + + void hook (TrackHeadWidget&, int xPos=0, int yPos=0) override; + void move (TrackHeadWidget&, int xPos, int yPos) override; + void remove (TrackHeadWidget&) override; + void rehook (ViewHooked&) noexcept override; + + void hook (TrackBody&, int xPos=0, int yPos=0) override; + void move (TrackBody&, int xPos, int yPos) override; + void remove (TrackBody&) override; + void rehook (ViewHooked&) noexcept override; + private:/* ===== Internals ===== */ }; diff --git a/src/stage/timeline/track-body.hpp b/src/stage/timeline/track-body.hpp index 9717235cb..938dbb92d 100644 --- a/src/stage/timeline/track-body.hpp +++ b/src/stage/timeline/track-body.hpp @@ -42,7 +42,7 @@ #include "stage/gtk-base.hpp" #include "stage/timeline/ruler-track.hpp" -#include "stage/timeline/timeline-layout.hpp" +#include "stage/timeline/display-manager.hpp" //#include "lib/util.hpp" diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 2470be5f4..d53800643 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -18532,7 +18532,7 @@ - + @@ -18994,7 +18994,8 @@ - + + @@ -19268,6 +19269,19 @@ + + + + + + + + + + + + + @@ -21537,6 +21551,9 @@ + + + @@ -21784,6 +21801,8 @@ + + @@ -21798,8 +21817,219 @@ + + + + + - + + + + + + + + + + +

+ ....sonst wird es zur Sackgasse. +

+

+ Die zugrundeliegende Idee war gut, aber ich hab mich in einer cleveren Implementierung mit einem Lambda-Parameter festgefahren. Zwar brauche ich nicht die volle Generizität und Quer-Beweglichkeit, aber der verallgemeinerte Enwurf für ViewHook(ed) ist auch ohne das um Längen besser als die bestehende Struktur +

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + +

+ aber keine generische Quer-Beweglichkeit +

+ +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ und zwar, genauer gesagt, eine Konsequenz der Entscheidung, nicht nur einen ViewHook, sondern ein ViewHooked zu machen. Ich hab die Beziehung in's Strukturelle hinen genommen. Damit muß auch die Wurzel diese Struktur unterstützen, und damit wird an dieser Stelle die Abstraktion undicht. +

+ + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +

+ nur wenn DisplayFrame selber ein ViewHook wäre +

+ + +
+ + +
+ + + + + + +

+ weil der Trigger irgendwo unten passiert, und nicht auf dem top-Level ViewHook +

+ + +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + +

+ soweit möglich ohne grundlegende Änderungen +

+ +
+
+
+ + + + + + + + + + + +