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++)
56 /// testing this entry
57 Line_of_score::Line_of_score(svec<const PCol *> sv,
61 for (int i=0; i< sv.sz(); i++) {
62 PCol *p=(PCol *) sv[i];
67 for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
68 staffs.bottom().add(new Line_of_staff(this, sc));
70 /** construct a line with the named columns. Make the line field
71 in each column point to this
73 #sv# isn't really const!!
76 Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
78 // [don't know how to calc dimensions yet.]
85 const PCol *linestart= sc->cols.top();
86 const PCol *linestop=sc->cols.bottom();
88 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
89 const PCol *brokenstart = &MAX(*linestart, *sp->left);
90 const PCol *brokenstop = &MIN(*linestop, *sp->right);
92 if (*brokenstop < *brokenstart)
93 brokenspans.bottom().add(sp->broken_at(brokenstop, brokenstart));
99 Line_of_staff::maxheight() const
102 y = pstaff_->stafsym->height(scor->score->linewidth);
103 PCursor<const PCol *> cc(scor->cols);
105 // all items in the current line & staff.
106 for (; cc.ok(); cc++) {
109 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
110 if (ic->pstaff_ == pstaff_) {
111 y.unite(ic->height());
115 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
116 if (sc->pstaff_ == pstaff_)