Lumiera
0.pre.03
»edit your freedom«
|
Go to the source code of this file.
Implementation details of timeline custom drawing.
This translation unit holds the central part of the timeline custom drawing code. While the timeline::TimelineCanvas implementation functions (bottom part of the source) govern the high-level invocation control structure and [entry point](}ref TimelineCancas::on_draw()), the actual drawing is performed by the implementation code within timeline::BodyCanvasWidget, which in turn delegates to the actual drawing mechanism – implemented in the local namespace at the top of this file. The actual drawing is decomposed into some building blocks, like drawing a background, drawing an inset slope etc. These blocks are activated with the help of the timeline::TrackProfile, which in fact enacts a visitor (double-dispatch) mechanism. The actual track profile is a sequence of verbs describing the structure of a vertical cross-section over the track space; it is assembled at runtime within the function timeline::TrackBody::establishTrackSpace(), based on specifications drawn from the real CSS layout definitions. Here, within this translation unit, we define the corresponding timeline::ProfileInterpreter implementations; these are the concrete visitors and are invoked repeatedly to carry out the actual drawing requests.
Definition in file body-canvas-widget.cpp.
#include "stage/gtk-base.hpp"
#include "stage/timeline/body-canvas-widget.hpp"
#include "stage/timeline/display-manager.hpp"
#include "stage/timeline/track-profile.hpp"
#include "stage/timeline/track-body.hpp"
#include "stage/style-scheme.hpp"
#include "common/advice.hpp"
#include "lib/util.hpp"
#include <utility>
Classes | |
class | AbstractTrackRenderer |
class | TrackGroundingRenderer |
class | TrackOverlayRenderer |
Typedefs | |
using | CairoC = PCairoContext const & |
using | Grounding = TrackGroundingRenderer |
using | Overlay = TrackOverlayRenderer |
using | StyleC = PStyleContext const & |
Functions | |
template<class PINT , bool isRuler> | |
auto | makeRenderer (DisplayManager &layout, BodyCanvasWidget::ProfileGetter &getProfile) |
void | setupAdditionalTrackPadding_fromCSS () |
Adjust the vertical space to accommodate for additional decorations as required by the CSS style rules. More... | |
cuString | slopeClassName (int depth) |
Variables | |
const bool | BODY = false |
const int | INITIAL_CONTENT_HEIGHT_px = 100 |
const int | INITIAL_TIMERULER_HEIGHT_px = 30 |
const int | MINIMAL_CONTENT_WIDTH_px = 100 |
const bool | RULER = true |
const uint | SLOPE_CAP_DEPTH = 5 |
lumiera::advice::Request< PStyleContext > | trackBodyStyle {"style(trackBody)"} |
request a pre-defined CSS style context for the track body | |
lumiera::advice::Request< PStyleContext > | trackRulerStyle {"style(trackRuler)"} |
Namespaces | |
stage | |
Lumiera GTK UI implementation root. | |
stage::timeline | |
The timeline display and editing operations. | |