Lumiera 0.pre.04
»edit your freedom«
Loading...
Searching...
No Matches
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 100 of file timeline-layout.hpp.

Public Member Functions

 TimelineLayout (Gtk::Paned &)
 
 ~TimelineLayout ()
 
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.
 
void setupStructure (LayoutElement &)
 
Gtk::WidgetPath getBodyWidgetPath () const
 
- Public Member Functions inherited from ZoomMetric< DisplayManager >
TimeSpan coveredTime () const override
 
int translateTimeToPixels (TimeValue startTimePoint) const override
 
int translateScreenDelta (Offset timeOffset) const override
 
TimeValue applyScreenDelta (Time anchor, double deltaPx) const override
 
- Public Member Functions inherited from LayoutElement
virtual ~LayoutElement ()
 this is an interface
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

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

Additional Inherited Members

- Protected Attributes inherited from ZoomMetric< DisplayManager >
ZoomWindow zoomWindow_
 

Constructor & Destructor Documentation

◆ TimelineLayout()

TimelineLayout ( Gtk::Paned &  topLevelContainer)

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

References ZoomWindow::attachChangeNotification(), TimelineLayout::bodyCanvas_, BodyCanvasWidget::get_hadjustment(), TimelineLayout::headerPane_, TimelineLayout::sizeZoomWindow(), TimelineLayout::syncZoomWindow(), and ZoomMetric< DisplayManager >::zoomWindow_.

+ Here is the call graph for this function:

◆ ~TimelineLayout()

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

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 74 of file timeline-layout.cpp.

References TimelineLayout::bodyCanvas_, TimelineLayout::headerPane_, BodyCanvasWidget::installForkRoot(), HeaderPaneWidget::installForkRoot(), and TrackBody::signalStructureChange_.

+ Here is the call graph for this function:

◆ 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 89 of file timeline-layout.cpp.

References DisplayEvaluation::attach(), TimelineLayout::bodyCanvas_, and TimelineLayout::displayEvaluation_.

Referenced by TimelineController::TimelineController().

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

◆ getBodyWidgetPath()

Gtk::WidgetPath getBodyWidgetPath ( ) const

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

References TimelineLayout::bodyCanvas_.

◆ 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 111 of file timeline-layout.cpp.

References TimelineLayout::displayEvaluation_, and DisplayEvaluation::perform().

+ Here is the call graph for this function:

◆ establishLayout()

void establishLayout ( DisplayEvaluation )
overrideprotectedvirtual

TimelineLayout also participates itself in the DisplayEvaluation, notably to set up the basic parameters for Zoom management.

Implements LayoutElement.

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

References TimelineLayout::bodyCanvas_, BodyCanvasWidget::get_hadjustment(), TimeSpan::start(), ZoomMetric< DisplayManager >::translateTimeToPixels(), ZoomWindow::visible(), and ZoomMetric< DisplayManager >::zoomWindow_.

+ Here is the call graph for this function:

◆ completeLayout()

void completeLayout ( DisplayEvaluation )
overrideprotectedvirtual

Implements LayoutElement.

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

◆ getHeadHook()

model::ViewHook< TrackHeadWidget > & getHeadHook ( )
inlineoverrideprotected

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

◆ getBodyHook()

model::ViewHook< TrackBody > & getBodyHook ( )
inlineoverrideprotected

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

◆ getClipHook()

model::CanvasHook< Gtk::Widget > & getClipHook ( )
inlineoverrideprotected

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

References TimelineLayout::bodyCanvas_.

◆ hook() [1/2]

void hook ( TrackHeadWidget head)
overrideprotected

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

References TimelineLayout::headerPane_, and HeaderPaneWidget::installForkRoot().

+ Here is the call graph for this function:

◆ remove() [1/2]

void remove ( TrackHeadWidget )
overrideprotected

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

References HeaderPaneWidget::disable(), and TimelineLayout::headerPane_.

+ Here is the call graph for this function:

◆ rehook() [1/2]

void rehook ( TrackHeadWidget )
overrideprotectednoexcept

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

◆ hook() [2/2]

void hook ( TrackBody body)
overrideprotected

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

References TimelineLayout::bodyCanvas_, BodyCanvasWidget::installForkRoot(), and TrackBody::signalStructureChange_.

+ Here is the call graph for this function:

◆ remove() [2/2]

void remove ( TrackBody )
overrideprotected

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

References TimelineLayout::bodyCanvas_, and BodyCanvasWidget::disable().

+ Here is the call graph for this function:

◆ rehook() [2/2]

void rehook ( TrackBody )
overrideprotectednoexcept

Definition at line 205 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 144 of file timeline-layout.cpp.

References ZoomMetric< DisplayManager >::applyScreenDelta(), ZoomWindow::overallSpan(), ZoomWindow::setVisibleStart(), TimeSpan::start(), and ZoomMetric< DisplayManager >::zoomWindow_.

Referenced by TimelineLayout::TimelineLayout().

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

◆ 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 157 of file timeline-layout.cpp.

References ZoomWindow::calibrateExtension(), ZoomWindow::pxWidth(), and ZoomMetric< DisplayManager >::zoomWindow_.

Referenced by TimelineLayout::TimelineLayout().

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

Member Data Documentation

◆ paneSplitPosition_

Glib::PropertyProxy<int> paneSplitPosition_
private

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

◆ bodyCanvas_

◆ headerPane_

◆ displayEvaluation_

DisplayEvaluation displayEvaluation_
private
+ Inheritance diagram for TimelineLayout:
+ Collaboration diagram for TimelineLayout:

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