2 rest-grav.cc -- implement Rest_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
9 #include "rest-grav.hh"
10 #include "musical-request.hh"
14 Should merge with Note_head_engraver
16 Rest_engraver::Rest_engraver ()
24 Rest_engraver::do_post_move_processing ()
30 Rest_engraver::do_pre_move_processing ()
34 typeset_element (rest_p_
);
39 typeset_element (dot_p_
);
45 Rest_engraver::do_process_requests ()
47 if (rest_req_l_
&& !rest_p_
)
50 rest_p_
->balltype_i_
= rest_req_l_
->duration_
.durlog_i_
;
51 rest_p_
->dots_i_
= rest_req_l_
->duration_
.dots_i_
;
55 rest_p_
->dots_l_
=dot_p_
;
56 announce_element (Score_elem_info (dot_p_
,0));
58 announce_element (Score_elem_info (rest_p_
, rest_req_l_
));
63 Rest_engraver::do_try_request (Request
*r
)
65 Musical_req
*m
= r
->musical ();
66 if (!m
|| !m
->rest ())
69 rest_req_l_
= m
->rest (); // ugh
73 IMPLEMENT_IS_TYPE_B1(Rest_engraver
, Engraver
);
74 ADD_THIS_TRANSLATOR(Rest_engraver
);