8 Line_of_staff::TeXstring() const
10 String s("%line_of_staff\n\\vbox to ");
11 s += print_dimen(maxheight() ) +"{";
16 // the staff itself: eg lines, accolades
19 Symbol sym = pstaff_->get_stafsym(scor->score->linewidth);
21 PCursor<const PCol *> cc(scor->cols);
22 Real lastpos=cc->hpos;
24 // all items in the current line & staff.
25 for (; cc.ok(); cc++) {
26 Real delta=cc->hpos - lastpos;
30 s +=String( "\\kern ") + print_dimen(delta);
32 // now output the items.
34 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
35 if (ic->pstaff_ == pstaff_)
39 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
40 if (sc->pstaff_ == pstaff_)
49 Line_of_score::TeXstring() const
52 for (PCursor<Line_of_staff*> sc(staffs); sc.ok(); sc++){
55 s+= "\\interstaffline\n";
61 /// testing this entry
62 Line_of_score::Line_of_score(svec<const PCol *> sv,
66 for (int i=0; i< sv.sz(); i++) {
67 PCol *p=(PCol *) sv[i];
72 for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
73 staffs.bottom().add(new Line_of_staff(this, sc));
75 /** construct a line with the named columns. Make the line field
76 in each column point to this
78 #sv# isn't really const!!
81 Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
83 // [don't know how to calc dimensions yet.]
90 const PCol *linestart= sc->cols.top();
91 const PCol *linestop=sc->cols.bottom();
93 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
94 const PCol *brokenstart = &MAX(*linestart, *sp->left);
95 const PCol *brokenstop = &MIN(*linestop, *sp->right);
97 if (*brokenstop < *brokenstart)
98 brokenspans.bottom().add(sp->broken_at(brokenstop, brokenstart));
104 Line_of_staff::maxheight() const
108 Symbol s = pstaff_->stafsym->eval(scor->score->linewidth);
111 PCursor<const PCol *> cc(scor->cols);
113 // all items in the current line & staff.
114 for (; cc.ok(); cc++) {
117 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
118 if (ic->pstaff_ == pstaff_) {
119 y.unite(ic->height());
123 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
124 if (sc->pstaff_ == pstaff_)