2 bar-column-grav.cc -- implement Bar_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "bar-column-grav.hh"
11 #include "bar-column.hh"
16 Bar_column_engraver::Bar_column_engraver()
24 Bar_column_engraver::acknowledge_element (Score_elem_info info
)
26 if (info
.elem_l_
->is_type_b (Script::static_name())
27 && info
.req_l_
->command()
28 && info
.origin_grav_l_arr_
.size() == 1)
30 script_l_arr_
.push ((Script
*)info
.elem_l_
->item());
32 else if (info
.origin_grav_l_arr_
.size() == 1
33 && info
.elem_l_
->is_type_b (Bar::static_name()))
34 bar_l_
= (Bar
*)info
.elem_l_
->item();
36 if (bar_l_
&& !barcol_p_
)
38 barcol_p_
= new Bar_column
;
39 barcol_p_
->breakable_b_
=true;
40 barcol_p_
->break_priority_i_
= bar_l_
-> break_priority_i_
;
41 barcol_p_
->set_bar (bar_l_
);
43 announce_element (Score_elem_info (barcol_p_
, 0));
48 for (int i
=0; i
< script_l_arr_
.size(); i
++)
50 script_l_arr_
[i
]->breakable_b_
= true;
51 script_l_arr_
[i
]->break_priority_i_
= barcol_p_
-> break_priority_i_
;
52 barcol_p_
->add (script_l_arr_
[i
]);
54 script_l_arr_
.clear();
59 Bar_column_engraver::do_pre_move_processing()
63 typeset_element (barcol_p_
);
69 Bar_column_engraver::do_post_move_processing()
71 script_l_arr_
.clear();
75 IMPLEMENT_IS_TYPE_B1(Bar_column_engraver
, Engraver
);
76 ADD_THIS_TRANSLATOR(Bar_column_engraver
);