X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;ds=sidebyside;f=lily%2Fottava-bracket.cc;h=a2ed6b54227bdb2c85f493f0d3daa44b44b43bad;hb=d15c79e957e0cc927996ab3ba3526ef63a323b92;hp=a9df448d62f0d6023582bb3e46dc7f11ad5c6fd7;hpb=2c22efe5a46a37065b10c3f51c5d7db00d07d318;p=lilypond.git diff --git a/lily/ottava-bracket.cc b/lily/ottava-bracket.cc index a9df448d62..a2ed6b5422 100644 --- a/lily/ottava-bracket.cc +++ b/lily/ottava-bracket.cc @@ -3,11 +3,10 @@ source file of the GNU LilyPond music typesetter - (c) 2004--2005 Han-Wen Nienhuys + (c) 2004--2007 Han-Wen Nienhuys */ #include "text-interface.hh" -#include "line-spanner.hh" #include "spanner.hh" #include "font-interface.hh" #include "dimensions.hh" @@ -24,7 +23,7 @@ struct Ottava_bracket { DECLARE_SCHEME_CALLBACK (print, (SCM)); - static bool has_interface (Grob *); + DECLARE_GROB_INTERFACE (); }; /* @@ -42,7 +41,7 @@ Ottava_bracket::print (SCM smob) Interval span_points; Grob *common = me->get_bound (LEFT)->common_refpoint (me->get_bound (RIGHT), X_AXIS); - Output_def *layout = me->get_layout (); + Output_def *layout = me->layout (); Drul_array broken; Direction d = LEFT; @@ -55,7 +54,7 @@ Ottava_bracket::print (SCM smob) { extract_grob_set (b, "note-heads", heads); common = common_refpoint_of_array (heads, common, X_AXIS); - for (int i = 0; i < heads.size (); i++) + for (vsize i = 0; i < heads.size (); i++) { Grob *h = heads[i]; Grob *dots = Rhythmic_head::get_dots (h); @@ -70,7 +69,8 @@ Ottava_bracket::print (SCM smob) SCM markup = me->get_property ("text"); Stencil text; if (Text_interface::is_markup (markup)) - text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), properties, markup)); + text = *unsmob_stencil (Text_interface::interpret_markup (layout->self_scm (), + properties, markup)); Drul_array shorten = robust_scm2interval (me->get_property ("shorten-pair"), Interval (0, 0)); @@ -87,7 +87,7 @@ Ottava_bracket::print (SCM smob) if (Note_column::has_interface (b)) { extract_grob_set (b, "note-heads", heads); - for (int i = 0; i < heads.size (); i++) + for (vsize i = 0; i < heads.size (); i++) { Grob *h = heads[i]; ext.unite (h->extent (common, X_AXIS)); @@ -175,7 +175,13 @@ Ottava_bracket::print (SCM smob) return b.smobbed_copy (); } -ADD_INTERFACE (Ottava_bracket, "ottava-bracket-interface", - "An ottava bracket", - "edge-height bracket-flare shorten-pair minimum-length"); +ADD_INTERFACE (Ottava_bracket, + "An ottava bracket.", + + /* properties */ + "edge-height " + "bracket-flare " + "shorten-pair " + "minimum-length " + );