]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-pq-engraver.cc
2003 -> 2004
[lilypond.git] / lily / grob-pq-engraver.cc
index 3d1d350e0abb6b7d4d859715f50d7446aa49c57e..c681814026be960f235b4c2dc1e9ec5590b0469d 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2002  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2004  Han-Wen Nienhuys <hanwen@cs.uu.nl>
 */
 
 #include "translator-group.hh"
 #include "grob.hh"
 #include "warn.hh"
 
+/*
+  TODO: should junk this engraver.
+ */
+
 struct Grob_mom
 {
   Grob * grob_ ;
@@ -28,6 +32,7 @@ int compare  (Grob_mom const &a, Grob_mom const &b)
   return Moment::compare (a.end_, b.end_);
 }
 
+/****************/
 
 class Grob_pq_engraver: public Engraver
 {
@@ -59,10 +64,11 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
 {
   Music  * m = gi.music_cause ();
 
-  if (m)
+  if (m
+      && !gi.grob_->internal_has_interface (ly_symbol2scm ("multi-measure-interface")))
     {
       Moment n = now_mom ();
-      Moment l = m->length_mom ();
+      Moment l = m->get_length ();
 
       if (!l.to_bool ())
        return ;
@@ -78,7 +84,7 @@ Grob_pq_engraver::acknowledge_grob (Grob_info gi)
 }
 
 LY_DEFINE(ly_grob_pq_less_p, 
-         "ly-grob-pq-less?", 2 , 0 ,0, (SCM a, SCM b), 
+         "ly:grob-pq-less?", 2 , 0 ,0, (SCM a, SCM b), 
          "Compare 2 Grob PQ entries. Internal")
 {
   if ( Moment::compare (*unsmob_moment (gh_car (a)),
@@ -117,7 +123,7 @@ Grob_pq_engraver::stop_translation_timestep ()
 void
 Grob_pq_engraver::start_translation_timestep ()
 {
- Moment now = now_mom();
 Moment now = now_mom();
 
   SCM start_busy = get_property ("busyGrobs");
   SCM busy = start_busy;
@@ -139,10 +145,14 @@ Grob_pq_engraver::start_translation_timestep ()
 
 
 ENTER_DESCRIPTION(Grob_pq_engraver,
-/* descr */       "Administrate when certain grobs (eg. note heads) stop playing; this
-engraver is a sort-of a failure, since it doesn't handle all sorts of borderline cases very well.
-",
-/* creats*/       "",
-/* acks  */       "grob-interface",
-/* reads */       "busyGrobs",
+
+/* descr */       "Administrate when certain grobs (eg. note heads) stop playing; this \
+engraver is a sort-of a failure, since it doesn't handle all sorts of \
+borderline cases very well. \
+",                                                                                               \
+                 
+/* creats*/       "",                                                                            \
+/* accepts */     "",                                                                            \
+/* acks  */      "grob-interface",                                                               \
+/* reads */       "busyGrobs",                                                                   \
 /* write */       "busyGrobs");