]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/parenthesis-engraver.cc
add vcs lines to debian/control
[lilypond.git] / lily / parenthesis-engraver.cc
index 53d332427eeccfdfa33bf2e4ca238a35a5fb6fab..1fe8005e4d1d93c504eca919ae2c8138087b51ec 100644 (file)
@@ -1,15 +1,25 @@
 /*
-  parenthesis-engraver.cc -- implement Parenthesis_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2005--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
-  (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
 
+  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"
 
-#include "grob.hh"
 #include "item.hh"
 #include "pointer-group-interface.hh"
 #include "simple-closure.hh"
@@ -26,7 +36,7 @@ protected:
   DECLARE_ACKNOWLEDGER (grob);
 };
 
-Parenthesis_engraver::Parenthesis_engraver()
+Parenthesis_engraver::Parenthesis_engraver ()
 {
 }
 
@@ -40,12 +50,10 @@ Parenthesis_engraver::acknowledge_grob (Grob_info info)
          if (Item *victim = dynamic_cast<Item*> (info.grob ()))
            {
              Engraver *eng = dynamic_cast<Engraver*> (info.origin_translator ());
-             Item *paren = make_item_from_properties (eng,
-                                                      ly_symbol2scm ("ParenthesesItem"),
-                                                      victim->self_scm (),
-                                                      "ParenthesesItem");
-
+             Item *paren = eng->make_item ("ParenthesesItem", victim->self_scm ());
              Pointer_group_interface::add_grob (paren, ly_symbol2scm ("elements"), victim);
+
+             paren->set_parent (victim, Y_AXIS);
              
              Real size = robust_scm2double (paren->get_property ("font-size"), 0.0)
                + robust_scm2double (victim->get_property ("font-size"), 0.0);
@@ -67,11 +75,16 @@ Parenthesis_engraver::acknowledge_grob (Grob_info info)
 
 ADD_ACKNOWLEDGER (Parenthesis_engraver, grob);
 ADD_TRANSLATOR (Parenthesis_engraver,
-               /* doc */ "Parenthesize objects whose music cause has the @code{parenthesize} "
-               "property.",
+               /* doc */
+               "Parenthesize objects whose music cause has the"
+               " @code{parenthesize} property.",
                
                /* create */
                "ParenthesesItem ",
-               /* accept */ "",
-               /* read */ "",
-               /* write */ "");
+
+               /* read */
+               "",
+
+               /* write */
+               ""
+               );