]> git.donarmstrong.com Git - lilypond.git/blob - lily/axis-group-item.cc
release: 0.1.7
[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 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8 #include "axis-group-item.hh"
9 #include "p-col.hh"
10
11 IMPLEMENT_IS_TYPE_B2(Axis_group_item, Axis_group_element, Item);
12
13 void
14 Axis_group_item::OK() const
15 {
16     Link_array<Score_elem> elems = axis_admin_.elem_l_arr_; 
17     for (int i=0; i < elems.size(); i++) {
18         Item * it_l = elems[i]->item();
19         assert(it_l);
20   
21         // somebody probably broke it in pieces
22         assert (it_l->pcol_l_ == pcol_l_ );
23     }
24 }
25
26 void
27 Axis_group_item::do_breakable_col_processing()
28 {
29     if (!pcol_l_->breakable_b())
30         return;
31     OK();
32     copy_breakable_items();
33     
34             
35     Link_array<Score_elem> elems = axis_admin_.elem_l_arr_; 
36     for (int i=0; i < elems.size(); i++) {
37         Item* it_l = elems[i]->item();
38         for ( int j=0; j < 2; j++) {
39             Item *new_l = it_l->find_prebroken_piece(broken_to_a_[j]->pcol_l_);
40             ((Axis_group_item*)broken_to_a_[j])->add_element( new_l );
41         }
42     }
43     Item::do_breakable_col_processing();
44 }
45
46 void
47 Axis_group_item::do_print() const
48
49     Axis_group_element::do_print(); 
50 }