]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/include/spring.hh
* lily/*.cc, lily/include/*.hh: eliminate dummy arguments from
[lilypond.git] / lily / include / spring.hh
index 4a49085e80d11cac515c1267dd80996aae59b14d..8813caff92602031d365b39b1b7ea227a43ee5f3 100644 (file)
@@ -1,34 +1,44 @@
-/*   
+/*
   spring.hh -- declare Spring, Column_spring
-  
+
   source file of the GNU LilyPond music typesetter
-  
-  (c) 1999--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+
+  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+*/
 
 #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 ();
+#include "smobs.hh"
+
+struct Spring_smob
+{
+  Grob *other_;
+  Real distance_;
+  bool expand_only_b_;
+  Real inverse_strength_;
+
+  DECLARE_SIMPLE_SMOBS (Spring_smob);
+public:
+  Spring_smob ();
 };
+DECLARE_UNSMOB (Spring_smob, spring);
+
+struct Spring
+{
+  Drul_array<Item *> item_drul_;
+  Real distance_;
+  bool expand_only_b_;
 
-struct Spring{
-  Drul_array<Item*> 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 */