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

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

Description

Description of the structure and arrangement of tracks for display in the UI.

This sequence of verb tokens especially details the profile of a vertical cross-section; the nested structure of the track fork is translated into a series of steps and insets, running alongside the timeline display. To decouple the drawing code – thus allowing for later customisations – we let the individual TrackBody elements just emit these structure description.

Todo:

WIP-WIP as of 4/2019

the number of pinned elements should be a member field, instead of sneaking it into the prelude element...

Definition at line 78 of file track-profile.hpp.

Public Member Functions

bool empty () const
 
void clear () noexcept
 
void performWith (ProfileInterpreter &interpreter)
 
void performWith (ProfileInterpreter &interpreter, bool isRulerSegment)
 A variation of standard evaluation, only rendering one segment of the profile.
 
void addSlopeDown ()
 
void addSlopeUp ()
 
uint getPrecedingSlopeUp ()
 
void markPrefixEnd ()
 

Private Types

using SlopeVerb = lib::VerbPack< ProfileInterpreter, void, ProfileInterpreter::MAX_ARG_SIZE >
 
using Elements = std::vector< SlopeVerb >
 

Private Member Functions

template<typename FUN , typename... ARGS>
void append (FUN &&handler, Literal token, ARGS &&... params)
 
bool lastEntryIs (Literal expectedToken)
 
void incrementLastCloseSlope ()
 
auto filterSegment (bool selectPrefixPart)
 

Private Attributes

Elements elements
 
int pinnedPrefixCnt = 0
 

Member Typedef Documentation

◆ SlopeVerb

◆ Elements

using Elements = std::vector<SlopeVerb>
private

Definition at line 81 of file track-profile.hpp.

Member Function Documentation

◆ empty()

bool empty ( ) const
inline

Definition at line 90 of file track-profile.hpp.

References TrackProfile::elements.

◆ clear()

void clear ( )
inlinenoexcept

Definition at line 96 of file track-profile.hpp.

References TrackProfile::elements.

Referenced by BodyCanvasWidget::disable(), and BodyCanvasWidget::slotStructureChange().

+ Here is the caller graph for this function:

◆ performWith() [1/2]

void performWith ( ProfileInterpreter interpreter)
inline

Definition at line 102 of file track-profile.hpp.

References TrackProfile::elements.

◆ performWith() [2/2]

void performWith ( ProfileInterpreter interpreter,
bool  isRulerSegment 
)
inline

A variation of standard evaluation, only rendering one segment of the profile.

The prelude verb defines a special prefix part of the track profile, which is assumed to correspond to the timecode ruler tracks. These special overview tracks are rendered always visible at the top of the timeline, even when scrolling down on large arrangements with several tracks. Effectively this means we have to split the TrackProfile into two segments, which are to be rendered within two distinct TimelineCanvas widgets (the first one always on top, while the second one with the actual track content is shown within a pane with scrollbars).

Parameters
selectRulerdecide if this evaluation shall render the overview rulers (when given true) or alternatively the remaining standard body part of the timeline (when given false).

Definition at line 221 of file track-profile.hpp.

References TrackProfile::filterSegment().

+ Here is the call graph for this function:

◆ append()

template<typename FUN , typename... ARGS>
void append ( FUN &&  handler,
Literal  token,
ARGS &&...  params 
)
inlineprivate

Definition at line 116 of file track-profile.hpp.

References TrackProfile::elements.

◆ addSlopeDown()

void addSlopeDown ( )
inline

Definition at line 139 of file track-profile.hpp.

Referenced by TrackBody::establishTrackSpace().

+ Here is the caller graph for this function:

◆ addSlopeUp()

void addSlopeUp ( )
inline

Definition at line 145 of file track-profile.hpp.

References TrackProfile::incrementLastCloseSlope(), and TrackProfile::lastEntryIs().

Referenced by TrackBody::establishTrackSpace().

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

◆ getPrecedingSlopeUp()

uint getPrecedingSlopeUp ( )
inline

Definition at line 154 of file track-profile.hpp.

References TrackProfile::elements, and TrackProfile::lastEntryIs().

Referenced by TrackBody::establishTrackSpace().

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

◆ markPrefixEnd()

void markPrefixEnd ( )
inline

Definition at line 162 of file track-profile.hpp.

References TrackProfile::elements, and TrackProfile::pinnedPrefixCnt.

Referenced by TrackBody::establishTrackSpace().

+ Here is the caller graph for this function:

◆ lastEntryIs()

bool lastEntryIs ( Literal  expectedToken)
inlineprivate

Definition at line 169 of file track-profile.hpp.

References TrackProfile::elements.

Referenced by TrackProfile::addSlopeUp(), TrackProfile::getPrecedingSlopeUp(), and TrackProfile::incrementLastCloseSlope().

+ Here is the caller graph for this function:

◆ incrementLastCloseSlope()

void incrementLastCloseSlope ( )
inlineprivate

Definition at line 176 of file track-profile.hpp.

References TrackProfile::elements, and TrackProfile::lastEntryIs().

Referenced by TrackProfile::addSlopeUp().

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

◆ filterSegment()

auto filterSegment ( bool  selectPrefixPart)
inlineprivate

Definition at line 185 of file track-profile.hpp.

References TrackProfile::elements, lib::explore(), and TrackProfile::pinnedPrefixCnt.

Referenced by TrackProfile::performWith().

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

Member Data Documentation

◆ elements

◆ pinnedPrefixCnt

int pinnedPrefixCnt = 0
private

Definition at line 84 of file track-profile.hpp.

Referenced by TrackProfile::filterSegment(), and TrackProfile::markPrefixEnd().

+ Collaboration diagram for TrackProfile:

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