]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/note-spacing-engraver.cc
Run grand-replace (issue 3765)
[lilypond.git] / lily / note-spacing-engraver.cc
index 8a5f5c7944228753efbc518241bf09773827fac6..5accbc5f96daa122261b58b1ab8efaa01134d753 100644 (file)
@@ -1,10 +1,20 @@
-/* 
-  note-spacing-engraver.cc -- implement Note_spacing_engraver
-  
-  source file of the GNU LilyPond music typesetter
-  
-  (c) 2006--2008 Han-Wen Nienhuys <hanwen@lilypond.org>
-  
+/*
+  This file is part of LilyPond, the GNU music typesetter.
+
+  Copyright (C) 2006--2014 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"
 
 class Note_spacing_engraver : public Engraver
 {
-  typedef map <Context*, Grob*> Last_spacing_map;
+  typedef map <Context *, Grob *> Last_spacing_map;
   Last_spacing_map last_spacings_;
   Grob *last_spacing_;
-  
+
   Grob *spacing_;
 
   void add_spacing_item (Grob *);
@@ -58,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)
 {
@@ -94,11 +103,11 @@ Note_spacing_engraver::finalize ()
   if (last_spacing
       && !unsmob_grob_array (last_spacing->get_object ("right-items")))
     {
-      Grob *col  = unsmob_grob (get_property ("currentCommandColumn"));
-      
+      Grob *col = unsmob_grob (get_property ("currentCommandColumn"));
+
       Pointer_group_interface::add_grob (last_spacing,
-                                        ly_symbol2scm ("right-items"),
-                                        col);
+                                         ly_symbol2scm ("right-items"),
+                                         col);
     }
 }
 
@@ -113,10 +122,10 @@ Note_spacing_engraver::stop_translation_timestep ()
     {
       Grob *col = unsmob_grob (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_;
@@ -130,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 */
+                ""
+               );