]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vertically-spaced-context-engraver.cc
* flower/include/std-vector.hh[STD_VECTOR]: Do not include
[lilypond.git] / lily / vertically-spaced-context-engraver.cc
index f62fbe0ffee85cc6cb7a4b84e2ee78abba78994e..9fa0f172f1800894e97d6026a06a74ef63d5d665 100644 (file)
@@ -3,8 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 2005 Han-Wen Nienhuys <hanwen@xs4all.nl>
-
+  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
 
 class Vertically_spaced_contexts_engraver : public Engraver
 {
-  TRANSLATOR_DECLARATIONS(Vertically_spaced_contexts_engraver);
+  TRANSLATOR_DECLARATIONS (Vertically_spaced_contexts_engraver);
 protected:
-  virtual void acknowledge_grob (Grob_info);
   virtual void initialize ();
+  DECLARE_ACKNOWLEDGER (vertically_spaceable);
 
 private:
-  Grob * system_;
+  Grob *system_;
 };
 
-
-
 Vertically_spaced_contexts_engraver::Vertically_spaced_contexts_engraver ()
 {
   system_ = 0;
@@ -38,15 +35,14 @@ Vertically_spaced_contexts_engraver::initialize ()
 }
 
 void
-Vertically_spaced_contexts_engraver::acknowledge_grob (Grob_info gi)
+Vertically_spaced_contexts_engraver::acknowledge_vertically_spaceable (Grob_info gi)
 {
-  if (Axis_group_interface::has_interface (gi.grob ())
-      && gi.grob ()->internal_has_interface (ly_symbol2scm ("vertically-spaceable-interface")))
+  if (Axis_group_interface::has_interface (gi.grob ()))
     {
       SCM spaceable = get_property ("verticallySpacedContexts");
       Context *orig = gi.origin_contexts (this)[0];
 
-      if (scm_memq (ly_symbol2scm (orig->context_name ().to_str0 ()),
+      if (scm_memq (ly_symbol2scm (orig->context_name ().c_str ()),
                    spaceable) != SCM_BOOL_F)
        {
          Pointer_group_interface::add_grob (system_,
@@ -58,10 +54,10 @@ Vertically_spaced_contexts_engraver::acknowledge_grob (Grob_info gi)
 
 #include "translator.icc"
 
+ADD_ACKNOWLEDGER (Vertically_spaced_contexts_engraver, vertically_spaceable);
 ADD_TRANSLATOR (Vertically_spaced_contexts_engraver,
-               /* descr */ "",
-               /* creats*/ "",
-               /* accepts */ "",
-               /* acks  */ "axis-group-interface",
-               /* reads */ "verticallySpacedContexts",
+               /* doc */ "",
+               /* create */ "",
+               /* accept */ "",
+               /* read */ "verticallySpacedContexts",
                /* write */ "verticallySpacedContexts");