]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/output-lib.scm
(mangle_cxx_identifier): new
[lilypond.git] / scm / output-lib.scm
index d0dde3f4d5deb6eab23b0b4515bf54d1ebfa0231..ee652b2533c05a5289b5e9e0c2c041357cf6253e 100644 (file)
@@ -2,7 +2,7 @@
 ;;;;
 ;;;;  source file of the GNU LilyPond music typesetter
 ;;;; 
-;;;; (c) 1998--2005 Jan Nieuwenhuizen <janneke@gnu.org>
+;;;; (c) 1998--2006 Jan Nieuwenhuizen <janneke@gnu.org>
 ;;;; Han-Wen Nienhuys <hanwen@cs.uu.nl>
 
 
 ;;; end of tablature functions
 
 (define-public (make-stencil-boxer thickness padding callback)
+
   "Return function that adds a box around the grob passed as argument."
-  (lambda (grob) (box-stencil (callback grob) thickness padding)))
+  (lambda (grob)
+    
+    (box-stencil (callback grob) thickness padding)))
 
 (define-public (make-stencil-circler thickness padding callback)
   "Return function that adds a circle around the grob passed as argument."
 
 (define-public (print-circled-text-callback grob)
   (let* ((text (ly:grob-property grob 'text))
+        
         (layout (ly:grob-layout grob))
         (defs (ly:output-def-lookup layout 'text-font-defaults))
         (props (ly:grob-alist-chain grob defs))
-        (circle (Text_interface::interpret_markup
-                 layout props (make-draw-circle-markup 0.8 0.1 #f)))
-        (text-stencil (Text_interface::interpret_markup layout props text)))
-    
-    (ly:stencil-add (centered-stencil text-stencil) circle)))
+        (circle (ly:text-interface::interpret-markup
+                 layout props (make-circle-markup text))))
+    circle))
 
 
 ;;(define (mm-to-pt x)
@@ -176,7 +178,7 @@ centered, X==1 is at the right, X == -1 is at the left."
 
 (define-public (first-bar-number-invisible barnum) (> barnum 1))
 
-;; See documentation of Item::visibility_lambda_
+;; See documentation of ly:item::visibility-lambda-
 (define-public begin-of-line-visible
   #(#f #f #t))
 (define-public end-of-line-visible
@@ -218,6 +220,7 @@ centered, X==1 is at the right, X == -1 is at the left."
                         (".|." . (".|." . ()))
                         ("" . ("" . ""))
                         (":" . (":" . ""))
+                        ("." . ("." . ()))
                         ("empty" . (() . ()))
                         ("brace" . (() . "brace"))
                         ("bracket" . (() . "bracket"))  )))
@@ -227,10 +230,11 @@ centered, X==1 is at the right, X == -1 is at the left."
                             (index-cell (cdr result) dir)
                             #f)))
         )
-        
-    (if glyph-name
-       (set! (ly:grob-property grob 'glyph-name) glyph-name)
-       (ly:grob-suicide! grob))))
+
+    (if (not glyph-name)
+       (ly:grob-suicide! grob))
+
+    glyph-name))
 
 
 (define-public (shift-right-at-line-begin g)
@@ -279,3 +283,14 @@ centered, X==1 is at the right, X == -1 is at the left."
      (ly:stencil-translate-axis lp (- (car x-ext) padding) X)
      (ly:stencil-translate-axis rp (+ (cdr x-ext) padding) X))
   ))
+
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;; 
+
+(define-public (chain-grob-member-functions grob value . funcs)
+  (for-each
+   (lambda (func)
+     (set! value (func grob value)))
+   funcs)
+
+  value)