]> git.donarmstrong.com Git - lilypond.git/blob - lily/rest-column.cc
patch::: 0.0.68pre.jcn1: Re: patsen?
[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 "debug.hh"
10 #include "rest-column.hh"
11 #include "note-head.hh"
12 #include "rest-column.hh"
13 #include "stem.hh"
14
15 IMPLEMENT_STATIC_NAME(Rest_column);
16 IMPLEMENT_IS_TYPE_B1(Rest_column,Item);
17
18 Rest_column::Rest_column()
19 {
20     dir_i_ = 0;
21 }
22     
23 void
24 Rest_column::add(Note_head *n_l)
25 {
26     add_support(n_l);
27     head_l_arr_.push(n_l);
28 }
29
30 void
31 Rest_column::add(Stem*stem_l)
32 {
33     stem_l_ = stem_l;
34 //    add_support(stem_l);
35 }
36
37 void
38 Rest_column::do_print() const
39 {
40 #ifndef NPRINT
41     mtor << "heads: " << head_l_arr_.size();
42 #endif
43 }
44
45 void
46 Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n)
47 {
48     Script_column::do_substitute_dependency(o,n);
49     if (o->name() == Note_head::static_name()) {
50         head_l_arr_.substitute( (Note_head*)o->item(), 
51                                 (n)? (Note_head*)n->item() : 0);
52     }
53 }
54
55 void
56 Rest_column::translate_y(Real dy_f)
57 {
58     for (int i=0; i < head_l_arr_.size(); i++)
59         head_l_arr_[i]->translate_y(dy_f);
60 }