2 score-halign-reg.cc -- implement Score_horizontal_align_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "break-align-item.hh"
11 #include "score-halign-grav.hh"
12 #include "score-align-grav.hh"
14 Score_horizontal_align_engraver::Score_horizontal_align_engraver()
20 Score_horizontal_align_engraver::do_pre_move_processing()
24 typeset_element (halign_p_
);
30 Score_horizontal_align_engraver::acknowledge_element (Score_elem_info i
)
32 Engraver
* reg
= i
.origin_grav_l_arr_
[0];
33 if (reg
->is_type_b (Type_align_engraver::static_name()))
35 Type_align_engraver
* align_grav_l
= (Type_align_engraver
*) reg
;
38 halign_p_
= new Break_align_item
;
39 halign_p_
->breakable_b_
= true;
40 announce_element (Score_elem_info (halign_p_
,0));
42 Item
* it
= i
.elem_l_
->item();
43 if (align_grav_l
->type_ch_C_
== Bar::static_name())
44 halign_p_
->center_l_
= it
;
46 halign_p_
->add (it
, align_grav_l
->priority_i_
);
50 IMPLEMENT_IS_TYPE_B1(Score_horizontal_align_engraver
,Engraver
);
51 ADD_THIS_TRANSLATOR(Score_horizontal_align_engraver
);