10 Score::output(String s)
13 if (paper->outfile=="")
16 *mlog << "output to " << paper->outfile << "...\n";
17 Tex_stream the_output(paper->outfile);
18 pscore_->output(the_output);
28 commands_.clean(last());
30 /// distribute commands to disciples
31 distribute_commands();
34 for (PCursor<Staff*> sc(staffs_); sc.ok(); sc++) {
35 sc->set_output(pscore_);
39 // do this after processing, staffs first have to generate PCols.
45 pscore_->calc_breaking();
46 // TODO: calculate vertical structs
47 // TODO: calculate mixed structs.
50 // remove empty cols with no spacing attached.
51 /* should rethink ownership of cols
56 for (PCursor<Staff * > sc(staffs_); sc.ok(); sc++)
59 for (PCursor<Score_column*> c(cols_); c.ok(); ) {
61 mtor << "removing : ";
68 pscore_->clean_cols();
70 /* this sux. We should have Score_column create the appropriate PCol.
71 Unfortunately, PCols don't know about their position.
74 PCursor<Score_column*>
75 Score::create_cols(Mtime w)
77 Score_column* c1 = new Score_column(w);
78 Score_column* c2 = new Score_column(w);
83 PCursor<Score_column*> scc(cols_);
85 for (; scc.ok(); scc++) {
86 assert(scc->when != w);
92 cols_.bottom().add(c1);
93 cols_.bottom().add(c2);
105 Score::find_col(Mtime w,bool mus)
107 PCursor<Score_column*> scc(cols_);
108 for (; scc.ok(); scc++) {
109 if (scc->when == w && scc->musical == mus)
114 scc = create_cols(w);
121 Score::distribute_commands(void)
123 for (PCursor<Staff*> sc(staffs_); sc.ok(); sc++) {
124 sc->add_commands(commands_);
131 staffs_.bottom().add(s);
138 PCursor<Score_column*> sc(cols_);
139 for (; sc.ok(); sc++) {
140 pscore_->add(sc->pcol);
147 for (PCursor<Staff*> stc(staffs_); stc.ok(); stc++) {
148 l = MAX(l, stc->last());
157 for (PCursor<Staff*> sc(staffs_); sc.ok(); sc++) {
159 assert(sc->score_ == this);
163 for (PCursor<Score_column*> cc(cols_); cc.ok() && (cc+1).ok(); cc++) {
164 assert(cc->when <= (cc+1)->when);
176 for (PCursor<Staff*> sc(staffs_); sc.ok(); sc++) {
179 for (PCursor<Score_column*> sc(cols_); sc.ok(); sc++) {
193 Score::add(Command*c)