]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/grob-pq-engraver.cc
* lily/include/grob-info.hh: origin_contexts() now does not
[lilypond.git] / lily / grob-pq-engraver.cc
index 4e50e5c50c7864452c8ee42f742ce0d41207a959..4fdf5d2b4f33febe41d3ac8699fc49b9835fe924 100644 (file)
@@ -3,14 +3,18 @@
 
   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 "context.hh"
 #include "engraver.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
 {
@@ -51,7 +56,7 @@ Grob_pq_engraver::Grob_pq_engraver()
 void
 Grob_pq_engraver::initialize ()
 {
-  daddy_trans_->set_property ("busyGrobs", SCM_EOL); 
+  daddy_context_->set_property ("busyGrobs", SCM_EOL); 
 }
 
 void
@@ -59,7 +64,8 @@ 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->get_length ();
@@ -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)),
@@ -111,13 +117,13 @@ Grob_pq_engraver::stop_translation_timestep ()
   
   busy = scm_merge_x (current_list, busy, ly_grob_pq_less_p_proc);
   current_grobs_.clear ();
-  daddy_trans_->set_property ("busyGrobs", busy);
+  daddy_context_->set_property ("busyGrobs", busy);
 }
 
 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;
@@ -133,7 +139,7 @@ Grob_pq_engraver::start_translation_timestep ()
     }
 
   if (start_busy != busy)
-    daddy_trans_->set_property ("busyGrobs", busy);
+    daddy_context_->set_property ("busyGrobs", busy);
 
 }