Lumiera
0.pre.03
»edit your freedom«
|
#include "stage/timeline/track-body.hpp"
Helper to organise and draw the space allocated for a fork of sub-tracks.
TrackBody units work together with the TimelineCanvas, which arranges all elements placed into the tracks and performs custom drawing to mark the working space available for placing those elements (Clips, Effects, Markers). A given TrackBody works with coordinates relative to its vertical starting point; coordinates on the TimelineCanvas operate from top downwards. The fundamental task of a TrackBody is to find out about its own overall height, including the overall height required by all its nested children. Moreover, the height of the content area needs to be negotiated with the actual content elements.
Definition at line 95 of file track-body.hpp.
Public Member Functions | |
void | accommodateContentHeight (uint contentExtension) |
ensure content with the given extension can be accommodated within this track's content area | |
Rulers & | bindRulers () |
uint | calcContentHeight () const |
uint | calcHeight () const |
recursively calculate the height in pixels to display this track, including all nested sub-tracks and possibly decoration/padding from CSS More... | |
uint | calcRulerHeight () const |
sum up the vertical extension required by all overview rulers. More... | |
uint | calcSubtrackHeight () const |
uint | establishTrackSpace (TrackProfile &) |
recursively establish the screen space allocation for this structure of nested tracks. More... | |
uint | getContentOffsetY () const |
void | hook (TrackBody &) override |
void | rehook (TrackBody &) noexcept override |
void | remove (TrackBody &) override |
void | setTrackName (cuString &) |
Public Member Functions inherited from ViewHook< TrackBody > | |
virtual | ~ViewHook () |
this is an interface | |
virtual void | hook (TrackBody &widget)=0 |
virtual void | rehook (TrackBody &widget) noexcept=0 |
virtual void | remove (TrackBody &widget)=0 |
void | reOrder (IT newOrder) |
re-attach elements in a given, new order. More... | |
Static Public Attributes | |
static Decoration | decoration {} |
storage for common style/padding settings | |
Public Attributes | |
DisplayManager::SignalStructureChange | signalStructureChange_ |
Private Types | |
using | PRuler = std::unique_ptr< RulerTrack > |
using | Rulers = std::vector< PRuler > |
using | SubTracks = std::vector< TrackBody * > |
Private Attributes | |
uint | contentHeight_ |
uint | contentOffset_ |
Rulers | rulers_ |
uint | startLine_ |
SubTracks | subTracks_ |
uint establishTrackSpace | ( | TrackProfile & | profile | ) |
recursively establish the screen space allocation for this structure of nested tracks.
For one, we'll have to find out about the total vertical space for each track, so to establish the vertical starting position, which is required to place clips onto the canvas.
Moreover we have to build the TrackProfile, which is an abstracted description of the sequence of track elements, akin to a vertical cross section through the track bodies. This profile is repeatedly "played back" to paint the background and overlays corresponding to each track.
This function recursively processes the tree of track bodies...
Definition at line 213 of file track-body.cpp.
|
inline |
Definition at line 121 of file track-body.hpp.
uint calcHeight | ( | ) | const |
recursively calculate the height in pixels to display this track, including all nested sub-tracks and possibly decoration/padding from CSS
Definition at line 132 of file track-body.cpp.
References TrackBody::calcContentHeight().
uint calcRulerHeight | ( | ) | const |
sum up the vertical extension required by all overview rulers.
Definition at line 156 of file track-body.cpp.
References TrackBody::decoration.
Referenced by TrackBody::calcContentHeight().
uint calcContentHeight | ( | ) | const |
Definition at line 143 of file track-body.cpp.
References TrackBody::calcRulerHeight(), and TrackBody::decoration.
Referenced by TrackBody::calcHeight().
|
inline |
Allow the TrackPresenter to manage the rulers The collection of rulers is part of the systematic UI model and thus formally a direct child of the TrackPresenter; however they are only relevant for the immediate display and interaction mechanics, thus we store them right here, close to usage site.
Definition at line 149 of file track-body.hpp.