summaryrefslogtreecommitdiff
path: root/src/scoreline.cc
blob: 7e40c6a76a7a23892ef54341f240e9a1f4abd5fc (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include "scoreline.hh"
#include "staffline.hh"
#include "dimen.hh"
#include "spanner.hh"
#include "symbol.hh"
#include "paper.hh"
#include "pcol.hh"
#include "pscore.hh"


String
Line_of_score::TeXstring() const
{
     String s("\\vbox{%<- line of score\n");
     for (PCursor<Line_of_staff*> sc(staffs); sc.ok(); sc++){
	 s += sc->TeXstring();
	 if ((sc+1).ok())
	     s+= "\\interstaffline\n";
     }
     s += "}";
     return s;
}


Line_of_score::Line_of_score(svec<const PCol *> sv,
			     const PScore *ps)
{
    score = ps;
    for (int i=0; i< sv.sz(); i++) {
	PCol *p=(PCol *) sv[i];
	cols.bottom().add(p);
	p->line=this;
    }

    for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
	staffs.bottom().add(new Line_of_staff(this, sc));    
}
/* construct a line with the named columns. Make the line field
    in each column point to this
    
    #sv# isn't really const!!
    */