]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/collision.hh
patch::: 1.3.9.hwn2
[lilypond.git] / lily / include / collision.hh
1 /*
2   collision.hh -- declare Collision
3
4   source file of the GNU LilyPond music typesetter
5
6   (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7 */
8
9
10 #ifndef COLLISION_HH
11 #define COLLISION_HH
12 #include "lily-proto.hh"
13 #include "axis-group-item.hh"
14 #include "tuple.hh"
15
16
17 typedef Tuple<Note_column*, Real> Shift_tup;
18
19 /**
20   Resolve conflicts between various Note_columns (chords).
21   
22   TODO 
23
24   multistaff support (see Chlapik: equal noteheads should be on the
25   same hpos.)  
26 */
27 class Collision : public Axis_group_item {
28 protected:
29   Array<Shift_tup> automatic_shift ();
30   Array<Shift_tup> forced_shift ();
31   
32   virtual void do_substitute_element_pointer (Score_element*,Score_element*);
33   virtual void do_pre_processing();
34 public:
35   Link_array<Note_column> clash_l_arr_;
36     
37   void add_column (Note_column*ncol_l);
38   Collision();
39 };
40 #endif // COLLISION_HH