PointerList<const Item*> its;
PointerList<const Spanner*> stoppers, starters;
- /// Can this be broken? true eg. for bars.
- bool breakable()const;
-
- /// does this column have items, does it have spacings attached?
- bool used;
/// prebreak is put before end of line.
PCol *prebreak;
PCol *postbreak;
/** \See{prebreak}
*/
+
PCol *daddy;
- /*
- if this column is pre or postbreak, then this field points to the parent.
- */
+ /** if this column is pre or postbreak, then this field points to
+ the parent. */
+
/// if lines are broken then this column is in #line#
const Line_of_score *line;
/// if lines are broken then this column x-coord #hpos#
Real hpos;
-
- /****************************************************************/
+ PScore * pscore_;
+
+ /****************/
+ /// does this column have items, does it have spacings attached?
+ bool used() const;
+
void add(Item *i);
+
+ /// Can this be broken? true eg. for bars.
+ bool breakable()const;
Interval width() const;
~PCol();
// need to store height of each staff.
IPointerList<Line_of_staff*> staffs;
- const PScore * score; // needed to generate staffs
+ PScore * pscore_; // needed to generate staffs
/****************/
- Line_of_score(svec<const PCol *> sv, const PScore *);
+ Line_of_score(svec<const PCol *> sv, PScore *);
String TeXstring() const;
};
#endif
+
/// one broken line of staff.
struct Line_of_staff {
- IPointerList<Spanner *> brokenspans;
- Line_of_score const * scor;
+
+ Line_of_score * line_of_score_;
const PStaff *pstaff_;
/****************/
String TeXstring() const;
Line_of_staff(Line_of_score*, PStaff *);
Interval height() const;
+
};
#endif
void
Score::connect_nonmus(PCol* c1, PCol *c2, Real d)
{
- if (c2->used && c1->used) {
+ if (c2->used() && c1->used()) {
do_connect(c1,c2,d);
// alert! this is broken!
bool
Score_column::used() {
- return pcol_->used;
+ return pcol_->used();
}
void
sc->clean_cols();
for (PCursor<Score_column*> c(cols_); c.ok(); ) {
- if (!c->pcol_->used) {
+ if (!c->pcol_->used()) {
mtor << "removing : ";
c->print();
c.del();
Line_of_score::Line_of_score(svec<const PCol *> sv,
- const PScore *ps)
+ PScore *ps)
{
- score = ps;
+ pscore_ = ps;
for (int i=0; i< sv.sz(); i++) {
PCol *p=(PCol *) sv[i];
cols.bottom().add(p);
p->line=this;
}
- for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
+ for (PCursor<PStaff*> sc(pscore_->staffs); sc.ok(); sc++)
staffs.bottom().add(new Line_of_staff(this, sc));
}
/* construct a line with the named columns. Make the line field
// the staff itself: eg lines, accolades
s += "\\hbox{";
{
- Symbol sym = pstaff_->get_stafsym(scor->score->paper_->linewidth);
+ Symbol sym = pstaff_->get_stafsym(line_of_score_->pscore_-> // ugh
+ paper_->linewidth);
s+=sym.tex;
- PCursor<const PCol *> cc(scor->cols);
+ PCursor<const PCol *> cc(line_of_score_->cols);
Real lastpos=cc->hpos;
// all items in the current line & staff.
Line_of_staff::Line_of_staff(Line_of_score * sc, PStaff*st)
{
- scor=sc;
+ line_of_score_=sc;
pstaff_=st;
-#if 0
+
+
const PCol *linestart = sc->cols.top();
const PCol *linestop = sc->cols.bottom();
+
for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
const PCol *brokenstart = &MAX(*linestart, *sp->left);
const PCol *brokenstop = &MIN(*linestop, *sp->right);
-// if (*brokenstop < *brokenstart)
- brokenspans.bottom().add(sp->broken_at(0,0));
- }
-#endif
- for (PCursor<const Spanner*> sp(pstaff_->spans); sp.ok(); sp++) {
-
- brokenspans.bottom().add(sp->broken_at(0,0));
+ if ( *brokenstart < *brokenstop) {
+ line_of_score_->pscore_-> // higghl
+ add_broken(sp->broken_at(brokenstart,brokenstop));
+ }
}
}
{
Interval y;
{
- Symbol s = pstaff_->stafsym->eval(scor->score->paper_->linewidth);
+ Symbol s = pstaff_->stafsym->eval(line_of_score_->pscore_->
+ paper_->linewidth);
y = s.dim.y;
}
- PCursor<const PCol *> cc(scor->cols);
+ PCursor<const PCol *> cc(line_of_score_->cols);
// all items in the current line & staff.
for (; cc.ok(); cc++) {