]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.76
authorfred <fred>
Sun, 24 Mar 2002 19:48:21 +0000 (19:48 +0000)
committerfred <fred>
Sun, 24 Mar 2002 19:48:21 +0000 (19:48 +0000)
lily/idealspacing.cc
lily/include/word-wrap.hh [new file with mode: 0644]

index f1ff3691d567ad25b89509d2284b2e9683f265fc..9713f255db45a14b6cd1368ba44a2272cd4faf23 100644 (file)
@@ -1,3 +1,11 @@
+/*
+  idealspacing.cc -- implement Idealspacing
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1996,1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
 #include "idealspacing.hh"
 #include "p-col.hh"
 #include "p-score.hh"
@@ -8,23 +16,21 @@ Idealspacing::print() const
 {
 #ifndef NPRINT
     mtor << "idealspacing {" ;
-    mtor << "distance "<<space<< " strength " << hooke ;
-    mtor << "left " << left->rank_i() << " right " << right->rank_i() << "}\n";
+    mtor << "distance "<<space_f_<< " strength " << hooke_f_ ;
+    mtor << "left " << left_i_ << " right " << right_i_ << "}\n";
 #endif
 }
 
-Idealspacing::Idealspacing(PCol const * l,PCol const * r)
+Idealspacing::Idealspacing()
 {
-    space = 0.0;
-    hooke = 0.0;
-    left = l;
-    right = r;
+    space_f_ = 0.0;
+    hooke_f_ = 0.0;
+    left_i_ = -1;
+    right_i_ = -1;
 }
 
 void
 Idealspacing::OK() const
 {
-#ifndef NDEBUG
-    assert(hooke >= 0 && left  && right);
-#endif    
+    assert(hooke_f_ >= 0);
 }
diff --git a/lily/include/word-wrap.hh b/lily/include/word-wrap.hh
new file mode 100644 (file)
index 0000000..b7b7d42
--- /dev/null
@@ -0,0 +1,21 @@
+/*
+  word-wrap.hh -- declare Word_wrap
+
+  source file of the GNU LilyPond music typesetter
+
+  (c) 1997 Han-Wen Nienhuys <hanwen@stack.nl>
+*/
+
+
+#ifndef WORD_WRAP_HH
+#define WORD_WRAP_HH
+
+#include "break.hh"
+
+/// wordwrap type algorithm: move to next line if current is optimal.
+struct Word_wrap : Break_algorithm {
+    virtual Array<Col_hpositions> do_solve()const;
+    Word_wrap(PScore&);
+};
+
+#endif // WORD_WRAP_HH