]> git.donarmstrong.com Git - lilypond.git/blob - lily/include/spring.hh
* scm/music-functions.scm (has-request-chord): don't use
[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--2005 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 "smobs.hh"
15
16 struct Spring_smob
17 {
18   Grob *other_;
19   Real distance_;
20   bool expand_only_b_;
21   Real strength_;
22   
23   DECLARE_SIMPLE_SMOBS(Spring_smob, dummy);
24 public:
25   Spring_smob();
26 };
27 DECLARE_UNSMOB(Spring_smob, spring);
28
29 struct Spring
30 {
31   Drul_array<Item*> item_l_drul_;
32   Real distance_;
33   bool expand_only_b_;
34
35   /*
36     TODO: make 2 strengths: one for stretching, and one for shrinking.
37   */
38   Real strength_;
39   void add_to_cols ();
40   void set_to_cols ();
41   Spring ();
42 };
43
44
45 #endif /* SPRING_HH */
46