in GUI docs, show inherited methods
svn: r7119 original commit: 44d1c03d685aefced364362cc0fe28ca6cf34148
This commit is contained in:
parent
e8dc197a92
commit
bfd881ce7f
|
@ -203,7 +203,9 @@
|
||||||
|
|
||||||
(define/public (render-flow-element p part ht)
|
(define/public (render-flow-element p part ht)
|
||||||
(cond
|
(cond
|
||||||
[(table? p) (render-table p part ht)]
|
[(table? p) (if (auxiliary-table? p)
|
||||||
|
(render-auxiliary-table p part ht)
|
||||||
|
(render-table p part ht))]
|
||||||
[(itemization? p) (render-itemization p part ht)]
|
[(itemization? p) (render-itemization p part ht)]
|
||||||
[(blockquote? p) (render-blockquote p part ht)]
|
[(blockquote? p) (render-blockquote p part ht)]
|
||||||
[(delayed-flow-element? p) (render-flow-element
|
[(delayed-flow-element? p) (render-flow-element
|
||||||
|
@ -211,6 +213,9 @@
|
||||||
part ht)]
|
part ht)]
|
||||||
[else (render-paragraph p part ht)]))
|
[else (render-paragraph p part ht)]))
|
||||||
|
|
||||||
|
(define/public (render-auxiliary-table i part ht)
|
||||||
|
null)
|
||||||
|
|
||||||
(define/public (render-table i part ht)
|
(define/public (render-table i part ht)
|
||||||
(map (lambda (d) (if (flow? i)
|
(map (lambda (d) (if (flow? i)
|
||||||
(render-flow d part ht)
|
(render-flow d part ht)
|
||||||
|
|
|
@ -212,7 +212,11 @@
|
||||||
,@(if (part? p)
|
,@(if (part? p)
|
||||||
(render-content (part-title-content p) d ht)
|
(render-content (part-title-content p) d ht)
|
||||||
(render-content (element-content p) d ht)))))))
|
(render-content (element-content p) d ht)))))))
|
||||||
ps)))))))))))
|
ps)))))))
|
||||||
|
,@(apply append
|
||||||
|
(map (lambda (t)
|
||||||
|
(render-table t d ht))
|
||||||
|
(filter auxiliary-table? (flow-paragraphs (part-flow d)))))))))
|
||||||
|
|
||||||
(define/public (render-one-part d ht fn number)
|
(define/public (render-one-part d ht fn number)
|
||||||
(parameterize ([current-output-file fn])
|
(parameterize ([current-output-file fn])
|
||||||
|
|
|
@ -1265,6 +1265,49 @@
|
||||||
[(_ object%) #'#f]
|
[(_ object%) #'#f]
|
||||||
[(_ id) (class-id->class-doc-info-id #'id)]))
|
[(_ id) (class-id->class-doc-info-id #'id)]))
|
||||||
|
|
||||||
|
(define (collect-inherited supers ht)
|
||||||
|
(let* ([supers (let loop ([supers supers][accum null])
|
||||||
|
(cond
|
||||||
|
[(null? supers) (reverse accum)]
|
||||||
|
[(memq (car supers) accum)
|
||||||
|
(loop (cdr supers) accum)]
|
||||||
|
[else
|
||||||
|
(let ([super (car supers)])
|
||||||
|
(loop (append (reverse (decl-intfs super))
|
||||||
|
(if (decl-super super)
|
||||||
|
(list (decl-super super))
|
||||||
|
null)
|
||||||
|
(cdr supers))
|
||||||
|
(cons super accum)))]))]
|
||||||
|
[inh (apply
|
||||||
|
append
|
||||||
|
(map (lambda (super)
|
||||||
|
(let ([inh (filter
|
||||||
|
values
|
||||||
|
(hash-table-map
|
||||||
|
(decl-methods super)
|
||||||
|
(lambda (k v)
|
||||||
|
(let ([v (hash-table-get ht k)])
|
||||||
|
(and (eq? (car v) (decl-name super))
|
||||||
|
(cons (symbol->string k)
|
||||||
|
(*method k (car v))))))))])
|
||||||
|
(if (null? inh)
|
||||||
|
null
|
||||||
|
(cons
|
||||||
|
(make-element #f (list (make-element "inheritedlbl" '("from "))
|
||||||
|
(to-element (decl-name super))))
|
||||||
|
(map cdr (sort inh
|
||||||
|
(lambda (a b)
|
||||||
|
(string<? (car a) (car b)))))))))
|
||||||
|
supers))])
|
||||||
|
(if (null? inh)
|
||||||
|
null
|
||||||
|
(list (make-auxiliary-table
|
||||||
|
"inherited"
|
||||||
|
(map (lambda (i)
|
||||||
|
(list (make-flow (list (make-paragraph (list i))))))
|
||||||
|
(cons (make-element "inheritedlbl" '("Inherited methods:")) inh)))))))
|
||||||
|
|
||||||
(define (register-class name super intfs mk-head body)
|
(define (register-class name super intfs mk-head body)
|
||||||
(let ([ht (make-hash-table)])
|
(let ([ht (make-hash-table)])
|
||||||
(when super
|
(when super
|
||||||
|
@ -1280,7 +1323,13 @@
|
||||||
(when (meth? i)
|
(when (meth? i)
|
||||||
(hash-table-put! ht (meth-name i) (cons name i))))
|
(hash-table-put! ht (meth-name i) (cons name i))))
|
||||||
body)
|
body)
|
||||||
(make-decl name super intfs mk-head body ht)))
|
(make-decl name super intfs mk-head
|
||||||
|
(append body
|
||||||
|
(collect-inherited (append
|
||||||
|
(if super (list super) null)
|
||||||
|
intfs)
|
||||||
|
ht))
|
||||||
|
ht)))
|
||||||
|
|
||||||
(define (*include-class decl)
|
(define (*include-class decl)
|
||||||
(make-splice
|
(make-splice
|
||||||
|
|
|
@ -118,6 +118,23 @@
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.inherited {
|
||||||
|
margin-top: 1em;
|
||||||
|
text-align: left;
|
||||||
|
background-color: #ECF5F5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inherited td {
|
||||||
|
padding-left: 1em;
|
||||||
|
text-indent: -0.8em;
|
||||||
|
padding-right: 0.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.inheritedlbl {
|
||||||
|
font-style: italic;
|
||||||
|
font-size: 85%;
|
||||||
|
}
|
||||||
|
|
||||||
.indexlink {
|
.indexlink {
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,6 +65,7 @@
|
||||||
[(styled-paragraph paragraph) ([style any/c])]
|
[(styled-paragraph paragraph) ([style any/c])]
|
||||||
[table ([style any/c]
|
[table ([style any/c]
|
||||||
[flowss (listof (listof (or/c flow? (one-of/c 'cont))))])]
|
[flowss (listof (listof (or/c flow? (one-of/c 'cont))))])]
|
||||||
|
[(auxiliary-table table) ()]
|
||||||
[delayed-flow-element ([render (any/c part? any/c . -> . flow-element?)])]
|
[delayed-flow-element ([render (any/c part? any/c . -> . flow-element?)])]
|
||||||
[itemization ([flows (listof flow?)])]
|
[itemization ([flows (listof flow?)])]
|
||||||
[blockquote ([style any/c]
|
[blockquote ([style any/c]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user