2 rest-collision-reg.cc -- implement Rest_collision_engraver
4 source file of the GNU LilyPond music typesetter
6 (c) 1997--1998 Han-Wen Nienhuys <hanwen@stack.nl>
10 #include "rest-collision.hh"
11 #include "rest-collision-grav.hh"
12 #include "collision.hh"
13 #include "note-column.hh"
16 IMPLEMENT_IS_TYPE_B1(Rest_collision_engraver
, Engraver
);
17 ADD_THIS_TRANSLATOR(Rest_collision_engraver
);
19 Rest_collision_engraver::Rest_collision_engraver()
25 Rest_collision_engraver::acknowledge_element (Score_elem_info i
)
27 if (i
.elem_l_
->is_type_b (Note_column::static_name()))
29 // what should i do, what should _engraver do?
30 if (!rest_collision_p_
)
32 rest_collision_p_
= new Rest_collision
;
33 announce_element (Score_elem_info (rest_collision_p_
, 0));
35 rest_collision_p_
->add ((Note_column
*)i
.elem_l_
->item());
40 Rest_collision_engraver::do_pre_move_processing()
42 if (rest_collision_p_
)
44 typeset_element (rest_collision_p_
);
45 rest_collision_p_
= 0;