]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spring.hh
* Another grand 2003 update.
[lilypond.git] / lily / include / spring.hh
1 /*   
2   spring.hh -- declare Spring, Column_spring
3   
4   source file of the GNU LilyPond music typesetter
5   
6   (c)  1999--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
7   
8  */
9
10 #ifndef SPRING_HH
11 #define SPRING_HH
12
13 #include "lily-proto.hh"
14 #include "drul-array.hh"
15 #include "smobs.hh"
16
17 struct Spring_smob
18 {
19   Grob *other_;
20   Real distance_;
21   bool expand_only_b_;
22   Real strength_;
23   
24   DECLARE_SIMPLE_SMOBS(Spring_smob,dummy);
25 public:
26   SCM smobbed_copy () const;
27   Spring_smob();
28 };
29 DECLARE_UNSMOB(Spring_smob, spring);
30
31 struct Spring{
32   Drul_array<Item*> item_l_drul_;
33   Real distance_;
34   bool expand_only_b_;
35
36   /*
37     TODO: make 2 strengths: one for stretching, and one for shrinking.
38   */
39   Real strength_;
40   void add_to_cols ();
41   void set_to_cols ();
42   Spring ();
43 };
44
45
46 #endif /* SPRING_HH */
47