changed some one-of/c's to or/c's

svn: r18185

original commit: 94880b47332bfc0bdd3d1b15ff22746be5cb2843
This commit is contained in:
Robby Findler 2010-02-19 15:03:12 +00:00
parent 075f36f524
commit 3ce2bfd158
3 changed files with 113 additions and 113 deletions

View File

@ -260,9 +260,9 @@ Propagates the request to any snip with the editor-local focus.
}}
@defmethod[(can-do-edit-operation? [op (one-of/c 'undo 'redo 'clear 'cut 'copy 'paste
'kill 'select-all 'insert-text-box
'insert-pasteboard-box 'insert-image)]
@defmethod[(can-do-edit-operation? [op (or/c 'undo 'redo 'clear 'cut 'copy 'paste
'kill 'select-all 'insert-text-box
'insert-pasteboard-box 'insert-image)]
[recursive? any/c #t])
boolean?]{
@methspec{
@ -282,8 +282,8 @@ locked, etc.
@defmethod[#:mode pubment
(can-load-file? [filename path?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
boolean?]{
@methspec{
@ -308,8 +308,8 @@ Returns @scheme[#t].
@defmethod[#:mode pubment
(can-save-file? [filename path?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
boolean?]{
@methspec{
@ -462,9 +462,9 @@ Returns the name of a style to be used for newly inserted text,
See @xmethod[text% do-copy] or @xmethod[pasteboard% do-copy].}
@defmethod[(do-edit-operation [op (one-of/c 'undo 'redo 'clear 'cut 'copy 'paste
'kill 'select-all 'insert-text-box
'insert-pasteboard-box 'insert-image)]
@defmethod[(do-edit-operation [op (or/c 'undo 'redo 'clear 'cut 'copy 'paste
'kill 'select-all 'insert-text-box
'insert-pasteboard-box 'insert-image)]
[recursive? any/c #t]
[time (and/c exact? integer?) 0])
void?]{
@ -700,7 +700,7 @@ See also @method[editor<%> set-caret-owner].
@defmethod[(get-inactive-caret-threshold)
(one-of/c 'no-caret 'show-inactive-caret 'show-caret)]{
(or/c 'no-caret 'show-inactive-caret 'show-caret)]{
Returns the threshold for painting an inactive selection. This
threshold is compared with the @scheme[draw-caret] argument to
@ -928,7 +928,7 @@ Inserts data into the editor. A snip cannot be inserted into multiple
}
@defmethod[(insert-box [type (one-of/c 'text 'pasteboard) 'text])
@defmethod[(insert-box [type (or/c 'text 'pasteboard) 'text])
void?]{
Inserts a box (a sub-editor) into the editor by calling
@ -941,13 +941,13 @@ inserts the resulting snip into the editor.
@defmethod*[([(insert-file [filename path-string?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[show-errors? any/c #t])
boolean?]
[(insert-file [port input-port?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[show-errors? any/c #t])
boolean?])]{
@ -967,7 +967,7 @@ The @scheme[show-errors?] argument is no longer used.
@defmethod[(insert-image [filename (or/c path-string? #f) #f]
[type (one-of/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict) 'unknown]
[type (or/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict) 'unknown]
[relative-path? any/c #f]
[inline? any/c #t])
void?]{
@ -989,10 +989,10 @@ calling
}
@defmethod[(insert-port [port input-port?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[replace-styles? any/c #t])
(one-of/c 'standard 'text 'text-force-cr)]{
(or/c 'standard 'text 'text-force-cr)]{
Use @method[editor<%> insert-file], instead.
@ -1081,8 +1081,8 @@ See also @method[editor<%> cut].
@defmethod[(load-file [filename (or/c path-string? #f) #f]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'guess]
[show-errors? any/c #t])
boolean?]{
@ -1442,8 +1442,8 @@ Either passes this event on to a caret-owning snip, selects a new
@defmethod[#:mode pubment
(on-load-file [filename path?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
void?]{
@methspec{
@ -1503,7 +1503,7 @@ Either lets the keymap handle the event or calls
}}
@defmethod[(on-new-box [type (one-of/c 'text 'pasteboard)])
@defmethod[(on-new-box [type (or/c 'text 'pasteboard)])
(is-a?/c snip%)]{
@methspec{
@ -1524,7 +1524,7 @@ Creates a @scheme[editor-snip%] with either a sub-editor from
@defmethod[(on-new-image-snip [filename path?]
[kind (one-of/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)]
[kind (or/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)]
[relative-path? any/c]
[inline? any/c])
(is-a?/c image-snip%)]{
@ -1552,7 +1552,7 @@ Returns @scheme[(make-object image-snip% filename kind relative-path? inline?)].
[bottom real?]
[dx real?]
[dy real?]
[draw-caret (one-of/c 'no-caret 'show-inactive-caret 'show-caret)])
[draw-caret (or/c 'no-caret 'show-inactive-caret 'show-caret)])
void?]{
@methspec{
@ -1602,8 +1602,8 @@ Does nothing.
@defmethod[#:mode pubment
(on-save-file [filename path?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr)])
void?]{
@methspec{
@ -1712,7 +1712,7 @@ To extend or re-implement copying, override the @xmethod[text%
@defmethod[(print [interactive? any/c #t]
[fit-on-page? any/c #t]
[output-mode (one-of/c 'standard 'postscript) 'standard]
[output-mode (or/c 'standard 'postscript) 'standard]
[parent (or/c (or/c (is-a?/c frame%) (is-a?/c dialog%)) #f) #f]
[force-ps-page-bbox? any/c #t]
[as-eps? any/c #f])
@ -1891,7 +1891,7 @@ See also @method[editor<%> add-undo].
[y real?]
[width (and/c real? (not/c negative?))]
[height (and/c real? (not/c negative?))]
[draw-caret (one-of/c 'no-caret 'show-inactive-caret 'show-caret)]
[draw-caret (or/c 'no-caret 'show-inactive-caret 'show-caret)]
[background (or/c (is-a?/c color%) #f)])
void?]{
@ -1973,8 +1973,8 @@ If @scheme[redraw-now?] is @scheme[#f], the editor will require
@defmethod[(save-file [filename (or/c path-string? #f) #f]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'same]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'same]
[show-errors? any/c #t])
boolean?]{
@ -2004,8 +2004,8 @@ The @scheme[show-errors?] argument is no longer used.
@defmethod[(save-port [port output-port?]
[format (one-of/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'same]
[format (or/c 'guess 'same 'copy 'standard
'text 'text-force-cr) 'same]
[show-errors? any/c #t])
boolean?]{
@ -2025,7 +2025,7 @@ The @scheme[show-errors?] argument is no longer used.
[width (and/c real? (not/c negative?))]
[height (and/c real? (not/c negative?))]
[refresh? any/c]
[bias (one-of/c 'start 'end 'none)])
[bias (or/c 'start 'end 'none)])
boolean?]{
Causes the editor to be scrolled so that a given @techlink{location}
@ -2061,7 +2061,7 @@ For @scheme[text%] objects: @|FCA| @|EVD|
[width (and/c real? (not/c negative?))]
[height (and/c real? (not/c negative?))]
[refresh? any/c]
[bias (one-of/c 'start 'end 'none) 'none])
[bias (or/c 'start 'end 'none) 'none])
boolean?]{
Called (indirectly) by snips within the editor: it causes the editor
@ -2120,7 +2120,7 @@ get-admin]}]
@defmethod[(set-caret-owner [snip (or/c (is-a?/c snip%) #f)]
[domain (one-of/c 'immediate 'display 'global) 'immediate])
[domain (or/c 'immediate 'display 'global) 'immediate])
void?]{
Attempts to give the keyboard focus to @scheme[snip]. If @scheme[snip] is
@ -2195,7 +2195,7 @@ This method is also called when the filename changes through any
}
@defmethod[(set-inactive-caret-threshold [threshold (one-of/c 'no-caret 'show-inactive-caret 'show-caret)])
@defmethod[(set-inactive-caret-threshold [threshold (or/c 'no-caret 'show-inactive-caret 'show-caret)])
void?]{
Sets the threshold for painting an inactive selection. See

View File

@ -129,28 +129,28 @@ The family and face settings in a style delta are interdependent:
@defconstructor*/make[(([change-command (one-of/c 'change-nothing
'change-normal
'change-toggle-underline
'change-toggle-size-in-pixels
'change-normal-color
'change-bold)
@defconstructor*/make[(([change-command (or/c 'change-nothing
'change-normal
'change-toggle-underline
'change-toggle-size-in-pixels
'change-normal-color
'change-bold)
'change-nothing])
([change-command (one-of/c 'change-family
'change-style
'change-toggle-style
'change-weight
'change-toggle-weight
'change-smoothing
'change-toggle-smoothing
'change-alignment)]
([change-command (or/c 'change-family
'change-style
'change-toggle-style
'change-weight
'change-toggle-weight
'change-smoothing
'change-toggle-smoothing
'change-alignment)]
[v symbol])
([change-command (one-of/c 'change-size
'change-bigger
'change-smaller)]
([change-command (or/c 'change-size
'change-bigger
'change-smaller)]
[v (integer-in 0 255)])
([change-command (one-of/c 'change-underline
'change-size-in-pixels)]
([change-command (or/c 'change-underline
'change-size-in-pixels)]
[v any/c]))]{
The initialization arguments are passed on to
@ -186,14 +186,14 @@ Returns @scheme[#t] if the given delta is equivalent to this one in
}
@defmethod[(get-alignment-off)
(one-of/c 'base 'top 'center 'bottom)]{
(or/c 'base 'top 'center 'bottom)]{
See @scheme[style-delta%].
}
@defmethod[(get-alignment-on)
(one-of/c 'base 'top 'center 'bottom)]{
(or/c 'base 'top 'center 'bottom)]{
See @scheme[style-delta%].
@ -232,8 +232,8 @@ See also @method[style-delta% get-family].
}
@defmethod[(get-family)
(one-of/c 'base 'default 'decorative 'roman 'script
'swiss 'modern 'symbol 'system)]{
(or/c 'base 'default 'decorative 'roman 'script
'swiss 'modern 'symbol 'system)]{
Returns the delta's font family. The possible values are
@itemize[
@ -301,24 +301,24 @@ Gets the multiplicative font size shift (applied before the additive factor).
}
@defmethod[(get-smoothing-off)
(one-of/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{
(or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{
See @scheme[style-delta%].
}
@defmethod[(get-smoothing-on)
(one-of/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{See
(or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{See
@scheme[style-delta%].
}
@defmethod[(get-style-off)
(one-of/c 'base 'normal 'italic 'slant)]{See
(or/c 'base 'normal 'italic 'slant)]{See
@scheme[style-delta%].
}
@defmethod[(get-style-on)
(one-of/c 'base 'normal 'italic 'slant)]{See
(or/c 'base 'normal 'italic 'slant)]{See
@scheme[style-delta%].
}
@ -343,50 +343,50 @@ See @scheme[style-delta%].
}
@defmethod[(get-weight-off)
(one-of/c 'base 'normal 'bold 'light)]{See
(or/c 'base 'normal 'bold 'light)]{See
@scheme[style-delta%].
}
@defmethod[(get-weight-on)
(one-of/c 'base 'normal 'bold 'light)]{See
(or/c 'base 'normal 'bold 'light)]{See
@scheme[style-delta%].
}
@defmethod[(set-alignment-off [v (one-of/c 'base 'top 'center 'bottom)])
@defmethod[(set-alignment-off [v (or/c 'base 'top 'center 'bottom)])
void?]{See
@scheme[style-delta%].
}
@defmethod[(set-alignment-on [v (one-of/c 'base 'top 'center 'bottom)])
@defmethod[(set-alignment-on [v (or/c 'base 'top 'center 'bottom)])
void?]{See
@scheme[style-delta%].
}
@defmethod*[([(set-delta [change-command (one-of/c 'change-nothing
'change-normal
'change-toggle-underline
'change-toggle-size-in-pixels
'change-normal-color
'change-bold)
@defmethod*[([(set-delta [change-command (or/c 'change-nothing
'change-normal
'change-toggle-underline
'change-toggle-size-in-pixels
'change-normal-color
'change-bold)
'change-nothing])
(is-a?/c style-delta%)]
[(set-delta [change-command (one-of/c 'change-family
'change-style
'change-toggle-style
'change-weight
'change-toggle-weight
'change-smoothing
'change-toggle-smoothing
'change-alignment)]
[(set-delta [change-command (or/c 'change-family
'change-style
'change-toggle-style
'change-weight
'change-toggle-weight
'change-smoothing
'change-toggle-smoothing
'change-alignment)]
[param symbol])
(is-a?/c style-delta%)]
[(set-delta [change-command (one-of/c 'change-size
'change-bigger
'change-smaller)]
[(set-delta [change-command (or/c 'change-size
'change-bigger
'change-smaller)]
[param (integer-in 0 255)])
(is-a?/c style-delta%)]
[(set-delta [change-command (one-of/c 'change-underline
'change-size-in-pixels)]
[(set-delta [change-command (or/c 'change-underline
'change-size-in-pixels)]
[on? any/c])
(is-a?/c style-delta%)])]{
@ -455,8 +455,8 @@ For the case that a string color name is supplied, see
}
@defmethod[(set-delta-face [name string?]
[family (one-of/c 'base 'default 'decorative 'roman
'script 'swiss 'modern 'symbol 'system)
[family (or/c 'base 'default 'decorative 'roman
'script 'swiss 'modern 'symbol 'system)
'default])
(is-a?/c style-delta%)]{
@ -493,8 +493,8 @@ For the case that a string color name is supplied, see
}
@defmethod[(set-family [v (one-of/c 'base 'default 'decorative 'roman 'script
'swiss 'modern 'symbol 'system)])
@defmethod[(set-family [v (or/c 'base 'default 'decorative 'roman 'script
'swiss 'modern 'symbol 'system)])
void?]{
Sets the delta's font family. See
@method[style-delta% get-family].
@ -521,22 +521,22 @@ after the multiplicative factor).
before the additive factor).
}
@defmethod[(set-smoothing-off [v (one-of/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)])
@defmethod[(set-smoothing-off [v (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)])
void?]{See
@scheme[style-delta%].
}
@defmethod[(set-smoothing-on [v (one-of/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)])
@defmethod[(set-smoothing-on [v (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)])
void?]{See
@scheme[style-delta%].
}
@defmethod[(set-style-off [v (one-of/c 'base 'normal 'italic 'slant)])
@defmethod[(set-style-off [v (or/c 'base 'normal 'italic 'slant)])
void?]{See
@scheme[style-delta%].
}
@defmethod[(set-style-on [v (one-of/c 'base 'normal 'italic 'slant)])
@defmethod[(set-style-on [v (or/c 'base 'normal 'italic 'slant)])
void?]{See
@scheme[style-delta%].
}
@ -561,12 +561,12 @@ before the additive factor).
@scheme[style-delta%].
}
@defmethod[(set-weight-off [v (one-of/c 'base 'normal 'bold 'light)])
@defmethod[(set-weight-off [v (or/c 'base 'normal 'bold 'light)])
void?]{See
@scheme[style-delta%].
}
@defmethod[(set-weight-on [v (one-of/c 'base 'normal 'bold 'light)])
@defmethod[(set-weight-on [v (or/c 'base 'normal 'bold 'light)])
void?]{See
@scheme[style-delta%].
}}

View File

@ -519,7 +519,7 @@ Given a @techlink{location} in the editor, returns the line at the
}
@defmethod[(find-newline [direction (one-of/c 'forward 'backward) 'forward]
@defmethod[(find-newline [direction (or/c 'forward 'backward) 'forward]
[start (or/c exact-nonnegative-integer? 'start) 'start]
[end (or/c exact-nonnegative-integer? 'eof) 'eof])
(or/c exact-nonnegative-integer? #f)]{
@ -590,7 +590,7 @@ See @method[text% find-position] for a discussion of
@defmethod[(find-snip [pos exact-nonnegative-integer?]
[direction (one-of/c 'before-or-none 'before 'after 'after-or-none)]
[direction (or/c 'before-or-none 'before 'after 'after-or-none)]
[s-pos (or/c (box/c exact-nonnegative-integer?) #f) #f])
(or/c (is-a?/c snip%) #f)]{
@ -622,7 +622,7 @@ can be any of the following:
@defmethod[(find-string [str string?]
[direction (one-of/c 'forward 'backward) 'forward]
[direction (or/c 'forward 'backward) 'forward]
[start (or/c exact-nonnegative-integer? 'start) 'start]
[end (or/c exact-nonnegative-integer? 'eof) 'eof]
[get-start? any/c #t]
@ -654,7 +654,7 @@ 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]
[direction (or/c 'forward 'backward) 'forward]
[start (or/c exact-nonnegative-integer? 'start) 'start]
[end (or/c exact-nonnegative-integer? 'eof) 'eof]
[get-start? any/c #t]
@ -670,7 +670,7 @@ Finds all occurrences of a string using @method[text% find-string]. If
@defmethod[(find-wordbreak [start (or/c (box/c exact-nonnegative-integer?) #f)]
[end (or/c (box/c exact-nonnegative-integer?) #f)]
[reason (one-of/c 'caret 'line 'selection 'user1 'user2)])
[reason (or/c 'caret 'line 'selection 'user1 'user2)])
void?]{
Finds wordbreaks in the editor using the current wordbreak procedure.
@ -789,7 +789,7 @@ Returns the ending @techlink{position} of the current selection. See
@defmethod[(get-file-format)
(one-of/c 'standard 'text 'text-force-cr)]{
(or/c 'standard 'text 'text-force-cr)]{
Returns the format of the last file saved from or loaded into this
editor. See also @method[editor<%> load-file].
@ -1259,9 +1259,9 @@ then this method ignores the editor's maximum width and any automatic
}
@defmethod[(move-position [code (one-of/c 'home 'end 'right 'left 'up 'down)]
@defmethod[(move-position [code (or/c 'home 'end 'right 'left 'up 'down)]
[extend? any/c #f]
[kind (one-of/c 'simple 'word 'page 'line) 'simple])
[kind (or/c 'simple 'word 'page 'line) 'simple])
void?]{
Moves the current selection.
@ -1720,7 +1720,7 @@ Removes all clickbacks installed for exactly the range @scheme[start]
@defmethod[(scroll-to-position [start exact-nonnegative-integer?]
[at-eol? any/c #f]
[end (or/c exact-nonnegative-integer? 'same) 'same]
[bias (one-of/c 'start 'end 'none) 'none])
[bias (or/c 'start 'end 'none) 'none])
boolean?]{
Scrolls the editor so that a given @techlink{position} is visible.
@ -1836,7 +1836,7 @@ If @scheme[call-on-down?] is not @scheme[#f], the clickback is called
See also @|clickbackdiscuss|.
}
@defmethod[(set-file-format [format (one-of/c 'standard 'text 'text-force-cr)])
@defmethod[(set-file-format [format (or/c 'standard 'text 'text-force-cr)])
void?]{
Set the format of the file saved from this editor.
@ -1875,7 +1875,7 @@ Enables or disables overwrite mode. See @method[text%
@defmethod[(set-paragraph-alignment [paragraph exact-nonnegative-integer?]
[alignment (one-of/c 'left 'center 'right)])
[alignment (or/c 'left 'center 'right)])
void?]{
Sets a paragraph-specific horizontal alignment. The alignment is only
@ -1917,7 +1917,7 @@ The first line of the paragraph is indented by @scheme[first-left] points
[end (or/c exact-nonnegative-integer? 'same) 'same]
[at-eol? any/c #f]
[scroll? any/c #t]
[seltype (one-of/c 'default 'x 'local) 'default])
[seltype (or/c 'default 'x 'local) 'default])
void?]{
Sets the current selection in the editor.
@ -1956,12 +1956,12 @@ See also @scheme[editor-set-x-selection-mode].
}
@defmethod[(set-position-bias-scroll [bias (one-of/c 'start-only 'start 'none 'end 'end-only)]
@defmethod[(set-position-bias-scroll [bias (or/c 'start-only 'start 'none 'end 'end-only)]
[start exact-nonnegative-integer?]
[end (or/c exact-nonnegative-integer? 'same) 'same]
[ateol? any/c #f]
[scroll? any/c #t]
[seltype (one-of/c 'default 'x 'local) 'default])
[seltype (or/c 'default 'x 'local) 'default])
void?]{
Like @method[text% set-position], but a scrolling bias can be specified.