13 *mlog << "Processing ... ";
17 /// distribute commands to disciples
18 pscore_ = new PScore(paper_);
19 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
20 i->process_commands(last());
21 i->set_output(pscore_);
25 // do this after processing, staffs first have to generate PCols.
27 // ugh. Would want to clean the columns before anything else.
35 pscore_->preprocess();
36 *mlog << "Calculating ... ";
37 pscore_->calc_breaking();
38 *mlog << "Postprocessing ... ";
39 pscore_->postprocess();
41 // TODO: calculate vertical structs?
42 // TODO: calculate mixed structs.?
50 for (PCursor<Staff * > i(staffs_); i.ok(); i++)
53 for (PCursor<Score_column*> c(cols_); c.ok(); ) {
54 if (!c->pcol_->used()) {
62 pscore_->clean_cols();
65 this sux. We should have Score_column create the appropriate PCol.
66 Unfortunately, PCols don't know about their position.
69 PCursor<Score_column*>
70 Score::create_cols(Real w)
72 Score_column* c1 = new Score_column(w);
73 Score_column* c2 = new Score_column(w);
78 PCursor<Score_column*> scc(cols_);
80 for (; scc.ok(); scc++) {
81 assert(scc->when != w);
87 cols_.bottom().add(c1);
88 cols_.bottom().add(c2);
99 PCursor<Score_column*>
100 Score::find_col(Real w,bool mus)
102 PCursor<Score_column*> scc(cols_);
103 for (; scc.ok(); scc++) {
104 if (scc->when == w && scc->musical == mus)
109 scc = create_cols(w);
118 PCursor<Score_column*> i(cols_);
119 for (; i.ok(); i++) {
120 pscore_->add(i->pcol_);
127 for (PCursor<Staff*> stc(staffs_); stc.ok(); stc++) {
128 l = MAX(l, stc->last());
137 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
139 assert(i->score_ == this);
143 for (PCursor<Score_column*> cc(cols_); cc.ok() && (cc+1).ok(); cc++) {
144 assert(cc->when <= (cc+1)->when);
155 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
158 for (PCursor<Score_column*> i(cols_); i.ok(); i++) {
168 Score::Score(Paperdef*p)
180 Score::output(String s)
183 if (paper_->outfile=="")
186 *mlog << "output to " << paper_->outfile << "...\n";
187 Tex_stream the_output(paper_->outfile);
188 pscore_->output(the_output);
197 staffs_.bottom().add(s);