![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
Implementation details of timeline custom drawing. More...
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>Namespaces | |
| namespace | stage |
| Lumiera GTK UI implementation root. | |
| namespace | stage::timeline |
| The timeline display and editing operations. | |
| namespace | stage::timeline::anonymous_namespace{body-canvas-widget.cpp} |
Typedefs | |
| using | CairoC = PCairoContext const & |
| using | StyleC = PStyleContext const & |
| using | Grounding = TrackGroundingRenderer |
| using | Overlay = TrackOverlayRenderer |
Classes | |
| class | AbstractTrackRenderer |
| class | TrackGroundingRenderer |
| class | TrackOverlayRenderer |
Functions | |
| cuString | slopeClassName (int depth) |
| void | setupAdditionalTrackPadding_fromCSS () |
| Adjust the vertical space to accommodate for additional decorations as required by the CSS style rules. | |
| template<class PINT , bool isRuler> | |
| auto | makeRenderer (DisplayManager &layout, BodyCanvasWidget::ProfileGetter &getProfile) |
Variables | |
| const int | INITIAL_TIMERULER_HEIGHT_px = 30 |
| const int | INITIAL_CONTENT_HEIGHT_px = 100 |
| const int | MINIMAL_CONTENT_WIDTH_px = 100 |
| 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)"} |
| const uint | SLOPE_CAP_DEPTH = 5 |
| const bool | RULER = true |
| const bool | BODY = false |