Timeline: inject sub-track into the header pane structure
This commit is contained in:
parent
eca09e3ab5
commit
3102de9d8a
4 changed files with 36 additions and 16 deletions
|
|
@ -66,6 +66,7 @@ namespace timeline {
|
|||
: Gtk::Grid{}
|
||||
, nameTODO_{"?"}
|
||||
, treeTODO_{"↳"}
|
||||
, childCnt_{0}
|
||||
{
|
||||
this->attach (nameTODO_, 0,0, 2,1);
|
||||
this->attach (treeTODO_, 0,1, 1,1);
|
||||
|
|
@ -85,15 +86,29 @@ namespace timeline {
|
|||
* 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
|
||||
* patchbay for each track is a grid with initially four quadrants, and the 4th quadrant
|
||||
* holds the _content area,_ which is again a TrackHeadWidget. Additional sub-Tracks
|
||||
* are added as additional lines to the grid, while nested sub-Tracks will be handled
|
||||
* recursively by the corresponding nested TrackHeadWidget.
|
||||
* @note Child tracks are always appended. When tracks are reordered or deleted,
|
||||
* the whole structure has to be re-built accordingly.
|
||||
*/
|
||||
void
|
||||
TrackHeadWidget::injectSubFork (TrackHeadWidget& subForkHead)
|
||||
{
|
||||
UNIMPLEMENTED ("how actually to represent the track in the patchbay");
|
||||
++childCnt_;
|
||||
this->attach (subForkHead, 0, childCnt_, 1,1);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
TrackHeadWidget::clearSubFork()
|
||||
{
|
||||
while (childCnt_ > 0)
|
||||
{
|
||||
this->remove_row (childCnt_);
|
||||
--childCnt_;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@
|
|||
** + 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, including
|
||||
** the sub-tracks nested therein.
|
||||
** For each track, we display a "patchbay"-like content control in the timeline header pane,
|
||||
** which serves to control such aspects relevant for all content contained within the scope
|
||||
** of this track, including the sub-tracks nested therein.
|
||||
**
|
||||
** @todo WIP-WIP-WIP as of 10/2018
|
||||
**
|
||||
|
|
@ -74,6 +74,8 @@ namespace timeline {
|
|||
Gtk::Label nameTODO_;
|
||||
Gtk::Label treeTODO_;
|
||||
|
||||
uint childCnt_;
|
||||
|
||||
public:
|
||||
TrackHeadWidget();
|
||||
~TrackHeadWidget();
|
||||
|
|
@ -82,6 +84,9 @@ namespace timeline {
|
|||
|
||||
/** Integrate the control area for a nested sub track fork. */
|
||||
void injectSubFork (TrackHeadWidget& subForkHead);
|
||||
|
||||
/** Discard all nested sub track display widgets. */
|
||||
void clearSubFork();
|
||||
|
||||
private:/* ===== Internals ===== */
|
||||
|
||||
|
|
|
|||
|
|
@ -104,17 +104,17 @@ namespace timeline {
|
|||
})
|
||||
.matchElement ([&](GenNode const& spec, PRuler const& elm) -> bool
|
||||
{
|
||||
// return spec.idi == ID{*elm}; ////////////////////////////////////////////////////////////TICKET #1193 : shall RulerTrack be a Tangible?
|
||||
return spec.idi == ID{*elm};
|
||||
})
|
||||
.constructFrom ([&](GenNode const& spec) -> PRuler
|
||||
{
|
||||
// return make_unique<RulerTrack> (spec.idi, this->uiBus_); ///////////////////////////////TICKET #1193 : how to construct a RulerTrack?
|
||||
{ // »Constructor« : how to attach a new ruler track
|
||||
return make_unique<RulerTrack> (spec.idi, this->uiBus_, *this);
|
||||
})
|
||||
.buildChildMutator ([&](PRuler& target, GenNode::ID const& subID, TreeMutator::Handle buff) -> bool
|
||||
{ ///////////////////////////////TICKET #1193 : do we even want to "mutate" a ruler?
|
||||
// if (ID{*target} != subID) return false;
|
||||
// target->buildMutator (buff);
|
||||
// return true;
|
||||
{
|
||||
if (ID{*target} != subID) return false;
|
||||
target->buildMutator (buff);
|
||||
return true;
|
||||
}))
|
||||
.attach (collection(markers_)
|
||||
.isApplicableIf ([&](GenNode const& spec) -> bool
|
||||
|
|
|
|||
|
|
@ -106,8 +106,8 @@ namespace timeline {
|
|||
void
|
||||
injectSubTrack (TrackHeadWidget& subHead, TrackBody& subBody)
|
||||
{
|
||||
head.injectSubFork (subHead);
|
||||
body.attachSubTrack (&subBody);
|
||||
UNIMPLEMENTED ("inject the widgets to represent a nested sub-track within this timeline track display frame");
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue