]> git.donarmstrong.com Git - lilypond.git/blob - lily/rest-column.cc
release: 0.0.68pre
[lilypond.git] / lily / rest-column.cc
1 /*
2   rest-column.cc -- implement Rest_column
3
4   source file of the GNU LilyPond music typesetter
5
6   (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
8
9 #include "rest-column.hh"
10 #include "note-head.hh"
11 #include "rest-column.hh"
12
13 void
14 Rest_column::add(Note_head *n_l)
15 {
16     add_support(n_l);
17     head_l_arr_.push(n_l);
18 }
19
20 void
21 Rest_column::translate_y(Real dy_f)
22 {
23     for (int i=0; i < head_l_arr_.size(); i++)
24         head_l_arr_[i]->translate_y(dy_f);
25 }
26
27 IMPLEMENT_STATIC_NAME(Rest_column);
28 IMPLEMENT_IS_TYPE_B1(Rest_column,Item);
29
30 Rest_column::Rest_column()
31 {
32     dir_i_ = 0;
33 }
34     
35
36 void
37 Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n)
38 {
39     Script_column::do_substitute_dependency(o,n);
40     if (o->name() == Note_head::static_name()) {
41         head_l_arr_.substitute( (Note_head*)o->item(), 
42                                 (n)? (Note_head*)n->item() : 0);
43     }
44 }