]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-engraver.cc
release: 1.3.19
[lilypond.git] / lily / rest-engraver.cc
index b3f5e4494da1ab5b0ab3d7703dd49111814e5741..5fe98cf2936f97b4b27d4a5bbc74f82cdbcf323f 100644 (file)
@@ -3,9 +3,9 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c)  1997--1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c)  1997--2000 Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
-
+#include "staff-symbol-referencer.hh"
 #include "rest-engraver.hh"
 #include "musical-request.hh"
 #include "dots.hh"
@@ -47,21 +47,25 @@ Rest_engraver::do_process_requests ()
   if (rest_req_l_ && !rest_p_) 
     {
       rest_p_ = new Rest;
-      rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_; 
-      rest_p_->dots_i_ = rest_req_l_->duration_.dots_i_;
-      if (rest_p_->dots_i_)
+      Staff_symbol_referencer_interface si (rest_p_);
+      si.set_interface ();
+      
+      rest_p_->set_elt_property ("duration-log",
+                                gh_int2scm (rest_req_l_->duration_.durlog_i_)); 
+      
+      if (rest_req_l_->duration_.dots_i_)
        {
          dot_p_ = new Dots;
-         rest_p_->dots_l_  =dot_p_;
+
+         Staff_symbol_referencer_interface si (dot_p_);
+         si.set_interface ();
+         
+         rest_p_->add_dots (dot_p_);
+         dot_p_->set_elt_property ("dot-count",
+                                   gh_int2scm (rest_req_l_->duration_.dots_i_));
          announce_element (Score_element_info (dot_p_,0));
        }
-      if (rest_p_->balltype_i_ >= 2) 
-       {
-         String reststyle = get_property ("restStyle", 0);
-         if (reststyle.length_i ())
-           rest_p_->set_elt_property (style_scm_sym,
-                                      ly_ch_C_to_scm (reststyle.ch_C()));
-       }
+
       announce_element (Score_element_info (rest_p_, rest_req_l_));
     }
 }