]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/percent-repeat-engraver.cc
* lily/accidental-placement.cc (position_accidentals): bugfix in
[lilypond.git] / lily / percent-repeat-engraver.cc
index 517ba465611af3ba8536b89e8a1c3284d5c4d710..3090e9b615cce4ab84fe4f5d109bbf0b7a40d555 100644 (file)
@@ -3,14 +3,14 @@
   
   source file of the GNU LilyPond music typesetter
   
-  (c) 2000--2003 Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2000--2004 Han-Wen Nienhuys <hanwen@cs.uu.nl>
   
  */
 
 #include "engraver.hh"
 #include "repeated-music.hh"
 #include "engraver-group-engraver.hh"
-#include "global-translator.hh"
+#include "global-context.hh"
 #include "warn.hh"
 #include "misc.hh"
 #include "spanner.hh"
@@ -19,7 +19,8 @@
 #include "bar-line.hh"
 
 #include "score-engraver.hh"
-#include "translator-group.hh"
+#include "context.hh"
+
 
 /**
   This acknowledges repeated music with "percent" style.  It typesets
@@ -36,7 +37,7 @@ class Percent_repeat_engraver : public Engraver
 {
   void typeset_perc ();
 public:
-  TRANSLATOR_DECLARATIONS(Percent_repeat_engraver);
+  TRANSLATOR_DECLARATIONS (Percent_repeat_engraver);
 protected:
   Repeated_music * repeat_;
 
@@ -80,7 +81,7 @@ Percent_repeat_engraver::try_music (Music * m)
 {
   Repeated_music * rp = dynamic_cast<Repeated_music*> (m);
   if (rp
-      && rp->get_mus_property ("iterator-ctor")
+      && rp->get_property ("iterator-ctor")
          == Percent_repeat_iterator::constructor_proc
       && !repeat_)
     {
@@ -113,7 +114,7 @@ Percent_repeat_engraver::try_music (Music * m)
       repeat_ = rp;
 
       
-      Global_translator *global =top_engraver();
+      Global_context *global = get_global_context ();
       for (int i = 0; i < count; i++)  
        global->add_moment_to_process (next_moment_ + Moment (i) * body_length_);
   
@@ -132,25 +133,25 @@ Percent_repeat_engraver::process_music ()
        {
          finished_perc_ = perc_;
          typeset_perc ();
-         perc_ = new Spanner (get_property ("PercentRepeat"));
+         perc_ = make_spanner ("PercentRepeat");
          SCM col =get_property ("currentCommandColumn");
          perc_->set_bound (LEFT, unsmob_grob (col));
-         announce_grob(perc_, repeat_->self_scm());
+         announce_grob (perc_, repeat_->self_scm ());
        }
       else if (repeat_sign_type_ == DOUBLE_MEASURE)
        {
-         double_percent_ = new Item (get_property ("DoublePercentRepeat"));
-         announce_grob(double_percent_, repeat_->self_scm());
+         double_percent_ = make_item ("DoublePercentRepeat");
+         announce_grob (double_percent_, repeat_->self_scm ());
 
       /*
        forbid breaks on a % line. Should forbid all breaks, really.
        */
 
-           top_engraver()->forbid_breaks ();   // guh. Use properties!      
+         get_score_engraver ()->forbid_breaks ();      // guh. Use properties!      
        }
       next_moment_ = next_moment_ + body_length_;
 
-      top_engraver()->add_moment_to_process (next_moment_);
+      get_global_context ()->add_moment_to_process (next_moment_);
     }
 }
 
@@ -212,7 +213,7 @@ Percent_repeat_engraver::stop_translation_timestep ()
 
 
 
-ENTER_DESCRIPTION(Percent_repeat_engraver,
+ENTER_DESCRIPTION (Percent_repeat_engraver,
 /* descr */       "Make whole bar and double bar repeats.",
 /* creats*/       "PercentRepeat DoublePercentRepeat",
 /* accepts */     "repeated-music",