2 rest-column.cc -- implement Rest_column
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "rest-column.hh"
11 #include "note-head.hh"
12 #include "rest-column.hh"
15 IMPLEMENT_STATIC_NAME(Rest_column);
16 IMPLEMENT_IS_TYPE_B1(Rest_column,Item);
18 Rest_column::Rest_column()
25 Rest_column::add(Note_head *n_l)
28 head_l_arr_.push(n_l);
32 Rest_column::add(Stem*stem_l)
35 add_dependency(stem_l);
36 // add_support(stem_l);
40 Rest_column::do_print() const
43 mtor << "heads: " << head_l_arr_.size();
48 Rest_column::do_substitute_dependency(Score_elem*o,Score_elem*n)
50 Script_column::do_substitute_dependency(o,n);
52 stem_l_ = n? (Stem*)n->item() :0;
54 if (o->is_type_b( Note_head::static_name()) )
55 head_l_arr_.substitute( (Note_head*)o->item(),
56 (n)? (Note_head*)n->item() : 0);
61 translate the rest symbols
64 Rest_column::translate_heads(int dy_i)
66 for (int i=0; i < head_l_arr_.size(); i++)
67 head_l_arr_[i]->position_i_ += dy_i;