]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/metronome-engraver.cc
* flower
[lilypond.git] / lily / metronome-engraver.cc
index ea9b3893a56dd9a43c9a95765835f1e176900184..b59d3c962fb90b3ee2d1cc36beac2abaeaff9871 100644 (file)
@@ -15,9 +15,9 @@
 #include "context.hh"
 
 /**
-  put stuff over or next to  bars.  Examples: bar numbers, marginal notes,
-  rehearsal marks.
- */
+   put stuff over or next to  bars.  Examples: bar numbers, marginal notes,
+   rehearsal marks.
+*/
 class Metronome_mark_engraver : public Engraver
 {
 public:
@@ -26,8 +26,8 @@ protected:
   Item *text_;
   Grob *bar_line_;
   Music *mark_ev_;
-  
-  void create_items (Music*);
+
+  void create_items (Music *);
 protected:
   virtual void stop_translation_timestep ();
   virtual bool try_music (Music *ev);
@@ -40,34 +40,32 @@ Metronome_mark_engraver::Metronome_mark_engraver ()
   mark_ev_ = 0;
 }
 
-void 
+void
 Metronome_mark_engraver::stop_translation_timestep ()
 {
   if (text_)
     {
-      Grob*mc = unsmob_grob (get_property( "currentMusicalColumn"));
+      Grob *mc = unsmob_grob (get_property ("currentMusicalColumn"));
       text_->set_parent (mc, X_AXIS);
-      text_->set_property ("side-support-elements" , get_property ("stavesFound"));
-      
+      text_->set_property ("side-support-elements", get_property ("stavesFound"));
+
       text_ = 0;
     }
   mark_ev_ = 0;
 }
 
-
 void
 Metronome_mark_engraver::create_items (Music *rq)
 {
   if (text_)
     return;
 
-  text_ = make_item ("MetronomeMark", rq->self_scm () );
+  text_ = make_item ("MetronomeMark", rq->self_scm ());
 
 }
 
-
 bool
-Metronome_mark_engraver::try_music (Musicr)
+Metronome_mark_engraver::try_music (Music *r)
 {
   mark_ev_ = r;
   return true;
@@ -82,22 +80,20 @@ Metronome_mark_engraver::process_music ()
 
       SCM proc = get_property ("metronomeMarkFormatter");
       SCM result = scm_call_2 (proc, mark_ev_->self_scm (),
-                             context ()->self_scm ()); 
-      
+                              context ()->self_scm ());
+
       text_->set_property ("text", result);
     }
 }
 
 ADD_TRANSLATOR (Metronome_mark_engraver,
-/* descr */       "Engrave metro nome marking. This delegates the formatting work "
-                  "to the function in the metronomeMarkFormatter property. "
-                  "The mark is put over all staves. "
-                  "The staves are taken from the @code{stavesFound} property, "
-                  "which is maintained by @code{@ref{Staff_collecting_engraver}}. "
-       
-                  ,
-/* creats*/       "MetronomeMark",
-/* accepts */     "metronome-change-event",
-                  /* acks  */       "",
-/* reads */       "stavesFound metronomeMarkFormatter",
-/* write */       "");
+               /* descr */ "Engrave metro nome marking. This delegates the formatting work "
+               "to the function in the metronomeMarkFormatter property. "
+               "The mark is put over all staves. "
+               "The staves are taken from the @code{stavesFound} property, "
+               "which is maintained by @code{@ref{Staff_collecting_engraver}}. ",
+               /* creats*/ "MetronomeMark",
+               /* accepts */ "metronome-change-event",
+               /* acks  */ "",
+               /* reads */ "stavesFound metronomeMarkFormatter",
+               /* write */ "");