]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/collision.hh
release: 1.3.70
[lilypond.git] / lily / include / collision.hh
index c0d51b35aad384d16a53d3304063f3f2ebe1ff35..10c5397a6eb57df8709a2b1131d966cc8643a7cf 100644 (file)
@@ -3,38 +3,46 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 
 #ifndef COLLISION_HH
 #define COLLISION_HH
-#include "lily-proto.hh"
-#include "axis-group-item.hh"
-#include "tuple.hh"
 
+#include "lily-proto.hh"
+#include "lily-guile.hh"
 
-typedef Tuple<Note_column*, Real> Shift_tup;
 
 /**
   Resolve conflicts between various Note_columns (chords).
   
   TODO 
 
-  multistaff support (see Chlapik: equal noteheads should be on the
+  multistaff support (see Chlapik: equal noteheads should be on the
   same hpos.)  
-*/
-class Collision : public Axis_group_item {
-protected:
-  Array<Shift_tup> automatic_shift ();
-  Array<Shift_tup> forced_shift ();
+
+  * Make interface of this, similar to align-interface.
+  
+  Properties:
+
+  elements -- (see Axis_group_interface)
+
+  merge-differently-dotted -- merge black noteheads with differing dot count.
+
+  horizontal-shift -- integer that identifies ranking of note-column for horizontal shifting.
   
-  virtual void do_substitute_element_pointer (Score_element*,Score_element*);
-  virtual void do_pre_processing();
+  force-hshift -- amount of collision_note_width that overides automatic collision settings.
+  Read and removed from elements.
+  
+*/
+class Collision                        // interface
+{
 public:
-  Link_array<Note_column> clash_l_arr_;
-    
-  void add_column (Note_column*ncol_l);
-  Collision();
+  static SCM automatic_shift (Score_element*);
+  static SCM forced_shift (Score_element*);
+  static Real force_shift_callback (Score_element *, Axis);
+  static void do_shifts (Score_element*);
+  static void add_column (Score_element*me,Score_element*ncol_l);
 };
 #endif // COLLISION_HH