/*
collision.hh -- declare Collision
- source file of the LilyPond music typesetter
+ source file of the GNU LilyPond music typesetter
- (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+ (c) 1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
*/
#ifndef COLLISION_HH
#define COLLISION_HH
#include "lily-proto.hh"
-#include "item.hh"
+#include "axis-group-item.hh"
+#include "tuple.hh"
-class Collision : public Item {
- Array<Note_column*> clash_l_arr_;
+//junkme, use SCM conses.
+typedef Tuple<Score_element*, Real> Shift_tup;
+
+/**
+ Resolve conflicts between various Note_columns (chords).
+
+ TODO
+
+ multistaff support (see Chlapik: equal noteheads should be on the
+ same hpos.)
+*/
+class Collision : public Axis_group_item {
protected:
- virtual void do_pre_processing();
+ Array<Shift_tup> automatic_shift ();
+ Array<Shift_tup> forced_shift ();
+
+ virtual void do_pre_processing();
public:
- NAME_MEMBERS(Collision);
- void add (Note_column*ncol_l);
- Collision();
+ void add_column (Note_column*ncol_l);
+ Collision();
};
#endif // COLLISION_HH