X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fnote-spacing-engraver.cc;h=b3d60bb7bf51aa5b4f75a3f2f794bd910781def7;hb=f4abbfff5f0d985a457e15586dbcc3ae473b0dee;hp=68dcae550c6084b8012f65be88153bde08663aba;hpb=bc95f4434f760d41191341ab4508b2064eb19025;p=lilypond.git diff --git a/lily/note-spacing-engraver.cc b/lily/note-spacing-engraver.cc index 68dcae550c..b3d60bb7bf 100644 --- a/lily/note-spacing-engraver.cc +++ b/lily/note-spacing-engraver.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2010 Han-Wen Nienhuys + Copyright (C) 2006--2014 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 @@ -30,10 +30,10 @@ class Note_spacing_engraver : public Engraver { - typedef map Last_spacing_map; + typedef map Last_spacing_map; Last_spacing_map last_spacings_; Grob *last_spacing_; - + Grob *spacing_; void add_spacing_item (Grob *); @@ -68,21 +68,20 @@ Note_spacing_engraver::add_spacing_item (Grob *g) { spacing_ = make_item ("NoteSpacing", g->self_scm ()); } - + if (spacing_) { Pointer_group_interface::add_grob (spacing_, - ly_symbol2scm ("left-items"), - g); + ly_symbol2scm ("left-items"), + g); if (last_spacing_) - Pointer_group_interface::add_grob (last_spacing_, - ly_symbol2scm ("right-items"), - g); + Pointer_group_interface::add_grob (last_spacing_, + ly_symbol2scm ("right-items"), + g); } } - void Note_spacing_engraver::acknowledge_note_column (Grob_info gi) { @@ -102,13 +101,13 @@ Note_spacing_engraver::finalize () Grob *last_spacing = last_spacings_[parent]; if (last_spacing - && !unsmob_grob_array (last_spacing->get_object ("right-items"))) + && !Grob_array::unsmob (last_spacing->get_object ("right-items"))) { - Grob *col = unsmob_grob (get_property ("currentCommandColumn")); - + Grob *col = Grob::unsmob (get_property ("currentCommandColumn")); + Pointer_group_interface::add_grob (last_spacing, - ly_symbol2scm ("right-items"), - col); + ly_symbol2scm ("right-items"), + col); } } @@ -121,12 +120,12 @@ Note_spacing_engraver::stop_translation_timestep () if (last_spacing && to_boolean (get_property ("hasStaffSpacing"))) { - Grob *col = unsmob_grob (get_property ("currentCommandColumn")); + Grob *col = Grob::unsmob (get_property ("currentCommandColumn")); Pointer_group_interface::add_grob (last_spacing, - ly_symbol2scm ("right-items"), - col); + ly_symbol2scm ("right-items"), + col); } - + if (spacing_) { last_spacings_[parent] = spacing_; @@ -140,16 +139,16 @@ ADD_ACKNOWLEDGER (Note_spacing_engraver, note_column); ADD_ACKNOWLEDGER (Note_spacing_engraver, rhythmic_grob); ADD_TRANSLATOR (Note_spacing_engraver, - /* doc */ - "Generate @code{NoteSpacing}, an object linking horizontal" - " lines for use in spacing.", + /* doc */ + "Generate @code{NoteSpacing}, an object linking horizontal" + " lines for use in spacing.", - /* create */ - "NoteSpacing ", + /* create */ + "NoteSpacing ", - /* read */ - "", + /* read */ + "", - /* write */ - "" - ); + /* write */ + "" + );