From: fred Date: Sun, 24 Nov 1996 23:58:52 +0000 (+0000) Subject: lilypond-0.0.11 X-Git-Tag: release/1.5.59~6754 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=c15bad00ca138ebce15ecfecb350cc56cf5393e5;p=lilypond.git lilypond-0.0.11 --- diff --git a/src/pcol.cc b/src/pcol.cc index 6e3092a0e3..41cf4fdb67 100644 --- a/src/pcol.cc +++ b/src/pcol.cc @@ -1,4 +1,5 @@ #include "pcol.hh" +#include "pscore.hh" #include "pstaff.hh" #include "debug.hh" @@ -44,24 +45,32 @@ PCol::width() const void PCol::print() const { - #ifndef NPRINT +#ifndef NPRINT mtor << "PCol {"; + if (pscore_) { // ugh + PCursor me=pscore_->find_col(this); + PCursor bot(pscore_->cols.top()); + if (me.ok()) { + mtor << "rank: " << me - bot << '\n'; + } + } mtor << "# symbols: " << its.size() ; if (breakable()){ - mtor << "pre,post: "; + mtor << "\npre,post: "; prebreak->print(); postbreak->print(); + } else if (daddy) { + mtor<<'\n' << ((this == daddy->prebreak) ? "prebreak" : "postbreak"); } mtor << "extent: " << width().min << ", " << width().max << "\n"; mtor << "}\n"; - #endif +#endif } int -PCol::compare(const PCol &, const PCol &) +PCol::compare(const PCol &c1, const PCol &c2) { - assert(false); - return 0 ; + return c1.pscore_->compare_pcols(&c1,&c2); } void @@ -71,8 +80,7 @@ PCol::OK () const assert(prebreak&&postbreak); assert(prebreak->daddy == this); assert(postbreak->daddy == this); - } - + } } void @@ -83,7 +91,10 @@ PCol::set_breakable() prebreak = new PCol(this); postbreak = new PCol(this); - used = true; + prebreak->pscore_ = pscore_; + postbreak->pscore_ = pscore_; + + } bool @@ -98,7 +109,8 @@ PCol::PCol(PCol *parent) prebreak=0; postbreak=0; line=0; - used = false; + + pscore_ = 0; } PCol::~PCol() @@ -112,5 +124,11 @@ PCol::add( Item *i) { its.bottom().add(i); i->pcol_ = this; - used = true; + +} + +bool +PCol::used()const +{ + return breakable() || its.size(); }