Lumiera
0.pre.03
»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 139 of file body-canvas-widget.hpp.
Public Member Functions | |
BodyCanvasWidget (DisplayManager &) | |
void | disable () |
void | forceRedraw () |
auto | get_hadjustment () |
auto | get_vadjustment () |
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. 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_. More... | |
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. More... | |
Public Member Functions inherited from LayoutElement | |
virtual | ~LayoutElement () |
this is an interface | |
Protected Member Functions | |
void | completeLayout (DisplayEvaluation &) override |
void | establishLayout (DisplayEvaluation &) override |
respond to the DisplayEvaluation pass. More... | |
model::DisplayMetric & | getMetric () const override |
access the component to handle layout metric | |
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 |
Private Types | |
using | ProfileGetter = std::function< TrackProfile &()> |
a way to get and possibly (re)compute the current TrackProfile | |
Private Member Functions | |
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. More... | |
TimelineCanvas & | getCanvas (int yPos) |
void | maybeRebuildLayout () |
Possibly (re)build the allocation and distribution of layout space. More... | |
void | slotStructureChange () noexcept |
force rebuilding of theTrackProfile whenever the global timeline structure changes | |
Private Attributes | |
Gtk::ScrolledWindow | contentArea_ |
ProfileGetter | getProfile |
DisplayManager & | layout_ |
TimelineCanvas | mainCanvas_ |
TrackProfile | profile_ |
TrackBody * | rootBody_ |
Gtk::ScrolledWindow | rulerArea_ |
TimelineCanvas | rulerCanvas_ |
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. 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_.
Initially install the contents corresponding to the root track fork
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 509 of file body-canvas-widget.cpp.
|
inline |
allow the header pane to follow our vertical scrolling movement
Definition at line 163 of file body-canvas-widget.hpp.
|
overrideprotectedvirtual |
respond to the DisplayEvaluation pass.
TODO: anything to publish into the DisplayEvaluation ??
Implements LayoutElement.
Definition at line 626 of file body-canvas-widget.cpp.
|
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 536 of file body-canvas-widget.cpp.
|
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 556 of file body-canvas-widget.cpp.