]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/staff-collecting-engraver.cc
Fix some bugs in the dynamic engraver and PostScript backend
[lilypond.git] / lily / staff-collecting-engraver.cc
index ad8ca8546af9166f6c8f18b60e4660362d37dfa6..fe522a049747284eb8efd91dbf59442173a5e533 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2001--2005  Han-Wen Nienhuys <hanwen@cs.uu.nl>
+  (c) 2001--2006  Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "staff-symbol.hh"
@@ -15,31 +15,29 @@ class Staff_collecting_engraver : public Engraver
 {
 public:
   TRANSLATOR_DECLARATIONS (Staff_collecting_engraver);
-  virtual void acknowledge_grob (Grob_info);
+  DECLARE_ACKNOWLEDGER (staff_symbol);
 };
 
 Staff_collecting_engraver::Staff_collecting_engraver ()
 {
-
 }
 
 void
-Staff_collecting_engraver::acknowledge_grob (Grob_info gi)
+Staff_collecting_engraver::acknowledge_staff_symbol (Grob_info gi)
 {
-  if (Staff_symbol::has_interface (gi.grob_))
-    {
-      SCM staffs = get_property ("stavesFound");
-      staffs = scm_cons (gi.grob_->self_scm (), staffs);
+  SCM staffs = get_property ("stavesFound");
+  staffs = scm_cons (gi.grob ()->self_scm (), staffs);
 
-      context ()->set_property ("stavesFound", staffs);
-    }
+  context ()->set_property ("stavesFound", staffs);
 }
 
+#include "translator.icc"
+ADD_ACKNOWLEDGER (Staff_collecting_engraver, staff_symbol);
+
 ADD_TRANSLATOR (Staff_collecting_engraver,
-               /* descr */ "Maintain the stavesFound variable",
+               /* doc */ "Maintain the stavesFound variable",
 
-               /* creats*/ "",
-               /* accepts */ "",
-               /* acks  */ "staff-symbol-interface",
-               /* reads */ "stavesFound",
+               /* create */ "",
+               /* accept */ "",
+               /* read */ "stavesFound",
                /* write */ "stavesFound");