Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
TrackPresenter Class Reference

#include "stage/timeline/track-presenter.hpp"

Description

A View-Model entity to represent a timeline track in the UI.

Todo:
WIP-WIP as of 12/2016

Definition at line 252 of file track-presenter.hpp.

Public Member Functions

 TrackPresenter (ID id, ctrl::BusTerm &nexus, DisplayViewHooks &displayAnchor)
 
virtual void buildMutator (lib::diff::TreeMutator::Handle) override
 set up a binding to respond to mutation messages via UiBus
 
- Public Member Functions inherited from Controller
 Tangible (ID identity, ctrl::BusTerm &nexus)
 
- Public Member Functions inherited from Tangible
virtual ~Tangible ()
 this is an interface
 
 operator string () const
 diagnostic representation.
 
 operator LuidH () const
 
ID getID () const
 
void reset ()
 invoke the generic reset hook
 
void clearMsg ()
 invoke the hook to clear notification messages
 
void clearErr ()
 invoke the hook to clear error markers
 
template<typename... ARGS>
void invoke (Symbol cmdID, ARGS &&...)
 
void invoke (Symbol cmdID, Rec &&arguments)
 Perform a command or action, once the execution context has been established.
 
void slotExpand ()
 Expand this element and remember the expanded state.
 
void slotCollapse ()
 Collapse or minimise this element and remember the collapsed state.
 
void slotReveal ()
 Cause the element to be brought into sight.
 
void markFlash ()
 highlight the element visually to catch the user's attention
 
void markMsg (string message)
 push a notification (or warning) message to the element.
 
void markErr (string error)
 push an error state tag to the element
 
void mark (GenNode const &)
 generic handler for all incoming "state mark" messages
 
void installExpander (Expander::ProbeFun, Expander::ChangeFun)
 Configure the (optional) functionality to expand or collapse the UI-Element.
 
void installRevealer (Revealer::RevealeItFun)
 Configure the (optional) functionality to bring the UI-Element into sight.
 
template<typename... ARGS>
void invoke (Symbol cmdID, ARGS &&... args)
 convenience shortcut to issue a command with several arguments
 
- Public Member Functions inherited from DiffMutable
virtual ~DiffMutable ()
 this is an interface
 
- Public Member Functions inherited from LayoutElement
virtual ~LayoutElement ()
 this is an interface
 

Protected Member Functions

void establishLayout (DisplayEvaluation &) override
 handle Phase-1 of the DisplayEvaluation pass for this track and its sub-tracks.
 
void completeLayout (DisplayEvaluation &) override
 handle Phase-2 (collect/balancing phase) for this track and its sub-tracks.
 
- Protected Member Functions inherited from Controller
virtual void doMark (GenNode const &mark) override
 default handler for all generic mark messages.
 
- Protected Member Functions inherited from Tangible
 Tangible (ID identity, ctrl::BusTerm &nexus)
 
virtual bool doExpand (bool yes)
 generic default implementation of the expand/collapse functionality.
 
virtual void doReveal ()
 generic default implementation of the "reveal" functionality.
 

Private Member Functions

void setTrackName (string name)
 invoked via diff to show a (changed) track name
 
void relinkContents ()
 second pass of the DisplayEvaluation: reassemble content to match adjusted layout
 

Private Attributes

DisplayFrame display_
 
vector< PForksubFork_
 
vector< PMarkmarkers_
 
vector< PClipclips_
 

Additional Inherited Members

- Public Types inherited from Tangible
using ID = ctrl::BusTerm::ID
 
using LuidH = lib::hash::LuidH
 
- Protected Types inherited from Tangible
using Rec = lib::diff::Rec
 
using GenNode = lib::diff::GenNode
 
- Protected Attributes inherited from Tangible
ctrl::BusTerm uiBus_
 
Expander expand_
 
Revealer reveal_
 

Constructor & Destructor Documentation

◆ TrackPresenter()

TrackPresenter ( ID  id,
ctrl::BusTerm nexus,
DisplayViewHooks displayAnchor 
)
inline
Parameters
ididentity used to refer to a corresponding session::Fork
nexusa way to connect this Controller to the UI-Bus.
anchorDisplaya one-way closure to attach into the display fabric

Definition at line 269 of file track-presenter.hpp.

References TrackPresenter::setTrackName().

+ Here is the call graph for this function:

Member Function Documentation

◆ buildMutator()

void buildMutator ( lib::diff::TreeMutator::Handle  buffer)
inlineoverridevirtual

set up a binding to respond to mutation messages via UiBus

Note
we distinguish between the contents of our four nested child collections based on the symbolic type field sent in the Record type within the diff representation
  • "Marker" designates a Marker object
  • "Clip" designates a Clip placed on this track
  • "Fork" designates a nested sub-track
  • "Ruler" designates a nested ruler (timescale, overview,....) belonging to this track
See also
TimelineController::buildMutator() for a basic explanation of the data binding mechanism

Implements Tangible.

Definition at line 314 of file track-presenter.hpp.

References stage::ATTR_name, stage::ATTR_timing, DisplayFrame::bindRulers(), TreeMutator::build(), TrackPresenter::clips_, GenNode::data, TrackPresenter::display_, PlantingHandle< BA, DEFAULT >::emplace(), DisplayFrame::getClipHook(), GenNode::idi, TrackPresenter::markers_, DataCap::recordType(), GenNode::retrieveAttribute(), TrackPresenter::setTrackName(), TrackPresenter::subFork_, stage::TYPE_Clip, stage::TYPE_Fork, stage::TYPE_Marker, and Tangible::uiBus_.

+ Here is the call graph for this function:

◆ establishLayout()

void establishLayout ( DisplayEvaluation displayEvaluation)
inlineoverrideprotectedvirtual

handle Phase-1 of the DisplayEvaluation pass for this track and its sub-tracks.

Implements LayoutElement.

Definition at line 365 of file track-presenter.hpp.

References TrackPresenter::clips_, TrackPresenter::display_, DisplayFrame::establishExtension(), DisplayEvaluation::isCollectPhase(), TrackPresenter::markers_, and TrackPresenter::subFork_.

+ Here is the call graph for this function:

◆ completeLayout()

void completeLayout ( DisplayEvaluation displayEvaluation)
inlineoverrideprotectedvirtual

handle Phase-2 (collect/balancing phase) for this track and its sub-tracks.

Implements LayoutElement.

Definition at line 375 of file track-presenter.hpp.

References TrackPresenter::display_, DisplayEvaluation::isCollectPhase(), TrackPresenter::relinkContents(), TrackPresenter::subFork_, and DisplayFrame::sync_and_balance().

+ Here is the call graph for this function:

◆ setTrackName()

void setTrackName ( string  name)
inlineprivate

invoked via diff to show a (changed) track name

Definition at line 293 of file track-presenter.hpp.

References TrackPresenter::display_, and DisplayFrame::setTrackName().

Referenced by TrackPresenter::TrackPresenter(), and TrackPresenter::buildMutator().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ relinkContents()

void relinkContents ( )
inlineprivate

second pass of the DisplayEvaluation: reassemble content to match adjusted layout

Todo:
2/2021 WIP-WIP initial draft; many aspects still unclear

Definition at line 413 of file track-presenter.hpp.

References TrackPresenter::clips_, Tangible::mark(), and TrackPresenter::markers_.

Referenced by TrackPresenter::completeLayout().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ display_

◆ subFork_

◆ markers_

◆ clips_

+ Inheritance diagram for TrackPresenter:
+ Collaboration diagram for TrackPresenter:

The documentation for this class was generated from the following file: