![]() |
Lumiera 0.pre.04
»edit your freedom«
|
#include "stage/timeline/body-canvas-widget.hpp"
Presentation of the timeline workspace by custom drawing on a canvas.
This widget allows for uniform access and handling of that body area; however, in fact we need several TimelineCanvas spaces, since part of the display needs to stay "pinned" on top (the overview rulers), while the majority of the track body area is packaged into a scrolling pane.
We have to distinguish two kinds of drawing access to this BodyCanvasWidget:
Definition at line 130 of file body-canvas-widget.hpp.
Public Types | |
| using | ProfileGetter = std::function< TrackProfile &()> |
| a way to get and possibly (re)compute the current TrackProfile | |
Public Member Functions | |
| BodyCanvasWidget (DisplayManager &) | |
| ~BodyCanvasWidget () | |
| void | installForkRoot (TrackBody &rootTrackBody) |
| 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. | |
| void | forceRedraw () |
| void | disable () |
| auto | get_vadjustment () |
| auto | get_hadjustment () |
Public Member Functions inherited from CanvasHook< Gtk::Widget > | |
| virtual | ~CanvasHook () |
| this is an interface | |
| virtual CanvasHook< Gtk::Widget > & | getAnchorHook () noexcept |
| Anchor point to build chains of related View Hooks. | |
| Pos | hookedAt (int x, int y) |
| Pos | hookedAt (Time start, int downshift=0) |
| build the "construction hook" for a CanvasHooked element, which is to be attached to some timeline canvas view. | |
Public Member Functions inherited from LayoutElement | |
| virtual | ~LayoutElement () |
| this is an interface | |
Protected Member Functions | |
| void | hook (Gtk::Widget &, int xPos=0, int yPos=0) override |
| void | move (Gtk::Widget &, int xPos, int yPos) override |
| void | remove (Gtk::Widget &) override |
| model::DisplayMetric & | getMetric () const override |
| access the component to handle layout metric | |
| void | establishLayout (DisplayEvaluation &) override |
| respond to the DisplayEvaluation pass. | |
| void | completeLayout (DisplayEvaluation &) override |
Private Member Functions | |
| TimelineCanvas & | getCanvas (int yPos) |
| void | slotStructureChange () noexcept |
| force rebuilding of theTrackProfile whenever the global timeline structure changes | |
| void | maybeRebuildLayout () |
| Possibly (re)build the allocation and distribution of layout space. | |
| void | adjustCanvasSize (int canvasWidth, int totalHeight, int rulerHeight) |
| After the (recent) display evaluation pass has negotiated the required space for the currently presented content, this function adjusts the actual Gtk::Layout canvas extension to match. | |
Private Attributes | |
| DisplayManager & | layout_ |
| TrackProfile | profile_ |
| TrackBody * | rootBody_ |
| Gtk::ScrolledWindow | contentArea_ |
| Gtk::ScrolledWindow | rulerArea_ |
| TimelineCanvas | rulerCanvas_ |
| TimelineCanvas | mainCanvas_ |
| ProfileGetter | getProfile |
| BodyCanvasWidget | ( | DisplayManager & | displayManager | ) |
Definition at line 444 of file body-canvas-widget.cpp.
References BodyCanvasWidget::adjustCanvasSize(), stage::CLASS_timeline, stage::CLASS_timeline_body, BodyCanvasWidget::contentArea_, BodyCanvasWidget::getProfile, BodyCanvasWidget::layout_, BodyCanvasWidget::mainCanvas_, BodyCanvasWidget::maybeRebuildLayout(), BodyCanvasWidget::profile_, BodyCanvasWidget::rulerArea_, BodyCanvasWidget::rulerCanvas_, DisplayManager::signalStructureChange_, and BodyCanvasWidget::slotStructureChange().
Here is the call graph for this function:| ~BodyCanvasWidget | ( | ) |
Definition at line 441 of file body-canvas-widget.cpp.
| using ProfileGetter = std::function<TrackProfile&()> |
a way to get and possibly (re)compute the current TrackProfile
Definition at line 158 of file body-canvas-widget.hpp.
| void installForkRoot | ( | TrackBody & | rootTrackBody | ) |
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.
Initially install the contents corresponding to the root track fork
This recursively nested structure is parallelled in the way we organise and draw the timeline representation onto the TimelineCanvas: we use an intermediary entity, the TrackBody as an organisational grouping device, even while we draw all of the timeline representation onto a single global mainCanvas_ within the (scrollable) contentArea_. Thus, adding the first TrackBody to represent the root track of a Timeline, will also prepare the grounding for any other nested entities to be drawn on top.
Definition at line 500 of file body-canvas-widget.cpp.
References BodyCanvasWidget::rootBody_.
Referenced by TimelineLayout::hook(), and TimelineLayout::installRootTrack().
Here is the caller graph for this function:| void forceRedraw | ( | ) |
Definition at line 569 of file body-canvas-widget.cpp.
References BodyCanvasWidget::mainCanvas_, and BodyCanvasWidget::rulerCanvas_.
| void disable | ( | ) |
Definition at line 506 of file body-canvas-widget.cpp.
References TrackProfile::clear(), BodyCanvasWidget::profile_, and BodyCanvasWidget::rootBody_.
Referenced by TimelineLayout::remove().
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
allow the header pane to follow our vertical scrolling movement
Definition at line 154 of file body-canvas-widget.hpp.
References BodyCanvasWidget::contentArea_.
|
inline |
Definition at line 155 of file body-canvas-widget.hpp.
References BodyCanvasWidget::contentArea_.
Referenced by TimelineLayout::TimelineLayout(), and TimelineLayout::establishLayout().
Here is the caller graph for this function:
|
overrideprotectedvirtual |
Implements CanvasHook< Gtk::Widget >.
Definition at line 585 of file body-canvas-widget.cpp.
References BodyCanvasWidget::getCanvas().
Here is the call graph for this function:
|
overrideprotectedvirtual |
Implements CanvasHook< Gtk::Widget >.
Definition at line 599 of file body-canvas-widget.cpp.
References BodyCanvasWidget::getCanvas().
Here is the call graph for this function:
|
overrideprotectedvirtual |
Implements CanvasHook< Gtk::Widget >.
Definition at line 592 of file body-canvas-widget.cpp.
References BodyCanvasWidget::getCanvas().
Here is the call graph for this function:
|
overrideprotectedvirtual |
access the component to handle layout metric
Implements CanvasHook< Gtk::Widget >.
Definition at line 606 of file body-canvas-widget.cpp.
References BodyCanvasWidget::layout_.
|
overrideprotectedvirtual |
respond to the DisplayEvaluation pass.
TODO: anything to publish into the DisplayEvaluation ??
Implements LayoutElement.
Definition at line 617 of file body-canvas-widget.cpp.
References BodyCanvasWidget::adjustCanvasSize(), TrackBody::calcRulerHeight(), PixSpan::delta(), TrackBody::establishTrackSpace(), DisplayManager::getPixSpan(), BodyCanvasWidget::layout_, BodyCanvasWidget::profile_, and BodyCanvasWidget::rootBody_.
Here is the call graph for this function:
|
overrideprotectedvirtual |
Implements LayoutElement.
Definition at line 628 of file body-canvas-widget.cpp.
|
private |
Definition at line 576 of file body-canvas-widget.cpp.
References BodyCanvasWidget::mainCanvas_.
Referenced by BodyCanvasWidget::hook(), BodyCanvasWidget::move(), and BodyCanvasWidget::remove().
Here is the caller graph for this function:
|
privatenoexcept |
force rebuilding of theTrackProfile whenever the global timeline structure changes
Definition at line 515 of file body-canvas-widget.cpp.
References TrackProfile::clear(), and BodyCanvasWidget::profile_.
Referenced by BodyCanvasWidget::BodyCanvasWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Possibly (re)build the allocation and distribution of layout space.
Check the internal trigger flag and recalculate the extension of relevant parts.
Definition at line 527 of file body-canvas-widget.cpp.
References BodyCanvasWidget::layout_, BodyCanvasWidget::profile_, BodyCanvasWidget::rootBody_, and DisplayManager::triggerDisplayEvaluation().
Referenced by BodyCanvasWidget::BodyCanvasWidget().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
After the (recent) display evaluation pass has negotiated the required space for the currently presented content, this function adjusts the actual Gtk::Layout canvas extension to match.
Note that we use two Gtk::Layout controls, one to show the overview rules always visible at the top, while the second one is placed into a scrollable pane to accommodate an arbitrary number of tracks.
Definition at line 547 of file body-canvas-widget.cpp.
References BodyCanvasWidget::mainCanvas_, and BodyCanvasWidget::rulerCanvas_.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), and BodyCanvasWidget::establishLayout().
Here is the caller graph for this function:
|
private |
Definition at line 135 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), BodyCanvasWidget::establishLayout(), BodyCanvasWidget::getMetric(), and BodyCanvasWidget::maybeRebuildLayout().
|
private |
Definition at line 136 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), BodyCanvasWidget::disable(), BodyCanvasWidget::establishLayout(), BodyCanvasWidget::maybeRebuildLayout(), and BodyCanvasWidget::slotStructureChange().
|
private |
Definition at line 137 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::disable(), BodyCanvasWidget::establishLayout(), BodyCanvasWidget::installForkRoot(), and BodyCanvasWidget::maybeRebuildLayout().
|
private |
Definition at line 139 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), BodyCanvasWidget::get_hadjustment(), and BodyCanvasWidget::get_vadjustment().
|
private |
Definition at line 140 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget().
|
private |
Definition at line 141 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), BodyCanvasWidget::adjustCanvasSize(), and BodyCanvasWidget::forceRedraw().
|
private |
Definition at line 142 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget(), BodyCanvasWidget::adjustCanvasSize(), BodyCanvasWidget::forceRedraw(), and BodyCanvasWidget::getCanvas().
|
private |
Definition at line 175 of file body-canvas-widget.hpp.
Referenced by BodyCanvasWidget::BodyCanvasWidget().
Inheritance diagram for BodyCanvasWidget:
Collaboration diagram for BodyCanvasWidget: