10 PCursor
<Staff_column
*> stc(cols
);
12 if (!stc
->score_column
->used())
20 Staff::get_col(Mtime w
, bool mus
)
22 Score_column
* sc
= score_
->find_col(w
,mus
);
23 assert(sc
->when
== w
);
24 PCursor
<Staff_column
*> stc(cols
);
25 for (; stc
.ok(); stc
++) {
26 if (*sc
< *stc
->score_column
)
28 if (sc
== stc
->score_column
)
31 Staff_column
* newst
= create_col(sc
);
34 cols
.bottom().add(newst
);
43 if ((stc
-1)->when() == newst
->when()) {
54 Staff::add_voice(Voice
*v
)
56 voices
.bottom().add(v
);
60 put all stuff grouped vertically in the Staff_cols
63 Staff::setup_staffcols()
66 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {
68 Mtime now
= vc
->start
;
69 for (PCursor
<Voice_element
*> ve(vc
->elts
); ve
.ok(); ve
++) {
71 Staff_column
*sc
=get_col(now
,true);
77 for (PCursor
<Command
*> cc(commands
); cc
.ok(); cc
++) {
78 Staff_column
*sc
=get_col(cc
->when
,false);
79 sc
->s_commands
.add(cc
);
83 /// merge commands from score
85 Staff::add_commands(PointerList
<Command
*> const &cl
)
87 PCursor
<Command
*> score_c(cl
);
88 PCursor
<Command
*> cc(commands
);
90 while (score_c
.ok()) {
91 while (cc
.ok() && cc
->when
<= score_c
->when
)
94 Command
*nc
= new Command (*(* score_c
));
96 // cc->when > score_c->when
99 commands
.bottom().add( nc
);
100 cc
= commands
.bottom();
105 // now integrate break commands with other commands.
106 // maybe do this in derived functions.
114 for (PCursor
<Staff_column
*> sc(cols
); sc
.ok(); sc
++) {
115 sc
->process_commands();
116 sc
->process_requests();
134 Staff::last() const {
136 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {
137 l
= MAX(l
, vc
->last());
149 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {