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--2000 Jan Nieuwenhuizen <janneke@gnu.org>
8 Han-Wen Nienhuys <hanwen@cs.uu.nl>
11 #include "axis-group-interface.hh"
12 #include "hara-kiri-vertical-group-spanner.hh"
16 Hara_kiri_group_spanner::Hara_kiri_group_spanner()
18 set_elt_property ("items-worth-living", SCM_EOL);
19 axis_group (this).set_axes(Y_AXIS,Y_AXIS);
23 Hara_kiri_group_spanner::add_interesting_item (Item* n)
26 set_elt_property ("items-worth-living",
27 gh_cons (n->self_scm_,
28 get_elt_property ("items-worth-living")));
32 Hara_kiri_group_spanner::after_line_breaking ()
34 SCM worth = get_elt_property ("items-worth-living");
35 if (gh_pair_p (worth))
38 Link_array<Score_element> childs = axis_group (this).get_children ();
39 for (int i = 0; i < childs.size (); i++)
41 Score_element* s = childs[i];
43 if ( line_l () != s->line_l ())
44 programming_error ("Killing other children too");
45 s->set_elt_property ("transparent", SCM_BOOL_T);
46 s->set_empty (X_AXIS);
47 s->set_empty (Y_AXIS);