]> git.donarmstrong.com Git - lilypond.git/blob - lily/rest-column.cc
release: 0.0.65
[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(Offset(0,dy_f));
25 }
26
27 IMPLEMENT_STATIC_NAME(Rest_column);
28
29 Rest_column::Rest_column()
30 {
31     dir_i_ = 0;
32 }
33     
34
35 void
36 Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n)
37 {
38     Script_column::do_substitute_dependency(o,n);
39     if (o->name() == Note_head::static_name()) {
40         head_l_arr_.substitute( (Note_head*)o->item(), 
41                                 (n)? (Note_head*)n->item() : 0);
42     }
43 }