X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fvertical-align-engraver.cc;h=0d1f757c59262392719d3bf3472258cd3f53f1de;hb=eee5583d9b8b6ff3187060aa48120e4544d2af58;hp=65cf6e7f772d7af5086ccbe6bfab11a94664a1d7;hpb=6eb8d8d2780b4b8e1228d94d845145f558240519;p=lilypond.git diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 65cf6e7f77..0d1f757c59 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 1997--2012 Han-Wen Nienhuys + Copyright (C) 1997--2015 Han-Wen Nienhuys LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,6 +29,9 @@ #include "translator.icc" +using std::string; +using std::vector; + class Vertical_align_engraver : public Engraver { Spanner *valign_; @@ -100,7 +103,7 @@ Vertical_align_engraver::process_music () top_level_ = to_boolean (get_property ("topLevelAlignment")); valign_ = make_spanner (top_level_ ? "VerticalAlignment" : "StaffGrouper", SCM_EOL); - valign_->set_bound (LEFT, unsmob_grob (get_property ("currentCommandColumn"))); + valign_->set_bound (LEFT, unsmob (get_property ("currentCommandColumn"))); Align_interface::set_ordered (valign_); } } @@ -110,7 +113,7 @@ Vertical_align_engraver::finalize () { if (valign_) { - valign_->set_bound (RIGHT, unsmob_grob (get_property ("currentCommandColumn"))); + valign_->set_bound (RIGHT, unsmob (get_property ("currentCommandColumn"))); valign_ = 0; } } @@ -120,7 +123,7 @@ Vertical_align_engraver::qualifies (Grob_info i) const { int sz = i.origin_contexts ((Translator *)this).size (); - return sz > 0 && Axis_group_interface::has_interface (i.grob ()) + return sz > 0 && 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); @@ -145,14 +148,14 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i) SCM before = scm_hash_ref (id_to_group_hashtab_, before_id, SCM_BOOL_F); SCM after = scm_hash_ref (id_to_group_hashtab_, after_id, SCM_BOOL_F); - Grob *before_grob = unsmob_grob (before); - Grob *after_grob = unsmob_grob (after); + Grob *before_grob = unsmob (before); + Grob *after_grob = unsmob (after); Align_interface::add_element (valign_, i.grob ()); if (before_grob || after_grob) { - Grob_array *ga = unsmob_grob_array (valign_->get_object ("elements")); + Grob_array *ga = unsmob (valign_->get_object ("elements")); vector &arr = ga->array_reference (); Grob *added = arr.back (); @@ -182,7 +185,7 @@ Vertical_align_engraver::acknowledge_axis_group (Grob_info i) else if (qualifies (i)) { Pointer_group_interface::add_grob (valign_, ly_symbol2scm ("elements"), i.grob ()); - if (!unsmob_grob (i.grob ()->get_object ("staff-grouper"))) + if (!unsmob (i.grob ()->get_object ("staff-grouper"))) i.grob ()->set_object ("staff-grouper", valign_->self_scm ()); } }