GUI type fixes
Due to either typos in documentation, adjustment to make contract generation easier, or where a more precise type than documented is needed for real uses.
This commit is contained in:
parent
8402ee1635
commit
8ebbd3dfee
|
@ -448,11 +448,14 @@
|
|||
(Class #:row-var r #:implements Frame:Basic<%>)))
|
||||
|
||||
(define-type Frame:Focus-Table<%>
|
||||
(Class #:implements Frame%))
|
||||
(Class #:implements Top-Level-Window<%>))
|
||||
|
||||
;; The documentation claims this should be applied to frames, but
|
||||
;; the implementation and its uses in practice (such as in DrRacket)
|
||||
;; apply it to other top level windows like dialog% instances.
|
||||
(define-type Frame:Focus-Table-Mixin
|
||||
(All (r #:row)
|
||||
(Class #:row-var r #:implements Frame%)
|
||||
(Class #:row-var r #:implements Top-Level-Window<%>)
|
||||
->
|
||||
(Class #:row-var r #:implements Frame:Focus-Table<%>)))
|
||||
|
||||
|
@ -1513,7 +1516,7 @@
|
|||
[Boolean
|
||||
(U 'high 'low)
|
||||
(U 'rectangle 'ellipse 'hollow-ellipse 'dot)
|
||||
#:adjust-on-insert/delete Boolean
|
||||
#:adjust-on-insert/delete? Boolean
|
||||
#:key Any]
|
||||
. ->* . ; FIXME: result type depends on `adjust-on-insert/delete`
|
||||
(U Void (-> Void)))]
|
||||
|
|
|
@ -610,7 +610,10 @@
|
|||
(define-type Area<%>
|
||||
(Class [get-graphical-min-size (-> (Values Natural Natural))]
|
||||
[get-parent (-> (Option (Instance Area-Container<%>)))]
|
||||
[get-top-level-window (-> (U (Instance Frame%) (Instance Dialog%)))]
|
||||
;; The documentation says this returns a frame% or dialog%,
|
||||
;; but giving it that type doesn't work for contract generation
|
||||
;; because it creates an `or/c` of two class contracts.
|
||||
[get-top-level-window (-> (Instance Top-Level-Window<%>))]
|
||||
[min-width (case-> (-> Integer)
|
||||
(Integer -> Void))]
|
||||
[min-height (case-> (-> Integer)
|
||||
|
|
Loading…
Reference in New Issue
Block a user