1 // utility functions for PScore
10 for (PCursor
<PCol
*> c(cols
); c
.ok(); c
++)
13 //mtor << "removing pcol\n";
19 PScore::add(PStaff
*s
)
21 staffs
.bottom().add(s
);
25 PScore::typeset_item(Item
*i
, PCol
*c
, PStaff
*s
, int breakstat
)
28 if (breakstat
== 1 ) {
29 typeset_item(i
, c
->prebreak
, s
, 0);
31 typeset_item(i
, c
->prebreak
, s
, 0 );
40 PScore::add_line(svec
<const PCol
*> curline
, svec
<Real
> config
)
42 Line_of_score
*p
= new Line_of_score(curline
,this);
43 lines
.bottom().add(p
);
44 for (int i
=0; i
< curline
.sz(); i
++){
45 PCol
*c
=(PCol
*)curline
[i
]; // so, this isn't really const.
51 PScore::get_spacing(PCol
*l
, PCol
*r
)
54 for (PCursor
<Idealspacing
*> ic (suz
); ic
.ok(); ic
++) {
55 if (ic
->left
== l
&& ic
->right
== r
){
60 Idealspacing
*ip
=new Idealspacing(l
,r
);
62 // l->used = r->used = true;
67 PScore::find_breaks() const
69 svec
<const PCol
*> retval
;
70 for (PCursor
<PCol
*> c(cols
); c
.ok(); c
++)
87 linewidth
= 15; // in cm for now
91 PScore::output(Tex_stream
&ts
)
94 ts
<< "% linewidth " << linewidth
* HOR_TO_PT
<< " pt\n";
95 for (PCursor
<Line_of_score
*> lic(lines
); lic
.ok(); lic
++) {
96 ts
<< "% line of score no. " << l
++ <<"\n";
97 ts
<< lic
->TeXstring();