7 Line_of_staff::TeXstring() const
9 String
s("%line_of_staff\n\\vbox to ");
10 s
+= String(maxheight() * VERT_TO_PT
) +"pt{";
13 s
+= vstrut(base
* VERT_TO_PT
);
15 // the staff itself: eg lines, accolades
18 s
+=(*pstaff_
->stafsym
)(scor
->score
->linewidth
);
19 PCursor
<const PCol
*> cc(scor
->cols
);
20 Real lastpos
=cc
->hpos
;
22 // all items in the current line & staff.
23 for (; cc
.ok(); cc
++) {
24 Real delta
=cc
->hpos
- lastpos
;
28 s
+=String( "\\kern ") + HOR_TO_PT
*delta
+ "pt ";
30 // now output the items.
32 for (PCursor
<const Item
*> ic(cc
->its
); ic
.ok(); ic
++) {
33 if (ic
->pstaff_
== pstaff_
)
37 for (PCursor
<const Spanner
*> sc(cc
->starters
); sc
.ok(); sc
++)
38 if (sc
->pstaff_
== pstaff_
)
47 Line_of_score::TeXstring() const
50 for (PCursor
<Line_of_staff
*> sc(staffs
); sc
.ok(); sc
++){
53 s
+= "\\interstaffline\n";
59 /// testing this entry
60 Line_of_score::Line_of_score(svec
<const PCol
*> sv
,
64 for (int i
=0; i
< sv
.sz(); i
++) {
65 PCol
*p
=(PCol
*) sv
[i
];
70 for (PCursor
<PStaff
*> sc(score
->staffs
); sc
.ok(); sc
++)
71 staffs
.bottom().add(new Line_of_staff(this, sc
));
73 /** construct a line with the named columns. Make the line field
74 in each column point to this
76 #sv# isn't really const!!
79 Line_of_staff::Line_of_staff(Line_of_score
* sc
, PStaff
*st
)
81 // [don't know how to calc dimensions yet.]
88 const PCol
*linestart
= sc
->cols
.top();
89 const PCol
*linestop
=sc
->cols
.bottom();
91 for (PCursor
<const Spanner
*> sp(pstaff_
->spans
); sp
.ok(); sp
++) {
92 const PCol
*brokenstart
= &MAX(*linestart
, *sp
->left
);
93 const PCol
*brokenstop
= &MIN(*linestop
, *sp
->right
);
95 if (*brokenstop
< *brokenstart
)
96 brokenspans
.bottom().add(sp
->broken_at(brokenstop
, brokenstart
));
102 Line_of_staff::maxheight() const
105 y
= pstaff_
->stafsym
->height(scor
->score
->linewidth
);
106 PCursor
<const PCol
*> cc(scor
->cols
);
108 // all items in the current line & staff.
109 for (; cc
.ok(); cc
++) {
112 for (PCursor
<const Item
*> ic(cc
->its
); ic
.ok(); ic
++) {
113 if (ic
->pstaff_
== pstaff_
) {
114 y
.unite(ic
->height());
118 for (PCursor
<const Spanner
*> sc(cc
->starters
); sc
.ok(); sc
++)
119 if (sc
->pstaff_
== pstaff_
)