X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fspring.hh;h=2ccd5facf8f1799f0aa8cb5c270ca7f1a0b1f3e4;hb=18037c60a42e96cf61b13006bb391e3699bdc45e;hp=3e88aadf38df9f1e56a95db10cf1607c9318b043;hpb=d7416352b825c3e9b4858e1ddcf14f0c00e26d89;p=lilypond.git diff --git a/lily/include/spring.hh b/lily/include/spring.hh index 3e88aadf38..2ccd5facf8 100644 --- a/lily/include/spring.hh +++ b/lily/include/spring.hh @@ -1,35 +1,44 @@ -/* +/* spring.hh -- declare Spring, Column_spring - + source file of the GNU LilyPond music typesetter - - (c) 1999--2000 Han-Wen Nienhuys - - */ + + (c) 1999--2006 Han-Wen Nienhuys +*/ #ifndef SPRING_HH #define SPRING_HH #include "lily-proto.hh" -#include "drul-array.hh" - -struct Column_spring { - Paper_column *other_l_; - Real distance_f_; - Real strength_f_; - - Column_spring (); - static int compare (const Column_spring &r1, const Column_spring &r2); +#include "smobs.hh" + +struct Spring_smob +{ + Grob *other_; + Real distance_; + bool expand_only_b_; + Real inverse_strength_; + + DECLARE_SIMPLE_SMOBS (Spring_smob, dummy); +public: + Spring_smob (); }; +DECLARE_UNSMOB (Spring_smob, spring); + +struct Spring +{ + Drul_array item_drul_; + Real distance_; + bool expand_only_b_; -struct Spring{ - Drul_array item_l_drul_; - Real distance_f_; - Real strength_f_; + /* + TODO: make 2 strengths: one for stretching, and one for shrinking. + */ + Real inverse_strength_; void add_to_cols (); + void set_to_cols (); Spring (); }; - #endif /* SPRING_HH */