]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/new-markup.scm
* GNUmakefile.in: remove no kpathsea hack.
[lilypond.git] / scm / new-markup.scm
index 248047def9e973ad7304052e5faf3a43e8f4dc73..f9587aa8a2adeabf74479484d708893216ef6fd6 100644 (file)
@@ -73,18 +73,12 @@ for the reader.
    (map (lambda (x) (interpret-markup grob props x)) (car rest)))
   )
 
-(define (combine-molecule-list lst)
-  (if (null? (cdr lst)) (car lst)
-      (ly:molecule-add (car lst) (combine-molecule-list (cdr lst)))
-      ))
 
 (define-public (combine-markup grob props . rest)
   (ly:molecule-add
    (interpret-markup grob props (car rest))
    (interpret-markup grob props (cadr rest))))
   
-;   (combine-molecule-list (map (lambda (x) (interpret-markup grob props x)) (car rest))))
-
 (define (font-markup qualifier value)
   (lambda (grob props . rest)
     (interpret-markup grob (cons (cons `(,qualifier . ,value) (car props)) (cdr props)) (car rest))
@@ -223,15 +217,12 @@ for the reader.
        (dot (ly:find-glyph-by-name font "dots-dot"))
        (dotwid  (interval-length (ly:molecule-get-extent dot X)))
        (dots (if (> dot-count 0)
-                (reduce
-                 (lambda (x y)
-                   (ly:molecule-add x y))
+                (apply ly:molecule-add
                  (map (lambda (x)
                         (ly:molecule-translate-axis
                          dot  (* (+ 1 (* 2 x)) dotwid) X) )
-                      (range dot-count 1)))
-                #f
-                ))
+                      (iota dot-count 1)))
+                #f))
        
        (flaggl (if (> log 2)
                   (ly:molecule-translate
@@ -335,7 +326,6 @@ for the reader.
     (bracketify-molecule m Y th (* 2.5 th) th)  
 ))
 
-
 ;; todo: fix negative space
 (define (hspace-markup grob props . rest)
   "Syntax: \\hspace NUMBER."
@@ -380,6 +370,17 @@ for the reader.
    (car rest))
   ))
 
+(define-public (box-markup grob props . rest)
+  "Syntax: \\box MARKUP"
+  (let*
+      (
+       (th 0.1)
+       (pad 0.2)
+       (m (interpret-markup grob props (car rest)))
+       )
+    (box-molecule m th pad)
+  ))
+
 (define (markup-signature-to-keyword sig)
   " (A B C) -> a0-b1-c2 "
   
@@ -503,7 +504,8 @@ for the reader.
    ;; size
    (cons smaller-markup (list markup?))
    (cons bigger-markup (list markup?))
-
+;   (cons char-number-markup (list string?))
+   
    ;; 
    (cons sub-markup (list markup?))
    (cons normal-size-sub-markup (list markup?))
@@ -538,6 +540,8 @@ for the reader.
    (cons raise-markup (list number? markup?))
    (cons magnify-markup (list number? markup?))
    (cons fontsize-markup (list number? markup?))
+
+   (cons box-markup  (list markup?))
    )
   )
 
@@ -658,19 +662,16 @@ against SIGNATURE, reporting MAKE-NAME as the user-invoked function.
 
 (define-public (brew-new-markup-molecule grob)
   (let*
-      ((t     (ly:get-grob-property grob 'text))
-       )
-    (if (null? t)
-       '()
-       (interpret-markup grob
-                         (Font_interface::get_property_alist_chain grob)
-                         t
-                         ))
-  ))
+      ((t (ly:get-grob-property grob 'text))
+       (chain (Font_interface::get_property_alist_chain grob)))
+    (if (markup? t)
+       (interpret-markup grob  chain t)
+       (Text_item::text_to_molecule grob t chain)
+       )))
 
-(define-public empty-markup `(,simple-markup ""))
+(define-public empty-markup (make-simple-markup ""))
 
-(define (interpret-markup  grob props markup)
+(define-public (interpret-markup grob props markup)
   (if (string? markup)
       (simple-markup grob props markup)
       (let*