diff --git a/src/stage/timeline/stave-bracket-widget.cpp b/src/stage/timeline/stave-bracket-widget.cpp index 465673666..df5e8a631 100644 --- a/src/stage/timeline/stave-bracket-widget.cpp +++ b/src/stage/timeline/stave-bracket-widget.cpp @@ -78,6 +78,37 @@ namespace timeline { const double ARC_I_TIP = 0.7853981633974485; const double ARC_I_END = 1.2490457723982538; + /** + * Setup the base metric for this bracket drawing based on CSS styling. + * @remark the width of the double line is used as foundation to derive + * further layout properties, based on the golden ratio. + * @return scale factor to apply to the base layout + */ + double + determineScale (StyleC style) + { + UNIMPLEMENTED ("set base line width based on suitable CSS property"); + } + + double + anchorLeft (double scale) + { + UNIMPLEMENTED ("place left anchor reference line"); + } + + double + anchorUpper (double scale) + { + UNIMPLEMENTED ("place top cap vertical anchor"); + } + + double + anchorLower (double scale, int canvasHeight) + { + UNIMPLEMENTED ("place bottom cap vertical anchor"); + } + + /** * Draw the curved end cap of the bracket, inspired by musical notation. * @param ox horizontal offset of the anchor point in pixels @@ -106,6 +137,12 @@ namespace timeline { // cox->restore(); } + + void + drawBar (CairoC cox, double leftX, double upperY, double lowerY, double scale) + { + UNIMPLEMENTED ("draw the double bar"); + } } @@ -141,7 +178,15 @@ namespace timeline { cox->stroke(); /////////////////////////////////////////////TICKET #1018 : placeholder drawing - drawCap (cox, w/2.0, h/2.0, 5.0); //////////TODO proper scale and placement + StyleC style = this->get_style_context(); + double scale = determineScale (style); + double left = anchorLeft (scale); + double upper = anchorUpper (scale); + double lower = anchorLower (scale, h); + + drawCap (cox, left, upper, scale, true); //////////TODO proper scale and placement + drawCap (cox, left, lower, scale, false); //////////TODO proper scale and placement + drawBar (cox, left, upper, lower, scale); return event_is_handled; } diff --git a/src/stage/timeline/stave-bracket-widget.hpp b/src/stage/timeline/stave-bracket-widget.hpp index 387f608ea..cc1904b3e 100644 --- a/src/stage/timeline/stave-bracket-widget.hpp +++ b/src/stage/timeline/stave-bracket-widget.hpp @@ -52,7 +52,8 @@ namespace stage { namespace timeline { - using CairoC = Cairo::RefPtr const&; + using CairoC = PCairoContext const&; + using StyleC = PStyleContext const&; // class TrackPresenter; diff --git a/wiki/thinkPad.ichthyo.mm b/wiki/thinkPad.ichthyo.mm index 232ed5d7f..37fd8689a 100644 --- a/wiki/thinkPad.ichthyo.mm +++ b/wiki/thinkPad.ichthyo.mm @@ -28793,6 +28793,10 @@ + + + + @@ -28811,9 +28815,9 @@ - + - + @@ -28868,6 +28872,105 @@ + + + + + + + + + + + + + + + + + + + + + + +

+ ...um festzulegen, an welcher Stelle in der Hierarchie dieses Styling definiert ist; allerdings machen wir bereits genau dies für die Timeline im Allgemeinen (und zwar genau wegen dem custom-drawing) +

+ +
+ +
+
+ + + + + + + + + + + + + + + + + +

+ ...anders als bei den Einzel-Widgets im Timeline-Content, haben wir hier im Header nur ein StaveBracket-Widget pro Track +

+ +
+
+
+ + + + +
+
+ + + + + + + + + + + + + + + + + + + + + + +

+ das ist der Basiswert für weiteres Layout-Entscheidungen +

+ +
+ +
+
+ + + + + + + + +