6 #include "staff-walker.hh"
7 #include "staff-column.hh"
8 #include "score-column.hh"
9 #include "voice-element.hh"
11 #include "musicalrequest.hh"
12 #include "commandrequest.hh" // todo
13 #include "midi-stream.hh"
16 Staff::add(PointerList
<Voice
*> const &l
)
18 for (iter_top(l
,i
); i
.ok(); i
++)
19 voice_list_
.bottom().add(i
);
25 return score_l_
->paper_p_
;
33 if (!i
->musical_column_l_
->used_b())
34 i
->musical_column_l_
= 0;
35 if (!i
->command_column_l_
->used_b())
36 i
->command_column_l_
=0;
38 if (!i
->command_column_l_
&& !i
->musical_column_l_
)
46 Staff::get_col(Moment w
, PCursor
<Staff_column
*> *last
)
49 if (last
&& last
->ok() && (*last
)->when() <= w
)
57 } else if (i
->when() > w
)
62 PCursor
<Score_column
*> scorecolumns(score_l_
->find_col(w
, false));
63 Staff_column
* staffcolumn_p
= new Staff_column
;
64 staffcolumn_p
->staff_l_
= this;
65 Score_column
* comcol_l
= scorecolumns
++;
66 staffcolumn_p
->set_cols(comcol_l
, scorecolumns
);
69 cols_
.bottom().add( staffcolumn_p
);
72 i
.insert(staffcolumn_p
);
81 put all stuff grouped vertically in the Staff_cols.
82 Do the preprarations for walking the cols. not virtual
85 Staff::setup_staffcols()
87 for (iter_top(voice_list_
,i
); i
.ok(); i
++) {
88 PCursor
<Staff_column
*> last(cols_
);
89 Moment now
= i
->start
;
90 for (iter_top(i
->elts
,j
); j
.ok(); j
++) {
92 Staff_column
*s_l
= get_col(now
, &last
);
93 assert(now
== s_l
->when());
111 for (; i
.ok(); j
++,i
++) {
112 assert(j
->when () < i
->when() );
123 for (iter_top(voice_list_
,i
); i
.ok(); i
++) {
134 for (iter_top(voice_list_
,i
); i
.ok(); i
++) {