]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-engraver.cc
update for the lily-wins.py script.
[lilypond.git] / lily / volta-engraver.cc
index 195a258c580dd8591654d1bfd464db890f293e42..248d5740e9f0c46f9f39c7f6887ad6e5f528ba3d 100644 (file)
@@ -3,12 +3,12 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "engraver.hh"
-#include "translator-group.hh"
+#include "context.hh"
 #include "volta-bracket.hh"
 #include "item.hh"
 #include "note-column.hh"
@@ -24,7 +24,7 @@
 class Volta_engraver : public Engraver
 {
 public:
-  TRANSLATOR_DECLARATIONS(Volta_engraver);
+  TRANSLATOR_DECLARATIONS (Volta_engraver);
 protected:
 
   virtual void acknowledge_grob (Grob_info);
@@ -82,7 +82,7 @@ Volta_engraver::staff_eligible ()
        volta engraver in score context or somesuch.
        
       */
-      if (!gh_pair_p (staffs))
+      if (!ly_c_pair_p (staffs))
        {
          programming_error ("Huh? Volta engraver can't find staffs?");
          return false;
@@ -106,13 +106,13 @@ Volta_engraver::process_music ()
     
   bool  end = false;
   start_string_ = SCM_EOL;
-  while (gh_pair_p (cs))
+  while (ly_c_pair_p (cs))
     {
       SCM c = ly_car (cs);
 
-      if (gh_pair_p (c)
+      if (ly_c_pair_p (c)
          && ly_car (c) == ly_symbol2scm ("volta")
-         && gh_pair_p (ly_cdr (c)))
+         && ly_c_pair_p (ly_cdr (c)))
        {
          if (ly_cadr (c) ==  SCM_BOOL_F)
            end = true;
@@ -146,7 +146,7 @@ Volta_engraver::process_music ()
     }
 
   if (volta_span_ && 
-      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
     {
       warning (_ ("Already have a volta spanner.  Stopping that one prematurely."));
       
@@ -161,14 +161,14 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_ && 
-      (gh_string_p (start_string_) || gh_pair_p (start_string_)))
+      (ly_c_string_p (start_string_) || ly_c_pair_p (start_string_)))
     {
       started_mom_ = now_mom () ;
 
-      volta_span_ = new Spanner (get_property ("VoltaBracket"));
+      volta_span_ = make_spanner ("VoltaBracket", SCM_EOL);
 
-      announce_grob (volta_span_, SCM_EOL);
-      volta_span_->set_grob_property ("text", start_string_);
+      
+      volta_span_->set_property ("text", start_string_);
     }
 }
 
@@ -200,7 +200,7 @@ Volta_engraver::acknowledge_grob (Grob_info i)
        staff_ = SCM_UNDEFINED;
 
       if (staff_ != SCM_UNDEFINED)
-       staff_ = i.grob_->self_scm();
+       staff_ = i.grob_->self_scm ();
     }
 }
 
@@ -228,10 +228,10 @@ Volta_engraver::stop_translation_timestep ()
        THIS IS A KLUDGE.
 
        we need to do this here, because STAFF_ is not initialized yet
-       in the 1st call of process_music()
+       in the 1st call of process_music ()
       */
       
-      volta_span_->suicide( );
+      volta_span_->suicide ( );
       volta_span_ = 0;
     }
   
@@ -246,7 +246,7 @@ Volta_engraver::stop_translation_timestep ()
   TODO: should attach volta to paper-column if no bar is found.
  */
 
-ENTER_DESCRIPTION(Volta_engraver,
+ENTER_DESCRIPTION (Volta_engraver,
 /* descr */       "Make volta brackets",
 /* creats*/       "VoltaBracket",
 /* accepts */     "",