lilypond-1.3.65
[lilypond.git] / lily / score-align-grav.cc
blob3af608484c84e95b3b48928a294df243623c2d62
1 /*
2 score-align-reg.cc -- implement Type_align_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 */
10 #include "horizontal-group-item.hh"
11 #include "score-align-grav.hh"
12 #include "item.hh"
14 Type_align_engraver::Type_align_engraver()
16 type_ch_C_ = 0;
17 priority_i_ =0;
18 align_p_=0;
21 void
22 Type_align_engraver::do_pre_move_processing()
24 if (align_p_)
26 typeset_element (align_p_);
27 align_p_ =0;
31 void
32 Type_align_engraver::acknowledge_element (Score_elem_info inf)
34 if (inf.elem_l_->is_type_b (type_ch_C_))
37 if (!align_p_)
39 align_p_ = new Horizontal_group_item;
40 align_p_->breakable_b_ = true;
41 announce_element (Score_elem_info (align_p_,0));
43 Score_elem * unbound_elem = inf.elem_l_;
44 while (unbound_elem->axis_group_l_a_[X_AXIS])
45 unbound_elem = unbound_elem->axis_group_l_a_[X_AXIS];
46 align_p_->add_element (unbound_elem);
51 IMPLEMENT_IS_TYPE_B1(Type_align_engraver,Engraver);