]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 1320: preliminary work - repeat bars defined as context properties
authorMarc Hohl <marc@hohlart.de>
Sun, 13 May 2012 20:23:54 +0000 (22:23 +0200)
committerDavid Kastrup <dak@gnu.org>
Fri, 18 May 2012 07:42:49 +0000 (09:42 +0200)
This patch removes the hardcoded bar line types for repeat
constructs; this allows for future changes in the bar line
handling routines without recompiling the sources.

lily/repeat-acknowledge-engraver.cc
ly/engraver-init.ly
scm/define-context-properties.scm

index 3d988c2c4963b3a3f79ecce2b55fd91770523d9c..6d2b508481d062d73dcf7475ad0c9dc0c420915c 100644 (file)
@@ -96,9 +96,9 @@ Repeat_acknowledge_engraver::process_music ()
   if (start && end)
     s = robust_scm2string (get_property ("doubleRepeatType"), ":|:");
   else if (start)
-    s = "|:";
+    s = robust_scm2string (get_property ("startRepeatType"), "|:");
   else if (end)
-    s = ":|";
+    s =  robust_scm2string (get_property ("endRepeatType"), ":|");
 
   /*
     TODO: line breaks might be allowed if we set whichBar to "".
index 7f9a2b9699812347a237e86ff3529cc20581aa48..5710d4f6b214ff67eeda820c083d603c52060ad0 100644 (file)
@@ -602,6 +602,8 @@ automatically when an output definition (a @code{\score} or
 
   defaultBarType = #"|"
   doubleRepeatType = #":|:"
+  startRepeatType = #"|:"
+  endRepeatType = #":|"
   barNumberVisibility = #first-bar-number-invisible-and-no-parenthesized-bar-numbers
   barNumberFormatter = #robust-bar-number-function
   automaticBars = ##t
index 59baec69ad6b7140a0af48a1dad37a0d043c721b..dd6abce6d2d81559d723d146da773449e1b0a2aa 100644 (file)
@@ -230,7 +230,8 @@ the symbol @samp{hihat}) as keys, and a list
 @code{(@var{notehead-style} @var{script} @var{vertical-position})} as
 values.")
 
-
+     (endRepeatType ,string? "Set the default bar line for the ending
+of repeats.")
      (explicitClefVisibility ,vector? "@samp{break-visibility}
 function for clef changes.")
      (explicitCueClefVisibility ,vector? "@samp{break-visibility}
@@ -479,6 +480,8 @@ part-combining.")
 @code{traditional}, or @code{semitone}.")
      (stanza ,markup? "Stanza @q{number} to print before the start of a
 verse.  Use in @code{Lyrics} context.")
+     (startRepeatType ,string? "Set the default bar line for the beginning
+of repeats.")
      (stemLeftBeamCount ,integer? "Specify the number of beams to draw
 on the left side of the next note.  Overrides automatic beaming.  The
 value is only used once, and then it is erased.")