X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftuplet-bracket.cc;h=a1886620be8d59a135d154a372b4a556e95e9742;hb=8aa22bbddc78ee71ead7bb3b29decafdc176f520;hp=188496c0dde19dde03911eac2cbe7d152cb2ef9e;hpb=0fe24db3936774a8fb913cb14c997036db7aeb1c;p=lilypond.git diff --git a/lily/tuplet-bracket.cc b/lily/tuplet-bracket.cc index 188496c0dd..a1886620be 100644 --- a/lily/tuplet-bracket.cc +++ b/lily/tuplet-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 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify @@ -133,7 +133,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_connect_to_neighbors, 1); SCM Tuplet_bracket::calc_connect_to_neighbors (SCM smob) { - Spanner *me = Spanner::unsmob (smob); + Spanner *me = unsmob (smob); Direction dir = get_grob_direction (me); Drul_array bounds (get_x_bound_item (me, LEFT, dir), @@ -184,7 +184,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_x_positions, 1) SCM Tuplet_bracket::calc_x_positions (SCM smob) { - Spanner *me = Spanner::unsmob (smob); + Spanner *me = unsmob (smob); extract_grob_set (me, "note-columns", columns); Grob *commonx = get_common_x (me); @@ -255,7 +255,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, print, 1); SCM Tuplet_bracket::print (SCM smob) { - Spanner *me = Spanner::unsmob (smob); + Spanner *me = unsmob (smob); Stencil mol; extract_grob_set (me, "note-columns", columns); @@ -268,7 +268,7 @@ Tuplet_bracket::print (SCM smob) */ SCM bracket_vis_prop = me->get_property ("bracket-visibility"); bool bracket_prop = ly_scm2bool (bracket_vis_prop); // Flag, user has set bracket-visibility prop. - bool bracket = (bracket_vis_prop == ly_symbol2scm ("if-no-beam")); + bool bracket = scm_is_eq (bracket_vis_prop, ly_symbol2scm ("if-no-beam")); if (scm_is_bool (bracket_vis_prop)) bracket_visibility = bracket_prop; else if (bracket) @@ -303,7 +303,7 @@ Tuplet_bracket::print (SCM smob) Output_def *pap = me->layout (); - Grob *number_grob = Grob::unsmob (me->get_object ("tuplet-number")); + Grob *number_grob = unsmob (me->get_object ("tuplet-number")); /* Don't print the bracket when it would be smaller than the number. @@ -364,7 +364,7 @@ Tuplet_bracket::print (SCM smob) = Text_interface::interpret_markup (pap->self_scm (), properties, text); - Stencil *edge_text = Stencil::unsmob (t); + Stencil *edge_text = unsmob (t); edge_text->translate_axis (x_span[d] - x_span[LEFT], X_AXIS); edge_stencils[d] = *edge_text; @@ -632,7 +632,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy) } // Check for number-on-bracket collisions - Grob *number = Grob::unsmob (tuplets[i]->get_object ("tuplet-number")); + Grob *number = unsmob (tuplets[i]->get_object ("tuplet-number")); if (number) points.push_back (Offset (number->extent (commonx, X_AXIS).center () - x0, number->extent (commony, Y_AXIS)[dir])); @@ -651,7 +651,7 @@ Tuplet_bracket::calc_position_and_height (Grob *me_grob, Real *offset, Real *dy) // assume that if a script is avoiding slurs, it should not get placed // under a tuplet bracket - if (Grob::is_smob (scripts[i]->get_object ("slur"))) + if (unsmob (scripts[i]->get_object ("slur"))) continue; Interval script_x (scripts[i]->extent (commonx, X_AXIS)); @@ -701,7 +701,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_direction, 1); SCM Tuplet_bracket::calc_direction (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); Direction dir = Tuplet_bracket::get_default_dir (me); return scm_from_int (dir); } @@ -710,7 +710,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_positions, 1); SCM Tuplet_bracket::calc_positions (SCM smob) { - Spanner *me = Spanner::unsmob (smob); + Spanner *me = unsmob (smob); Real dy = 0.0; Real offset = 0.0; @@ -787,7 +787,7 @@ MAKE_SCHEME_CALLBACK (Tuplet_bracket, calc_cross_staff, 1); SCM Tuplet_bracket::calc_cross_staff (SCM smob) { - Grob *me = Grob::unsmob (smob); + Grob *me = unsmob (smob); extract_grob_set (me, "note-columns", cols); extract_grob_set (me, "tuplets", tuplets); @@ -806,7 +806,7 @@ Tuplet_bracket::calc_cross_staff (SCM smob) for (vsize i = 0; i < cols.size (); i++) { - Grob *stem = Grob::unsmob (cols[i]->get_object ("stem")); + Grob *stem = unsmob (cols[i]->get_object ("stem")); if (stem && to_boolean (stem->get_property ("cross-staff"))) return SCM_BOOL_T; } @@ -837,6 +837,7 @@ ADD_INTERFACE (Tuplet_bracket, "note-columns " "padding " "tuplet-number " + "scripts " "shorten-pair " "staff-padding " "thickness "