]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-column-engraver.cc
* lily/accidental-engraver.cc: formatting fixes.
[lilypond.git] / lily / script-column-engraver.cc
index 4cb617443974a9a22d50d25112d4a31a36a10d1b..2bb3c88bdac25f330be16c0f18eecb98487c4a72 100644 (file)
@@ -1,16 +1,18 @@
-/*   
+/*
   script-column-engraver.cc -- implement Script_column_engraver
-  
+
   source file of the GNU LilyPond music typesetter
-  
+
   (c) 1999--2005 Han-Wen Nienhuys <hanwen@cs.uu.nl>
-  
- */
+*/
 
 #include "engraver.hh"
 #include "script-column.hh"
 #include "side-position-interface.hh"
 
+#include "translator.icc"
+
+
 /**
    Find potentially colliding scripts, and put them in a
    Script_column, that will fix the collisions.  */
@@ -22,12 +24,11 @@ class Script_column_engraver : public Engraver
 public:
   TRANSLATOR_DECLARATIONS (Script_column_engraver);
 protected:
-  virtual void acknowledge_grob (Grob_info);
-  virtual void process_acknowledged_grobs ();
-  virtual void stop_translation_timestep ();
+  DECLARE_ACKNOWLEDGER (side_position);
+  void process_acknowledged ();
+  void stop_translation_timestep ();
 };
 
-
 Script_column_engraver::Script_column_engraver ()
 {
   scol_ = 0;
@@ -41,13 +42,13 @@ Script_column_engraver::stop_translation_timestep ()
 }
 
 void
-Script_column_engraver::acknowledge_grob (Grob_info inf) 
+Script_column_engraver::acknowledge_side_position (Grob_info inf)
 {
-  Item *thing = dynamic_cast<Item*> (inf.grob_);
-  if (thing && Side_position_interface::has_interface (inf.grob_)) // ugh FIXME
+  Item *thing = dynamic_cast<Item *> (inf.grob ());
+  if (thing)
     {
       if (!Item::is_breakable (thing)
-         && Side_position_interface::get_axis (inf.grob_) == Y_AXIS)
+         && Side_position_interface::get_axis (inf.grob ()) == Y_AXIS)
        {
          scripts_.push (thing);
        }
@@ -55,12 +56,11 @@ Script_column_engraver::acknowledge_grob (Grob_info inf)
 }
 
 void
-Script_column_engraver::process_acknowledged_grobs ()
+Script_column_engraver::process_acknowledged ()
 {
   if (!scol_ && scripts_.size () > 1)
     {
       scol_ = make_item ("ScriptColumn", SCM_EOL);
-      
     }
 
   if (scol_)
@@ -69,13 +69,11 @@ Script_column_engraver::process_acknowledged_grobs ()
        Script_column::add_staff_sided (scol_, scripts_[i]);
       scripts_.clear ();
     }
-
 }
-
+ADD_ACKNOWLEDGER (Script_column_engraver, side_position);
 ADD_TRANSLATOR (Script_column_engraver,
-/* descr */       "",
-/* creats*/       "ScriptColumn",
-/* accepts */     "",
-/* acks  */      "side-position-interface",
-/* reads */       "",
-/* write */       "");
+               /* descr */ "",
+               /* creats*/ "ScriptColumn",
+               /* accepts */ "",
+               /* reads */ "",
+               /* write */ "");