]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/trill-spanner-engraver.cc
* lily/pfb.cc (LY_DEFINE): set ttf_verbosity from ttf-verbosity
[lilypond.git] / lily / trill-spanner-engraver.cc
index 6bfd91ba6b249d6dceda568dab7b9a0f09f9ab9c..ddb283ea48ad59e017daecfebac852445388b86c 100644 (file)
@@ -3,26 +3,24 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2000--2004 Jan Nieuwenhuizen <janneke@gnu.org>
+  (c) 2000--2005 Jan Nieuwenhuizen <janneke@gnu.org>
 */
 
 /*
   C&P from text-spanner.cc
 
   - todo: ending should be detected automatically? a new note
-    automatically is the end of the trill?
-  
- */
+  automatically is the end of the trill?
+*/
 
 #include "note-column.hh"
-#include "item.hh"
 #include "side-position-interface.hh"
 #include "engraver.hh"
 
 class Trill_spanner_engraver : public Engraver
 {
 public:
-  TRANSLATOR_DECLARATIONS (Trill_spanner_engraver);  
+  TRANSLATOR_DECLARATIONS (Trill_spanner_engraver);
 protected:
   virtual void finalize ();
   virtual void acknowledge_grob (Grob_info);
@@ -34,16 +32,15 @@ private:
   Spanner *span_;
   Spanner *finished_;
   Music *current_req_;
-  Drul_array<Music*> req_drul_;
+  Drul_array<Music *> req_drul_;
   void typeset_all ();
 };
 
-
 Trill_spanner_engraver::Trill_spanner_engraver ()
 {
   finished_ = 0;
   current_req_ = 0;
-  span_ =0;
+  span_ = 0;
   req_drul_[START] = 0;
   req_drul_[STOP] = 0;
 }
@@ -87,7 +84,7 @@ Trill_spanner_engraver::process_music ()
       else
        {
          current_req_ = req_drul_[START];
-         span_  = make_spanner ("TrillSpanner", req_drul_[START]->self_scm ());
+         span_ = make_spanner ("TrillSpanner", req_drul_[START]->self_scm ());
          Side_position_interface::set_axis (span_, Y_AXIS);
          req_drul_[START] = 0;
        }
@@ -97,25 +94,25 @@ Trill_spanner_engraver::process_music ()
 void
 Trill_spanner_engraver::acknowledge_grob (Grob_info info)
 {
-  Spanner * spans[2] ={span_, finished_};
-  for (int i = 0;  i < 2 ; i++)
+  Spanner *spans[2] ={span_, finished_};
+  for (int i = 0; i < 2; i++)
     {
-      if (spans[i] && Note_column::has_interface (info.grob_))
+      if (spans[i] && Note_column::has_interface (info.grob ()))
        {
-         Side_position_interface::add_support (spans[i], info.grob_);
-         add_bound_item (spans[i], dynamic_cast<Item*> (info.grob_));
+         Side_position_interface::add_support (spans[i], info.grob ());
+         add_bound_item (spans[i], dynamic_cast<Item *> (info.grob ()));
        }
     }
 }
 
 void
 Trill_spanner_engraver::typeset_all ()
-{  
+{
   if (finished_)
     {
       if (!finished_->get_bound (RIGHT))
        {
-         Grobe = unsmob_grob (get_property ("currentMusicalColumn"));
+         Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
          finished_->set_bound (RIGHT, e);
        }
       finished_ = 0;
@@ -127,7 +124,7 @@ Trill_spanner_engraver::stop_translation_timestep ()
 {
   if (span_ && !span_->get_bound (LEFT))
     {
-      Grobe = unsmob_grob (get_property ("currentMusicalColumn"));
+      Grob *e = unsmob_grob (get_property ("currentMusicalColumn"));
       span_->set_bound (LEFT, e);
     }
 
@@ -148,10 +145,10 @@ Trill_spanner_engraver::finalize ()
     }
 }
 
-ENTER_DESCRIPTION (Trill_spanner_engraver,
-/* descr */       "Create trill spanner from a Music.",
-/* creats*/       "TrillSpanner",
-/* accepts */     "trill-span-event",
-/* acks  */      "note-column-interface",
-/* reads */       "",
-/* write */       "");
+ADD_TRANSLATOR (Trill_spanner_engraver,
+               /* descr */ "Create trill spanner from a Music.",
+               /* creats*/ "TrillSpanner",
+               /* accepts */ "trill-span-event",
+               /* acks  */ "note-column-interface",
+               /* reads */ "",
+               /* write */ "");