2 bar-reg.cc -- implement Bar_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
11 #include "command-request.hh"
12 #include "time-description.hh"
13 #include "engraver-group.hh"
15 Bar_engraver::Bar_engraver()
17 do_post_move_processing();
21 Bar_engraver::do_try_request (Request
*r_l
)
23 Command_req
* c_l
= r_l
->command();
24 if (!c_l
|| !c_l
->bar())
26 Bar_req
* b
= c_l
->bar();
27 if (bar_req_l_
&& bar_req_l_
->equal_b (b
))
36 Bar_engraver::do_process_requests()
41 bar_p_
->type_str_
=bar_req_l_
->type_str_
;
45 Time_description
const *time
= get_staff_info().time_C_
;
46 if (time
&& !time
->whole_in_measure_
)
52 announce_element (Score_elem_info (bar_p_
, bar_req_l_
));
57 daddy_grav_l_
->try_request (&r
);
63 Bar_engraver::do_pre_move_processing()
67 typeset_element (bar_p_
);
73 Bar_engraver::do_post_move_processing()
80 IMPLEMENT_IS_TYPE_B1(Bar_engraver
,Engraver
);
81 ADD_THIS_ENGRAVER(Bar_engraver
);