]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/porrectus-engraver.cc
* ly/engraver-init.ly: use Hara kiri by default for
[lilypond.git] / lily / porrectus-engraver.cc
index eb5737d1db39343f971f8c67be952df439ce1c40..fab7e7d86ef4c6220fe7dbf484a2c1279a407d75 100644 (file)
@@ -1,7 +1,7 @@
 /*
   porrectus-engraver.cc -- implement Porrectus_engraver
 
-  Copyright (c) 2001--2002  Juergen Reuter
+  Copyright (c) 2001--2003  Juergen Reuter
 
   written for the GNU LilyPond music typesetter
 */
@@ -22,7 +22,7 @@
  * ligature context that encloses use of this engraver, using syntax
  * like: \ligature { e \~ c }.
  *
- * TODO: Do not allow a series of adjacent porrectus requests, as in:
+ * TODO: Do not allow a series of adjacent porrectus events, as in:
  * e \~ d \~ c.
  *
  * TODO: Junk duplicate (or rather triple) implementation of
@@ -31,8 +31,8 @@
 
 #include "staff-symbol-referencer.hh"
 #include "porrectus.hh"
-#include "musical-request.hh"
-#include "command-request.hh"
+#include "event.hh"
+
 #include "rhythmic-head.hh"
 #include "item.hh"
 #include "engraver.hh"
@@ -55,7 +55,7 @@ protected:
 
 private:
   PQueue<Grob_pitch_tuple> past_notes_pq_;
-  Porrectus_req *porrectus_req_;
+  Music *porrectus_req_;
   Array<Grob_pitch_tuple> left_heads_;
   Array<Grob_pitch_tuple> right_heads_;
   Link_array<Grob> porrectuses_;
@@ -69,9 +69,9 @@ Porrectus_engraver::Porrectus_engraver ()
 bool
 Porrectus_engraver::try_music (Music *m)
 {
-  if (Porrectus_req *req_ = dynamic_cast <Porrectus_req *> (m))
+  if (m->is_mus_type ("porrectus-event"))
     {
-      porrectus_req_ = req_;
+      porrectus_req_ = m;
       return true;
     }
   else
@@ -96,7 +96,7 @@ Porrectus_engraver::acknowledge_grob (Grob_info info_)
       if (m->is_mus_type ("note-event"))
        right_heads_.push (Grob_pitch_tuple (info_.grob_, m,
                                             now_mom () +
-                                            m->length_mom ()));
+                                            m->get_length ()));
     }
 }
 
@@ -167,7 +167,7 @@ Porrectus_engraver::start_translation_timestep ()
 ENTER_DESCRIPTION(Porrectus_engraver,
 /* descr */       "Join adjacent notes to a porrectus ligature.",
 /* creats*/       "Porrectus",
-/* accepts */     "general-music",
+/* accepts */     "porrectus-event",
 /* acks  */      "rhythmic-head-interface",
 /* reads */       "",
 /* write */       "");