13 *mlog << "Processing ... ";
16 paper_ = new Paperdef;
18 /// distribute commands to disciples
19 pscore_ = new PScore(paper_);
20 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
21 i->process_commands(last());
22 i->set_output(pscore_);
26 // do this after processing, staffs first have to generate PCols.
28 // ugh. Would want to clean the columns before anything else.
36 pscore_->preprocess();
37 *mlog << "Calculating ... ";
38 pscore_->calc_breaking();
39 *mlog << "Postprocessing ... ";
40 pscore_->postprocess();
42 // TODO: calculate vertical structs?
43 // TODO: calculate mixed structs.?
51 for (PCursor<Staff * > i(staffs_); i.ok(); i++)
54 for (PCursor<Score_column*> c(cols_); c.ok(); ) {
55 if (!c->pcol_->used()) {
63 pscore_->clean_cols();
66 this sux. We should have Score_column create the appropriate PCol.
67 Unfortunately, PCols don't know about their position.
70 PCursor<Score_column*>
71 Score::create_cols(Real w)
73 Score_column* c1 = new Score_column(w);
74 Score_column* c2 = new Score_column(w);
79 PCursor<Score_column*> scc(cols_);
81 for (; scc.ok(); scc++) {
82 assert(scc->when != w);
88 cols_.bottom().add(c1);
89 cols_.bottom().add(c2);
100 PCursor<Score_column*>
101 Score::find_col(Real w,bool mus)
103 PCursor<Score_column*> scc(cols_);
104 for (; scc.ok(); scc++) {
105 if (scc->when == w && scc->musical == mus)
110 scc = create_cols(w);
119 PCursor<Score_column*> i(cols_);
120 for (; i.ok(); i++) {
121 pscore_->add(i->pcol_);
128 for (PCursor<Staff*> stc(staffs_); stc.ok(); stc++) {
129 l = MAX(l, stc->last());
138 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
140 assert(i->score_ == this);
144 for (PCursor<Score_column*> cc(cols_); cc.ok() && (cc+1).ok(); cc++) {
145 assert(cc->when <= (cc+1)->when);
156 for (PCursor<Staff*> i(staffs_); i.ok(); i++) {
159 for (PCursor<Score_column*> i(cols_); i.ok(); i++) {
169 Score::Score(Paperdef*p)
181 Score::output(String s)
184 if (paper_->outfile=="")
187 *mlog << "output to " << paper_->outfile << "...\n";
188 Tex_stream the_output(paper_->outfile);
189 pscore_->output(the_output);
198 staffs_.bottom().add(s);