1 #include "staffline.hh"
2 #include "scoreline.hh"
13 String s("\\vbox to ");
14 s += print_dimen(i.length());
15 s += "{\\vskip "+print_dimen(i.max)+" ";
21 Line_of_staff::TeXstring() const
23 String s("%line_of_staff\n");
24 s+=make_vbox(height());
25 // the staff itself: eg lines, accolades
28 Symbol sym = pstaff_->get_stafsym(line_of_score_->pscore_-> // ugh
31 PCursor<const PCol *> cc(line_of_score_->cols);
32 Real lastpos=cc->hpos;
34 // all items in the current line & staff.
35 for (; cc.ok(); cc++) {
36 Real delta=cc->hpos - lastpos;
41 s +=String( "\\kern ") + print_dimen(delta);
43 // now output the items.
45 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
46 if (ic->pstaff_ == pstaff_)
50 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
51 if (sc->pstaff_ == pstaff_)
59 Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
65 const PCol *linestart = sc->cols.top();
66 const PCol *linestop = sc->cols.bottom();
69 for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
70 const PCol *brokenstart = &MAX(*linestart, *sp->left);
71 const PCol *brokenstop = &MIN(*linestop, *sp->right);
72 if ( *brokenstart < *brokenstop) {
73 line_of_score_->pscore_-> // higghl
74 add_broken(sp->broken_at(brokenstart,brokenstop));
81 Line_of_staff::height() const
85 Symbol s = pstaff_->stafsym->eval(line_of_score_->pscore_->
89 PCursor<const PCol *> cc(line_of_score_->cols);
91 // all items in the current line & staff.
92 for (; cc.ok(); cc++) {
93 for (PCursor<const Item *> ic(cc->its); ic.ok(); ic++) {
94 if (ic->pstaff_ == pstaff_) {
95 y.unite(ic->height());
99 for (PCursor<const Spanner *> sc(cc->starters); sc.ok(); sc++)
100 if (sc->pstaff_ == pstaff_) {
101 y.unite(sc->height());