]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/vertical-align-engraver.cc
Run `make grand-replace'.
[lilypond.git] / lily / vertical-align-engraver.cc
index 2b2930e9b17dbf2511ff635cdc49af39fc4a127f..0d07a509dfbc864db37dffe53ed6ff8e7a6d5fac 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1997--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1997--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "context.hh"
@@ -37,12 +37,20 @@ protected:
 
 ADD_ACKNOWLEDGER (Vertical_align_engraver, axis_group);
 ADD_TRANSLATOR (Vertical_align_engraver,
-               "Catch groups (staffs, lyrics lines, etc.) and stack "
-               "them vertically.",
-               /* create */ "VerticalAlignment",
-               /* accept */ "",
-               /* read */ "",
-               /* write */ "");
+               /* doc */
+               "Catch groups (staves, lyrics lines, etc.) and stack them"
+               " vertically.",
+
+               /* create */
+               "VerticalAlignment ",
+
+               /* read */
+               "alignAboveContext "
+               "alignBelowContext ",
+
+               /* write */
+               ""
+               );
 
 Vertical_align_engraver::Vertical_align_engraver ()
 {
@@ -90,6 +98,7 @@ Vertical_align_engraver::qualifies (Grob_info i) const
 
   return sz > 0 && Axis_group_interface::has_interface (i.grob ())
     && !i.grob ()->get_parent (Y_AXIS)
+    && !to_boolean (i.grob ()->get_property ("no-alignment"))
     && Axis_group_interface::has_axis (i.grob (), Y_AXIS);
 }
 
@@ -98,9 +107,9 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
 {
   if (qualifies (i))
     {
-      std::string id = i.context ()->id_string ();
+      string id = i.context ()->id_string ();
 
-      scm_hash_set_x (id_to_group_hashtab_, scm_makfrom0str (id.c_str ()),
+      scm_hash_set_x (id_to_group_hashtab_, ly_string2scm (id),
                      i.grob ()->self_scm ());
 
       SCM before_id = i.context ()->get_property ("alignAboveContext");
@@ -113,11 +122,11 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i)
       Grob *after_grob = unsmob_grob (after);
 
       Align_interface::add_element (valign_, i.grob ());
-
+       
       if (before_grob || after_grob)
        {
          Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements"));
-         Link_array__Grob_ &arr = ga->array_reference ();
+         vector<Grob*> &arr = ga->array_reference ();
 
          Grob *added = arr.back ();
          arr.pop_back ();