]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/span-arpeggio-engraver.cc
Update using bison-CVS.
[lilypond.git] / lily / span-arpeggio-engraver.cc
index 0b473fe5df73db7258356b66dafc98b24f87426b..79dbbd0dc218d37dd375af15470275fb5d484794 100644 (file)
@@ -3,29 +3,26 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
 
   Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
-#include "lily-guile.hh"
-#include "item.hh"
 #include "arpeggio.hh"
 #include "group-interface.hh"
 #include "side-position-interface.hh"
 #include "staff-symbol-referencer.hh"
 
-
-/** 
-  Make arpeggios that span multiple staves.  Catch arpeggios, and span a
-  Span_arpeggio over them if we find more than two arpeggios.
-  */
+/**
+   Make arpeggios that span multiple staves.  Catch arpeggios, and span a
+   Span_arpeggio over them if we find more than two arpeggios.
+*/
 class Span_arpeggio_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Span_arpeggio_engraver);
-  
+
 protected:
   virtual void acknowledge_grob (Grob_info);
   virtual void process_acknowledged_grobs ();
@@ -36,7 +33,6 @@ private:
   Link_array<Grob> arpeggios_;
 };
 
-
 Span_arpeggio_engraver::Span_arpeggio_engraver ()
 {
   span_arpeggio_ = 0;
@@ -65,28 +61,27 @@ Span_arpeggio_engraver::process_acknowledged_grobs ()
   if (!span_arpeggio_ && arpeggios_.size () > 1
       && to_boolean (get_property ("connectArpeggios")))
     {
-      span_arpeggio_ = make_item ("Arpeggio");
-      announce_grob (span_arpeggio_, SCM_EOL);      
+      span_arpeggio_ = make_item ("Arpeggio", SCM_EOL);
     }
 }
 
 void
 Span_arpeggio_engraver::stop_translation_timestep ()
 {
-  if (span_arpeggio_) 
+  if (span_arpeggio_)
     {
       /*
        we do this very late, to make sure we also catch `extra'
        side-pos support like accidentals.
-       */
-      for (int i=0; i < arpeggios_.size (); i ++)
+      */
+      for (int i = 0; i < arpeggios_.size (); i++)
        {
          for (SCM s = arpeggios_[i]->get_property ("stems");
-              ly_pair_p (s); s = ly_cdr (s))
-           Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), ly_car (s));
+              scm_is_pair (s); s = scm_cdr (s))
+           Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("stems"), scm_car (s));
          for (SCM s = arpeggios_[i]->get_property ("side-support-elements");
-              ly_pair_p (s); s = ly_cdr (s))
-           Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), ly_car (s));
+              scm_is_pair (s); s = scm_cdr (s))
+           Group_interface::add_thing (span_arpeggio_, ly_symbol2scm ("side-support-elements"), scm_car (s));
 
          /*
            we can't kill the children, since we don't want to the
@@ -94,19 +89,16 @@ Span_arpeggio_engraver::stop_translation_timestep ()
            it transparent.  */
          arpeggios_[i]->set_property ("print-function", SCM_EOL);
        }
-      
-      typeset_grob (span_arpeggio_);
+
       span_arpeggio_ = 0;
     }
   arpeggios_.clear ();
 }
 
-
-
-ENTER_DESCRIPTION (Span_arpeggio_engraver,
-/* descr */       "",
-/* creats*/       "Arpeggio",
-/* accepts */     "",
-/* acks  */      "arpeggio-interface",
-/* reads */       "connectArpeggios",
-/* write */       "");
+ADD_TRANSLATOR (Span_arpeggio_engraver,
+               /* descr */ "",
+               /* creats*/ "Arpeggio",
+               /* accepts */ "",
+               /* acks  */ "arpeggio-interface",
+               /* reads */ "connectArpeggios",
+               /* write */ "");