]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/volta-engraver.cc
* The grand 2005-2006 replace.
[lilypond.git] / lily / volta-engraver.cc
index 0189f1521e0b3167d3490d68f12fc2a298f9f34b..4a6c555d9610a3407e76e03089acf5d564192ce8 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
@@ -14,6 +14,7 @@
 #include "side-position-interface.hh"
 #include "warn.hh"
 #include "staff-symbol.hh"
+#include "text-interface.hh"
 
 #include "translator.icc"
 
@@ -30,12 +31,12 @@ protected:
   DECLARE_ACKNOWLEDGER (staff_symbol);
   DECLARE_ACKNOWLEDGER (note_column);
   DECLARE_ACKNOWLEDGER (bar_line);
-  
+
   virtual void finalize ();
   virtual void derived_mark () const;
   void stop_translation_timestep ();
   void process_music ();
-  
+
   Moment started_mom_;
   Spanner *volta_span_;
   Spanner *end_volta_span_;
@@ -55,6 +56,7 @@ Volta_engraver::derived_mark () const
 Volta_engraver::Volta_engraver ()
 {
   staff_ = SCM_EOL;
+  start_string_ = SCM_EOL;
   volta_span_ = 0;
   end_volta_span_ = 0;
 }
@@ -71,9 +73,7 @@ Volta_engraver::staff_eligible ()
 {
   SCM doit = get_property ("voltaOnThisStaff");
   if (scm_is_bool (doit))
-    {
-      return to_boolean (doit);
-    }
+    return to_boolean (doit);
 
   if (!unsmob_grob (staff_))
     return false;
@@ -161,7 +161,7 @@ Volta_engraver::process_music ()
     }
 
   if (!volta_span_
-      && (scm_is_string (start_string_) || scm_is_pair (start_string_)))
+      && Text_interface::is_markup (start_string_))
     {
       started_mom_ = now_mom ();
 
@@ -175,7 +175,7 @@ void
 Volta_engraver::acknowledge_note_column (Grob_info i)
 {
   if (volta_span_)
-    Volta_bracket_interface::add_column (volta_span_, i.grob());
+    Volta_bracket_interface::add_column (volta_span_, i.grob ());
 }
 
 void
@@ -186,7 +186,7 @@ Volta_engraver::acknowledge_bar_line (Grob_info i)
   if (end_volta_span_)
     Volta_bracket_interface::add_bar (end_volta_span_, i.item ());
 }
+
 void
 Volta_engraver::acknowledge_staff_symbol (Grob_info i)
 {
@@ -245,8 +245,8 @@ ADD_ACKNOWLEDGER (Volta_engraver, staff_symbol);
 ADD_ACKNOWLEDGER (Volta_engraver, note_column);
 ADD_ACKNOWLEDGER (Volta_engraver, bar_line);
 ADD_TRANSLATOR (Volta_engraver,
-               /* descr */ "Make volta brackets.",
-               /* creats*/ "VoltaBracket",
-               /* accepts */ "",
-               /* reads */ "repeatCommands voltaSpannerDuration stavesFound",
+               /* doc */ "Make volta brackets.",
+               /* creat*/ "VoltaBracket",
+               /* accept */ "",
+               /* read */ "repeatCommands voltaSpannerDuration stavesFound",
                /* write */ "");