]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/collision.hh
release: 1.3.18
[lilypond.git] / lily / include / collision.hh
index 844496a855546467bb8db9f9fbb21a6860da6fd8..f17e4378342cbfdc0d4039ec0380d7c99ea54ee4 100644 (file)
@@ -1,25 +1,38 @@
 /*
   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