;; outer let to trigger suicide
(let ((sten (ly:hairpin::print grob)))
(if (grob::is-live? grob)
- (let* ((decresc? (eq? (ly:grob-property grob 'grow-direction) LEFT))
+ (let* ((decresc? (eqv? (ly:grob-property grob 'grow-direction) LEFT))
(thick (ly:grob-property grob 'thickness 0.1))
(thick (* thick (layout-line-thickness grob)))
(xex (ly:stencil-extent sten X))
the extents of @code{BreakAlignment} grobs associated with the left and
right bounds of a @code{MeasureCounter} spanner. Broken measures are
numbered in parentheses."
- (let* ((num (markup (number->string (ly:grob-property grob 'count-from))))
+ (let* ((num (make-simple-markup
+ (number->string (ly:grob-property grob 'count-from))))
(orig (ly:grob-original grob))
(siblings (ly:spanner-broken-into orig)) ; have we been split?
(num
X)))
num))
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; HorizontalBracketText
+
+(define-public (ly:horizontal-bracket-text::print grob)
+ (let ((text (ly:grob-property grob 'text)))
+ (if (or (null? text)
+ (equal? text "")
+ (equal? text empty-markup))
+ (begin
+ (ly:grob-suicide! grob)
+ '())
+ (let* ((orig (ly:grob-original grob))
+ (siblings (ly:spanner-broken-into orig))
+ (text
+ (if (or (null? siblings)
+ (eq? grob (car siblings)))
+ text
+ (if (string? text)
+ (string-append "(" text ")")
+ (make-parenthesize-markup text)))))
+ (grob-interpret-markup grob text)))))
+
+(define-public (ly:horizontal-bracket-text::calc-direction grob)
+ (let* ((bracket (ly:grob-object grob 'bracket))
+ (bracket-dir (ly:grob-property bracket 'direction DOWN)))
+ bracket-dir))
+
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; make-engraver helper macro