2 p-col.cc -- implement PCol
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
19 for (iter_top(its,i); i.ok(); i++)
22 w.unite(Interval(0,0));
27 PCol::clean_breakable_items()
33 prebreak_p_->clean_breakable_items();
35 postbreak_p_->clean_breakable_items();
49 prebreak_p_->rank_i_ = i;
51 postbreak_p_->rank_i_ = i;
60 mtor << "rank: " << rank_i_ << '\n';
62 mtor << "# symbols: " << its.size() ;
64 mtor << "\npre,post: ";
66 postbreak_p_->print();
67 } else if (daddy_l_) {
68 mtor<<'\n' << ((this == daddy_l_->prebreak_p_) ?
69 "prebreak" : "postbreak");
72 mtor << "extent: " << width().str() << "\n";
78 PCol::compare(PCol const &c1, PCol const &c2)
80 return c1.rank_i() - c2.rank_i();
87 if (prebreak_p_ || postbreak_p_ ) {
88 assert(prebreak_p_&&postbreak_p_);
89 assert(prebreak_p_->daddy_l_ == this);
90 assert(postbreak_p_->daddy_l_ == this);
101 prebreak_p_ = new PCol(this);
102 postbreak_p_ = new PCol(this);
103 prebreak_p_->pscore_l_ = pscore_l_;
104 postbreak_p_->pscore_l_ = pscore_l_;
108 PCol::breakpoint_b() const
114 PCol::breakable_b() const
116 return prebreak_p_||postbreak_p_;
119 PCol::PCol(PCol *parent)
122 error_mark_b_ = false;
148 return breakable_b() || its.size()|| used_b_;