original commit: 1bd92c441435a2c2ae5f0a37c7d5e6559e620360
This commit is contained in:
Robby Findler 2004-10-19 18:34:34 +00:00
parent 9f47be3d48
commit 39e093d608
9 changed files with 83 additions and 83 deletions

View File

@ -13,8 +13,8 @@
(vacuous-max (() (listof number?) . ->* . (number?)))
(child-height ((union (is-a?/c alignment<%>) (is-a?/c snip%)) . -> . number?))
(child-width ((union (is-a?/c alignment<%>) (is-a?/c snip%)) . -> . number?))
(insert-before (any? (listof any?) any? . -> . (listof any?)))
(insert-after (any? (listof any?) any? . -> . (listof any?))))
(insert-before (any/c (listof any/c) any/c . -> . (listof any/c)))
(insert-after (any/c (listof any/c) any/c . -> . (listof any/c))))
(define (vacuous-max . n)
(if (empty? n)

View File

@ -32,12 +32,12 @@
#;(((is-a?/c dc<%>)
number?
number?)
((union nonnegative? false?)
(union nonnegative? false?)
(union nonnegative? false?)
(union nonnegative? false?)
(union nonnegative? false?)
(union nonnegative? false?))
((union nonnegative? false/c)
(union nonnegative? false/c)
(union nonnegative? false/c)
(union nonnegative? false/c)
(union nonnegative? false/c)
(union nonnegative? false/c))
. opt-> .
void?)
(define/override (get-extent dc x y w h descent space lspace rspace)

View File

@ -13,11 +13,11 @@
;; a snip
(define snip? (is-a?/c snip%))
;; a snip to act as the varying argument to a recursive functions
(define linked-snip? (union snip? false?))
(define linked-snip? (union snip? false/c))
;; a function to act on snips being mapped
(define snip-visitor? any? #;((snip?) (listof any?) . ->* . (void)))
(define snip-visitor? any/c #;((snip?) (listof any/c) . ->* . (void)))
;; the rest of the lists passed to a snip mapping function
(define rest-lists? (listof (listof any?)))
(define rest-lists? (listof (listof any/c)))
;; a class that contains a snip
(define editor? (is-a?/c editor<%>))
@ -26,10 +26,10 @@
(snip-height (snip? . -> . number?))
(snip-min-width (snip? . -> . number?))
(snip-min-height (snip? . -> . number?))
(snip-parent (snip? . -> . (union editor? false?)))
(fold-snip ((snip? any? . -> . any?) any? linked-snip? . -> . any?))
(for-each-snip any? #;((snip-visitor? linked-snip?) rest-lists? . ->* . (void)))
(map-snip any? #;((snip-visitor? linked-snip?) rest-lists? . ->* . ((listof any?))))
(snip-parent (snip? . -> . (union editor? false/c)))
(fold-snip ((snip? any/c . -> . any/c) any/c linked-snip? . -> . any/c))
(for-each-snip any/c #;((snip-visitor? linked-snip?) rest-lists? . ->* . (void)))
(map-snip any/c #;((snip-visitor? linked-snip?) rest-lists? . ->* . ((listof any/c))))
(stretchable-width? (snip? . -> . boolean?))
(stretchable-height? (snip? . -> . boolean?)))

View File

@ -61,7 +61,7 @@
"@flink number-snip:make-repeating-decimal-snip %"
".")
(version:add-spec
(any? any? . -> . void?)
(any/c any/c . -> . void?)
(spec revision)
"These two values are appended to the version string. \\rawscm{write} is"
"used to transform them to strings. For example:"
@ -84,7 +84,7 @@
(message continuation-marks)
"Creates a framework exception.")
(exn:exn?
(any? . -> . boolean?)
(any/c . -> . boolean?)
(exn)
"Tests if a value is a framework exception.")
(exn:make-unknown-preference
@ -92,7 +92,7 @@
(message continuation-marks)
"Creates an unknown preference exception.")
(exn:unknown-preference?
(any? . -> . boolean?)
(any/c . -> . boolean?)
(exn)
"Determines if a value is an unknown preference exn.")
@ -110,7 +110,7 @@
"the name of the application to \\var{name}.")
(preferences:get
(symbol? . -> . any?)
(symbol? . -> . any/c)
(symbol)
"See also"
"@flink preferences:set-default %"
@ -121,7 +121,7 @@
"\\scmindex{exn:unknown-preference}\\rawscm{exn:unknown-preference}"
"if the preference has not been set.")
(preferences:add-callback
(opt-> (symbol? (symbol? any? . -> . any?))
(opt-> (symbol? (symbol? any/c . -> . any/c))
(boolean?)
(-> void?))
((p f)
@ -145,13 +145,13 @@
"\\scmindex{exn:unknown-preference}\\rawscm{exn:unknown-preference}"
"if the preference has not been set.")
(preferences:set
(symbol? any? . -> . void?)
(symbol? any/c . -> . void?)
(symbol value)
"\\rawscm{preferences:set-preference} sets the preference"
"\\var{symbol} to \\var{value}. This should be called when the"
"users requests a change to a preference.")
(preferences:set-default
(symbol? any? (any? . -> . any) . -> . void?)
(symbol? any/c (any/c . -> . any) . -> . void?)
(symbol value test)
"This function must be called every time your application starts up, before any call to"
"@flink preferences:get %"
@ -177,7 +177,7 @@
"If there is a site-wide default preferences file, the default"
"preference in that file is used instead of \\var{value}.")
(preferences:set-un/marshall
(symbol? (any? . -> . printable?) (printable? . -> . any?) . -> . void?)
(symbol? (any/c . -> . printable/c) (printable/c . -> . any/c) . -> . void?)
(symbol marshall unmarshall)
"\\rawscm{preference:set-un/marshall} is used to specify marshalling and"
"unmarshalling functions for the preference"
@ -446,7 +446,7 @@
(filename)
"Generates a name for an backup file from \\var{filename}.")
(finder:dialog-parent-parameter
any?
any/c
()
"This is a parameter (see "
"\\Mzhyperref{parameters}{mz:parameters} for information about parameters)"
@ -495,13 +495,13 @@
(opt->
()
(string?
(union false? path?)
(union false/c path?)
boolean?
string?
(union false? byte-regexp?)
(union false/c byte-regexp?)
string?
(union (is-a?/c top-level-window<%>) false?))
(union false? path?))
(union (is-a?/c top-level-window<%>) false/c))
(union false/c path?))
(()
((name "Untitled")
(directory #f)
@ -519,12 +519,12 @@
(finder:common-get-file
(opt->
()
((union path? false?)
((union path? false/c)
string?
(union byte-regexp? false?)
(union byte-regexp? false/c)
string?
(union false? (is-a?/c top-level-window<%>)))
(union path? false?))
(union false/c (is-a?/c top-level-window<%>)))
(union path? false/c))
(()
((directory #f)
(prompt "Select File")
@ -541,13 +541,13 @@
(opt->
()
(string?
(union false? path?)
(union false/c path?)
boolean?
string?
(union false? byte-regexp?)
(union false/c byte-regexp?)
string?
(union (is-a?/c top-level-window<%>) false?))
(union false? path?))
(union (is-a?/c top-level-window<%>) false/c))
(union false/c path?))
(()
((name "Untitled")
(directory #f)
@ -565,12 +565,12 @@
(finder:std-get-file
(opt->
()
((union path? false?)
((union path? false/c)
string?
(union byte-regexp? false?)
(union byte-regexp? false/c)
string?
(union false? (is-a?/c top-level-window<%>)))
(union path? false?))
(union false/c (is-a?/c top-level-window<%>)))
(union path? false/c))
(()
((directory #f)
(prompt "Select File")
@ -587,13 +587,13 @@
(opt->
()
(string?
(union false? path?)
(union false/c path?)
boolean?
string?
(union false? byte-regexp?)
(union false/c byte-regexp?)
string?
(union (is-a?/c top-level-window<%>) false?))
(union false? path?))
(union (is-a?/c top-level-window<%>) false/c))
(union false/c path?))
(()
((name "Untitled")
(directory #f)
@ -615,12 +615,12 @@
(finder:get-file
(opt->
()
((union path? false?)
((union path? false/c)
string?
(union byte-regexp? string? false?)
(union byte-regexp? string? false/c)
string?
(union false? (is-a?/c top-level-window<%>)))
(union path? false?))
(union false/c (is-a?/c top-level-window<%>)))
(union path? false/c))
(()
((directory #f)
(prompt "Select File")
@ -640,12 +640,12 @@
(finder:common-get-file-list
(opt->
()
((union false? path?)
((union false/c path?)
string?
(union false? byte-regexp?)
(union false/c byte-regexp?)
string?
(union false? (is-a?/c top-level-window<%>)))
(union (listof path?) false?))
(union false/c (is-a?/c top-level-window<%>)))
(union (listof path?) false/c))
(()
((directory #f)
(prompt "Select File")
@ -683,7 +683,7 @@
"This returns the frame group.")
(handler:handler?
(any? . -> . boolean?)
(any/c . -> . boolean?)
(obj)
"This predicate determines if its input is a handler")
(handler:handler-name
@ -701,7 +701,7 @@
(handler:insert-format-handler
(string?
(union string? (listof string?) (path? . -> . boolean?))
(path? . -> . (union false? (is-a?/c frame:editor<%>)))
(path? . -> . (union false/c (is-a?/c frame:editor<%>)))
. -> .
void?)
(name pred handler)
@ -734,9 +734,9 @@
(handler:edit-file
(opt->
((union path? false?))
((union path? false/c))
((-> (is-a?/c frame:editor<%>)))
(union false? (is-a?/c frame:editor<%>)))
(union false/c (is-a?/c frame:editor<%>)))
((filename)
((make-default (lambda () ((handler:current-create-new-window) filename)))))
"This function creates a frame or re-uses an existing frame to edit a file. "
@ -780,8 +780,8 @@
(handler:current-create-new-window
(case->
(((union false? path?) . -> . (is-a?/c frame%)) . -> . void)
(-> ((union false? string?) . -> . (is-a?/c frame%))))
(((union false/c path?) . -> . (is-a?/c frame%)) . -> . void)
(-> ((union false/c string?) . -> . (is-a?/c frame%))))
((new-window-handler) ())
"This is a parameter that controls how the framework"
"creates new application windows."
@ -795,7 +795,7 @@
"\\end{schemedisplay}")
(handler:open-file
(-> (union false? (is-a?/c frame:basic<%>)))
(-> (union false/c (is-a?/c frame:basic<%>)))
()
"This function queries the user for a filename and opens the file for"
"editing. It uses "
@ -975,7 +975,7 @@
".")
(keymap:call/text-keymap-initializer
((-> any?) . -> . any?)
((-> any/c) . -> . any/c)
(thunk-proc)
"Thus function parameterizes the call to \\var{thunk-proc} by"
" setting the keymap-initialization procedure (see"
@ -1267,7 +1267,7 @@
(scheme:text-balanced?
(opt->
((is-a?/c text%))
(number? (union false? number?))
(number? (union false/c number?))
boolean?)
((text)
((start 0) (end #f)))
@ -1408,7 +1408,7 @@
"values representing an RGB-tuple.")
(color-model:xyz?
(any? . -> . boolean?)
(any/c . -> . boolean?)
(val)
"Determines if \\var{val} an xyz color record.")

View File

@ -88,9 +88,9 @@
"\\iscmprocedure{gui-utils:show-busy-cursor} is called.")
(gui-utils:show-busy-cursor
(opt->
((-> any?))
((-> any/c))
(integer?)
any?)
any/c)
((thunk)
((delay (gui-utils:cursor-delay))))
"Evaluates \\rawscm{(\\var{thunk})} with a watch cursor. The argument"
@ -131,9 +131,9 @@
(gui-utils:local-busy-cursor
(opt->
((is-a?/c window<%>)
(-> any?))
(-> any/c))
(integer?)
any?)
any/c)
((window thunk)
((delay (gui-utils:cursor-delay))))
"Evaluates \\rawscm{(\\var{thunk})} with a watch cursor in \\var{window}. If"
@ -150,7 +150,7 @@
(string?
string?)
(boolean?
(union false?
(union false/c
(is-a?/c frame%)
(is-a?/c dialog%)))
(symbols 'continue 'save 'cancel))
@ -174,10 +174,10 @@
string?
string?)
(string?
any?
(union false? (is-a?/c frame%) (is-a?/c dialog%))
any/c
(union false/c (is-a?/c frame%) (is-a?/c dialog%))
(symbols 'app 'caution 'stop))
any?)
any/c)
((message true-choice false-choice)
((title (string-constant warning))
(default-result 'disallow-close)

View File

@ -30,10 +30,10 @@
void?)
((is-a?/c graph-snip<%>)
(is-a?/c graph-snip<%>)
(union false? (is-a?/c pen%))
(union false? (is-a?/c pen%))
(union false? (is-a?/c brush%))
(union false? (is-a?/c brush%))
(union false/c (is-a?/c pen%))
(union false/c (is-a?/c pen%))
(union false/c (is-a?/c brush%))
(union false/c (is-a?/c brush%))
. -> .
void?))))

View File

@ -8,7 +8,7 @@
(provide/contract
(draw-button-label
((is-a?/c dc<%>) (union false? string?) (>/c 5) (>/c 5) boolean?
((is-a?/c dc<%>) (union false/c string?) (>/c 5) (>/c 5) boolean?
. -> .
void?))

View File

@ -11,7 +11,7 @@
(provide/contract
(pasteboard-root ((is-a?/c aligned-pasteboard<%>) . -> . (is-a?/c aligned-pasteboard<%>)))
(pasteboard-parent
((is-a?/c pasteboard%) . -> . (union (is-a?/c editor-canvas%) (is-a?/c editor-snip%) false?))))
((is-a?/c pasteboard%) . -> . (union (is-a?/c editor-canvas%) (is-a?/c editor-snip%) false/c))))
;; gets the top most aligned pasteboard in the tree of pasteboards and containers
(define (pasteboard-root pasteboard)

View File

@ -11,11 +11,11 @@
;; a snip
(define snip? (is-a?/c snip%))
;; a snip to act as the varying argument to a recursive functions
(define linked-snip? (union snip? false?))
(define linked-snip? (union snip? false/c))
;; a function to act on snips being mapped
(define snip-visitor? any? #;((snip?) (listof any?) . ->* . (void)))
(define snip-visitor? any/c #;((snip?) (listof any/c) . ->* . (void)))
;; the rest of the lists passed to a snip mapping function
(define rest-lists? (listof (listof any?)))
(define rest-lists? (listof (listof any/c)))
;; a class that contains a snip
(define editor? (is-a?/c editor<%>))
@ -24,10 +24,10 @@
(snip-height (snip? . -> . number?))
(snip-min-width (snip? . -> . number?))
(snip-min-height (snip? . -> . number?))
(snip-parent (snip? . -> . (union editor? false?)))
(fold-snip ((snip? any? . -> . any?) any? linked-snip? . -> . any?))
(for-each-snip any? #;((snip-visitor? linked-snip?) rest-lists? . ->* . (void)))
(map-snip any? #;((snip-visitor? linked-snip?) rest-lists? . ->* . ((listof any?))))
(snip-parent (snip? . -> . (union editor? false/c)))
(fold-snip ((snip? any/c . -> . any/c) any/c linked-snip? . -> . any/c))
(for-each-snip any/c #;((snip-visitor? linked-snip?) rest-lists? . ->* . (void)))
(map-snip any/c #;((snip-visitor? linked-snip?) rest-lists? . ->* . ((listof any/c))))
(stretchable-width? (snip? . -> . boolean?))
(stretchable-height? (snip? . -> . boolean?)))