(make-procedure-with-setter ly:music-property
ly:music-set-property!))
+
+;; TODO move this
(define-public ly:grob-property
(make-procedure-with-setter ly:grob-property
ly:grob-set-property!))
+(define-public ly:paper-system-property
+ (make-procedure-with-setter ly:paper-system-property
+ ly:paper-system-set-property!))
+
(define-public (music-map function music)
"Apply @var{function} to @var{music} and all of the music it contains.
(define-public (make-grob-property-revert grob gprop)
"Revert the grob property GPROP for GROB."
- (make-music 'OverrideProperty
+ (make-music 'RevertProperty
'symbol grob
'grob-property gprop))
(define-public ((add-balloon-text object-name text off) grob orig-context cur-context)
"Usage: see input/regression/balloon.ly "
(let* ((meta (ly:grob-property grob 'meta))
- (nm (if (pair? meta) (cdr (assoc 'name meta)) "nonexistant"))
- (cb (ly:grob-property grob 'print-function)))
- (if (equal? nm object-name)
+ (cb (ly:grob-property-data grob 'stencil))
+ (nm (if (pair? meta) (cdr (assoc 'name meta)) "nonexistant")))
+ (if (and (equal? nm object-name)
+ (procedure? cb))
(begin
- (set! (ly:grob-property grob 'print-function) Balloon_interface::print)
- (set! (ly:grob-property grob 'balloon-original-callback) cb)
+ (ly:grob-set-property! grob 'stencil Balloon_interface::print)
+ (set! (ly:grob-property grob 'original-stencil) cb)
(set! (ly:grob-property grob 'balloon-text) text)
(set! (ly:grob-property grob 'balloon-text-offset) off)
(set! (ly:grob-property grob 'balloon-text-props) '((font-family . roman)))))))