]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/cue-clef-engraver.cc
Doc: Clarify Context creation (3006)
[lilypond.git] / lily / cue-clef-engraver.cc
index 28e11e17df43dbb2bfa0c476375c25b8e9ce3680..1723964266001d47bd26fe0c05771505d03e9338 100644 (file)
@@ -1,9 +1,9 @@
 /*
   This file is part of LilyPond, the GNU music typesetter.
 
-  Copyright (C) 1997--2011 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  Copyright (C) 1997--2012 Han-Wen Nienhuys <hanwen@xs4all.nl>
                            Mats Bengtsson <matsb@s3.kth.se>
-  Copyright (C) 2010--2011 Reinhold Kainhofer <reinhold@kainhofer.com>
+  Copyright (C) 2010--2012 Reinhold Kainhofer <reinhold@kainhofer.com>
 
   LilyPond is free software: you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
@@ -24,7 +24,6 @@ using namespace std;
 
 #include "item.hh"
 #include "context.hh"
-#include "bar-line.hh"
 #include "staff-symbol-referencer.hh"
 #include "engraver.hh"
 #include "direction.hh"
@@ -114,9 +113,12 @@ Cue_clef_engraver::create_octavate_eight (SCM oct)
       SCM txt = scm_number_to_string (scm_from_int (abs_oct),
                                       scm_from_int (10));
 
-      g->set_property ("text",
-                       scm_list_n (ly_lily_module_constant ("vcenter-markup"),
-                                   txt, SCM_UNDEFINED));
+      SCM style = get_property ("cueClefOctavationStyle");
+
+      SCM formatter = get_property ("cueClefOctavationFormatter");
+      if (ly_is_procedure (formatter))
+        g->set_property ("text", scm_call_2 (formatter, txt, style));
+
       Side_position_interface::add_support (g, clef_);
 
       g->set_parent (clef_, Y_AXIS);
@@ -220,6 +222,7 @@ ADD_TRANSLATOR (Cue_clef_engraver,
                 /* read */
                 "cueClefGlyph "
                 "cueClefOctavation "
+                "cueClefOctavationStyle "
                 "cueClefPosition "
                 "explicitCueClefVisibility "
                 "middleCCuePosition "