X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Ftuplet-number.cc;h=2972942ee346169e681908f838fa31b618d4afd8;hb=b430c32d29caa72a7ae3f679f1f62066c1ebfa95;hp=a08c37dd3e1d0a96b3485cda7102a8a4bf5b6e59;hpb=e344ae579fa1d81fc6c6f3049494697872fd39f9;p=lilypond.git diff --git a/lily/tuplet-number.cc b/lily/tuplet-number.cc index a08c37dd3e..2972942ee3 100644 --- a/lily/tuplet-number.cc +++ b/lily/tuplet-number.cc @@ -1,10 +1,21 @@ /* - tuplet-number.cc -- implement Tuplet_number + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2005--2011 Han-Wen Nienhuys - (c) 2005--2008 Han-Wen Nienhuys + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "tuplet-bracket.hh" @@ -20,14 +31,13 @@ struct Tuplet_number DECLARE_SCHEME_CALLBACK (calc_cross_staff, (SCM)); DECLARE_GROB_INTERFACE (); }; - MAKE_SCHEME_CALLBACK (Tuplet_number, print, 1); -SCM +SCM Tuplet_number::print (SCM smob) { Spanner *me = unsmob_spanner (smob); - Spanner *tuplet = unsmob_spanner (me->get_object ("bracket")); + Spanner *tuplet = unsmob_spanner (me->get_object ("bracket")); if (!tuplet || !tuplet->is_live ()) { @@ -41,7 +51,7 @@ Tuplet_number::print (SCM smob) stc->align_to (X_AXIS, CENTER); stc->align_to (Y_AXIS, CENTER); - SCM cpoints = tuplet->get_property ("control-points"); + SCM cpoints = tuplet->get_property ("control-points"); Drul_array points; if (scm_is_pair (cpoints)) { @@ -53,7 +63,7 @@ Tuplet_number::print (SCM smob) programming_error ("wrong type for control-points"); } stc->translate ((points[RIGHT] + points[LEFT]) / 2); - + return stc_scm; } @@ -66,10 +76,11 @@ Tuplet_number::calc_cross_staff (SCM smob) } ADD_INTERFACE (Tuplet_number, - "The number for a bracket.", + "The number for a bracket.", - /* properties */ - "avoid-slur " // UGH. - "bracket " - ); + /* properties */ + "avoid-slur " // UGH. + "bracket " + "direction " + );