]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/script-column-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / script-column-engraver.cc
index 41555cdbff34399b886639299789b54ff370cd88..6821c51733b7a292c27e0ef833c28982caa06ad5 100644 (file)
@@ -3,12 +3,13 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1999--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1999--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "engraver.hh"
 #include "script-column.hh"
 #include "side-position-interface.hh"
+#include "item.hh"
 
 #include "translator.icc"
 
@@ -17,8 +18,8 @@
    Script_column, that will fix the collisions.  */
 class Script_column_engraver : public Engraver
 {
-  Grob *scol_;
-  Link_array<Item> scripts_;
+  Grob *script_column_;
+  vector<Grob*> scripts_;
 
 public:
   TRANSLATOR_DECLARATIONS (Script_column_engraver);
@@ -30,20 +31,20 @@ protected:
 
 Script_column_engraver::Script_column_engraver ()
 {
-  scol_ = 0;
+  script_column_ = 0;
 }
 
 void
 Script_column_engraver::stop_translation_timestep ()
 {
-  if (scol_)
+  if (script_column_)
     {
       for (vsize i = 0; i < scripts_.size (); i++)
        if (Side_position_interface::get_axis (scripts_[i]) == Y_AXIS)
-         Script_column::add_staff_sided (scol_, scripts_[i]);
+         Script_column::add_side_positioned (script_column_, scripts_[i]);
     }
 
-  scol_ = 0;
+  script_column_ = 0;
   scripts_.clear ();
 }
 
@@ -53,7 +54,7 @@ Script_column_engraver::acknowledge_side_position (Grob_info inf)
   Item *thing = dynamic_cast<Item *> (inf.grob ());
   if (thing)
     {
-      if (!Item::is_breakable (thing))
+      if (!Item::is_non_musical (thing))
        scripts_.push_back (thing);
     }
 }
@@ -61,14 +62,22 @@ Script_column_engraver::acknowledge_side_position (Grob_info inf)
 void
 Script_column_engraver::process_acknowledged ()
 {
-  if (!scol_ && scripts_.size () > 1)
-    scol_ = make_item ("ScriptColumn", SCM_EOL);
+  if (!script_column_ && scripts_.size () > 1)
+    script_column_ = make_item ("ScriptColumn", SCM_EOL);
 }
 
 ADD_ACKNOWLEDGER (Script_column_engraver, side_position);
 ADD_TRANSLATOR (Script_column_engraver,
-               /* doc */ "",
-               /* create */ "ScriptColumn",
-               /* accept */ "",
-               /* read */ "",
-               /* write */ "");
+               /* doc */
+               "Find potentially colliding scripts and put them into a"
+               " @code{ScriptColumn} object; that will fix the collisions.",
+
+               /* create */
+               "ScriptColumn ",
+
+               /* read */
+               "",
+
+               /* write */
+               ""
+               );