2 headreg.cc -- part of GNU LilyPond
4 (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
7 #include "note-head.hh"
9 #include "paper-def.hh"
10 #include "complex-walker.hh"
11 #include "musical-request.hh"
13 Note_head_register::Note_head_register()
16 post_move_processing();
20 Note_head_register::try_request(Request *req_l)
22 if (req_l->musical() && (req_l->musical()->note() || req_l->musical()->rest()))
23 note_req_l_=req_l->musical()->rhythmic();
31 Note_head_register::process_requests()
36 Note_head*n_p = new Note_head(8); // ugh
38 n_p->set_rhythmic(note_req_l_->rhythmic());
40 if (note_req_l_->note()) {
41 n_p->position_i_ = note_req_l_->note()->height() +
42 *get_staff_info().c0_position_i_l_;
43 } else if (note_req_l_->rest()) {
45 if (note_req_l_->rhythmic()->duration_.type_i_ <= 2)
48 6 * paper()->internote_f()));
51 Score_elem_info itinf(note_p_,note_req_l_);
52 announce_element(itinf);
56 Note_head_register::pre_move_processing()
59 typeset_element(note_p_);
64 Note_head_register::post_move_processing()
69 IMPLEMENT_STATIC_NAME(Note_head_register);
70 ADD_THIS_REGISTER(Note_head_register);