]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/pitched-trill-engraver.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / pitched-trill-engraver.cc
index ce2c5a3b91ae70fa868768c871edfd20fcc5ad1b..84e391e231b301647120a5a9da73d00ef34d46d7 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
@@ -28,7 +28,6 @@ protected:
   DECLARE_ACKNOWLEDGER (dots);
   DECLARE_ACKNOWLEDGER (text_spanner);
   void process_music ();
-  virtual bool try_music (Music *);
   void stop_translation_timestep ();
 
 private:
@@ -36,7 +35,7 @@ private:
   Item *trill_group_;
   Item *trill_accidental_;
 
-  Link_array<Grob> heads_;
+  vector<Grob*> heads_;
 
   void make_trill (Music *);
 };
@@ -51,12 +50,12 @@ Pitched_trill_engraver::Pitched_trill_engraver ()
 void
 Pitched_trill_engraver::acknowledge_dots (Grob_info info)
 {
-  heads_.push (info.grob ());
+  heads_.push_back (info.grob ());
 }
 void
 Pitched_trill_engraver::acknowledge_note_head (Grob_info info)
 {
-  heads_.push (info.grob ());
+  heads_.push_back (info.grob ());
 }
 
 void
@@ -66,14 +65,14 @@ Pitched_trill_engraver::acknowledge_text_spanner (Grob_info info)
   if (mus
       && mus->is_mus_type ("trill-span-event")
       && to_dir (mus->get_property ("span-direction")) == START
-      && unsmob_pitch (mus->get_property ("trill-pitch")))
+      && unsmob_pitch (mus->get_property ("pitch")))
     make_trill (mus);
 }
 
 void
 Pitched_trill_engraver::make_trill (Music *mus)
 {
-  SCM scm_pitch = mus->get_property ("trill-pitch");
+  SCM scm_pitch = mus->get_property ("pitch");
   Pitch *p = unsmob_pitch (scm_pitch);
 
   SCM keysig = get_property ("localKeySignature");
@@ -123,7 +122,7 @@ void
 Pitched_trill_engraver::stop_translation_timestep ()
 {
   if (trill_group_)
-    for (int i = 0; i < heads_.size (); i++)
+    for (vsize i = 0; i < heads_.size (); i++)
       Side_position_interface::add_support (trill_group_, heads_[i]);
 
   heads_.clear ();
@@ -137,19 +136,19 @@ Pitched_trill_engraver::process_music ()
 {
 }
 
-bool
-Pitched_trill_engraver::try_music (Music *)
-{
-  return false;
-}
 
 #include "translator.icc"
+
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, note_head);
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, dots);
 ADD_ACKNOWLEDGER (Pitched_trill_engraver, text_spanner);
+
 ADD_TRANSLATOR (Pitched_trill_engraver,
                /* doc */ "Print the bracketed notehead after a notehead with trill.",
-               /* create */ "TrillPitchHead TrillPitchAccidental TrillPitchGroup",
+               /* create */
+               "TrillPitchHead "
+               "TrillPitchAccidental "
+               "TrillPitchGroup",
                /* accept */ "",
                /* read */ "",
                /* write */ "");