]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-0.0.9
authorfred <fred>
Fri, 8 Nov 1996 21:43:12 +0000 (21:43 +0000)
committerfred <fred>
Fri, 8 Nov 1996 21:43:12 +0000 (21:43 +0000)
src/scoreline.cc [new file with mode: 0644]

diff --git a/src/scoreline.cc b/src/scoreline.cc
new file mode 100644 (file)
index 0000000..7e40c6a
--- /dev/null
@@ -0,0 +1,43 @@
+#include "scoreline.hh"
+#include "staffline.hh"
+#include "dimen.hh"
+#include "spanner.hh"
+#include "symbol.hh"
+#include "paper.hh"
+#include "pcol.hh"
+#include "pscore.hh"
+
+
+String
+Line_of_score::TeXstring() const
+{
+     String s("\\vbox{%<- line of score\n");
+     for (PCursor<Line_of_staff*> sc(staffs); sc.ok(); sc++){
+        s += sc->TeXstring();
+        if ((sc+1).ok())
+            s+= "\\interstaffline\n";
+     }
+     s += "}";
+     return s;
+}
+
+
+Line_of_score::Line_of_score(svec<const PCol *> sv,
+                            const PScore *ps)
+{
+    score = ps;
+    for (int i=0; i< sv.sz(); i++) {
+       PCol *p=(PCol *) sv[i];
+       cols.bottom().add(p);
+       p->line=this;
+    }
+
+    for (PCursor<PStaff*> sc(score->staffs); sc.ok(); sc++)
+       staffs.bottom().add(new Line_of_staff(this, sc));    
+}
+/* construct a line with the named columns. Make the line field
+    in each column point to this
+    
+    #sv# isn't really const!!
+    */
+