4 #include "staff-walker.hh"
5 #include "staff-column.hh"
6 #include "score-column.hh"
7 #include "voice-element.hh"
9 #include "musicalrequest.hh"
10 #include "commandrequest.hh" // todo
11 #include "midi-stream.hh"
14 Staff::add(PointerList<Voice*> const &l)
16 for (iter_top(l,i); i.ok(); i++)
17 voice_list_.bottom().add(i);
23 return score_l_->paper_p_;
31 if (!i->musical_column_l_->used_b())
32 i->musical_column_l_ = 0;
33 if (!i->command_column_l_->used_b())
34 i->command_column_l_ =0;
36 if (!i->command_column_l_&& !i->musical_column_l_)
44 Staff::get_col(Moment w, PCursor<Staff_column*> *last)
47 if (last && last->ok() && (*last)->when() <= w)
55 } else if (i->when() > w)
60 PCursor<Score_column*> scorecolumns(score_l_->find_col(w, false));
61 Staff_column* staffcolumn_p = new Staff_column;
62 staffcolumn_p->staff_l_ = this;
63 Score_column* comcol_l = scorecolumns++;
64 staffcolumn_p->set_cols(comcol_l, scorecolumns);
67 cols_.bottom().add( staffcolumn_p);
70 i.insert(staffcolumn_p);
79 put all stuff grouped vertically in the Staff_cols.
80 Do the preprarations for walking the cols. not virtual
83 Staff::setup_staffcols()
85 for (iter_top(voice_list_,i); i.ok(); i++) {
86 PCursor<Staff_column*> last(cols_);
87 Moment now = i->start;
88 for (iter_top(i->elts,j); j.ok(); j++) {
90 Staff_column *s_l= get_col(now, &last);
91 assert(now == s_l->when());
109 for (; i.ok(); j++,i++) {
110 assert(j->when () < i->when() );
121 for (iter_top(voice_list_,i); i.ok(); i++) {
132 for (iter_top(voice_list_,i); i.ok(); i++) {