2 head-grav.cc -- part of GNU LilyPond
4 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
7 #include "note-head.hh"
8 #include "head-grav.hh"
9 #include "paper-def.hh"
10 #include "musical-request.hh"
13 Note_head_engraver::Note_head_engraver()
21 Note_head_engraver::do_try_request (Request
*req_l
)
26 if (!(req_l
->musical() && req_l
->musical ()->note ()))
30 note_req_l_
=req_l
->musical()->rhythmic ();
35 Note_head_engraver::do_process_requests()
37 if (!note_req_l_
|| note_p_
)
40 note_p_
= new Note_head
;
41 note_p_
->balltype_i_
= note_req_l_
->duration_
.durlog_i_
;
42 note_p_
->dots_i_
= note_req_l_
->duration_
.dots_i_
;
46 note_p_
->dots_l_
= dot_p_
;
47 announce_element (Score_elem_info (dot_p_
,0));
50 note_p_
->position_i_
= note_req_l_
->note()->pitch_
.steps ();
52 Staff_info inf
= get_staff_info();
53 if (inf
.c0_position_i_l_
)
54 note_p_
->position_i_
+= *inf
.c0_position_i_l_
;
57 Score_elem_info
itinf (note_p_
,note_req_l_
);
58 announce_element (itinf
);
62 Note_head_engraver::do_pre_move_processing()
66 typeset_element (note_p_
);
71 typeset_element (dot_p_
);
76 Note_head_engraver::do_post_move_processing()
82 IMPLEMENT_IS_TYPE_B1(Note_head_engraver
,Engraver
);
83 ADD_THIS_TRANSLATOR(Note_head_engraver
);