From 8de826c5d4fb89d1048c134f97aeea22c28124e4 Mon Sep 17 00:00:00 2001 From: Marc Hohl Date: Sun, 13 May 2012 22:23:54 +0200 Subject: [PATCH] Issue 1320: preliminary work - repeat bars defined as context properties 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 | 4 ++-- ly/engraver-init.ly | 2 ++ scm/define-context-properties.scm | 5 ++++- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 3d988c2c49..6d2b508481 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -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 "". diff --git a/ly/engraver-init.ly b/ly/engraver-init.ly index 7f9a2b9699..5710d4f6b2 100644 --- a/ly/engraver-init.ly +++ b/ly/engraver-init.ly @@ -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 diff --git a/scm/define-context-properties.scm b/scm/define-context-properties.scm index 59baec69ad..dd6abce6d2 100644 --- a/scm/define-context-properties.scm +++ b/scm/define-context-properties.scm @@ -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.") -- 2.39.2