Lumiera  0.pre.03
»edit your freedom«
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 261 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 More...
 
- Public Member Functions inherited from Tangible
virtual ~Tangible ()
 this is an interface
 
void clearErr ()
 invoke the hook to clear error markers More...
 
void clearMsg ()
 invoke the hook to clear notification messages More...
 
ID getID () const
 
void installExpander (Expander::ProbeFun, Expander::ChangeFun)
 Configure the (optional) functionality to expand or collapse the UI-Element. More...
 
void installRevealer (Revealer::RevealeItFun)
 Configure the (optional) functionality to bring the UI-Element into sight. More...
 
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. More...
 
template<typename... ARGS>
void invoke (Symbol cmdID, ARGS &&... args)
 convenience shortcut to issue a command with several arguments
 
void mark (GenNode const &)
 generic handler for all incoming "state mark" messages
 
void markErr (string error)
 push an error state tag to the element More...
 
void markFlash ()
 highlight the element visually to catch the user's attention More...
 
void markMsg (string message)
 push a notification (or warning) message to the element. More...
 
 operator LuidH () const
 
 operator string () const
 diagnostic representation. More...
 
void reset ()
 invoke the generic reset hook More...
 
void slotCollapse ()
 Collapse or minimise this element and remember the collapsed state. More...
 
void slotExpand ()
 Expand this element and remember the expanded state. More...
 
void slotReveal ()
 Cause the element to be brought into sight. More...
 
- 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 completeLayout (DisplayEvaluation &) override
 handle Phase-2 (collect/balancing phase) for this track and its sub-tracks. More...
 
void establishLayout (DisplayEvaluation &) override
 handle Phase-1 of the DisplayEvaluation pass for this track and its sub-tracks. More...
 
- Protected Member Functions inherited from Controller
virtual void doMark (GenNode const &mark) override
 default handler for all generic mark messages. More...
 
- 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. More...
 
virtual void doReveal ()
 generic default implementation of the "reveal" functionality. More...
 

Private Member Functions

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

Private Attributes

vector< PClip > clips_
 
DisplayFrame display_
 
vector< PMark > markers_
 
vector< PFork > subFork_
 

Additional Inherited Members

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

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 278 of file track-presenter.hpp.

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 323 of file track-presenter.hpp.

References TreeMutator::build(), lib::diff::anonymous_namespace{tree-mutator-collection-binding.hpp}::collection(), PlantingHandle< BA, DEFAULT >::emplace(), DataCap::recordType(), and GenNode::retrieveAttribute().

+ 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 374 of file track-presenter.hpp.

◆ completeLayout()

void completeLayout ( DisplayEvaluation displayEvaluation)
inlineoverrideprotectedvirtual

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

Implements LayoutElement.

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

◆ 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 422 of file track-presenter.hpp.

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

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