]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.3.125
authorfred <fred>
Wed, 27 Mar 2002 00:48:24 +0000 (00:48 +0000)
committerfred <fred>
Wed, 27 Mar 2002 00:48:24 +0000 (00:48 +0000)
scm/backend-documentation-lib.scm
scm/documentation-lib.scm
scm/engraver-documentation-lib.scm

index ac1e63a75cc4027cefb118965bf6372e6a2a1c76..980236042343a211ca6f8121c6b20ffd314d248b 100644 (file)
 
     (cons (string-append "@code{" name "} "
                       "(" typename ")"
-                      ":" )
+                      ": "
+
+; index gets too messy
+;                     "@vindex " name "\n"
+
+
+                      )
          desc)))
 
-(define (document-grob-property sym grob-description only-doc-if-set)
+(define (document-grob-property sym grob-description )
   (let* ((handle (assoc sym grob-description))
         (defval (if (eq? handle #f)
-                    ""
+                    "(unset)"
                   (scm->texi (cdr handle))))
         (propdoc (backend-property->texi sym)))
         
-    (if (and only-doc-if-set  (eq? handle #f))
-       '("" . "")
-       (cons (car propdoc) (string-append (cdr propdoc)
+    (cons (car propdoc) (string-append (cdr propdoc)
                                           "\nDefault value: "
-                                          defval)))))
+                                          defval))))
 
 (define (document-interface where interface grob-description)
   (let* ((level (if (eq? where 'grob) 3 2))
@@ -42,7 +46,7 @@
         (props (caddr interface))
         (docfunc (lambda (x)
                    (document-grob-property
-                    x grob-description (eq? where 'grob))))
+                    x grob-description )))
         (docs (map docfunc props)))
 
     (string-append
@@ -93,7 +97,7 @@
                         engraver-description-alist))))
        (string-append
        name " grobs are created by: "
-       (human-listify (map reffy
+       (human-listify (map ref-ify
                            (map engraver-name
                                 (map symbol->string engravers))))))
 
index dd863c9b1760c5ee3ab4db359234d84e022cda3a..2db0451aa9494d044e5dfd0065bda17f86d92276 100644 (file)
@@ -71,7 +71,7 @@ Add a ref if REF is set
   (string-append
    "\n" (cdr (assoc level texi-section-alist)) " "
    (if ref
-       (string-append "@ref{" name "}") 
+       (ref-ify name)
        name)
    "\n"))
 
@@ -103,7 +103,7 @@ Add a ref if REF is set
   ;; Menus don't appear in html, so we make a list ourselves
   "\n@ignore\n"
   "\n@ifhtml\n"
-  (description-list->texi (map (lambda (x) (cons (reffy (car x)) (cdr x)))
+  (description-list->texi (map (lambda (x) (cons (ref-ify (car x)) (cdr x)))
                         items-alist))
   "\n@end ifhtml\n"
   "\n@end ignore\n"))
@@ -133,18 +133,18 @@ Add a ref if REF is set
    ))
 
 (define (context-name name)
-  (string-append "Context " name))
+  name)
 
 (define (engraver-name name)
   name)
 
 (define (grob-name name)
-  (string-append "Grob " name))
+  name)
 
 (define (interface-name name)
   name)
 
-(define (reffy x)
+(define (ref-ify x)
   (string-append "@ref{" x "}"))
 
 (define (human-listify l)
index bdab2c870e3865775b08d304cf7e2c2c0b33fd34..8e8ceff574eb7326b9dc76a35fb469430954f244 100644 (file)
@@ -42,9 +42,9 @@
      (if  (null? objs)
          ""
          (string-append
-          "This engraver creates \n "
-          (human-listify (map reffy (map grob-name objs)))
-          " grobs.")
+          "This engraver creates the following grobs: \n "
+          (human-listify (map ref-ify  objs))
+          ".")
          )
 
      "\n\n"
@@ -66,7 +66,7 @@
                         context-description-alist))))
        (string-append
        name " is part of contexts: "
-       (human-listify (map reffy (map context-name contexts))))))))
+       (human-listify (map ref-ify (map context-name contexts))))))))
 
 
 ;; First level Engraver description
                  (cdr (assoc 'consists context-desc))
                  (cdr (assoc 'end-consists  context-desc))
                  ))
+       (grobs  (context-grobs context-desc))
+       (grob-refs (map (lambda (x) (ref-ify x)) grobs))
        )
     
     (string-append 
      desc
+     "\n\nThis context creates the following grobs: \n\n"
+     (apply string-append (map (lambda (x) (string-append " " x "  ")) grob-refs))
+     "."
      
      (if (null? accepts)
         "This context is a `bottom' context; it can not contain other contexts."
         (string-append
+         "\n\nContext "
          name " can contain \n"
-         (human-listify (map reffy (map context-name accepts)))))
+         (human-listify (map ref-ify (map context-name accepts)))))
      
      "\n\nThis context is built from the following engravers: "
      (if no-copies
-        (human-listify (map reffy (map engraver-name consists)))
+        (human-listify (map ref-ify (map engraver-name consists)))
         (apply string-append 
                (map document-engraver-by-name consists))))))
 
+(define (engraver-grobs  name)
+  (let* (
+        (eg (assoc (string->symbol name) engraver-description-alist))
+      )
+
+    (if (eq? eg #f)
+       '()
+       (map symbol->string (caddr (cdr eg)))
+       )
+  ))
+
+(define (context-grobs context-desc)
+  (let* (
+        (consists (append
+                   (list (cdr (assoc 'group-type context-desc)))
+                   (cdr (assoc 'consists context-desc))
+                   (cdr (assoc 'end-consists  context-desc))
+                   ))
+        (grobs  (apply append
+                 (map engraver-grobs consists))
+        )
+        )
+    grobs
+    ))
+
 
 ;; First level Context description
 (define (document-context top context-desc)