-/*
- note-spacing-engraver.cc -- implement Note_spacing_engraver
-
- source file of the GNU LilyPond music typesetter
-
- (c) 2006--2007 Han-Wen Nienhuys <hanwen@lilypond.org>
-
+/*
+ This file is part of LilyPond, the GNU music typesetter.
+
+ Copyright (C) 2006--2011 Han-Wen Nienhuys <hanwen@lilypond.org>
+
+ LilyPond is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ LilyPond is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
*/
#include "engraver.hh"
{
typedef map <Context*, Grob*> Last_spacing_map;
Last_spacing_map last_spacings_;
+ Grob *last_spacing_;
Grob *spacing_;
Note_spacing_engraver::Note_spacing_engraver ()
{
spacing_ = 0;
+ last_spacing_ = 0;
}
void
ly_symbol2scm ("left-items"),
g);
- Grob *last_spacing = last_spacings_[context ()->get_parent_context ()];
- if (last_spacing)
- Pointer_group_interface::add_grob (last_spacing,
+ if (last_spacing_)
+ Pointer_group_interface::add_grob (last_spacing_,
ly_symbol2scm ("right-items"),
g);
}
if (spacing_)
{
last_spacings_[parent] = spacing_;
+ last_spacing_ = spacing_;
spacing_ = 0;
}
ADD_ACKNOWLEDGER (Note_spacing_engraver, rhythmic_grob);
ADD_TRANSLATOR (Note_spacing_engraver,
- /* doc */ "Generates NoteSpacing, an object linking horizontal lines for use in spacing.",
- /* create */ "NoteSpacing",
- /* read */ "",
- /* write */ "");
+ /* doc */
+ "Generate @code{NoteSpacing}, an object linking horizontal"
+ " lines for use in spacing.",
+
+ /* create */
+ "NoteSpacing ",
+
+ /* read */
+ "",
+
+ /* write */
+ ""
+ );