]> git.donarmstrong.com Git - lilypond.git/blobdiff - src/melodicstaff.cc
release: 0.0.26
[lilypond.git] / src / melodicstaff.cc
index a0c0b2e46f53e6628398f344c810d318f0894d33..849a64b2094bbaa43441f0fdd4dcd4990afb3716 100644 (file)
@@ -5,8 +5,8 @@
 #include "notehead.hh"
 #include "paper.hh"
 #include "molecule.hh"
-#include "linestaff.hh"
-#include "rhythmstaff.hh"
+#include "linepstaff.hh"
+//#include "rhythmstaff.hh"
 #include "sccol.hh" 
 #include "localkeyitem.hh"
 #include "request.hh"
@@ -17,7 +17,7 @@ const int NO_LINES=5;
 void
 Melodic_staff::set_output(PScore*ps)
 {
-    theline = new Linestaff(NO_LINES,ps);
+    theline_l_ = new Linestaff(NO_LINES,ps); // theline_l_ is added to pscore later.
     Simple_staff::set_output(ps);
 }
 
@@ -25,12 +25,8 @@ Melodic_staff::set_output(PScore*ps)
 Notehead*
 Melodic_staff::get_notehead(Note_req *rq, int bottom)
 {        
-    int b  = rq->rhythmic()->balltype;
-    int d  = rq->rhythmic()->dots;
-    
     Notehead *n =new Notehead((NO_LINES-1)*2);
-    n->balltype =b;
-    n->dots = d;
+    n->set_rhythmic(rq->rhythmic());
     n->position = rq->note()->height() + bottom;
     return n;
 }
@@ -48,19 +44,10 @@ Stem *
 Melodic_staff::get_stem(Stem_req*rq)
 {
     Stem * s = new Stem(NO_LINES-1);
-    s->flag = rq->stem_number;
+    s->flag = rq->balltype;
     return s;
 }
 
-/*
-  creation
-  */
-Staff *
-get_new_melodicstaff()
-{
-    return new Melodic_staff;
-}
-
 Rest*
 Melodic_staff::get_rest(Rest_req*rq)
 {
@@ -70,13 +57,8 @@ Melodic_staff::get_rest(Rest_req*rq)
     return r;
 }
 
-Melodic_staff*
-Melodic_staff::clone()const
-{
-    return new Melodic_staff(*this);
-}
-
-Local_key_item* Melodic_staff::get_local_key_item()
+Local_key_item*
+Melodic_staff::get_local_key_item()
 {
     return new Local_key_item(-2);
 }