2 item.cc -- implement Item
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
22 IMPLEMENT_IS_TYPE_B1(Item, Score_elem);
25 Item::do_print() const
36 return pcol_l_->hpos_f_ + offset().x;
44 return pcol_l_->line_l_;
48 Item::break_status_i() const
53 else if (!c->daddy_l_)
55 else if (c == c->daddy_l_->prebreak_p_)
62 Item::do_breakable_col_processing()
65 if (!c->breakable_b())
68 for (int i=0; i < 2; i++) {
69 broken_to_a_[i] = clone()->item();
70 pscore_l_->typeset_item(broken_to_a_[i], c, -1+ 2*i);
71 broken_to_a_[i]->handle_prebroken_dependencies();
74 handle_prebroken_dependencies();
78 Item::find_prebroken_piece(Line_of_score*l) const
82 else if (broken_to_a_[0] && broken_to_a_[0]->line_l() == l)
83 return broken_to_a_[0];
84 else if (broken_to_a_[1] && broken_to_a_[1]->line_l() == l)
85 return broken_to_a_[1];
91 Item::find_prebroken_piece(PCol*c)const
94 return (Item *) this; // ugh
96 if (c == pcol_l_->prebreak_p_)
97 return (Item *) broken_to_a_[0];
98 else if (c==pcol_l_->postbreak_p_)
99 return (Item *)broken_to_a_[1];
105 Item::handle_prebroken_dependencies()
107 if ( pcol_l_->breakable_b() || pcol_l_->daddy_l_ )
108 Score_elem::handle_prebroken_dependencies();