X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Faxis-group-interface.cc;h=262f387ada4aa4e671b6c987a464d9a902c65b6e;hb=43995ba0ef51445e9d9c983e47368225491de488;hp=396a95857c38a56b306bc0a9b26eb3b35fc44220;hpb=3a5ba68c4200ce392683436b36e2e4ee493b78c3;p=lilypond.git diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 396a95857c..262f387ada 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -1,9 +1,20 @@ /* - axis-group-interface.cc -- implement Axis_group_interface + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2000--2010 Han-Wen Nienhuys - (c) 2000--2009 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 "axis-group-interface.hh" @@ -682,22 +693,40 @@ Axis_group_interface::print (SCM smob) return ret.smobbed_copy (); } +MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_pure_next_staff_spacing, 3) +SCM +Axis_group_interface::calc_pure_next_staff_spacing (SCM smob, SCM start, SCM end) +{ + return calc_maybe_pure_next_staff_spacing (unsmob_grob (smob), + true, + scm_to_int (start), + scm_to_int (end)); +} + MAKE_SCHEME_CALLBACK (Axis_group_interface, calc_next_staff_spacing, 1) SCM Axis_group_interface::calc_next_staff_spacing (SCM smob) { - Grob *me = unsmob_grob (smob); + return calc_maybe_pure_next_staff_spacing (unsmob_grob (smob), + false, + 0, + INT_MAX); +} + +SCM +Axis_group_interface::calc_maybe_pure_next_staff_spacing (Grob *me, bool pure, int start, int end) +{ Grob *grouper = unsmob_grob (me->get_object ("staff-grouper")); if (grouper) { - Grob *last_in_group = Staff_grouper_interface::get_last_grob (grouper); + Grob *last_in_group = Staff_grouper_interface::get_maybe_pure_last_grob (grouper, pure, start, end); if (me == last_in_group) - return grouper->get_property ("after-last-staff-spacing"); + return grouper->get_maybe_pure_property ("after-last-staff-spacing", pure, start, end); else - return grouper->get_property ("between-staff-spacing"); + return grouper->get_maybe_pure_property ("between-staff-spacing", pure, start, end); } - return me->get_property ("default-next-staff-spacing"); + return me->get_maybe_pure_property ("default-next-staff-spacing", pure, start, end); } Real @@ -729,6 +758,7 @@ ADD_INTERFACE (Axis_group_interface, "inter-staff-spacing " "keep-fixed-while-stretching " "max-stretch " + "non-affinity-spacing " "next-staff-spacing " "no-alignment " "pure-Y-common "