]> git.donarmstrong.com Git - lilypond.git/blob - src/scoreline.cc
release: 0.0.18
[lilypond.git] / src / scoreline.cc
1 #include "scoreline.hh"
2 #include "staffline.hh"
3 #include "dimen.hh"
4 #include "spanner.hh"
5 #include "symbol.hh"
6 #include "paper.hh"
7 #include "pcol.hh"
8 #include "pscore.hh"
9
10
11 String
12 Line_of_score::TeXstring() const
13 {
14      String s("\\vbox{%<- line of score\n");
15      for (PCursor<Line_of_staff*> sc(staffs); sc.ok(); sc++){
16          s += sc->TeXstring();
17          if ((sc+1).ok())
18              s+= "\\interstaffline\n";
19      }
20      s += "}";
21      return s;
22 }
23
24
25 Line_of_score::Line_of_score(svec<PCol *> sv,
26                              PScore *ps)
27 {
28     pscore_ = ps;
29     for (int i=0; i< sv.sz(); i++) {
30         PCol *p=(PCol *) sv[i];
31         cols.bottom().add(p);
32         p->line=this;
33     }
34
35     for (PCursor<PStaff*> sc(pscore_->staffs); sc.ok(); sc++)
36         staffs.bottom().add(new Line_of_staff(this, sc));    
37 }
38 /* construct a line with the named columns. Make the line field
39     in each column point to this
40     
41     #sv# isn't really const!!
42     */
43
44
45 void
46 Line_of_score::process()
47 {
48     for (PCursor<Line_of_staff*> i(staffs); i.ok(); i++)
49         i->process();
50 }
51