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

#include "stage/timeline/timeline-layout.hpp"

Description

Top-level anchor point for the timeline display (widgets).

The central entity to organise concerns relevant for the presentation of the Timeline as a whole, as opposed to rendering individual tracks as part of the Timeline.

Definition at line 109 of file timeline-layout.hpp.

Public Member Functions

 TimelineLayout (Gtk::Paned &)
 
Gtk::WidgetPath getBodyWidgetPath () const
 
void installRootTrack (TrackHeadWidget &, TrackBody &)
 This function is invoked once for each new TimelineWidget, in order to build the starting point for the track widget structure, which then can be extended recursively to add further nested tracks. More...
 
void setupStructure (LayoutElement &)
 
- Public Member Functions inherited from ZoomMetric< DisplayManager >
TimeValue applyScreenDelta (Time anchor, double deltaPx) const override
 
TimeSpan coveredTime () const override
 
int translateScreenDelta (Offset timeOffset) const override
 
int translateTimeToPixels (TimeValue startTimePoint) const override
 
- Public Member Functions inherited from LayoutElement
virtual ~LayoutElement ()
 this is an interface
 

Protected Member Functions

void completeLayout (DisplayEvaluation &) override
 
void establishLayout (DisplayEvaluation &) override
 TimelineLayout also participates itself in the DisplayEvaluation, notably to set up the basic parameters for Zoom management.
 
model::ViewHook< TrackBody > & getBodyHook () override
 
model::CanvasHook< Gtk::Widget > & getClipHook () override
 
model::ViewHook< TrackHeadWidget > & getHeadHook () override
 
void hook (TrackHeadWidget &) override
 
void hook (TrackBody &) override
 
void rehook (TrackHeadWidget &) noexcept override
 
void rehook (TrackBody &) noexcept override
 
void remove (TrackHeadWidget &) override
 
void remove (TrackBody &) override
 
void triggerDisplayEvaluation () override
 Perform a complete recursive pass over all elements relevant for layout, reestablish size allocation and negotiate distribution of available space. More...
 
- Protected 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...
 
- Protected 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...
 
- Protected Member Functions inherited from LayoutElement
virtual ~LayoutElement ()
 this is an interface
 

Private Member Functions

void sizeZoomWindow (Gtk::Allocation &)
 Signal receiver (slot) to react on changes of the window screen space allocation. More...
 
void syncZoomWindow (PAdjustment)
 Signal receiver (slot) to react on scrollbar changes. More...
 

Private Attributes

BodyCanvasWidget bodyCanvas_
 
DisplayEvaluation displayEvaluation_
 
HeaderPaneWidget headerPane_
 
Glib::PropertyProxy< int > paneSplitPosition_
 

Additional Inherited Members

- Protected Attributes inherited from ZoomMetric< DisplayManager >
ZoomWindow zoomWindow_
 

Member Function Documentation

◆ installRootTrack()

void installRootTrack ( TrackHeadWidget head,
TrackBody body 
)

This function is invoked once for each new TimelineWidget, in order to build the starting point for the track widget structure, which then can be extended recursively to add further nested tracks.

anchor the display of the root track into the two display panes

The central problem for this widget hierarchy is that we have to build two matching structures in parallel...

  • the track header area ("patchbay")
  • the corresponding track body with actual content (clips)

Definition at line 83 of file timeline-layout.cpp.

◆ setupStructure()

void setupStructure ( LayoutElement forkRoot)
Remarks
wiring of the Layout/Control structure for DisplayEvaluation can be done only after the TimelineCtonroller ctor also initialised the model root

Definition at line 98 of file timeline-layout.cpp.

◆ triggerDisplayEvaluation()

void triggerDisplayEvaluation ( )
overrideprotected

Perform a complete recursive pass over all elements relevant for layout, reestablish size allocation and negotiate distribution of available space.

Remarks
this is the entry point to the so called display evaluation pass.

Definition at line 120 of file timeline-layout.cpp.

◆ syncZoomWindow()

void syncZoomWindow ( PAdjustment  hadj)
private

Signal receiver (slot) to react on scrollbar changes.

Changes the logical window position in the ZoomWindow to reflect the given #scrollPos, which is interpreted relative to the implicitly known size of the timeline canvas in pixels.

Remarks
changes to ZoomWindow parameters cause notification of the listener, thereby triggering a new DisplayEvaluation; this in turn will invoke TimelineLayout::establishLayout() eventually, accommodating changes.

Definition at line 153 of file timeline-layout.cpp.

◆ sizeZoomWindow()

void sizeZoomWindow ( Gtk::Allocation &  alloc)
private

Signal receiver (slot) to react on changes of the window screen space allocation.

Whenever an actual change to the usable window width in pixels is detected, the ZoomWindow will be re-calibrated, in turn leading to a DisplayEvaluation.

Definition at line 166 of file timeline-layout.cpp.

+ Inheritance diagram for TimelineLayout:
+ Collaboration diagram for TimelineLayout:

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