source file of the GNU LilyPond music typesetter
- (c) 1997--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+ (c) 1997--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#include "note-column.hh"
/*
collect Note_column, and as soon as there are 2 or more, put them in
a collision object. */
-class Collision_engraver : public Engraver {
+class Collision_engraver : public Engraver
+{
Item * col_;
Link_array<Grob> note_columns_;
virtual void process_acknowledged_grobs ();
virtual void stop_translation_timestep ();
public:
- TRANSLATOR_DECLARATIONS(Collision_engraver);
+ TRANSLATOR_DECLARATIONS (Collision_engraver);
};
return ;
if (!col_)
{
- col_ = new Item (get_property ("NoteCollision"));
- announce_grob (col_, SCM_EOL);
+ col_ = make_item ("NoteCollision", SCM_EOL);
+
}
for (int i=0; i< note_columns_.size (); i++)
if (Note_column::has_interface (i.grob_))
{
/*should check Y axis? */
- if (Note_column::rest_b (i.grob_) || i.grob_->get_parent (X_AXIS))
+ if (Note_column::has_rests (i.grob_) || i.grob_->get_parent (X_AXIS))
return ;
note_columns_.push (i.grob_);
void
Collision_engraver::stop_translation_timestep ()
{
- if (col_)
- {
- typeset_grob (col_);
- col_ =0;
- }
+ col_ =0;
note_columns_.clear ();
}
-ENTER_DESCRIPTION(Collision_engraver,
+ENTER_DESCRIPTION (Collision_engraver,
/* descr */ "",
/* creats*/ "NoteCollision",
/* accepts */ "",