Lumiera  0.pre.03
»edit your freedom«
TrackHeadWidget Class Reference

#include "stage/timeline/track-head-widget.hpp"

Description

Header pane control area corresponding to a Track with nested child Tracks.

This structure is used recursively to build up the Fork of nested Tracks.

  • first row: Placement + Property pane
  • second row: content or nested tracks.
    Todo:
    WIP-WIP as of 12/2016

Definition at line 71 of file track-head-widget.hpp.

Public Member Functions

void accommodateContentHeight (uint)
 
void accommodateOverallHeight (uint)
 
uint getContentHeight () const
 
uint getOverallHeight () const
 
void setTrackName (cuString &)
 
void syncSubtrackStartHeight (uint)
 The first part of each track's display relates to the direct content; below that area, the content of sub-tracks may be added. More...
 
- Public Member Functions inherited from ViewHook< TrackHeadWidget >
virtual ~ViewHook ()
 this is an interface
 
virtual void hook (TrackHeadWidget &widget)=0
 
virtual void rehook (TrackHeadWidget &widget) noexcept=0
 
virtual void remove (TrackHeadWidget &widget)=0
 
void reOrder (IT newOrder)
 re-attach elements in a given, new order. More...
 

Private Member Functions

void attachSubFork (TrackHeadWidget &subForkHead)
 Integrate the control area for a nested sub track fork. More...
 
void clearFork ()
 Discard all nested sub track display widgets. More...
 
void detachSubFork (TrackHeadWidget &subForkHead)
 
void enforceContentHeight (uint h)
 
void enforceExpansionHeight (uint h)
 
void enforceHeightAt (int left, int top, uint height)
 
void enforceSyncPadHeight (uint h)
 
uint getExpansionHeight () const
 
uint getHeightAt (int left, int top) const
 get the height allocated at cell(x,y)
 
uint getLabelHeight () const
 
uint getSyncPadHeight () const
 
void hook (TrackHeadWidget &) override
 
void linkSubTrackPositions (uint)
 Coordinate the exact positions of sub-Track start during DisplayEvaluaton. More...
 
void rehook (TrackHeadWidget &) noexcept override
 
void remove (TrackHeadWidget &) override
 

Private Attributes

uint childCnt_
 
HeadControlArea headCtrl_
 
Gtk::Box padding_
 
StaveBracketWidget structure_
 
widget::ElementBoxWidget trackName_
 

Member Function Documentation

◆ rehook()

void rehook ( TrackHeadWidget hookedSubHead)
overrideprivatenoexcept
Remarks
This implementation will not interfere with the widget's lifecycle. The widget with all its children is just detached from presentation (leaving an empty grid cell), and immediately re-attached into the "bottom most" cell, as given by the current childCnt_
Note
in theory it is possible to end up with several widgets in a single cell, and GTK can handle that. Given our actual usage of these functions, such should never happen, since we manage all widgets as slave of the model::Tangible in charge.

Definition at line 274 of file track-head-widget.cpp.

◆ getContentHeight()

uint getContentHeight ( ) const
inline
Remarks
the cell(1,1) is guaranteed to exist; it may be empty, or hold the placement controls for this track's scope.

Definition at line 129 of file track-head-widget.hpp.

◆ syncSubtrackStartHeight()

void syncSubtrackStartHeight ( uint  directHeight)

The first part of each track's display relates to the direct content; below that area, the content of sub-tracks may be added.

This function possibly adds further padding to shift the sub-track headers down to correspond to the display of the sub track body content.

Parameters
directHeightthe vertical space to use for direct content

Definition at line 158 of file track-head-widget.cpp.

◆ attachSubFork()

void attachSubFork ( TrackHeadWidget subForkHead)
private

Integrate the control area for a nested sub track fork.

Remarks
The Lumiera Timeline model does not rely on a list of tracks, as most conventional video editing software does – rather, each sequence holds a fork of nested scopes. In the header pane, this recursively nested structure is reflected as nested Gtk::Grid widgets, populated for each track with initially three rows:
  • a row holding the Track Header label and menu (actually an ElementBoxWidget)
  • a row corresponding to the content area of the track itself, to hold the controls to govern this track's scope, i.e. the track together with all nested sub-tracks.
  • a padding row to help synchronising track head and track body display.
  • Additional sub-Tracks are added as additional lines to the grid, while deeper nested sub-Tracks will be handled by the corresponding nested TrackHeadWidget. The column to the left side will be increased accordingly to display the nested fork structure.
Note
Child tracks are always appended. When tracks are reordered or deleted, the whole structure has to be re-built accordingly.

Definition at line 204 of file track-head-widget.cpp.

◆ detachSubFork()

void detachSubFork ( TrackHeadWidget subForkHead)
private

remove a complete sub-fork from display.

Remarks
due to the automatic ref-counting system of GTK+, it is sufficient just to remove the entry from the Gtk::Container baseclass, which automatically decrements the refcount; alternatively we could as well destroy the Gtkmm wrapper-Object (i.e. the Gtk::Widget subclass), since this also destroys the underlying gobj and automatically detaches it from any container. (however, here this isn't necessary, since the TrackHeadWidget is managed by the DisplayFrame)

Definition at line 225 of file track-head-widget.cpp.

◆ clearFork()

void clearFork ( )
private

Discard all nested sub track display widgets.

Definition at line 237 of file track-head-widget.cpp.

◆ linkSubTrackPositions()

void linkSubTrackPositions ( uint  discrepancy)
private

Coordinate the exact positions of sub-Track start during DisplayEvaluaton.

Note
assuming that layout for all sub-Tracks is already final when called
Parameters
discrepancyadditional vertical offset incurred to reach a nominal height; this value is interspersed between the content cells and above the Children

Definition at line 172 of file track-head-widget.cpp.

+ Inheritance diagram for TrackHeadWidget:
+ Collaboration diagram for TrackHeadWidget:

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