2 bar-column-grav.cc -- implement Bar_column_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@cs.uu.nl>
10 #include "bar-column-engraver.hh"
11 #include "bar-column.hh"
17 Bar_column_engraver::Bar_column_engraver()
21 break_priority_i_
= 0;
25 Bar_column_engraver::do_creation_processing ()
31 Bar_column_engraver::do_process_requests ()
33 Scalar pri
= get_property ("barColumnPriority", 0);
34 if (pri
.length_i() && pri
.isnum_b ())
36 break_priority_i_
= int(pri
);
41 Bar_column_engraver::create_column ()
45 barcol_p_
= new Bar_column
;
46 barcol_p_
->breakable_b_
=true;
47 barcol_p_
->break_priority_i_
= break_priority_i_
;
48 announce_element (Score_element_info (barcol_p_
, 0));
54 Bar_column_engraver::acknowledge_element (Score_element_info info
)
56 Item
* it
= dynamic_cast <Item
*> (info
.elem_l_
);
59 Script
*s
= dynamic_cast<Script
*> (it
);
60 Bar
*b
= dynamic_cast<Bar
*> (it
);
63 && info
.origin_grav_l_arr_
.size() == 1
64 && it
->break_priority_i_
== break_priority_i_
)
67 barcol_p_
->add_script (s
);
69 else if (info
.origin_grav_l_arr_
.size() == 1
70 && it
->break_priority_i_
== break_priority_i_
76 barcol_p_
->set_bar (b
);
82 Bar_column_engraver::process_acknowledged ()
89 Bar_column_engraver::do_pre_move_processing()
93 typeset_element (barcol_p_
);
99 Bar_column_engraver::do_post_move_processing()
101 script_l_arr_
.clear();
106 ADD_THIS_TRANSLATOR(Bar_column_engraver
);