2 hara-kiri-vertical-group-spanner.cc
3 -- implement Hara_kiri_vertical_group_spanner
5 source file of the GNU LilyPond music typesetter
7 (c) 1998,1999 Jan Nieuwenhuizen <janneke@gnu.org>
8 Han-Wen Nienhuys <hanwen@cs.uu.nl>
11 #include "hara-kiri-vertical-group-spanner.hh"
15 Hara_kiri_group_spanner::Hara_kiri_group_spanner()
17 set_elt_property ("items-worth-living", SCM_EOL);
18 set_axes(Y_AXIS,Y_AXIS);
22 Hara_kiri_group_spanner::add_interesting_item (Item* n)
25 set_elt_property ("items-worth-living",
26 gh_cons (n->self_scm_,
27 get_elt_property ("items-worth-living")));
31 Hara_kiri_group_spanner::do_post_processing ()
33 SCM worth = get_elt_property ("items-worth-living");
34 if (gh_pair_p (worth))
37 Link_array<Score_element> childs = get_children ();
38 for (int i = 0; i < childs.size (); i++)
40 Score_element* s = childs[i];
42 if ( line_l () != s->line_l ())
43 programming_error ("Killing other children too");
44 s->set_elt_property ("transparent", SCM_BOOL_T);
45 s->set_empty (X_AXIS);
46 s->set_empty (Y_AXIS);