]> git.donarmstrong.com Git - lilypond.git/blob - lily/axis-group-item.cc
65570d0623698ec725ef0583e423da70dd5a7315
[lilypond.git] / lily / axis-group-item.cc
1 /*
2   axis-item.cc -- implement Axis_group_item
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8 #include "axis-group-item.hh"
9 #include "p-col.hh"
10
11
12
13 void
14 Axis_group_item::OK() const
15 {
16   Link_array<Score_element> elems = elem_l_arr ();
17   for (int i=0; i < elems.size(); i++) 
18     {
19       Item * it_l = dynamic_cast<Item*> (elems[i]);
20       assert (it_l);
21     }
22 }
23
24 void
25 Axis_group_item::do_breakable_col_processing()
26 {
27   if (!breakable_b ()) // ugh should merge with Item code
28     return;
29
30   OK();
31   copy_breakable_items();
32   
33             
34   Link_array<Score_element> elems = elem_l_arr ();
35   for (int i=0; i < elems.size(); i++) 
36     {
37       Item* it_l = dynamic_cast<Item*> (elems[i]);
38       Direction  j=LEFT;
39       do 
40         {
41           Axis_group_item * my_brok
42             = dynamic_cast<Axis_group_item*> (find_prebroken_piece(j));
43           Item *new_l = it_l->find_prebroken_piece (j);
44           my_brok->add_element (new_l);
45         }
46       while (flip(&j)!=LEFT);
47     }
48   Item::do_breakable_col_processing();
49 }
50
51 void
52 Axis_group_item::do_print() const
53
54   Axis_group_element::do_print(); 
55   Item::do_print ();
56 }