8 PCursor
<Staff_column
*> stc(cols
);
9 for(; stc
.ok(); stc
++){
10 if (!stc
->score_column
->used())
16 maak een staff column, met specs in args.
18 (sorry wat is het vroeg vandaag..)
21 Staff::get_col(Mtime w
, bool mus
)
23 Score_column
* sc
= score_
->find_col(w
,mus
);
24 assert(sc
->when
== w
);
25 PCursor
<Staff_column
*> stc(cols
);
26 for (; stc
.ok(); stc
++) {
27 if (*sc
< *stc
->score_column
)
29 if (sc
== stc
->score_column
)
32 Staff_column
* newst
= create_col(sc
);
35 cols
.bottom().add(newst
);
44 if ((stc
-1)->when() == newst
->when()) {
55 Staff::add_voice(Voice
*v
)
57 voices
.bottom().add(v
);
61 put all stuff grouped vertically in the Staff_cols
64 Staff::setup_staffcols()
67 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {
69 Mtime now
= vc
->start
;
70 for (PCursor
<Voice_element
*> ve(vc
->elts
); ve
.ok(); ve
++) {
72 Staff_column
*sc
=get_col(now
,true);
78 for (PCursor
<Command
*> cc(commands
); cc
.ok(); cc
++) {
79 Staff_column
*sc
=get_col(cc
->when
,false);
80 sc
->s_commands
.add(cc
);
84 /// merge commands from score
86 Staff::add_commands(PointerList
<Command
*> const &cl
)
88 PCursor
<Command
*> score_c(cl
);
89 PCursor
<Command
*> cc(commands
);
91 while (score_c
.ok()) {
92 while (cc
.ok() && cc
->when
<= score_c
->when
)
95 Command
*nc
= new Command (*(* score_c
));
97 // cc->when > score_c->when
100 commands
.bottom().add( nc
);
101 cc
= commands
.bottom();
106 // now integrate break commands with other commands.
107 // may be do this in derived functions.
115 for (PCursor
<Staff_column
*> sc(cols
); sc
.ok(); sc
++) {
116 sc
->process_commands();
117 sc
->process_requests();
134 Staff::last() const {
136 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {
137 l
= MAX(l
, vc
->last());
147 for (PCursor
<Voice
*> vc(voices
); vc
.ok(); vc
++) {
154 /****************************************************************/
157 Staff_column::mus() const
159 return score_column
->musical
;
163 Staff_column::when() const
165 return score_column
->when
;
168 Staff_column::add(Voice_element
*ve
)
170 Mtime d
= ve
->duration
;
172 score_column
->durations
.add(d
);
177 Staff_column::Staff_column(Score_column
*s
) {