]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/rest-engraver.cc
release: 1.3.66
[lilypond.git] / lily / rest-engraver.cc
index aef1e884bb1163753dda1c64c89f8cbf0dd248a4..96f34bfe961eab776a46db7a0f52970f130870f4 100644 (file)
@@ -3,13 +3,14 @@
 
   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"
 #include "rest.hh"
+
 /*
   Should merge with Note_head_engraver
  */
@@ -42,26 +43,30 @@ Rest_engraver::do_pre_move_processing ()
 }
 
 void
-Rest_engraver::do_process_requests ()
+Rest_engraver::do_process_music ()
 {
   if (rest_req_l_ && !rest_p_) 
     {
-      rest_p_ = new Rest;
-      rest_p_->balltype_i_ = rest_req_l_->duration_.durlog_i_; 
-
+      rest_p_ = new Rest (get_property ("basicRestProperties"));
+      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_;
+         dot_p_ = new Item (get_property ("basicDotsProperties"));
+
+         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_));
     }
 }