9 Line_of_staff::TeXstring() const
11 String s("%line_of_staff\n\\vbox to ");
12 s += print_dimen(maxheight() ) +"{";
17 // the staff itself: eg lines, accolades
20 Symbol sym = pstaff_->get_stafsym(scor->score->paper_->linewidth);
22 PCursor<const PCol *> cc(scor->cols);
23 Real lastpos=cc->hpos;
25 // all items in the current line & staff.
26 for (; cc.ok(); cc++) {
27 Real delta=cc->hpos - lastpos;
31 s +=String( "\\kern ") + print_dimen(delta);
33 // now output the items.
35 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
36 if (ic->pstaff_ == pstaff_)
40 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
41 if (sc->pstaff_ == pstaff_)
50 Line_of_score::TeXstring() const
53 for (PCursor<Line_of_staff*> sc(staffs); sc.ok(); sc++){
56 s+= "\\interstaffline\n";
62 /// testing this entry
63 Line_of_score::Line_of_score(svec<const PCol *> sv,
67 for (int i=0; i< sv.sz(); i++) {
68 PCol *p=(PCol *) sv[i];
73 for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
74 staffs.bottom().add(new Line_of_staff(this, sc));
76 /** construct a line with the named columns. Make the line field
77 in each column point to this
79 #sv# isn't really const!!
82 Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
84 // [don't know how to calc dimensions yet.]
91 const PCol *linestart= sc->cols.top();
92 const PCol *linestop=sc->cols.bottom();
94 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
95 const PCol *brokenstart = &MAX(*linestart, *sp->left);
96 const PCol *brokenstop = &MIN(*linestop, *sp->right);
98 if (*brokenstop < *brokenstart)
99 brokenspans.bottom().add(sp->broken_at(brokenstop, brokenstart));
105 Line_of_staff::maxheight() const
109 Symbol s = pstaff_->stafsym->eval(scor->score->paper_->linewidth);
112 PCursor<const PCol *> cc(scor->cols);
114 // all items in the current line & staff.
115 for (; cc.ok(); cc++) {
118 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
119 if (ic->pstaff_ == pstaff_) {
120 y.unite(ic->height());
124 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
125 if (sc->pstaff_ == pstaff_)