]> git.donarmstrong.com Git - lilypond.git/blob - lily/hara-kiri-vertical-group-spanner.cc
release: 1.1.37
[lilypond.git] / lily / hara-kiri-vertical-group-spanner.cc
1 /*
2   hara-kiri-vertical-group-spanner.cc 
3     -- implement Hara_kiri_vertical_group_spanner
4
5   source file of the GNU LilyPond music typesetter
6
7   (c)  1998,1999 Jan Nieuwenhuizen <janneke@gnu.org>
8   Han-Wen Nienhuys <hanwen@cs.uu.nl>
9 */
10
11 #include "hara-kiri-vertical-group-spanner.hh"
12 #include "debug.hh"
13 #include "item.hh"
14
15 Hara_kiri_group_spanner::Hara_kiri_group_spanner()
16 {
17   set_axes(Y_AXIS,Y_AXIS);
18 }
19
20 void 
21 Hara_kiri_group_spanner::add_interesting_item (Item* n)
22 {
23   add_dependency (n);
24   interesting_items_.push (n);
25 }
26
27 void 
28 Hara_kiri_group_spanner::do_post_processing ()
29 {
30   if (!interesting_items_.empty ())
31     return;
32
33   Link_array<Score_element> childs = get_children ();
34   for (int i = 0; i < childs.size (); i++)
35     {
36       childs[i]->set_elt_property (transparent_scm_sym, SCM_BOOL_T);
37       childs[i]->set_empty (true);
38     }
39   set_empty (true);
40 }
41
42 void
43 Hara_kiri_group_spanner::do_substitute_element_pointer (Score_element*o, Score_element*n)
44 {
45   if (Item *it = dynamic_cast<Item *> (o))
46     interesting_items_.substitute (it, dynamic_cast<Item *> (n));
47 }
48
49
50 void
51 Hara_kiri_group_spanner::do_print () const
52 {
53   Axis_group_spanner::do_print ();
54 }