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