From 2f9180a470cfe18319bb6c5b65d7f819eb8cd647 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Tue, 29 Jul 2008 12:56:05 +0000 Subject: [PATCH] fix '(nonnegative|positive)-exact-integer?' contracts (moving 'exact-' to the front where it belongs) svn: r10960 original commit: 2c813c53c56b010127736b6b33d1060a672ca1b7 --- collects/scribblings/framework/text.scrbl | 12 +- collects/scribblings/gui/choice-class.scrbl | 2 +- collects/scribblings/gui/dialog-funcs.scrbl | 4 +- .../gui/editor-data-class-list-intf.scrbl | 6 +- collects/scribblings/gui/editor-funcs.scrbl | 6 +- collects/scribblings/gui/editor-intf.scrbl | 6 +- .../scribblings/gui/editor-snip-class.scrbl | 48 ++-- .../gui/editor-stream-in-base-class.scrbl | 8 +- .../gui/editor-stream-in-class.scrbl | 12 +- .../gui/editor-stream-out-base-class.scrbl | 4 +- .../gui/editor-stream-out-class.scrbl | 6 +- .../scribblings/gui/global-draw-funcs.scrbl | 6 +- collects/scribblings/gui/list-box-class.scrbl | 22 +- .../scribblings/gui/list-control-intf.scrbl | 10 +- collects/scribblings/gui/miscwin-funcs.scrbl | 4 +- .../scribblings/gui/radio-box-class.scrbl | 16 +- .../scribblings/gui/readable-snip-intf.scrbl | 6 +- .../gui/snip-class-list-intf.scrbl | 6 +- collects/scribblings/gui/snip-class.scrbl | 22 +- .../scribblings/gui/string-snip-class.scrbl | 8 +- .../scribblings/gui/style-list-class.scrbl | 6 +- .../scribblings/gui/tab-panel-class.scrbl | 12 +- collects/scribblings/gui/text-class.scrbl | 266 +++++++++--------- collects/scribblings/gui/wxme.scrbl | 30 +- 24 files changed, 264 insertions(+), 264 deletions(-) diff --git a/collects/scribblings/framework/text.scrbl b/collects/scribblings/framework/text.scrbl index ffae4f29..2970b0d8 100644 --- a/collects/scribblings/framework/text.scrbl +++ b/collects/scribblings/framework/text.scrbl @@ -149,7 +149,7 @@ See @method[text:basic<%> set-styles-fixed]. } - @defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{ + @defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{ See @method[text:basic<%> set-styles-fixed]. @@ -209,7 +209,7 @@ Starts an edit-sequence by calling @method[editor<%> begin-edit-sequence]. } - @defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{ + @defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{ Replaces all non-breaking space characters @scheme[(integer->char 160)] @@ -255,10 +255,10 @@ @scheme[keymap:get-search] } - @defmethod[#:mode augment (after-insert [start nonnegative-exact-integer?][len nonnegative-exact-integer?]) void?]{ + @defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{ Re-does any search now that the contents of the window have changed. } - @defmethod[#:mode augment (after-delete [start nonnegative-exact-integer?][len nonnegative-exact-integer?]) void?]{ + @defmethod[#:mode augment (after-delete [start exact-nonnegative-integer?][len exact-nonnegative-integer?]) void?]{ Re-does any search now that the contents of the window have changed. } @@ -512,7 +512,7 @@ @scheme[top-level-window<%>] as the frame. } - @defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{ + @defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{ Calls the @method[frame:text-info<%> editor-position-changed] @@ -522,7 +522,7 @@ @scheme[top-level-window<%>] as the frame. } - @defmethod*[#:mode augment (((after-delete (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{ + @defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{ Calls the @method[frame:text-info<%> editor-position-changed] diff --git a/collects/scribblings/gui/choice-class.scrbl b/collects/scribblings/gui/choice-class.scrbl index ba154348..356013f9 100644 --- a/collects/scribblings/gui/choice-class.scrbl +++ b/collects/scribblings/gui/choice-class.scrbl @@ -25,7 +25,7 @@ See also [style (listof (one-of/c 'horizontal-label 'vertical-label 'deleted)) null] - [selection nonnegative-exact-integer? 0] + [selection exact-nonnegative-integer? 0] [font (is-a?/c font%) normal-control-font] [enabled any/c #t] [vert-margin (integer-in 0 1000) 2] diff --git a/collects/scribblings/gui/dialog-funcs.scrbl b/collects/scribblings/gui/dialog-funcs.scrbl index 4629b2b0..906a0cb7 100644 --- a/collects/scribblings/gui/dialog-funcs.scrbl +++ b/collects/scribblings/gui/dialog-funcs.scrbl @@ -377,9 +377,9 @@ If @scheme[style] includes @scheme['password], the dialog's text field [message (or/c string? false/c)] [choices (listof string?)] [parent (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c) #f] - [init-choices (listof nonnegative-exact-integer?) null] + [init-choices (listof exact-nonnegative-integer?) null] [style (listof (one-of/c 'single 'multiple 'extended)) '(single)]) - (or/c (listof nonnegative-exact-integer?) false/c)]{ + (or/c (listof exact-nonnegative-integer?) false/c)]{ Gets a list box selection from the user via a modal dialog, using @scheme[parent] as the parent window if it is specified. The dialog's diff --git a/collects/scribblings/gui/editor-data-class-list-intf.scrbl b/collects/scribblings/gui/editor-data-class-list-intf.scrbl index ca258fed..ce2ea11d 100644 --- a/collects/scribblings/gui/editor-data-class-list-intf.scrbl +++ b/collects/scribblings/gui/editor-data-class-list-intf.scrbl @@ -25,12 +25,12 @@ Finds a snip data class from the list with the given name, returning } @defmethod[(find-position [class (is-a?/c editor-data-class%)]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns an index into the list for the specified class. } -@defmethod[(nth [n nonnegative-exact-integer?]) +@defmethod[(nth [n exact-nonnegative-integer?]) (or/c (is-a?/c editor-data-class%) false/c)]{ Returns the @scheme[n]th class in the list (counting from 0), returning @scheme[#f] if the list has @scheme[n] or less classes. @@ -38,7 +38,7 @@ Returns the @scheme[n]th class in the list (counting from 0), returning } @defmethod[(number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of editor data classes in the list. diff --git a/collects/scribblings/gui/editor-funcs.scrbl b/collects/scribblings/gui/editor-funcs.scrbl index d9801f73..5764e33d 100644 --- a/collects/scribblings/gui/editor-funcs.scrbl +++ b/collects/scribblings/gui/editor-funcs.scrbl @@ -209,8 +209,8 @@ Opens @scheme[filename] (in @scheme['binary] mode) and checks whether it looks } @defproc[(open-input-text-editor [text-editor (is-a?/c text%)] - [start-position nonnegative-exact-integer? 0] - [end-position (or/c nonnegative-exact-integer? (one/of 'end)) 'end] + [start-position exact-nonnegative-integer? 0] + [end-position (or/c exact-nonnegative-integer? (one/of 'end)) 'end] [snip-filter ((is-a?/c snip%) . -> . any/c) (lambda (s) s)] [port-name any/c @scheme[text-editor]] [expect-to-read-all? any/c #f]) @@ -257,7 +257,7 @@ The result port must not be used if @scheme[text-editor] changes in any } @defproc[(open-output-text-editor [text-editor (is-a?/c text%)] - [start-position (or/c nonnegative-exact-integer? (one/of 'end)) 'end] + [start-position (or/c exact-nonnegative-integer? (one/of 'end)) 'end] [special-filter (any/c . -> . any/c) (lambda (x) x)] [port-name any/c @scheme[text-editor]]) output-port]{ diff --git a/collects/scribblings/gui/editor-intf.scrbl b/collects/scribblings/gui/editor-intf.scrbl index aaee1108..3b4cff2d 100644 --- a/collects/scribblings/gui/editor-intf.scrbl +++ b/collects/scribblings/gui/editor-intf.scrbl @@ -543,7 +543,7 @@ The first snip in a text editor is the one at @techlink{position} } @defmethod[(find-scroll-line [location real?]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Maps a vertical @techlink{location} within the editor to a vertical scroll position. @@ -1215,7 +1215,7 @@ The @scheme[localx], @scheme[localy], @scheme[width], and @scheme[height] @defmethod[(num-scroll-lines) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Reports the number of scroll positions available within the editor. @@ -2206,7 +2206,7 @@ Setting the height is disallowed when the editor is internally locked } -@defmethod[(set-max-undo-history [count (or/c nonnegative-exact-integer? (one/of 'forever))]) +@defmethod[(set-max-undo-history [count (or/c exact-nonnegative-integer? (one/of 'forever))]) void?]{ Sets the maximum number of undoables that will be remembered by the diff --git a/collects/scribblings/gui/editor-snip-class.scrbl b/collects/scribblings/gui/editor-snip-class.scrbl index 9d8182eb..f4a58c32 100644 --- a/collects/scribblings/gui/editor-snip-class.scrbl +++ b/collects/scribblings/gui/editor-snip-class.scrbl @@ -11,14 +11,14 @@ An @scheme[editor-snip%] object is a @scheme[snip%] object that @defconstructor[([editor (or/c (is-a?/c text%) false/c) #f] [with-border? any/c #t] - [left-margin nonnegative-exact-integer? 5] - [top-margin nonnegative-exact-integer? 5] - [right-margin nonnegative-exact-integer? 5] - [bottom-margin nonnegative-exact-integer? 5] - [left-inset nonnegative-exact-integer? 1] - [top-inset nonnegative-exact-integer? 1] - [right-inset nonnegative-exact-integer? 1] - [bottom-inset nonnegative-exact-integer? 1] + [left-margin exact-nonnegative-integer? 5] + [top-margin exact-nonnegative-integer? 5] + [right-margin exact-nonnegative-integer? 5] + [bottom-margin exact-nonnegative-integer? 5] + [left-inset exact-nonnegative-integer? 1] + [top-inset exact-nonnegative-integer? 1] + [right-inset exact-nonnegative-integer? 1] + [bottom-inset exact-nonnegative-integer? 1] [min-width (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none] [max-width (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none] [min-height (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none] @@ -120,10 +120,10 @@ If the editor is a text editor, then @scheme[1] is normally subtracted } -@defmethod[(get-inset [l (box/c nonnegative-exact-integer?)] - [t (box/c nonnegative-exact-integer?)] - [r (box/c nonnegative-exact-integer?)] - [b (box/c nonnegative-exact-integer?)]) +@defmethod[(get-inset [l (box/c exact-nonnegative-integer?)] + [t (box/c exact-nonnegative-integer?)] + [r (box/c exact-nonnegative-integer?)] + [b (box/c exact-nonnegative-integer?)]) void?]{ Gets the current border insets for the snip. The inset sets how much space @@ -137,10 +137,10 @@ is left between the edge of the snip and the border. } -@defmethod[(get-margin [l (box/c nonnegative-exact-integer?)] - [t (box/c nonnegative-exact-integer?)] - [r (box/c nonnegative-exact-integer?)] - [b (box/c nonnegative-exact-integer?)]) +@defmethod[(get-margin [l (box/c exact-nonnegative-integer?)] + [t (box/c exact-nonnegative-integer?)] + [r (box/c exact-nonnegative-integer?)] + [b (box/c exact-nonnegative-integer?)]) void?]{ Gets the current margins for the snip. The margin sets how much space @@ -244,10 +244,10 @@ When an @scheme[editor-snip%] object is not inserted in an editor, it } -@defmethod[(set-inset [l nonnegative-exact-integer?] - [t nonnegative-exact-integer?] - [r nonnegative-exact-integer?] - [b nonnegative-exact-integer?]) +@defmethod[(set-inset [l exact-nonnegative-integer?] + [t exact-nonnegative-integer?] + [r exact-nonnegative-integer?] + [b exact-nonnegative-integer?]) void?]{ Sets the current border insets for the snip. The inset sets how much @@ -256,10 +256,10 @@ Sets the current border insets for the snip. The inset sets how much } -@defmethod[(set-margin [l nonnegative-exact-integer?] - [t nonnegative-exact-integer?] - [r nonnegative-exact-integer?] - [b nonnegative-exact-integer?]) +@defmethod[(set-margin [l exact-nonnegative-integer?] + [t exact-nonnegative-integer?] + [r exact-nonnegative-integer?] + [b exact-nonnegative-integer?]) void?]{ Sets the current margins for the snip. The margin sets how much space diff --git a/collects/scribblings/gui/editor-stream-in-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-base-class.scrbl index e5501449..fd336631 100644 --- a/collects/scribblings/gui/editor-stream-in-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-base-class.scrbl @@ -22,7 +22,7 @@ Returns @scheme[#t] if there has been an error reading from the } @defmethod[(read [data (and/c bytes? (not/c immutable?))]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Reads characters to fill the supplied vector. The return value is the number of characters read, which may be less than the number @@ -33,14 +33,14 @@ Reads characters to fill the supplied vector. The return value is the } -@defmethod[(seek [pos nonnegative-exact-integer?]) +@defmethod[(seek [pos exact-nonnegative-integer?]) void?]{ Moves to the specified absolute position in the stream. } -@defmethod[(skip [n nonnegative-exact-integer?]) +@defmethod[(skip [n exact-nonnegative-integer?]) void?]{ Skips past the next @scheme[n] characters in the stream. @@ -48,7 +48,7 @@ Skips past the next @scheme[n] characters in the stream. } @defmethod[(tell) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the current stream position. diff --git a/collects/scribblings/gui/editor-stream-in-class.scrbl b/collects/scribblings/gui/editor-stream-in-class.scrbl index 76fd40b6..25f0e964 100644 --- a/collects/scribblings/gui/editor-stream-in-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-class.scrbl @@ -30,7 +30,7 @@ Reading from a bad stream always gives @scheme[0]. } -@defmethod[(get-bytes [len (or/c (box/c nonnegative-exact-integer?) false/c) #f]) +@defmethod[(get-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f]) (or/c bytes? false/c)]{ Like @method[editor-stream-in% get-unterminated-bytes], but the last @@ -69,7 +69,7 @@ Returns the next floating-point value in the stream. } -@defmethod[(get-unterminated-bytes [len (or/c (box/c nonnegative-exact-integer?) false/c) #f]) +@defmethod[(get-unterminated-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f]) (or/c bytes? false/c)]{ Returns the next byte string from the stream. Reading from a bad @@ -83,7 +83,7 @@ Note that when @method[editor-stream-out% put] is not given a byte } -@defmethod[(jump-to [pos nonnegative-exact-integer?]) +@defmethod[(jump-to [pos exact-nonnegative-integer?]) void?]{ Jumps to a given position in the stream. @@ -105,7 +105,7 @@ See @method[editor-stream-in% set-boundary]. } -@defmethod[(set-boundary [n nonnegative-exact-integer?]) +@defmethod[(set-boundary [n exact-nonnegative-integer?]) void?]{ Sets a file-reading boundary at @scheme[n] bytes past the current @@ -122,7 +122,7 @@ Boundaries help keep a subroutine from reading too much data leading } -@defmethod[(skip [n nonnegative-exact-integer?]) +@defmethod[(skip [n exact-nonnegative-integer?]) void?]{ Skips past the next @scheme[n] bytes in the stream. @@ -130,7 +130,7 @@ Skips past the next @scheme[n] bytes in the stream. } @defmethod[(tell) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the current stream position. diff --git a/collects/scribblings/gui/editor-stream-out-base-class.scrbl b/collects/scribblings/gui/editor-stream-out-base-class.scrbl index a93f7eca..fa05dc5d 100644 --- a/collects/scribblings/gui/editor-stream-out-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-base-class.scrbl @@ -22,7 +22,7 @@ Returns @scheme[#t] if there has been an error writing to the stream, } -@defmethod[(seek [pos nonnegative-exact-integer?]) +@defmethod[(seek [pos exact-nonnegative-integer?]) void?]{ Moves to the specified absolute position in the stream. @@ -30,7 +30,7 @@ Moves to the specified absolute position in the stream. } @defmethod[(tell) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the current stream position. diff --git a/collects/scribblings/gui/editor-stream-out-class.scrbl b/collects/scribblings/gui/editor-stream-out-class.scrbl index 57e54dd2..2499f448 100644 --- a/collects/scribblings/gui/editor-stream-out-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-class.scrbl @@ -18,7 +18,7 @@ An out-stream base---possibly an } -@defmethod[(jump-to [pos nonnegative-exact-integer?]) +@defmethod[(jump-to [pos exact-nonnegative-integer?]) void?]{ Jumps to a given position in the stream. @@ -49,7 +49,7 @@ This method is called by @scheme[write-editor-global-header]. } -@defmethod*[([(put [n nonnegative-exact-integer?] +@defmethod*[([(put [n exact-nonnegative-integer?] [v bytes?]) (is-a?/c editor-stream-out%)] [(put [v bytes?]) @@ -90,7 +90,7 @@ Numbers written to a stream with @method[editor-stream-out% put-fixed] } @defmethod[(tell) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the current stream position. diff --git a/collects/scribblings/gui/global-draw-funcs.scrbl b/collects/scribblings/gui/global-draw-funcs.scrbl index 89b663f5..98006f20 100644 --- a/collects/scribblings/gui/global-draw-funcs.scrbl +++ b/collects/scribblings/gui/global-draw-funcs.scrbl @@ -13,14 +13,14 @@ Under X and Mac OS X, flushes pending display messages such that the } @defproc[(get-display-depth) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the depth of the main display (a value of 1 denotes a monochrome display). } @defproc[(get-display-left-top-inset [avoid-bars? bool @scheme[#f]]) - (values nonnegative-exact-integer? nonnegative-exact-integer?)]{ + (values exact-nonnegative-integer? exact-nonnegative-integer?)]{ When the optional argument is @scheme[#f] (the default), this function returns the offset of the main screen's origin from the @@ -36,7 +36,7 @@ When the optional argument is true, this function returns the amount } @defproc[(get-display-size [full-screen? bool @scheme[#f]]) - (values nonnegative-exact-integer? nonnegative-exact-integer?)]{ + (values exact-nonnegative-integer? exact-nonnegative-integer?)]{ @index["screen resolution"]{Gets} the physical size of the display in pixels. Under Windows, this size does not include the task bar by diff --git a/collects/scribblings/gui/list-box-class.scrbl b/collects/scribblings/gui/list-box-class.scrbl index c9600c83..486872ec 100644 --- a/collects/scribblings/gui/list-box-class.scrbl +++ b/collects/scribblings/gui/list-box-class.scrbl @@ -32,7 +32,7 @@ See also @scheme[choice%]. 'vertical-label 'horizontal-label 'deleted)) '(single)] - [selection (or/c nonnegative-exact-integer? false/c) #f] + [selection (or/c exact-nonnegative-integer? false/c) #f] [font (is-a?/c font%) view-control-font] [label-font (is-a?/c font%) normal-control-font] [enabled any/c #t] @@ -110,7 +110,7 @@ See also @xmethod[list-control<%> append]. } -@defmethod[(delete [n nonnegative-exact-integer?]) +@defmethod[(delete [n exact-nonnegative-integer?]) void?]{ Deletes the item indexed by @scheme[n]. @|lbnumnote| If @scheme[n] is equal @@ -121,7 +121,7 @@ Selected items that are not deleted remain selected, and no other } -@defmethod[(get-data [n nonnegative-exact-integer?]) +@defmethod[(get-data [n exact-nonnegative-integer?]) any/c]{ Returns the data for the item indexed by @scheme[n], or @scheme[#f] @@ -135,7 +135,7 @@ See also @method[list-box% append] and @method[list-box% set-data]. @defmethod[(get-first-visible-item) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Reports the index of the item currently scrolled to the top of the list box. @|lbnumnote| @@ -151,7 +151,7 @@ Returns the font used for the control's label, which is optionally } @defmethod[(get-selections) - (listof nonnegative-exact-integer?)]{ + (listof exact-nonnegative-integer?)]{ Returns a list of indices for all currently selected items. @|lbnumnote| @@ -162,7 +162,7 @@ For single-selection lists, the result is always either @scheme[null] or } -@defmethod[(is-selected? [n nonnegative-exact-integer?]) +@defmethod[(is-selected? [n exact-nonnegative-integer?]) boolean?]{ Returns @scheme[#t] if the item index by @scheme[n] is selected, @@ -175,7 +175,7 @@ Returns @scheme[#t] if the item index by @scheme[n] is selected, } @defmethod[(number-of-visible-items) - positive-exact-integer?]{ + exact-positive-integer?]{ Returns the maximum number of items in the list box that are visible to the user with the control's current size (rounding down if the @@ -183,7 +183,7 @@ Returns the maximum number of items in the list box that are visible } -@defmethod[(select [n nonnegative-exact-integer?] +@defmethod[(select [n exact-nonnegative-integer?] [select? any/c #t]) void?]{ @@ -212,7 +212,7 @@ Clears the list box and installs a new list of items. } -@defmethod[(set-data [n nonnegative-exact-integer?] +@defmethod[(set-data [n exact-nonnegative-integer?] [data any/c]) void?]{ @@ -225,7 +225,7 @@ See also @method[list-box% append]. } -@defmethod[(set-first-visible-item [n nonnegative-exact-integer?]) +@defmethod[(set-first-visible-item [n exact-nonnegative-integer?]) void?]{ Scrolls the list box so that the item indexed by @scheme[n] is at the @@ -238,7 +238,7 @@ Scrolls the list box so that the item indexed by @scheme[n] is at the } -@defmethod[(set-string [n nonnegative-exact-integer?] +@defmethod[(set-string [n exact-nonnegative-integer?] [label label-string?]) void?]{ diff --git a/collects/scribblings/gui/list-control-intf.scrbl b/collects/scribblings/gui/list-control-intf.scrbl index 4320e4d2..c04e1e34 100644 --- a/collects/scribblings/gui/list-control-intf.scrbl +++ b/collects/scribblings/gui/list-control-intf.scrbl @@ -37,7 +37,7 @@ Removes all user-selectable items from the control. } @defmethod[(find-string [s string]) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Finds a user-selectable item matching the given string. If no matching choice is found, @scheme[#f] is returned, otherwise the index of the matching choice is returned (items are indexed from @scheme[0]). @@ -45,14 +45,14 @@ Finds a user-selectable item matching the given string. If no matching } @defmethod[(get-number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of user-selectable items in the control (which is also one more than the greatest index in the list control). } @defmethod[(get-selection) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Returns the index of the currently selected item (items are indexed from @scheme[0]). If the choice item currently contains no choices or no selections, @scheme[#f] is returned. If multiple selections are @@ -61,7 +61,7 @@ Returns the index of the currently selected item (items are indexed } -@defmethod[(get-string [n nonnegative-exact-integer?]) +@defmethod[(get-string [n exact-nonnegative-integer?]) (and/c immutable? label-string?)]{ Returns the item for the given index (items are indexed from @@ -79,7 +79,7 @@ Returns the currently selected item. If the control currently } -@defmethod[(set-selection [n nonnegative-exact-integer?]) +@defmethod[(set-selection [n exact-nonnegative-integer?]) void?]{ Selects the item specified by the given index (items are indexed from @scheme[0]). If the given index larger than the greatest index in the diff --git a/collects/scribblings/gui/miscwin-funcs.scrbl b/collects/scribblings/gui/miscwin-funcs.scrbl index c68b4684..1f5f871e 100644 --- a/collects/scribblings/gui/miscwin-funcs.scrbl +++ b/collects/scribblings/gui/miscwin-funcs.scrbl @@ -188,8 +188,8 @@ See also @scheme[write-resource].} @defproc[(get-window-text-extent [string string] [font (is-a?/c font%)] [combine? any/c #f]) - (values nonnegative-exact-integer? - nonnegative-exact-integer?)]{ + (values exact-nonnegative-integer? + exact-nonnegative-integer?)]{ Returns the pixel size of a string drawn as a window's label or value when drawn with the given font. The optional @scheme[combine?] diff --git a/collects/scribblings/gui/radio-box-class.scrbl b/collects/scribblings/gui/radio-box-class.scrbl index fbea90c5..323b38e9 100644 --- a/collects/scribblings/gui/radio-box-class.scrbl +++ b/collects/scribblings/gui/radio-box-class.scrbl @@ -28,7 +28,7 @@ Whenever the user changes the selected radio button, the radio box's 'vertical-label 'horizontal-label 'deleted)) '(vertical)] - [selection nonnegative-exact-integer? 0] + [selection exact-nonnegative-integer? 0] [font (is-a?/c font%) normal-control-font] [enabled any/c #t] [vert-margin (integer-in 0 1000) 2] @@ -75,7 +75,7 @@ By default, the first radio button is initially selected. If @defmethod*[#:mode override ([(enable [enable? any/c]) void?] - [(enable [n nonnegative-exact-integer?] + [(enable [n exact-nonnegative-integer?] [enable? any/c]) void?])]{ @@ -90,7 +90,7 @@ If two arguments are provided, then if @scheme[enable?] is } -@defmethod[(get-item-label [n nonnegative-exact-integer?]) +@defmethod[(get-item-label [n exact-nonnegative-integer?]) string?]{ Gets the label of a radio button by position. Radio buttons are @@ -99,7 +99,7 @@ Gets the label of a radio button by position. Radio buttons are } -@defmethod[(get-item-plain-label [n nonnegative-exact-integer?]) +@defmethod[(get-item-plain-label [n exact-nonnegative-integer?]) string?]{ Like @method[radio-box% get-item-label], except that the label must be @@ -108,14 +108,14 @@ a string and @litchar{&}s in the label are removed. } @defmethod[(get-number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of radio buttons in the radio box. } @defmethod[(get-selection) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Gets the position of the selected radio button. Radio buttons are numbered from @scheme[0]. @@ -125,7 +125,7 @@ numbered from @scheme[0]. @defmethod*[#:mode override ([(is-enabled?) boolean?] - [(is-enabled? [n nonnegative-exact-integer?]) + [(is-enabled? [n exact-nonnegative-integer?]) boolean?])]{ If no arguments are provided, the enable state of the entire radio box @@ -139,7 +139,7 @@ box, @|MismatchExn|. } -@defmethod[(set-selection [n nonnegative-exact-integer?]) +@defmethod[(set-selection [n exact-nonnegative-integer?]) void?]{ Sets the selected radio button by position. (The control's callback diff --git a/collects/scribblings/gui/readable-snip-intf.scrbl b/collects/scribblings/gui/readable-snip-intf.scrbl index c497e3a2..71e96005 100644 --- a/collects/scribblings/gui/readable-snip-intf.scrbl +++ b/collects/scribblings/gui/readable-snip-intf.scrbl @@ -10,9 +10,9 @@ A @scheme[readable-snip<%>] object is treated specially by the port generate the read result for the snip. @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ The arguments are the same as the arguments to a procedure returned by diff --git a/collects/scribblings/gui/snip-class-list-intf.scrbl b/collects/scribblings/gui/snip-class-list-intf.scrbl index b2d3f9c8..17b8134f 100644 --- a/collects/scribblings/gui/snip-class-list-intf.scrbl +++ b/collects/scribblings/gui/snip-class-list-intf.scrbl @@ -27,13 +27,13 @@ Finds a snip class from the list with the given name, returning } @defmethod[(find-position [class (is-a?/c snip-class%)]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns an index into the list for the specified class. } -@defmethod[(nth [n nonnegative-exact-integer?]) +@defmethod[(nth [n exact-nonnegative-integer?]) (or/c (is-a?/c snip-class%) false/c)]{ Returns the @scheme[n]th class in the list, or @scheme[#f] if @@ -42,7 +42,7 @@ Returns the @scheme[n]th class in the list, or @scheme[#f] if } @defmethod[(number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of snip classes in the list. diff --git a/collects/scribblings/gui/snip-class.scrbl b/collects/scribblings/gui/snip-class.scrbl index d8f94577..50a7c764 100644 --- a/collects/scribblings/gui/snip-class.scrbl +++ b/collects/scribblings/gui/snip-class.scrbl @@ -214,7 +214,7 @@ Draws nothing. @defmethod[(find-scroll-step [y real?]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ @methspec{ @@ -361,7 +361,7 @@ following symbols: @defmethod[(get-num-scroll-steps) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ @methspec{ @@ -378,7 +378,7 @@ Returns @scheme[1]. }} -@defmethod[(get-scroll-step-offset [offset nonnegative-exact-integer?]) +@defmethod[(get-scroll-step-offset [offset exact-nonnegative-integer?]) (and/c real? (not/c negative?))]{ @methspec{ @@ -414,8 +414,8 @@ Returns the snip's style. See also @method[snip% set-style]. } -@defmethod[(get-text [offset nonnegative-exact-integer?] - [num nonnegative-exact-integer?] +@defmethod[(get-text [offset exact-nonnegative-integer?] + [num exact-nonnegative-integer?] [flattened? any/c #f]) string?]{ @methspec{ @@ -439,10 +439,10 @@ Returns @scheme[""]. }} -@defmethod[(get-text! [buffer mutable string] - [offset nonnegative-exact-integer?] - [num nonnegative-exact-integer?] - [buffer-offset nonnegative-exact-integer?]) +@defmethod[(get-text! [buffer (and/c string? (not/c immutable?))] + [offset exact-nonnegative-integer?] + [num exact-nonnegative-integer?] + [buffer-offset exact-nonnegative-integer?]) void?]{ @methspec{ @@ -617,7 +617,7 @@ Does nothing. @defmethod[(partial-offset [dc (is-a?/c dc<%>)] [x real?] [y real?] - [len nonnegative-exact-integer?]) + [len exact-nonnegative-integer?]) real?]{ @methspec{ @@ -807,7 +807,7 @@ Does nothing. }} -@defmethod[(split [position nonnegative-exact-integer?] +@defmethod[(split [position exact-nonnegative-integer?] [first (box/c (is-a?/c snip%))] [second (box/c (is-a?/c snip%))]) void?]{ diff --git a/collects/scribblings/gui/string-snip-class.scrbl b/collects/scribblings/gui/string-snip-class.scrbl index 96dad1b9..38baf6f4 100644 --- a/collects/scribblings/gui/string-snip-class.scrbl +++ b/collects/scribblings/gui/string-snip-class.scrbl @@ -8,7 +8,7 @@ An instance of @scheme[string-snip%] is created automatically when on-new-string-snip]. -@defconstructor*/make[(([allocsize nonnegative-exact-integer? 0]) +@defconstructor*/make[(([allocsize exact-nonnegative-integer? 0]) ([s string?]))]{ Creates a string snip whose initial content is @scheme[s], if @@ -20,8 +20,8 @@ Creates a string snip whose initial content is @scheme[s], if @defmethod[(insert [s string?] - [len nonnegative-exact-integer?] - [pos nonnegative-exact-integer? 0]) + [len exact-nonnegative-integer?] + [pos exact-nonnegative-integer? 0]) void?]{ Inserts @scheme[s] (with length @scheme[len]) into the snip at relative @@ -30,7 +30,7 @@ Inserts @scheme[s] (with length @scheme[len]) into the snip at relative } -@defmethod[(read [len nonnegative-exact-integer?] +@defmethod[(read [len exact-nonnegative-integer?] [f (is-a?/c editor-stream-in%)]) void?]{ diff --git a/collects/scribblings/gui/style-list-class.scrbl b/collects/scribblings/gui/style-list-class.scrbl index b8cc48ca..b9eef135 100644 --- a/collects/scribblings/gui/style-list-class.scrbl +++ b/collects/scribblings/gui/style-list-class.scrbl @@ -91,7 +91,7 @@ notify-on-change]. } -@defmethod[(index-to-style [i nonnegative-exact-integer?]) +@defmethod[(index-to-style [i exact-nonnegative-integer?]) (or/c (is-a?/c style<%>) false/c)]{ Returns the style associated with the given index, or @scheme[#f] for @@ -136,7 +136,7 @@ The return value from @method[style-list% notify-on-change] is an @defmethod[(number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of styles in the list. @@ -152,7 +152,7 @@ Like @method[style-list% new-named-style], except that if the name is } @defmethod[(style-to-index [style (is-a?/c style<%>)]) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Returns the index for a particular style. The index for a style's base style (and shift style, if it is a join style) is guaranteed to be diff --git a/collects/scribblings/gui/tab-panel-class.scrbl b/collects/scribblings/gui/tab-panel-class.scrbl index f82e86e8..6743928c 100644 --- a/collects/scribblings/gui/tab-panel-class.scrbl +++ b/collects/scribblings/gui/tab-panel-class.scrbl @@ -66,7 +66,7 @@ The label string @scheme[choice] can contain @litchar{&}, which (in } -@defmethod[(delete [n nonnegative-exact-integer?]) +@defmethod[(delete [n exact-nonnegative-integer?]) void?]{ Deletes an existing tab. If @scheme[n] is equal to or larger than the @@ -74,7 +74,7 @@ Deletes an existing tab. If @scheme[n] is equal to or larger than the } -@defmethod[(get-item-label [n nonnegative-exact-integer?]) +@defmethod[(get-item-label [n exact-nonnegative-integer?]) string?]{ Gets the label of a tab by position. Tabs are numbered from @scheme[0]. @@ -84,14 +84,14 @@ If @scheme[n] is equal to or larger than the number of tabs in the panel, } @defmethod[(get-number) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of tabs on the panel. } @defmethod[(get-selection) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Returns the index (counting from 0) of the currently selected tab. If the panel has no tabs, the result is @scheme[#f]. @@ -106,7 +106,7 @@ Removes all tabs from the panel and installs tabs with the given } -@defmethod[(set-item-label [n nonnegative-exact-integer?] +@defmethod[(set-item-label [n exact-nonnegative-integer?] [label label-string?]) string?]{ @@ -115,7 +115,7 @@ Set the label for tab @scheme[n] to @scheme[label]. If @scheme[n] is equal to } -@defmethod[(set-selection [n nonnegative-exact-integer?]) +@defmethod[(set-selection [n exact-nonnegative-integer?]) void?]{ Sets the currently selected tab by index (counting from 0). diff --git a/collects/scribblings/gui/text-class.scrbl b/collects/scribblings/gui/text-class.scrbl index a80d59cb..a66ba7d0 100644 --- a/collects/scribblings/gui/text-class.scrbl +++ b/collects/scribblings/gui/text-class.scrbl @@ -33,8 +33,8 @@ A new @scheme[style-list%] object is created for the new editor. See @defmethod[#:mode pubment - (after-change-style [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (after-change-style [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -56,8 +56,8 @@ Does nothing. }} @defmethod[#:mode pubment - (after-delete [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (after-delete [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -84,8 +84,8 @@ Does nothing. }} @defmethod[#:mode pubment - (after-insert [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (after-insert [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -111,7 +111,7 @@ Does nothing. }} @defmethod[#:mode pubment - (after-merge-snips [pos nonnegative-exact-integer?]) + (after-merge-snips [pos exact-nonnegative-integer?]) void?]{ @methspec{ @@ -177,7 +177,7 @@ Does nothing. @defmethod[#:mode pubment - (after-split-snip [pos nonnegative-exact-integer?]) + (after-split-snip [pos exact-nonnegative-integer?]) void?]{ @methspec{ @@ -195,8 +195,8 @@ Does nothing. }} -@defmethod[(call-clickback [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?]) +@defmethod[(call-clickback [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?]) void?]{ Simulates a user click that invokes a clickback, if the given range of @@ -206,8 +206,8 @@ Simulates a user click that invokes a clickback, if the given range of } @defmethod[#:mode pubment - (can-change-style? [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (can-change-style? [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) boolean?]{ @methspec{ @@ -232,8 +232,8 @@ Returns @scheme[#t]. } @defmethod[#:mode pubment - (can-delete? [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (can-delete? [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) boolean?]{ @methspec{ @@ -261,8 +261,8 @@ Returns @scheme[#t]. }} @defmethod[#:mode pubment - (can-insert? [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (can-insert? [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) boolean?]{ @methspec{ @@ -325,13 +325,13 @@ See also @method[text% hide-caret]. @defmethod*[#:mode extend ([(change-style [delta (or/c (is-a?/c style-delta%) false/c)] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'end)) 'end] + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'end)) 'end] [counts-as-mod? any/c #t]) void?] [(change-style [style (or/c (is-a?/c style<%>) false/c)] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'end)) 'end] + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'end)) 'end] [counts-as-mod? any/c #t]) void?])]{ @@ -352,8 +352,8 @@ When @scheme[style] is provided: @InStyleListNote[] @defmethod[#:mode extend (copy [extend? any/c] [time (and/c exact? integer?)] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'end)) 'end]) + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'end)) 'end]) void?]{ Copies specified range of text into the clipboard. If @scheme[extend?] is @@ -383,8 +383,8 @@ In addition to the default @xmethod[editor<%> copy-self-to] work, @defmethod[#:mode override (cut [extend? any/c] [time (and/c exact? integer?)] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'end)) 'end]) + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'end)) 'end]) void?]{ Copies and then deletes the specified range. If @scheme[extend?] is not @@ -399,8 +399,8 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If } -@defmethod*[([(delete [start (or/c nonnegative-exact-integer? (one/of 'start))] - [end (or/c nonnegative-exact-integer? (one/of 'back)) 'back] +@defmethod*[([(delete [start (or/c exact-nonnegative-integer? (one/of 'start))] + [end (or/c exact-nonnegative-integer? (one/of 'back)) 'back] [scroll-ok? any/c #t]) void?] [(delete) @@ -422,8 +422,8 @@ Deletes the specified range or the currently selected text (when no } -@defmethod[(do-copy [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?] +@defmethod[(do-copy [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?] [time (and/c exact? integer?)] [extend? any/c]) void?]{ @@ -446,7 +446,7 @@ Copy the data from @scheme[start] to @scheme[end], extending the current }} -@defmethod[(do-paste [start nonnegative-exact-integer?] +@defmethod[(do-paste [start exact-nonnegative-integer?] [time (and/c exact? integer?)]) void?]{ @methspec{ @@ -467,7 +467,7 @@ Pastes into the @techlink{position} @scheme[start]. }} -@defmethod[(do-paste-x-selection [start nonnegative-exact-integer?] +@defmethod[(do-paste-x-selection [start exact-nonnegative-integer?] [time (and/c exact? integer?)]) void?]{ @methspec{ @@ -501,7 +501,7 @@ See also @method[text% delete]. @defmethod[(find-line [y real?] [on-it? (or/c (box/c any/c) false/c) #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Given a @techlink{location} in the editor, returns the line at the @techlink{location}. @|LineNumbering| @@ -533,7 +533,7 @@ Given a snip, returns the next snip in the editor (after the given [at-eol? (or/c (box/c any/c) false/c) #f] [on-it? (or/c (box/c any/c) false/c) #f] [edge-close? (or/c (box/c real?) false/c) #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Given a @techlink{location} in the editor, returns the @techlink{position} at the @techlink{location}. @@ -555,12 +555,12 @@ See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument. } -@defmethod[(find-position-in-line [line nonnegative-exact-integer?] +@defmethod[(find-position-in-line [line exact-nonnegative-integer?] [x real?] [at-eol? (or/c (box/c any/c) false/c) #f] [on-it? (or/c (box/c any/c) false/c) #f] [edge-close? (or/c (box/c real?) false/c) #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Given a @techlink{location} within a line of the editor, returns the @techlink{position} at the @techlink{location}. @|LineNumbering| @@ -577,9 +577,9 @@ See @method[text% find-position] for a discussion of } -@defmethod[(find-snip [pos nonnegative-exact-integer?] +@defmethod[(find-snip [pos exact-nonnegative-integer?] [direction (one-of/c 'before-or-none 'before 'after 'after-or-none)] - [s-pos (or/c (box/c nonnegative-exact-integer?) false/c) #f]) + [s-pos (or/c (box/c exact-nonnegative-integer?) false/c) #f]) (or/c (is-a?/c snip%) false/c)]{ Returns the snip at a given @techlink{position}, or @scheme[#f] if an appropriate @@ -611,11 +611,11 @@ can be any of the following: @defmethod[(find-string [str string?] [direction (one-of/c 'forward 'backward) 'forward] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof] + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof] [get-start? any/c #t] [case-sensitive? any/c #t]) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Finds an exact-match string in the editor and returns its @techlink{position}. If the string is not found, @scheme[#f] is returned. @@ -643,11 +643,11 @@ If @scheme[case-sensitive?] is @scheme[#f], then an uppercase and lowercase @defmethod[(find-string-all [str string?] [direction (one-of/c 'forward 'backward) 'forward] - [start (or/c nonnegative-exact-integer? (one/of 'start)) 'start] - [end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof] + [start (or/c exact-nonnegative-integer? (one/of 'start)) 'start] + [end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof] [get-start? any/c #t] [case-sensitive any/c #t]) - (listof nonnegative-exact-integer?)]{ + (listof exact-nonnegative-integer?)]{ Finds all occurrences of a string using @method[text% find-string]. If no occurrences are found, the empty list is returned. The arguments @@ -656,8 +656,8 @@ Finds all occurrences of a string using @method[text% find-string]. If } -@defmethod[(find-wordbreak [start (or/c (box/c nonnegative-exact-integer?) false/c)] - [end (or/c (box/c nonnegative-exact-integer?) false/c)] +@defmethod[(find-wordbreak [start (or/c (box/c exact-nonnegative-integer?) false/c)] + [end (or/c (box/c exact-nonnegative-integer?) false/c)] [reason (one-of/c 'caret 'line 'selection 'user1 'user2)]) void?]{ @@ -711,11 +711,11 @@ Turns off the hiliting and shows the normal selection range again; see } -@defmethod[(flash-on [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?] +@defmethod[(flash-on [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?] [at-eol? any/c #f] [scroll? any/c #t] - [timeout nonnegative-exact-integer? 500]) + [timeout exact-nonnegative-integer? 500]) void?]{ Temporarily hilites a region in the editor without changing the @@ -754,7 +754,7 @@ See also @method[text% set-between-threshold]. } -@defmethod[(get-character [start nonnegative-exact-integer?]) +@defmethod[(get-character [start exact-nonnegative-integer?]) char?]{ Returns the character following the @techlink{position} @@ -768,7 +768,7 @@ If @scheme[start] is greater than or equal to the last @defmethod[(get-end-position) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the ending @techlink{position} of the current selection. See also @method[text% get-position]. @@ -804,8 +804,8 @@ Returns @scheme[#t] if the editor is in overwrite mode, @scheme[#f] } -@defmethod[(get-position [start (or/c (box/c nonnegative-exact-integer?) false/c)] - [end (or/c (box/c nonnegative-exact-integer?) false/c) #f]) +@defmethod[(get-position [start (or/c (box/c exact-nonnegative-integer?) false/c)] + [end (or/c (box/c exact-nonnegative-integer?) false/c) #f]) void?]{ Returns the current selection range in @techlink{position}s. If @@ -821,8 +821,8 @@ and @method[text% get-end-position]. } -@defmethod[(get-region-data [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?]) +@defmethod[(get-region-data [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?]) (or/c (is-a?/c editor-data%) false/c)]{ Gets extra data associated with a given region. See @@ -854,7 +854,7 @@ Returns an inexact number that increments every time the editor is @defmethod[(get-snip-position [snip (is-a?/c snip%)]) - (or/c nonnegative-exact-integer? false/c)]{ + (or/c exact-nonnegative-integer? false/c)]{ Returns the starting @techlink{position} of a given snip or @scheme[#f] if the snip is not in this editor. @@ -862,7 +862,7 @@ Returns the starting @techlink{position} of a given snip or } @defmethod[(get-snip-position-and-location [snip (is-a?/c snip%)] - [pos (or/c (box/c nonnegative-exact-integer?) false/c)] + [pos (or/c (box/c exact-nonnegative-integer?) false/c)] [x (or/c (box/c real?) false/c) #f] [y (or/c (box/c real?) false/c) #f]) boolean?]{ @@ -881,7 +881,7 @@ When @techlink{location} information is requested: @|OVD| @|FCA| @defmethod[(get-start-position) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the starting @techlink{position} of the current selection. See also @method[text% get-position]. @@ -911,7 +911,7 @@ See also @method[text% set-styles-sticky]. } -@defmethod[(get-tabs [length (or/c (box/c nonnegative-exact-integer?) false/c) #f] +@defmethod[(get-tabs [length (or/c (box/c exact-nonnegative-integer?) false/c) #f] [tab-width (or/c (box/c real?) false/c) #f] [in-units (or/c (box/c any/c) false/c) #f]) (listof real?)]{ @@ -931,8 +931,8 @@ See also } -@defmethod[(get-text [start nonnegative-exact-integer? 0] - [end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof] +@defmethod[(get-text [start exact-nonnegative-integer? 0] + [end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof] [flattened? any/c #f] [force-cr? any/c #f]) string?]{ @@ -964,8 +964,8 @@ Returns the distance from the top of the editor to the alignment } -@defmethod[(get-visible-line-range [start (or/c (box/c nonnegative-exact-integer?) false/c)] - [end (or/c (box/c nonnegative-exact-integer?) false/c)] +@defmethod[(get-visible-line-range [start (or/c (box/c exact-nonnegative-integer?) false/c)] + [end (or/c (box/c exact-nonnegative-integer?) false/c)] [all? any/c #t]) void?]{ @@ -985,8 +985,8 @@ If the editor is displayed by multiple canvases and @scheme[all?] is } -@defmethod[(get-visible-position-range [start (or/c (box/c nonnegative-exact-integer?) false/c)] - [end (or/c (box/c nonnegative-exact-integer?) false/c)] +@defmethod[(get-visible-position-range [start (or/c (box/c exact-nonnegative-integer?) false/c)] + [end (or/c (box/c exact-nonnegative-integer?) false/c)] [all? any/c #t]) void?]{ @@ -1032,24 +1032,24 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock]. @defmethod*[#:mode override ([(insert [str string?] - [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] + [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [scroll-ok? any/c #t]) void?] - [(insert [n nonnegative-exact-integer?] + [(insert [n exact-nonnegative-integer?] [str string?] - [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] + [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [scroll-ok? any/c #t]) void?] [(insert [str string?]) void?] - [(insert [n nonnegative-exact-integer?] + [(insert [n exact-nonnegative-integer?] [str string?]) void?] [(insert [snip (is-a?/c snip%)] - [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] + [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [scroll-ok? any/c #t]) void?] [(insert [snip (is-a?/c snip%)]) @@ -1057,8 +1057,8 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock]. [(insert [char char?]) void?] [(insert [char char?] - [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]) + [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]) void?])]{ Inserts text or a snip into @this-obj[] at @techlink{position} @@ -1101,8 +1101,8 @@ See also @method[text% get-styles-sticky]. ([(kill [time (and/c exact? integer?) 0]) void?] [(kill [time (and/c exact? integer?)] - [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?]) + [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?]) void?])]{ Cuts the text in the given region. If @scheme[start] and @scheme[end] @@ -1118,7 +1118,7 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If @defmethod[(last-line) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of the last line in the editor. Lines are numbered starting with @scheme[0], so this is one less than the number of lines @@ -1131,7 +1131,7 @@ Returns the number of the last line in the editor. Lines are numbered @defmethod[(last-paragraph) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the number of the last paragraph in the editor. Paragraphs are numbered starting with @scheme[0], so this is one less than the @@ -1142,16 +1142,16 @@ Returns the number of the last paragraph in the editor. Paragraphs are } @defmethod[(last-position) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the last selection @techlink{position} in the editor. This is also the number of @techlink{item}s in the editor. } -@defmethod[(line-end-position [line nonnegative-exact-integer?] +@defmethod[(line-end-position [line exact-nonnegative-integer?] [visible? any/c #t]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the last @techlink{position} of a given line. @|LineNumbering| @@ -1171,8 +1171,8 @@ If the line ends with invisible @techlink{item}s (such as a carriage } -@defmethod[(line-length [i nonnegative-exact-integer?]) - nonnegative-exact-integer?]{ +@defmethod[(line-length [i exact-nonnegative-integer?]) + exact-nonnegative-integer?]{ Returns the number of @techlink{item}s in a given line. @|LineNumbering| @@ -1182,7 +1182,7 @@ line. @|LineNumbering| } -@defmethod[(line-location [line nonnegative-exact-integer?] +@defmethod[(line-location [line exact-nonnegative-integer?] [top? any/c #t]) real?]{ @@ -1198,8 +1198,8 @@ If @scheme[top?] is not @scheme[#f], the @techlink{location} for the } -@defmethod[(line-paragraph [start nonnegative-exact-integer?]) - nonnegative-exact-integer?]{ +@defmethod[(line-paragraph [start exact-nonnegative-integer?]) + exact-nonnegative-integer?]{ Returns the paragraph number of the paragraph containing the line. @|LineNumbering| @|ParagraphNumbering| @@ -1208,9 +1208,9 @@ Returns the paragraph number of the paragraph containing the line. } -@defmethod[(line-start-position [line nonnegative-exact-integer?] +@defmethod[(line-start-position [line exact-nonnegative-integer?] [visible? any/c #t]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the first @techlink{position} of the given line. @|LineNumbering| @@ -1285,8 +1285,8 @@ See also @method[text% set-position]. @defmethod[#:mode pubment - (on-change-style [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (on-change-style [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -1363,8 +1363,8 @@ Tracks clicks on a clickback (see @method[text% set-clickback]) of @defmethod[#:mode pubment - (on-delete [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (on-delete [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -1394,8 +1394,8 @@ Does nothing. @defmethod[#:mode pubment - (on-insert [start nonnegative-exact-integer?] - [len nonnegative-exact-integer?]) + (on-insert [start exact-nonnegative-integer?] + [len exact-nonnegative-integer?]) void?]{ @methspec{ @@ -1493,8 +1493,8 @@ Does nothing. }} -@defmethod[(paragraph-end-line [paragraph nonnegative-exact-integer?]) - nonnegative-exact-integer?]{ +@defmethod[(paragraph-end-line [paragraph exact-nonnegative-integer?]) + exact-nonnegative-integer?]{ Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumbering| @@ -1503,9 +1503,9 @@ Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumber } -@defmethod[(paragraph-end-position [paragraph nonnegative-exact-integer?] +@defmethod[(paragraph-end-position [paragraph exact-nonnegative-integer?] [visible? any/c #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the ending @techlink{position} of a given paragraph. @|ParagraphNumbering| @@ -1520,8 +1520,8 @@ If the paragraph ends with invisible @techlink{item}s (such as a carriage } -@defmethod[(paragraph-start-line [paragraph nonnegative-exact-integer?]) - nonnegative-exact-integer?]{ +@defmethod[(paragraph-start-line [paragraph exact-nonnegative-integer?]) + exact-nonnegative-integer?]{ Returns the starting line of a given paragraph. @|ParagraphNumbering| @|LineNumbering| @@ -1530,9 +1530,9 @@ Returns the starting line of a given paragraph. @|ParagraphNumbering| @|LineNumb } -@defmethod[(paragraph-start-position [paragraph nonnegative-exact-integer?] +@defmethod[(paragraph-start-position [paragraph exact-nonnegative-integer?] [visible? any/c #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the starting @techlink{position} of a given paragraph. @|ParagraphNumbering| @@ -1548,8 +1548,8 @@ If the paragraph starts with invisible @techlink{item}s and @scheme[visible?] is @defmethod[#:mode override (paste [time (and/c exact? integer?)] - [start (or/c nonnegative-exact-integer? (one/of 'end)) 'end] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]) + [start (or/c exact-nonnegative-integer? (one/of 'end)) 'end] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]) void?]{ Pastes into the specified range. If @scheme[start] is @scheme['end], then @@ -1586,8 +1586,8 @@ If the previous operation on the editor was not a paste, calling @defmethod[#:mode override (paste-x-selection [time (and/c exact? integer?)] - [start (or/c nonnegative-exact-integer? (one/of 'end)) 'end] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same]) + [start (or/c exact-nonnegative-integer? (one/of 'end)) 'end] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same]) void?]{ Pastes into the specified range. If @scheme[start] is @scheme['end], then @@ -1600,9 +1600,9 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If } -@defmethod[(position-line [start nonnegative-exact-integer?] +@defmethod[(position-line [start exact-nonnegative-integer?] [at-eol? any/c #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ Returns the line number of the line containing a given @techlink{position}. @|LineNumbering| @@ -1615,7 +1615,7 @@ See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. } -@defmethod[(position-location [start nonnegative-exact-integer?] +@defmethod[(position-location [start exact-nonnegative-integer?] [x (or/c (box/c real?) false/c) #f] [y (or/c (box/c real?) false/c) #f] [top? any/c #t] @@ -1646,7 +1646,7 @@ maximum bottom @techlink{location} for the whole line is returned in @scheme[y]. } -@defmethod[(position-locations [start nonnegative-exact-integer?] +@defmethod[(position-locations [start exact-nonnegative-integer?] [top-x (or/c (box/c real?) false/c) #f] [top-y (or/c (box/c real?) false/c) #f] [bottom-x (or/c (box/c real?) false/c) #f] @@ -1662,9 +1662,9 @@ and ``bottom'' results at once. } -@defmethod[(position-paragraph [start nonnegative-exact-integer?] +@defmethod[(position-paragraph [start exact-nonnegative-integer?] [at-eol? any/c #f]) - nonnegative-exact-integer?]{ + exact-nonnegative-integer?]{ See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. @@ -1675,7 +1675,7 @@ Returns the paragraph number of the paragraph containing a given @techlink{posit @defmethod[#:mode extend (read-from-file [stream (is-a?/c editor-stream-in%)] - [start (or/c nonnegative-exact-integer? (one/of 'start))] + [start (or/c exact-nonnegative-integer? (one/of 'start))] [overwrite-styles? any/c #t]) boolean?]{ @@ -1685,8 +1685,8 @@ New data is inserted at the @techlink{position} indicated by @scheme[start], or } -@defmethod[(remove-clickback [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?]) +@defmethod[(remove-clickback [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?]) void?]{ Removes all clickbacks installed for exactly the range @scheme[start] @@ -1695,9 +1695,9 @@ Removes all clickbacks installed for exactly the range @scheme[start] } -@defmethod[(scroll-to-position [start nonnegative-exact-integer?] +@defmethod[(scroll-to-position [start exact-nonnegative-integer?] [at-eol? any/c #f] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [bias (one-of/c 'start 'end 'none) 'none]) boolean?]{ @@ -1784,11 +1784,11 @@ See also } -@defmethod[(set-clickback [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?] +@defmethod[(set-clickback [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?] [f ((is-a?/c text% - nonnegative-exact-integer? - nonnegative-exact-integer?) + exact-nonnegative-integer? + exact-nonnegative-integer?) . -> . any)] [hilite-delta (or/c (is-a?/c style-delta%) false/c) #f] [call-on-down? any/c #f]) @@ -1852,7 +1852,7 @@ Enables or disables overwrite mode. See @method[text% } -@defmethod[(set-paragraph-alignment [paragraph nonnegative-exact-integer?] +@defmethod[(set-paragraph-alignment [paragraph exact-nonnegative-integer?] [alignment (one-of/c 'left 'center 'right)]) void?]{ @@ -1870,7 +1870,7 @@ Sets a paragraph-specific horizontal alignment. The alignment is only } -@defmethod[(set-paragraph-margins [paragraph nonnegative-exact-integer?] +@defmethod[(set-paragraph-margins [paragraph exact-nonnegative-integer?] [first-left (and/c real? (not/c negative?))] [left (and/c real? (not/c negative?))] [right (and/c real? (not/c negative?))]) @@ -1891,8 +1891,8 @@ The first line of the paragraph is indented by @scheme[first-left] points } -@defmethod[(set-position [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] +@defmethod[(set-position [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [at-eol? any/c #f] [scroll? any/c #t] [seltype (one-of/c 'default 'x 'local) 'default]) @@ -1935,8 +1935,8 @@ See also @scheme[editor-set-x-selection-mode]. @defmethod[(set-position-bias-scroll [bias (one-of/c 'start-only 'start 'none 'end 'end-only)] - [start nonnegative-exact-integer?] - [end (or/c nonnegative-exact-integer? (one/of 'same)) 'same] + [start exact-nonnegative-integer?] + [end (or/c exact-nonnegative-integer? (one/of 'same)) 'same] [ateol? any/c #f] [scroll? any/c #t] [seltype (one-of/c 'default 'x 'local) 'default]) @@ -1958,8 +1958,8 @@ See also @method[text% scroll-to-position]. } -@defmethod[(set-region-data [start nonnegative-exact-integer?] - [end nonnegative-exact-integer?] +@defmethod[(set-region-data [start exact-nonnegative-integer?] + [end exact-nonnegative-integer?] [data (is-a?/c editor-data%)]) void?]{ @@ -2010,8 +2010,8 @@ Setting tabs is disallowed when the editor is internally locked for } -@defmethod[(set-wordbreak-func [f ((is-a?/c text%) (or/c (box/c nonnegative-exact-integer?) false/c) - (or/c (box/c nonnegative-exact-integer?) false/c) +@defmethod[(set-wordbreak-func [f ((is-a?/c text%) (or/c (box/c exact-nonnegative-integer?) false/c) + (or/c (box/c exact-nonnegative-integer?) false/c) symbol? . -> . any)]) void?]{ @@ -2048,7 +2048,7 @@ If @scheme[map] is @scheme[#f], then the standard map } -@defmethod[(split-snip [pos nonnegative-exact-integer?]) +@defmethod[(split-snip [pos exact-nonnegative-integer?]) void?]{ Given a @techlink{position}, splits the snip that includes the @@ -2064,8 +2064,8 @@ Splitting a snip is disallowed when the editor is internally locked @defmethod[#:mode extend (write-to-file [stream (is-a?/c editor-stream-out%)] - [start nonnegative-exact-integer? 0] - [end (or/c nonnegative-exact-integer? (one/of 'eof)) 'eof]) + [start exact-nonnegative-integer? 0] + [end (or/c exact-nonnegative-integer? (one/of 'eof)) 'eof]) boolean?]{ If @scheme[start] is 0 and @scheme[end] is @scheme['eof] negative, diff --git a/collects/scribblings/gui/wxme.scrbl b/collects/scribblings/gui/wxme.scrbl index 2837aaf9..626562cf 100644 --- a/collects/scribblings/gui/wxme.scrbl +++ b/collects/scribblings/gui/wxme.scrbl @@ -185,9 +185,9 @@ An interface to be implemented by values returned from a snip reader. The only method is @method[readable<%> read-special]. @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ Like @method[readable-snip<%> read-special], but for non-graphical @@ -413,9 +413,9 @@ No data is available. } @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ Generates a special comment using @scheme[make-special-comment]. The @@ -446,9 +446,9 @@ Returns @scheme[#t] if whitespace is elimited from the contained XML literal, @scheme[#f] otherwise.} @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ Generates a @scheme[quasiquote] S-expression that enclosed the XML, @@ -480,9 +480,9 @@ Returns @scheme[#t] if the box corresponds to a splicing unquote, @scheme[#f] for a non-splicing unquote.} @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ Generates an S-expression for the code in the box.} @@ -511,9 +511,9 @@ mode. No data is available.} @defmethod[(read-special [source any/c] - [line (or/c nonnegative-exact-integer? false/c)] - [column (or/c nonnegative-exact-integer? false/c)] - [position (or/c nonnegative-exact-integer? false/c)]) + [line (or/c exact-nonnegative-integer? false/c)] + [column (or/c exact-nonnegative-integer? false/c)] + [position (or/c exact-nonnegative-integer? false/c)]) any/c]{ Generates a string containing the text.}