]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/melisma-engraver.cc
2003 -> 2004
[lilypond.git] / lily / melisma-engraver.cc
index 434fefbc32fa81a433d2c58d19216d18c954602a..6fa0653071faf5180e5d7ddca6b359a2d79183f8 100644 (file)
@@ -3,12 +3,14 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 1999 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 1999--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "engraver.hh"
-#include "musical-request.hh"
+#include "event.hh"
+#include "grob.hh"
+#include "translator-group.hh"
 
 /**
    Signal existence of melismas.
 class Melisma_engraver:public Engraver
 {
 public:
-  VIRTUAL_COPY_CONS(Translator);
-  bool do_try_music (Music *);
+  TRANSLATOR_DECLARATIONS(Melisma_engraver);
+  bool try_music (Music *);
 };
-ADD_THIS_TRANSLATOR(Melisma_engraver);
+
 
 bool
-Melisma_engraver::do_try_music (Music *m 
+Melisma_engraver::try_music (Music *
 {
-  if (dynamic_cast<Melisma_playing_req*>(m))
-    {
-      Scalar s (get_property ("melismaBusy", 0));
-      return s.to_bool ();
-    }
-  return false;
+  /*
+    This can only be melisma-playing-event.
+   */
+  return melisma_busy (this);
 }
+
+Melisma_engraver::Melisma_engraver()
+{
+}
+
+ENTER_DESCRIPTION(Melisma_engraver,
+/* descr */       "This engraver collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code.  ",
+/* creats*/       "",
+/* accepts */     "melisma-playing-event",
+/* acks  */      "",
+/* reads */       "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy",
+/* write */       "");