2 This file is part of LilyPond, the GNU music typesetter.
4 Copyright (C) 2011--2015 Mike Solomon <mike@mikesolomon.org>
6 LilyPond is free software: you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation, either version 3 of the License, or
9 (at your option) any later version.
11 LilyPond is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
20 #include "axis-group-interface.hh"
22 #include "grob-array.hh"
24 #include "paper-column.hh"
25 #include "pointer-group-interface.hh"
26 #include "pure-from-neighbor-interface.hh"
30 MAKE_SCHEME_CALLBACK (Pure_from_neighbor_interface, calc_pure_relevant_grobs, 1);
32 Pure_from_neighbor_interface::calc_pure_relevant_grobs (SCM smob)
34 Grob *me = unsmob<Grob> (smob);
35 extract_grob_set ((me->original () && me->original ()->is_live ()
41 vector<Grob *> new_elts;
42 new_elts.insert (new_elts.end (), elts.begin (), elts.end ());
44 if (Grob_array *a = unsmob<Grob_array> (me->get_object ("neighbors")))
45 a->set_array (new_elts);
47 return Axis_group_interface::internal_calc_pure_relevant_grobs (me, "neighbors");
50 ADD_INTERFACE (Pure_from_neighbor_interface,
51 "A collection of routines to allow for objects' pure "
52 "heights and heights to be calculated based on the "
53 "heights of the objects' neighbors.",
57 "pure-relevant-grobs "