Correct left text alignment of DynamicTextSpanner.
[lilypond.git] / lily / include / spring.hh
blob4022173201f45d00852568d7f5e8cd0c181a5ef8
1 /*
2 spring.hh -- declare Spring
4 source file of the GNU LilyPond music typesetter
6 (c) 1999--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #ifndef SPRING_HH
10 #define SPRING_HH
12 #include "lily-proto.hh"
13 #include "smobs.hh"
15 class Spring
17 Real distance_;
18 Real min_distance_;
20 Real inverse_stretch_strength_;
21 Real inverse_compress_strength_;
23 Real blocking_force_;
25 void update_blocking_force ();
27 DECLARE_SIMPLE_SMOBS (Spring);
28 public:
29 Spring ();
30 Spring (Real distance, Real min_distance);
32 Real distance () const {return distance_;}
33 Real min_distance () const {return min_distance_;}
34 Real inverse_stretch_strength () const {return inverse_stretch_strength_;}
35 Real inverse_compress_strength () const {return inverse_compress_strength_;}
36 Real blocking_force () const {return blocking_force_;}
38 Real length (Real f) const;
40 void set_distance (Real);
41 void set_min_distance (Real);
42 void set_inverse_stretch_strength (Real);
43 void set_inverse_compress_strength (Real);
44 void set_blocking_force (Real);
45 void set_default_strength ();
47 void operator*= (Real);
48 bool operator> (Spring const&) const;
50 DECLARE_UNSMOB (Spring, spring);
52 Spring merge_springs (vector<Spring> const &springs);
54 #endif /* SPRING_HH */