]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/mark-engraver.cc
* lily/accidental-engraver.cc: formatting fixes.
[lilypond.git] / lily / mark-engraver.cc
index 48e22c3465e9f841aae53ddbec649f7e4cb08777..97b2649f50c27df524b2c7a37d91970afe9f13ba 100644 (file)
@@ -26,11 +26,11 @@ public:
 protected:
   Item *text_;
 protected:
-  virtual void stop_translation_timestep ();
-  virtual void acknowledge_grob (Grob_info);
+  void stop_translation_timestep ();
+  DECLARE_ACKNOWLEDGER (bar_line);
   void create_items (Music *);
   virtual bool try_music (Music *ev);
-  virtual void process_music ();
+  void process_music ();
 
 private:
   Music *mark_ev_;
@@ -43,10 +43,10 @@ Mark_engraver::Mark_engraver ()
 }
 
 void
-Mark_engraver::acknowledge_grob (Grob_info inf)
+Mark_engraver::acknowledge_bar_line (Grob_info inf)
 {
   Grob *s = inf.grob ();
-  if (text_ && Bar_line::has_interface (s))
+  if (text_)
     {
       /*
        TODO: make this configurable. RehearsalMark cannot be
@@ -63,7 +63,7 @@ Mark_engraver::stop_translation_timestep ()
   if (text_)
     {
       SCM lst = get_property ("stavesFound");
-      text_->set_property ("side-support-elements", lst);
+      text_->set_object ("side-support-elements", lst);
       text_ = 0;
     }
   mark_ev_ = 0;
@@ -113,7 +113,7 @@ Mark_engraver::process_music ()
              int mark_count = scm_to_int (m);
              mark_count++;
              context ()->set_property ("rehearsalMark",
-                                       scm_int2num (mark_count));
+                                       scm_from_int (mark_count));
            }
 
          if (scm_is_number (m))
@@ -130,6 +130,9 @@ Mark_engraver::process_music ()
     }
 }
 
+#include "translator.icc"
+
+ADD_ACKNOWLEDGER (Mark_engraver,bar_line);
 ADD_TRANSLATOR (Mark_engraver,
                /* descr */ "This engraver will create RehearsalMark objects. "
                "It puts them on top of all staves (which is taken from "
@@ -139,6 +142,5 @@ ADD_TRANSLATOR (Mark_engraver,
                "end up on the same Y-location",
                /* creats*/ "RehearsalMark",
                /* accepts */ "mark-event",
-               /* acks  */ "bar-line-interface",
                /* reads */ "rehearsalMark markFormatter stavesFound",
                /* write */ "");