X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fvolta-bracket.cc;h=e337a34b34320c6f4a1b18b95edb205688ac399a;hb=97a0169312a260933246ab224e4f8b0969871dd5;hp=99490980e87f4c167733a34300d3fd63be99fd48;hpb=9e781b7dc83b60a543ce218aa1a5f139f74c760f;p=lilypond.git diff --git a/lily/volta-bracket.cc b/lily/volta-bracket.cc index 99490980e8..e337a34b34 100644 --- a/lily/volta-bracket.cc +++ b/lily/volta-bracket.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2014 Jan Nieuwenhuizen + Copyright (C) 1997--2015 Jan Nieuwenhuizen LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -31,7 +31,8 @@ using namespace std; #include "side-position-interface.hh" #include "directional-element-interface.hh" #include "lookup.hh" -#include "tuplet-bracket.hh" +#include "bracket.hh" +#include "lily-imports.hh" /* this is too complicated. Yet another version of side-positioning, @@ -46,7 +47,7 @@ MAKE_SCHEME_CALLBACK (Volta_bracket_interface, print, 1); SCM Volta_bracket_interface::print (SCM smob) { - Spanner *me = unsmob_spanner (smob); + Spanner *me = unsmob (smob); Spanner *orig_span = dynamic_cast (me->original ()); bool broken_first_bracket = orig_span && (orig_span->broken_intos_[0] == (Spanner *)me); @@ -93,12 +94,9 @@ Volta_bracket_interface::print (SCM smob) Offset start; start[X_AXIS] = me->spanner_length () - left; - /* - ugh, Tuplet_bracket should use Horizontal_bracket, not the other way around. - */ Stencil total - = Tuplet_bracket::make_bracket (me, Y_AXIS, start, - edge_height, empty, flare, shorten); + = Bracket::make_bracket (me, Y_AXIS, start, edge_height, empty, + flare, shorten); if (!orig_span || broken_first_bracket) { @@ -106,7 +104,7 @@ Volta_bracket_interface::print (SCM smob) SCM properties = me->get_property_alist_chain (SCM_EOL); SCM snum = Text_interface::interpret_markup (layout->self_scm (), properties, text); - Stencil num = *unsmob_stencil (snum); + Stencil num = *unsmob (snum); num.align_to (Y_AXIS, UP); num.translate_axis (-0.5, Y_AXIS); total.add_at_edge (X_AXIS, LEFT, num, - num.extent (X_AXIS).length () @@ -137,8 +135,8 @@ Volta_bracket_interface::modify_edge_height (Spanner *me) else str = "|"; - no_vertical_end |= ly_scm2bool (scm_call_1 (ly_lily_module_constant ("volta-bracket::calc-hook-visibility"), - ly_string2scm (str))); + no_vertical_end |= ly_scm2bool (Lily::volta_bracket_calc_hook_visibility + (ly_string2scm (str))); if (no_vertical_end || no_vertical_start) {