diff --git a/src/lib/iter-tree-explorer.hpp b/src/lib/iter-tree-explorer.hpp
index a4b5de54a..44a761b80 100644
--- a/src/lib/iter-tree-explorer.hpp
+++ b/src/lib/iter-tree-explorer.hpp
@@ -1636,6 +1636,16 @@ namespace lib {
return TreeExplorer (std::forward (srcSeq));
}
+ /** synonym for #treeExplore.
+ * @remark this might become an extension to C++20 pipelines
+ */
+ template
+ inline auto
+ explore (IT&& srcSeq)
+ {
+ return treeExplore (std::forward (srcSeq));
+ }
+
} // namespace lib
#endif /* LIB_ITER_TREE_EXPLORER_H */
diff --git a/src/stage/timeline/track-presenter.hpp b/src/stage/timeline/track-presenter.hpp
index ddbedae12..6d4806ec8 100644
--- a/src/stage/timeline/track-presenter.hpp
+++ b/src/stage/timeline/track-presenter.hpp
@@ -90,10 +90,8 @@
#include "stage/timeline/clip-presenter.hpp"
#include "stage/timeline/track-head-widget.hpp"
#include "stage/timeline/track-body.hpp"
-#include "lib/iter-adapter-ptr-deref.hpp"
-#include "lib/iter-adapter-stl.hpp"
+#include "lib/iter-tree-explorer.hpp"
#include "lib/util-coll.hpp"
-#include "lib/itertools.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
#include "lib/format-cout.hpp"
/////////////////////////////////////////////////////////////////////////////////////////////////////////////TICKET #1201 : test/code... remove this
@@ -116,17 +114,14 @@ namespace timeline {
using lib::diff::TreeMutator;
using lib::diff::collection;
using std::make_unique;
+ using lib::explore;
+ using util::max;
using PFork = unique_ptr;
using PClip = unique_ptr;
using PMark = unique_ptr;
using PRuler = unique_ptr;
- namespace{
- /** Helper: iterator to yield direct reference to collection members managed by (unique)pointer. */
- constexpr auto elems = [](auto& coll) { return lib::ptrDeref (lib::iter_stl::eachElm (coll)); };
- }
-
/**
* Reference frame to organise the presentation related to a specific Track in the Timeline-GUI.
@@ -174,8 +169,7 @@ namespace timeline {
return body_.bindRulers();
}
- template
- void establishExtension (CLPS, MRKS);
+ void establishExtension (vector&, vector&);
};
@@ -351,25 +345,27 @@ namespace timeline {
}
- /** @todo 2/2020 */
+
+ /** handle the DisplayEvaluation pass for this track and its sub-tracks.
+ * @todo 2/2020 WIP-WIP initial draft; need to find out more about Clip display
+ */
inline void
TrackPresenter::establishLayout (DisplayEvaluation& displayEvaluation)
{
- display_.establishExtension (elems(clips_), elems(markers_));
+ display_.establishExtension (clips_, markers_);
for (auto& subTrack: subFork_)
subTrack->establishLayout (displayEvaluation);
}
- /** */
- template
+ /** find out about the vertical extension of a single track display. */
inline void
- DisplayFrame::establishExtension (CLPS clips, MRKS markers)
+ DisplayFrame::establishExtension (vector& clips, vector&)
{
- int maxVSize = util::max (lib::transformIterator(clips,
- [](ClipPresenter const& clip)
- {
- return clip.determineRequiredVerticalExtension();
- }));
+ int maxVSize = max (explore (clips)
+ .transform([](PClip const& clip)
+ {
+ return clip->determineRequiredVerticalExtension();
+ }));
int headSize = this->head_.get_height();
int bodySize = this->body_.calcHeight();
}