X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Finclude%2Fspring.hh;h=5cb50a9191692a108932b44ad912586f7245ffb7;hb=321cc8ec6586cadfda33dc650198f83906008d36;hp=3e88aadf38df9f1e56a95db10cf1607c9318b043;hpb=d7416352b825c3e9b4858e1ddcf14f0c00e26d89;p=lilypond.git diff --git a/lily/include/spring.hh b/lily/include/spring.hh index 3e88aadf38..5cb50a9191 100644 --- a/lily/include/spring.hh +++ b/lily/include/spring.hh @@ -3,7 +3,7 @@ source file of the GNU LilyPond music typesetter - (c) 1999--2000 Han-Wen Nienhuys + (c) 1999--2003 Han-Wen Nienhuys */ @@ -12,21 +12,33 @@ #include "lily-proto.hh" #include "drul-array.hh" +#include "smobs.hh" -struct Column_spring { - Paper_column *other_l_; - Real distance_f_; - Real strength_f_; +struct Spring_smob +{ + Grob *other_; + Real distance_; + bool expand_only_b_; + Real strength_; - Column_spring (); - static int compare (const Column_spring &r1, const Column_spring &r2); + DECLARE_SIMPLE_SMOBS(Spring_smob,dummy); +public: + SCM smobbed_copy () const; + Spring_smob(); }; +DECLARE_UNSMOB(Spring_smob, spring); struct Spring{ Drul_array item_l_drul_; - Real distance_f_; - Real strength_f_; + Real distance_; + bool expand_only_b_; + + /* + TODO: make 2 strengths: one for stretching, and one for shrinking. + */ + Real strength_; void add_to_cols (); + void set_to_cols (); Spring (); };