original commit: 78671f5cc1d716230985f9a3bd6868c91331c57d
This commit is contained in:
Robby Findler 2003-08-10 23:36:54 +00:00
parent af6ec3c4ba
commit 0a14e7b5b3
3 changed files with 36 additions and 35 deletions

View File

@ -293,7 +293,7 @@
".")
(autosave:register
((and/f (is-a?/c autosave:autosavable<%>)
((and/c (is-a?/c autosave:autosavable<%>)
(is-a?/c editor<%>))
. -> .
void?)
@ -1226,10 +1226,10 @@
(scheme-paren:backward-containing-sexp
(opt->
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?))
(and/c integer? exact?)
(and/c integer? exact?))
((union false? (is-a?/c match-cache:%)))
(union false? (and/f integer? exact?)))
(union false? (and/c integer? exact?)))
((text start end)
((cache #f)))
"Returns the beginning of the interior of the (non-atomic) S-expression"
@ -1238,10 +1238,10 @@
(scheme-paren:backward-match
(opt->
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?))
(and/c integer? exact?)
(and/c integer? exact?))
((union false? (is-a?/c match-cache:%)))
(union false? (and/f integer? exact?)))
(union false? (and/c integer? exact?)))
((text start end)
((cache #f)))
"Specializes "
@ -1249,7 +1249,7 @@
"to Scheme.")
(scheme-paren:balanced?
((is-a?/c text%) (and/f integer? exact?) (and/f integer? exact?) . -> . boolean?)
((is-a?/c text%) (and/c integer? exact?) (and/c integer? exact?) . -> . boolean?)
(text start end)
"Specializes "
"@flink paren:balanced?"
@ -1258,10 +1258,10 @@
(scheme-paren:forward-match
(opt->
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?))
(and/c integer? exact?)
(and/c integer? exact?))
((union false? (is-a?/c match-cache:%)))
(union false? (and/f integer? exact?)))
(union false? (and/c integer? exact?)))
((text start end)
((cache #f)))
"Specializes"
@ -1339,14 +1339,14 @@
(paren:backward-match
(opt->
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?)
(and/c integer? exact?)
(and/c integer? exact?)
(listof (cons/p string? string?))
(listof (cons/p string? string?))
(listof string?))
(boolean?
(union false? (is-a?/c match-cache:%)))
(union false? (and/f integer? exact?)))
(union false? (and/c integer? exact?)))
((text start end parens quotes comments)
((containing? #f) (cache #f)))
"Returns the position in \\var{text} that ``opens'' the text ending at "
@ -1389,8 +1389,8 @@
(paren:balanced?
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?)
(and/c integer? exact?)
(and/c integer? exact?)
(listof (cons/p string? string?))
(listof (cons/p string? string?))
(listof string?)
@ -1410,13 +1410,13 @@
(paren:forward-match
(opt->
((is-a?/c text%)
(and/f integer? exact?)
(and/f integer? exact?)
(and/c integer? exact?)
(and/c integer? exact?)
(listof (cons/p string? string?))
(listof (cons/p string? string?))
(listof string?))
((union false? (is-a?/c match-cache:%)))
(union false? (and/f integer? exact?)))
(union false? (and/c integer? exact?)))
((text start end parens quotes comments)
((cache #f)))
"This function returns the position in \\var{text} that ``closes'' the"
@ -1447,9 +1447,9 @@
"")
(paren:skip-whitespace
((is-a?/c text%) (and/f integer? exact?) (symbols 'forward 'backward)
((is-a?/c text%) (and/c integer? exact?) (symbols 'forward 'backward)
. -> .
(and/f integer? exact?))
(and/c integer? exact?))
(text pos dir)
"If \\var{dir} is \\rawscm{'forward}, this returns the position of the first"
"non-whitespace character in \\var{text} after \\var{pos}. If \\var{dir}"

View File

@ -15,10 +15,10 @@
(gui-utils:trim-string
(string?
(and/f number? positive?)
(and/c number? positive?)
. ->d .
(lambda (str size)
(and/f string?
(and/c string?
(lambda (str)
((string-length str) . <= . size)))))
(str size)

View File

@ -3,7 +3,7 @@
(require (lib "mred.ss" "mred")
(lib "class.ss")
(lib "etc.ss")
(lib "contract.ss"))
(lib "contract.ss"))
(define-syntax (provide/contract/docs stx)
(syntax-case stx ()
@ -80,15 +80,16 @@
;; ((frame-has? p) f) =
;; f is a frame and it has a child (in it or a subpanel) that responds #t to p
(test:button-push
((union (and/f string?
(lambda (str)
(test:top-level-focus-window-has?
(lambda (c)
(and (is-a? c button%)
(string=? (send c get-label) str)
(send c is-enabled?)
(send c is-shown?))))))
(and/f (is-a?/c button%)
((union (lambda (str)
(and (string? str)
(test:top-level-focus-window-has?
(lambda (c)
(and (is-a? c button%)
(string=? (send c get-label) str)
(send c is-enabled?)
(send c is-shown?))))))
(and/c (is-a?/c button%)
(lambda (btn)
(and (send btn is-enabled?)
(send btn is-shown?)))
@ -179,8 +180,8 @@
(test:mouse-click
(opt->
((symbols 'left 'middle 'right)
(and/f exact? integer?)
(and/f exact? integer?))
(and/c exact? integer?)
(and/c exact? integer?))
((listof (symbols 'alt 'control 'meta 'shift 'noalt 'nocontrol 'nometa 'noshift)))
void?)
((button x y)