]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-lib.scm
Scheme function to return a grob's name
[lilypond.git] / scm / output-lib.scm
index db4fb9b022255a7bc277706ff1774f4bb7fefa61..7f956a54d574549efbf360575efc782ad817fb67 100644 (file)
 (define-public (grob::is-live? grob)
   (pair? (ly:grob-basic-properties grob)))
 
+(define-public (grob::name grob)
+  "Return the name of the grob @var{grob} as a symbol."
+  (assq-ref (ly:grob-property grob 'meta) 'name))
+
 (define-public (make-stencil-boxer thickness padding callback)
   "Return function that adds a box around the grob passed as argument."
   (lambda (grob)
@@ -1367,7 +1371,7 @@ parent or the parent has no setting."
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; measure counter
 
-(define (measure-counter-stencil grob)
+(define-public (measure-counter-stencil grob)
   "Print a number for a measure count.  The number is centered using
 the extents of @code{BreakAlignment} grobs associated with the left and
 right bounds of a @code{MeasureCounter} spanner.  Broken measures are