Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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

 TrackHeadWidget ()
 
 ~TrackHeadWidget ()
 
void setTrackName (cuString &)
 
uint getContentHeight () const
 
uint getOverallHeight () const
 
void accommodateContentHeight (uint)
 
void accommodateOverallHeight (uint)
 
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.
 
- Public Member Functions inherited from ViewHook< TrackHeadWidget >
virtual ~ViewHook ()
 this is an interface
 
virtual void hook (TrackHeadWidget &widget)=0
 
virtual void remove (TrackHeadWidget &widget)=0
 
virtual void rehook (TrackHeadWidget &widget) noexcept=0
 
void reOrder (IT newOrder)
 re-attach elements in a given, new order.
 

Private Member Functions

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

Private Attributes

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

Constructor & Destructor Documentation

◆ TrackHeadWidget()

◆ ~TrackHeadWidget()

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

Member Function Documentation

◆ hook()

void hook ( TrackHeadWidget subHead)
overrideprivate

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

References TrackHeadWidget::attachSubFork().

+ Here is the call graph for this function:

◆ remove()

void remove ( TrackHeadWidget subHead)
overrideprivate

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

References TrackHeadWidget::detachSubFork().

+ Here is the call graph for this function:

◆ 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.

◆ setTrackName()

void setTrackName ( cuString trackName)

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

References ElementBoxWidget::setName(), and TrackHeadWidget::trackName_.

+ Here is the call graph for this function:

◆ 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.

References TrackHeadWidget::getHeightAt().

Referenced by TrackHeadWidget::accommodateContentHeight(), TrackHeadWidget::linkSubTrackPositions(), and TrackHeadWidget::syncSubtrackStartHeight().

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

◆ getOverallHeight()

uint getOverallHeight ( ) const

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

References TrackHeadWidget::childCnt_, TrackHeadWidget::getExpansionHeight(), TrackHeadWidget::getHeightAt(), and TrackHeadWidget::getLabelHeight().

Referenced by TrackHeadWidget::accommodateOverallHeight().

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

◆ accommodateContentHeight()

void accommodateContentHeight ( uint  contentHeight)

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

References TrackHeadWidget::enforceContentHeight(), and TrackHeadWidget::getContentHeight().

+ Here is the call graph for this function:

◆ accommodateOverallHeight()

void accommodateOverallHeight ( uint  overallHeight)

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

References TrackHeadWidget::enforceExpansionHeight(), TrackHeadWidget::getLabelHeight(), TrackHeadWidget::getOverallHeight(), and TrackHeadWidget::linkSubTrackPositions().

+ Here is the call graph for this function:

◆ 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.

References TrackHeadWidget::enforceSyncPadHeight(), TrackHeadWidget::getContentHeight(), and TrackHeadWidget::getLabelHeight().

+ Here is the call graph for this function:

◆ 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.

References TrackHeadWidget::childCnt_, and TrackHeadWidget::structure_.

Referenced by TrackHeadWidget::hook().

+ Here is the caller graph for this function:

◆ 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.

References TrackHeadWidget::childCnt_, and TrackHeadWidget::structure_.

Referenced by TrackHeadWidget::remove().

+ Here is the caller graph for this function:

◆ clearFork()

void clearFork ( )
private

Discard all nested sub track display widgets.

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

References TrackHeadWidget::childCnt_, and TrackHeadWidget::structure_.

◆ 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.

References StaveBracketWidget::addConnector(), TrackHeadWidget::childCnt_, StaveBracketWidget::clearConnectors(), TrackHeadWidget::getContentHeight(), TrackHeadWidget::getHeightAt(), TrackHeadWidget::getLabelHeight(), TrackHeadWidget::getSyncPadHeight(), and TrackHeadWidget::structure_.

Referenced by TrackHeadWidget::accommodateOverallHeight().

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

◆ getHeightAt()

uint getHeightAt ( int  left,
int  top 
) const
private

get the height allocated at cell(x,y)

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

Referenced by TrackHeadWidget::getContentHeight(), TrackHeadWidget::getExpansionHeight(), TrackHeadWidget::getLabelHeight(), TrackHeadWidget::getOverallHeight(), TrackHeadWidget::getSyncPadHeight(), and TrackHeadWidget::linkSubTrackPositions().

+ Here is the caller graph for this function:

◆ enforceHeightAt()

void enforceHeightAt ( int  left,
int  top,
uint  height 
)
private

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

Referenced by TrackHeadWidget::enforceContentHeight(), TrackHeadWidget::enforceExpansionHeight(), and TrackHeadWidget::enforceSyncPadHeight().

+ Here is the caller graph for this function:

◆ getExpansionHeight()

uint getExpansionHeight ( ) const
inlineprivate

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

References TrackHeadWidget::getHeightAt().

Referenced by TrackHeadWidget::getOverallHeight().

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

◆ getSyncPadHeight()

uint getSyncPadHeight ( ) const
inlineprivate

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

References TrackHeadWidget::getHeightAt().

Referenced by TrackHeadWidget::linkSubTrackPositions().

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

◆ getLabelHeight()

uint getLabelHeight ( ) const
inlineprivate

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

References TrackHeadWidget::getHeightAt().

Referenced by TrackHeadWidget::accommodateOverallHeight(), TrackHeadWidget::getOverallHeight(), TrackHeadWidget::linkSubTrackPositions(), and TrackHeadWidget::syncSubtrackStartHeight().

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

◆ enforceContentHeight()

void enforceContentHeight ( uint  h)
inlineprivate

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

References TrackHeadWidget::enforceHeightAt().

Referenced by TrackHeadWidget::accommodateContentHeight().

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

◆ enforceSyncPadHeight()

void enforceSyncPadHeight ( uint  h)
inlineprivate

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

References TrackHeadWidget::enforceHeightAt().

Referenced by TrackHeadWidget::syncSubtrackStartHeight().

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

◆ enforceExpansionHeight()

void enforceExpansionHeight ( uint  h)
inlineprivate

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

References TrackHeadWidget::enforceHeightAt().

Referenced by TrackHeadWidget::accommodateOverallHeight().

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

Member Data Documentation

◆ trackName_

◆ structure_

◆ padding_

Gtk::Box padding_
private

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

Referenced by TrackHeadWidget::TrackHeadWidget().

◆ headCtrl_

HeadControlArea headCtrl_
private

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

Referenced by TrackHeadWidget::TrackHeadWidget().

◆ childCnt_

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

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