Fix documentation for gui, draw, and framework.

- General cleanup/consistency (e.g. void -> void?)
  - Fix misdocumented methods (found violations via contracts)

original commit: 14ef89c37d4c3a03eefb8cc5cd1f230646952cbf
This commit is contained in:
Asumu Takikawa 2011-04-22 01:40:38 -04:00
parent 636072ba5b
commit a5afac4522
30 changed files with 353 additions and 362 deletions

View File

@ -6,7 +6,7 @@
@definterface[autosave:autosavable<%> ()]{
Classes that implement this interface can be autosaved.
@defmethod*[(((do-autosave) void))]{
@defmethod*[(((do-autosave) void?))]{
This method is called when the object is registered to be
autosaved (see
@scheme[autosave:register]).

View File

@ -27,7 +27,7 @@
@defmixin[canvas:delegate-mixin (canvas:basic<%>) (canvas:delegate<%>)]{
Provides an implementation of
@scheme[canvas:delegate<%>].
@defmethod*[#:mode override (((on-superwindow-show (shown? boolean?)) void))]{
@defmethod*[#:mode override (((on-superwindow-show (shown? boolean?)) void?))]{
Notifies the delegate window when the original window is
visible. When invisible, the blue highlighting is erased.
@ -38,11 +38,11 @@
}
@defmixin[canvas:info-mixin (canvas:basic<%>) (canvas:info<%>)]{
@defmethod*[#:mode override (((on-focus) void))]{
@defmethod*[#:mode override (((on-focus) void?))]{
sets the canvas that the frame displays info about.
}
@defmethod*[#:mode override (((set-editor) void))]{
@defmethod*[#:mode override (((set-editor) void?))]{
Calls
@method[frame:info<%> update-info]
@ -58,18 +58,18 @@
and
@method[canvas:wide-snip<%> add-wide-snip]
to specify which snips should be resized.
@defmethod*[(((recalc-snips) void))]{
@defmethod*[(((recalc-snips) void?))]{
Recalculates the sizes of the wide snips.
}
@defmethod*[(((add-wide-snip (snip (instance snip%))) void))]{
@defmethod*[(((add-wide-snip (snip (is-a?/c snip%))) void?))]{
Snips passed to this method will be resized when the canvas's size
changes. Their width will be set so they take up all of the space
from their lefts to the right edge of the canvas.
}
@defmethod*[(((add-tall-snip (snip (instance snip%))) void))]{
@defmethod*[(((add-tall-snip (snip (is-a?/c snip%))) void?))]{
Snips passed to this method will be resized when the canvas's size
changes. Their height will be set so they take up all of the space
from their tops to the bottom of the canvas.
@ -82,7 +82,7 @@
The result of this mixin uses the same initialization arguments as the
mixin's argument.
@defmethod*[#:mode override (((on-size (width (integer-in 0 10000)) (height (integer-in 0 10000))) void))]{
@defmethod*[#:mode override (((on-size (width (integer-in 0 10000)) (height (integer-in 0 10000))) void?))]{
Adjusts the sizes of the marked snips.

View File

@ -25,7 +25,7 @@
exact-nonnegative-integer?
exact-nonnegative-integer?
any/c))))
(pairs (listof (list/p symbol? symbol?)))) void))]{
(pairs (listof (list/c symbol? symbol?)))) void?))]{
Starts tokenizing the buffer for coloring and parenthesis matching.
The @scheme[token-sym->style] argument will be passed the first return symbol from @scheme[get-token],
@ -107,14 +107,14 @@
closing parenthesis, each closing symbol in pairs will be converted to
a string and tried as a closing parenthesis.
}
@defmethod*[(((stop-colorer (clear-colors boolean #t)) void))]{
@defmethod*[(((stop-colorer (clear-colors boolean? #t)) void?))]{
Stops coloring and paren matching the buffer.
If @scheme[clear-colors] is true all the text in the buffer will have its
style set to Standard.
}
@defmethod*[(((force-stop-colorer (stop? boolean?)) void))]{
@defmethod*[(((force-stop-colorer (stop? boolean?)) void?))]{
Causes the entire tokenizing/coloring system to become inactive.
Intended for debugging purposes only.
@ -133,14 +133,14 @@
@method[color:text<%> thaw-colorer].
}
@defmethod*[(((freeze-colorer) void))]{
@defmethod*[(((freeze-colorer) void?))]{
Keep the text tokenized and paren matched, but stop altering the colors.
@scheme[freeze-colorer] will not return until the coloring/tokenization of the
entire text is brought up-to-date. It must not be called on a locked
text.
}
@defmethod*[(((thaw-colorer (recolor boolean #t) (retokenize boolean #f)) void))]{
@defmethod*[(((thaw-colorer (recolor boolean? #t) (retokenize boolean? #f)) void?))]{
Start coloring a frozen buffer again.
@ -153,19 +153,19 @@
background after the call to @scheme[thaw-colorer] returns.
}
@defmethod*[(((reset-region (start natural-number?) (end (union (quote end) natural-number?))) void))]{
@defmethod*[(((reset-region (start natural-number/c) (end (or/c (quote end) natural-number/c))) void?))]{
Set the region of the text that is tokenized.
}
@defmethod*[(((reset-regions (regions (listof (list number (union (quote end) number))))) void))]{
@defmethod*[(((reset-regions (regions (listof (list/c number? (or/c (quote end) number?))))) void?))]{
Sets the currently active regions to be @scheme[regions].
}
@defmethod*[(((get-regions) (listof (list number (union (quote end) number)))))]{
@defmethod*[(((get-regions) (listof (list/c number? (or/c (quote end) number?)))))]{
This returns the list of regions that are currently being colored in the editor.
}
@defmethod*[(((skip-whitespace (position natural-number?) (direction (symbols (quote forward) (quote backward))) (comments? boolean?)) natural-number?))]{
@defmethod*[(((skip-whitespace (position natural-number/c) (direction (symbols (quote forward) (quote backward))) (comments? boolean?)) natural-number/c))]{
Returns the next non-whitespace character.
Starts from position and skips whitespace in the direction indicated
@ -175,7 +175,7 @@
Must only be called while the tokenizer is started.
}
@defmethod*[(((backward-match (position natural-number?) (cutoff natural-number?)) (union natural-number? false?)))]{
@defmethod*[(((backward-match (position natural-number/c) (cutoff natural-number/c)) (or/c natural-number/c false?)))]{
Skip all consecutive whitespaces and comments (using @scheme[skip-whitespace])
immediately preceding the position. If the token at this position is
@ -185,14 +185,14 @@
Must only be called while the tokenizer is started.
}
@defmethod*[(((backward-containing-sexp (position natural-number?) (cutoff natural-number?)) (union natural-number? false?)))]{
@defmethod*[(((backward-containing-sexp (position natural-number/c) (cutoff natural-number/c)) (or/c natural-number/c false?)))]{
Return the starting position of the interior of the (non-atomic)
s-expression containing position, or @scheme[#f] is there is none.
Must only be called while the tokenizer is started.
}
@defmethod*[(((forward-match (position natural-number?) (cutoff natural-number?)) (union natural-number? false?)))]{
@defmethod*[(((forward-match (position natural-number/c) (cutoff natural-number/c)) (or/c natural-number/c false?)))]{
Skip all consecutive whitespaces and comments (using @scheme[skip-whitespace])
immediately following position. If the token at this position is an
@ -201,7 +201,7 @@
Must only be called while the tokenizer is started.
}
@defmethod*[(((insert-close-paren (position natural-number?) (char char?) (flash? boolean?) (fixup? boolean?)) void))]{
@defmethod*[(((insert-close-paren (position natural-number/c) (char char?) (flash? boolean?) (fixup? boolean?)) void?))]{
The @scheme[position] is the place to put the parenthesis, and @scheme[char] is the
parenthesis to be added (e.g., that the user typed). If @scheme[fixup?] is true, the right kind of closing
@ -236,7 +236,7 @@
It is called when the lexer's state changes from valid to invalid (and back).
The @racket[valid?] argument indicates if the lexer has finished running over the editor (or not).
The default method just returns @racket[(void)].
The default method just returns @racket[(void?)].
}
@defmethod[#:mode public-final (is-lexer-valid?) boolean?]{
@ -247,22 +247,22 @@
@defmixin[color:text-mixin (text:basic<%>) (color:text<%>)]{
Adds the functionality needed for on-the-fly coloring and parenthesis
matching based on incremental tokenization of the text.
@defmethod*[#:mode override (((lock) void))]{
@defmethod*[#:mode override (((lock) void?))]{
}
@defmethod*[#:mode override (((on-focus) void))]{
@defmethod*[#:mode override (((on-focus) void?))]{
}
@defmethod*[#:mode augment (((after-edit-sequence) void))]{
@defmethod*[#:mode augment (((after-edit-sequence) void?))]{
}
@defmethod*[#:mode augment (((after-set-position) void))]{
@defmethod*[#:mode augment (((after-set-position) void?))]{
}
@defmethod*[#:mode augment (((after-change-style) void))]{
@defmethod*[#:mode augment (((after-change-style) void?))]{
}
@defmethod*[#:mode augment (((on-set-size-constraint) void))]{
@defmethod*[#:mode augment (((on-set-size-constraint) void?))]{
}
@defmethod*[#:mode augment (((after-insert) void))]{
@defmethod*[#:mode augment (((after-insert) void?))]{
}
@defmethod*[#:mode augment (((after-delete) void))]{
@defmethod*[#:mode augment (((after-delete) void?))]{
}
}
@defclass[color:text% (color:text-mixin text:keymap%) ()]{}
@ -278,9 +278,9 @@
The arguments are passed to
@method[color:text<%> start-colorer].
}
@defmethod*[#:mode override (((on-disable-surrogate) void))]{
@defmethod*[#:mode override (((on-disable-surrogate) void?))]{
}
@defmethod*[#:mode override (((on-enable-surrogate) void))]{
@defmethod*[#:mode override (((on-enable-surrogate) void?))]{
}
}
@defclass[color:text-mode% (color:text-mode-mixin mode:surrogate-text%) ()]{}

View File

@ -73,10 +73,10 @@
}
@defclass[editor-snip:decorated-snipclass% snip-class% ()]{
@defmethod[(make-snip [stream-in (is-a?/c editor-stream-in%)]) -editor-snip:decorated<%>]{
@defmethod[(make-snip [stream-in (is-a?/c editor-stream-in%)]) (is-a?/c editor-snip:decorated<%>)]{
Returns an instance of @scheme[editor-snip:decorated%].
}
@defmethod[(read [stream-in (is-a?/c editor-stream-in%)]) editor-snip:decorated<%>]{
@defmethod[(read [stream-in (is-a?/c editor-stream-in%)]) (is-a?/c editor-snip:decorated<%>)]{
Calls @method[editor-snip:decorated-snipclass% make-snip] to get an object and
then invokes its @scheme[editor<%>]'s @method[editor<%> read-from-file] method
in order to read a snip from @scheme[stream-in], eg:

View File

@ -25,7 +25,7 @@
for more info about edit sequences.
}
@defmethod*[(((run-after-edit-sequence (thunk (-> void)) (tag (union symbol? #f) #f)) void))]{
@defmethod*[(((run-after-edit-sequence (thunk (-> void?)) (tag (or/c symbol? #f) #f)) void?))]{
This method is used to install callbacks that will be run after any
edit-sequence completes.
@ -40,7 +40,7 @@
@method[editor:basic<%> run-after-edit-sequence]'s argument will be called.
}
@defmethod*[(((get-top-level-window) (union #f (is-a?/c top-level-window<%>))))]{
@defmethod*[(((get-top-level-window) (or/c #f (is-a?/c top-level-window<%>))))]{
Returns the
@scheme[top-level-window<%>]
currently associated with this buffer.
@ -53,7 +53,7 @@
Returns @scheme[#t] if the file on disk has been modified, by some other program.
}
@defmethod*[(((save-file/gui-error (filename (union path #f) #f) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) same copy) (quote same)) (show-errors? boolean |#t|)) boolean?))]{
@defmethod*[(((save-file/gui-error (filename (or/c path? #f) #f) (format (or/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote same)) (show-errors? boolean? #t)) boolean?))]{
This method is an alternative to
@method[editor<%> save-file]. Rather than showing errors via the original stdout, it
opens a dialog with an error message showing the error.
@ -63,7 +63,7 @@
no error occurred and @scheme[#f] if an error occurred.
}
@defmethod*[(((load-file/gui-error (filename (union string #f) #f) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote guess)) (show-errors? boolean |#t|)) boolean?))]{
@defmethod*[(((load-file/gui-error (filename (or/c string? #f) #f) (format (or/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote guess)) (show-errors? boolean? #t)) boolean?))]{
This method is an alternative to
@method[editor<%> load-file]. Rather than showing errors via the original stdout, it
opens a dialog with an error message showing the error.
@ -73,7 +73,7 @@
no error occurred and @scheme[#f] if an error occurred.
}
@defmethod*[(((on-close) void))]{
@defmethod*[(((on-close) void?))]{
This method is called when an editor is closed.
Typically, this method is called when the frame
@ -119,7 +119,7 @@
@method[editor:basic<%> on-close].
}
@defmethod*[(((get-filename/untitled-name) string))]{
@defmethod*[(((get-filename/untitled-name) string?))]{
Returns the printed version of the filename for this
editor. If the editor doesn't yet have a filename, it
returns a symbolic name (something like "Untitled").
@ -155,7 +155,7 @@
This installs the global keymap @scheme[keymap:get-global] to
handle keyboard and mouse mappings not handled by @scheme[keymap]. The
global keymap is created when the framework is invoked.
@defmethod*[#:mode augment (((can-save-file? (filename string) (format symbol?)) boolean?))]{
@defmethod*[#:mode augment (((can-save-file? (filename string?) (format symbol?)) boolean?))]{
Checks to see if the file on the disk has been modified out
side of this editor, using
@ -163,7 +163,7 @@
If it has, this method prompts the user to be sure they want to save.
}
@defmethod*[#:mode augment (((after-save-file (success? boolean?)) void))]{
@defmethod*[#:mode augment (((after-save-file (success? boolean?)) void?))]{
If the current filename is not a temporary filename, this method calls
@scheme[handler:add-to-recent]with the current filename.
@ -175,14 +175,14 @@
@method[editor:basic<%> save-file-out-of-date?].
}
@defmethod*[#:mode augment (((after-load-file (success? boolean?)) void))]{
@defmethod*[#:mode augment (((after-load-file (success? boolean?)) void?))]{
Updates a private instance variable with the modification
time of the file, for using in implementing
@method[editor:basic<%> save-file-out-of-date?]
}
@defmethod*[#:mode override (((on-focus (on? boolean?)) void))]{
@defmethod*[#:mode override (((on-focus (on? boolean?)) void?))]{
Manages the state to implement
@method[editor:basic<%> has-focus?]
@ -192,12 +192,12 @@
Always returns @scheme[#t]. Updates a flag for
@method[editor:basic<%> local-edit-sequence?]
}
@defmethod*[#:mode augment (((after-edit-sequence) void))]{
@defmethod*[#:mode augment (((after-edit-sequence) void?))]{
Helps to implement
@method[editor:basic<%> run-after-edit-sequence].
}
@defmethod*[#:mode override (((on-new-box (type (union (quote pasteboard) (quote text)))) (instance editor-snip%)))]{
@defmethod*[#:mode override (((on-new-box (type (or/c (quote pasteboard) (quote text)))) (is-a?/c editor-snip%)))]{
Creates instances of
@scheme[pasteboard:basic%]
@ -209,7 +209,7 @@
@scheme[text%]
classes.
}
@defmethod[#:mode override (on-new-image-snip [filname (or/c path? false/c)]
@defmethod[#:mode override (on-new-image-snip [filename (or/c path? false/c)]
[kind (one-of/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)]
[relative-path? any/c]
[inline? any/c])
@ -270,7 +270,7 @@
@scheme[add-editor-keymap-functions],
@scheme[add-text-keymap-functions], and
@scheme[add-pasteboard-keymap-functions].
@defmethod*[(((get-keymaps) (list-of (instance keymap%))))]{
@defmethod*[(((get-keymaps) (list-of (is-a?/c keymap%))))]{
The keymaps returned from this method are chained to this
@scheme[editor<%>]'s keymap.
@ -310,14 +310,14 @@
}
@definterface[editor:file<%> (editor:keymap<%>)]{
Objects supporting this interface are expected to support files.
@defmethod*[(((get-can-close-parent) (union false (is-a/c? frame%) (is-a/c? dialog%))))]{
@defmethod*[(((get-can-close-parent) (or/c false (is-a?/c frame%) (is-a?/c dialog%))))]{
The result of this method is used as the parent for the
dialog that asks about closing.
Defaultly returns @scheme[#f].
}
@defmethod*[(((update-frame-filename) void))]{
@defmethod*[(((update-frame-filename) void?))]{
Attempts to find a frame that displays this editor. If it
does, it updates the frame's title based on a new filename
in the editor.
@ -347,7 +347,7 @@
The class that this mixin produces uses the same initialization
arguments as its input.
@defmethod*[#:mode override (((set-filename (name string) (temp? boolean #f)) void))]{
@defmethod*[#:mode override (((set-filename (name string?) (temp? boolean? #f)) void?))]{
Updates the filename on each frame displaying this editor, for each
frame that matches
@ -369,7 +369,7 @@
Also calls inner.
}
@defmethod*[#:mode override (((get-keymaps) (list-of (instance keymap%))))]{
@defmethod*[#:mode override (((get-keymaps) (list-of (is-a?/c keymap%))))]{
This returns a list containing the super-class's keymaps, plus the
result of
@ -399,7 +399,7 @@
Returns @scheme[#t].
}
@defmethod*[(((do-autosave) (union #f string)))]{
@defmethod*[(((do-autosave) (or/c #f path?)))]{
This method is called to perform the autosaving.
See also
@scheme[autosave:register]
@ -414,7 +414,7 @@
Returns the filename where the autosave took place, or
@scheme[#f] if none did.
}
@defmethod*[(((remove-autosave) void))]{
@defmethod*[(((remove-autosave) void?))]{
This method removes the autosave file associated with this
@scheme[editor<%>].
@ -438,15 +438,15 @@
backup file. For the backup file's name, see
@scheme[path-utils:generate-backup-name]
}
@defmethod*[#:mode augment (((on-close) void))]{
@defmethod*[#:mode augment (((on-close) void?))]{
Deletes the autosave file and turns off autosaving.
}
@defmethod*[#:mode augment (((on-change) void))]{
@defmethod*[#:mode augment (((on-change) void?))]{
Sets a flag indicating that this @scheme[editor<%>] needs to be autosaved.
}
@defmethod*[#:mode override (((set-modified (modified? any/c)) void))]{
@defmethod*[#:mode override (((set-modified (modified? any/c)) void?))]{
If the file is no longer modified, this method deletes the autosave
file. If it is, it updates a flag to indicate that the autosave file
@ -464,7 +464,7 @@
See also
@scheme[frame:text-info<%>].
@defmethod*[#:mode override (((lock (lock? boolean?)) void))]{
@defmethod*[#:mode override (((lock (lock? boolean?)) void?))]{
Uses
@method[editor:basic<%> run-after-edit-sequence]

View File

@ -10,13 +10,13 @@
Classes matching this interface support the basic
@scheme[frame%]
functionality required by the framework.
@defmethod*[(((get-area-container%) (is-a?/c area-container<%>)))]{
@defmethod*[(((get-area-container%) (implementation?/c area-container<%>)))]{
The class that this method returns is used to create the
@scheme[area-container<%>]
in this frame.
}
@defmethod*[(((get-area-container) (instance (is-a?/c area-container<%>))))]{
@defmethod*[(((get-area-container) (is-a?/c area-container<%>)))]{
This returns the main
@scheme[area-container<%>]
in the frame
@ -30,7 +30,7 @@
Return
@scheme[menu-bar%].
}
@defmethod*[(((make-root-area-container (class (is-a?/c area-container<%>)) (parent (instance (is-a?/c area-container<%>)))) (instance (is-a?/c area-container<%>))))]{
@defmethod*[(((make-root-area-container (class (implementation?/c area-container<%>)) (parent (is-a?/c area-container<%>))) (is-a?/c area-container<%>)))]{
Override this method to insert a panel in between the panel used by
the clients of this frame and the frame itself. For example, to insert
a status line panel override this method with something like this:
@ -74,14 +74,14 @@
(show #f)))])]
}
@defmethod*[(((editing-this-file? (filename path)) boolean?))]{
@defmethod*[(((editing-this-file? (filename path?)) boolean?))]{
Indicates if this frame contains this buffer (and can edit
that file).
Returns @scheme[#f].
}
@defmethod*[(((get-filename (temp (or/c #f (box boolean?)) #f)) (or/c #f path)))]{
@defmethod*[(((get-filename (temp (or/c #f (box boolean?)) #f)) (or/c #f path?)))]{
This returns the filename that the frame is currently being saved as,
or @scheme[#f] if there is no appropriate filename.
@ -91,7 +91,7 @@
If @scheme[temp] is a box, it is filled with @scheme[#t] or @scheme[#f],
depending if the filename is a temporary filename.
}
@defmethod*[(((make-visible (filename string)) void?))]{
@defmethod*[(((make-visible (filename string?)) void?))]{
Makes the file named by @scheme[filename] visible (intended for
use with tabbed editing).
@ -173,7 +173,7 @@
method.
}
@defmethod*[#:mode override (((on-drop-file (pathname string)) void?))]{
@defmethod*[#:mode override (((on-drop-file (pathname string?)) void?))]{
Calls
@scheme[handler:edit-file]
@ -206,7 +206,7 @@
@scheme[frame:setup-size-pref].
}
@defmethod*[#:mode override (((on-size (width number) (height number)) void?))]{
@defmethod*[#:mode override (((on-size (width number?) (height number?)) void?))]{
Updates the preferences, according to the width and
height. The preferences key is the one passed
@ -222,7 +222,7 @@
@defmixin[frame:register-group-mixin (frame:basic<%>) (frame:register-group<%>)]{
During initialization, calls
@method[group:% insert-frame]with @scheme[this].
@defmethod*[#:mode augment (((can-close?) bool))]{
@defmethod*[#:mode augment (((can-close?) boolean?))]{
Calls the inner method, with a default of @scheme[#t].
If that returns @scheme[#t],
@ -311,7 +311,7 @@
}
@defmixin[frame:status-line-mixin (frame:basic<%>) (frame:status-line<%>)]{
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c panel%)) (parent (instanceof (subclass?/c panel%)))) (is-a?/c panel%)))]{
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c panel%)) (parent (is-a?/c panel%))) (is-a?/c panel%)))]{
Adds a panel at the bottom of the frame to hold the status
lines.
@ -326,7 +326,7 @@
status line is visible and if it is @scheme[#f], the
status line is not visible (see
@scheme[preferences:get] for more info about preferences)
@defmethod*[(((determine-width (str string) (canvas (instance editor-canvas%)) (text (instance text%))) integer))]{
@defmethod*[(((determine-width (str string) (canvas (is-a?/c editor-canvas%)) (text (is-a?/c text%))) integer))]{
This method is used to calculate the size of an
@scheme[editor-canvas%]
with a particular set of characters in it.
@ -345,7 +345,7 @@
This method updates all of the information in the panel.
}
@defmethod*[(((set-info-canvas (canvas (instance canvas:basic%))) void?))]{
@defmethod*[(((set-info-canvas (canvas (or/c (is-a?/c canvas:basic%) #f))) void?))]{
Sets this canvas to be the canvas that the info frame shows info about. The
@method[canvas:info-mixin% on-focus]
and
@ -353,7 +353,7 @@
methods call this method to ensure that the info canvas is set correctly.
}
@defmethod*[(((get-info-canvas) (instance canvas:basic%)))]{
@defmethod*[(((get-info-canvas) (or/c (is-a?/c canvas:basic%) #f)))]{
Returns the canvas that the
@scheme[frame:info<%>]
currently shows info about. See also
@ -368,7 +368,7 @@
Returns the result of
@method[frame:editor<%> get-editor].
}
@defmethod*[(((get-info-panel) (instance horizontal-panel%)))]{
@defmethod*[(((get-info-panel) (is-a?/c horizontal-panel%)))]{
This method returns the panel where the information about this editor
is displayed.
@ -403,7 +403,7 @@
The result of this mixin uses the same initialization arguments as the
mixin's argument.
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c area-container<%>)) (parent (is-a?/c area-container<%>))) (instance area-container<%>)))]{
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c area-container<%>)) (parent (is-a?/c area-container<%>))) (is-a?/c area-container<%>)))]{
Builds an extra panel for displaying various information.
}
@ -489,11 +489,11 @@
@method[frame:editor<%> set-label-prefix].
}
@defmethod*[(((get-label-prefix) string))]{
@defmethod*[(((get-label-prefix) string?))]{
This returns the prefix for the frame's label.
}
@defmethod*[(((set-label-prefix (prefix string)) void?))]{
@defmethod*[(((set-label-prefix (prefix string?)) void?))]{
Sets the prefix for the label of the frame.
}
@ -506,13 +506,13 @@
Returns
@scheme[editor-canvas%].
}
@defmethod*[(((get-canvas<%>) (instance canvas:basic%)))]{
@defmethod*[(((get-canvas<%>) (is-a?/c canvas:basic%)))]{
The result of this method is used to guard the result of the
@method[frame:editor<%> get-canvas%]
method.
}
@defmethod*[(((get-editor%) (is-a?/c editor<%>)))]{
@defmethod*[(((get-editor%) (implementation?/c editor<%>)))]{
The result of this class is used to create the
@scheme[editor<%>]
in this frame.
@ -522,7 +522,7 @@
Returns the value of the init-field @scheme[editor%].
}
@defmethod*[(((get-editor<%>) interface))]{
@defmethod*[(((get-editor<%>) interface?))]{
The result of this method is used by
@method[frame:editor<%> make-editor]
to check that
@ -533,7 +533,7 @@
Returns
@scheme[editor<%>].
}
@defmethod*[(((make-editor) (instance (is-a?/c editor<%>))))]{
@defmethod*[(((make-editor) (is-a?/c editor<%>)))]{
This method is called to create the editor in this frame.
It calls
@method[frame:editor<%> get-editor<%>]
@ -571,14 +571,14 @@
Returns @scheme[#f] if the user cancells the file-choosing
dialog and returns @scheme[#t] otherwise.
}
@defmethod*[(((get-canvas) (instance (subclass?/c canvas%))))]{
@defmethod*[(((get-canvas) (is-a?/c canvas%)))]{
Returns the canvas used to display the
@scheme[editor<%>]
in this frame.
}
@defmethod*[(((get-editor) (instance (is-a?/c editor<%>))))]{
@defmethod*[(((get-editor) (is-a?/c editor<%>)))]{
Returns the editor in this frame.
}
}
@ -597,12 +597,12 @@
@defconstructor[((filename string?) (editor% (is-a?/c editor<%>)) (parent (or/c (is-a?/c frame%) false/c) #f) (width (or/c (integer-in 0 10000) false/c) #f) (height (or/c (integer-in 0 10000) false/c) #f) (x (or/c (integer-in -10000 10000) false/c) #f) (y (or/c (integer-in -10000 10000) false/c) #f) (style (listof (or/c (quote no-resize-border) (quote no-caption) (quote no-system-menu) (quote hide-menu-bar) (quote mdi-parent) (quote mdi-child) (quote toolbar-button) (quote float) (quote metal))) null) (enabled any/c #t) (border (integer-in 0 1000) 0) (spacing (integer-in 0 1000) 0) (alignment (list/c (or/c (quote left) (quote center) (quote right)) (or/c (quote top) (quote center) (quote bottom))) (quote (center top))) (min-width (integer-in 0 10000) graphical-minimum-width) (min-height (integer-in 0 10000) graphical-minimum-height) (stretchable-width any/c #t) (stretchable-height any/c #t))]{
}
@defmethod*[#:mode override (((get-filename) (or/c #f path)))]{
@defmethod*[#:mode override (((get-filename) (or/c #f path?)))]{
Returns the filename in the editor returned by
@method[frame:editor<%> get-editor].
}
@defmethod*[#:mode override (((editing-this-file? (filename path)) boolean?))]{
@defmethod*[#:mode override (((editing-this-file? (filename path?)) boolean?))]{
Returns @scheme[#t] if the filename is the file that this
frame is editing.
@ -619,7 +619,7 @@
@scheme[editor:basic<%>]'s method
@method[editor:basic<%> can-close?].
}
@defmethod*[#:mode override (((get-label) string))]{
@defmethod*[#:mode override (((get-label) string?))]{
Returns the portion of the label after the hyphen. See also
@method[frame:editor<%> get-entire-label].
@ -629,7 +629,7 @@
Sets the label, but preserves the label's prefix. See also
@method[frame:editor<%> set-label-prefix].
}
@defmethod*[#:mode override (((file-menu:open-callback (item any) (evt mouse-event)) void?))]{
@defmethod*[#:mode override (((file-menu:open-callback (item (is-a?/c menu-item<%>)) (evt (is-a?/c mouse-event%))) void?))]{
Calls
@scheme[handler:open-file]
@ -689,7 +689,7 @@
Creates a Print Setup menu item.
}
@defmethod*[#:mode override (((edit-menu:between-select-all-and-find (edit-menu (instance menu%))) void?))]{
@defmethod*[#:mode override (((edit-menu:between-select-all-and-find (edit-menu (is-a?/c menu%))) void?))]{
Adds a menu item for toggling
@method[editor<%> auto-wrap]
@ -751,7 +751,7 @@
Sets the label of @scheme[item] to
@scheme["New..."] if the preference @scheme['framework:open-here?] is set.
}
@defmethod*[#:mode override (((file-menu:new-callback (item (instance (subclass?/c menu-item%))) (evt (instance control-event%))) void?))]{
@defmethod*[#:mode override (((file-menu:new-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{
When the preference @scheme['framework:open-here?]
preference is set, this method prompts the user, asking if
@ -823,7 +823,7 @@
in these method descriptions refers to the
original editor and the term @bold{delegatee} refers to the
editor showing the 20,000 feet overview.
@defmethod*[(((get-delegated-text) (instanceof (is-a?/c text:delegate<%>))))]{
@defmethod*[(((get-delegated-text) (is-a?/c text:delegate<%>)))]{
Returns the delegate text.
}
@ -868,7 +868,7 @@
@defmixin[frame:delegate-mixin (frame:status-line<%> frame:text<%>) (frame:delegate<%>)]{
Adds support for a 20,000-feet view via
@scheme[text:delegate<%>] and @scheme[text:delegate-mixin]
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c panel%)) (parent (instanceof (subclass?/c panel%)))) (is-a?/c panel%)))]{
@defmethod*[#:mode override (((make-root-area-container (class (subclass?/c panel%)) (parent (is-a?/c panel%))) (is-a?/c panel%)))]{
adds a panel outside to hold the delegate
@scheme[editor-canvas%] and @scheme[text%].
@ -1019,7 +1019,7 @@
}
@defmixin[frame:searchable-text-mixin (frame:text<%> frame:searchable<%>) (frame:searchable-text<%>)]{
@defmethod*[#:mode override-final (((get-text-to-search) (instanceof text%)))]{
@defmethod*[#:mode override-final (((get-text-to-search) (is-a?/c text%)))]{
Returns the result of
@method[frame:editor<%> get-editor].

View File

@ -14,7 +14,7 @@
@scheme[frame:basic-mixin]
adds itself to the result of
@scheme[group:get-the-frame-group].
@defmethod*[(((set-open-here-frame (frame (is-a?/c frame:editor%))) void))]{
@defmethod*[(((set-open-here-frame (frame (is-a?/c frame:editor%))) void?))]{
Sets the frame to load new files into.
See also
@scheme[frame:open-here<%>].
@ -26,16 +26,16 @@
to load new files into.
}
@defmethod*[(((get-mdi-parent) (or/c false/c (instance frame%))))]{
@defmethod*[(((get-mdi-parent) (or/c false/c (is-a?/c frame%))))]{
The result of this method must be used as the parent frame for each
frame in the group.
}
@defmethod*[(((get-frames) (list-of (instance frame:basic<%>))))]{
@defmethod*[(((get-frames) (list-of (is-a?/c frame:basic<%>))))]{
Returns the frames in the group.
}
@defmethod*[(((frame-label-changed (frame (is-a?/c frame:basic<%>))) void))]{
@defmethod*[(((frame-label-changed (frame (is-a?/c frame:basic<%>))) void?))]{
This method is called by frames constructed with
@scheme[frame:basic-mixin]
when their titles change.
@ -43,7 +43,7 @@
Updates the windows menu of each frame in the group.
}
@defmethod*[(((frame-shown/hidden) void))]{
@defmethod*[(((frame-shown/hidden) void?))]{
This method is called by instances of
@scheme[frame:basic%]
to notify the frame group that
@ -52,7 +52,7 @@
Updates the Windows menus of all of the frames in the frame group.
}
@defmethod*[(((for-each-frame (f ((instance frame:basic<%>) -> void))) void))]{
@defmethod*[(((for-each-frame (f ((is-a?/c frame:basic<%>) -> void?))) void?))]{
This method applies a function to each frame in the group. It also
remembers the function and applies it to any new frames that are added
to the group when they are added.
@ -68,17 +68,17 @@
group.
}
@defmethod*[(((set-active-frame (frame (is-a?/c frame:basic<%>))) void))]{
@defmethod*[(((set-active-frame (frame (is-a?/c frame:basic<%>))) void?))]{
Sets the active frame in the group.
This method is called by
@method[frame:register-group-mixin on-activate].
}
@defmethod*[(((insert-frame (frame (is-a?/c frame:basic<%>))) void))]{
@defmethod*[(((insert-frame (frame (is-a?/c frame:basic<%>))) void?))]{
Inserts a frame into the group.
}
@defmethod*[(((remove-frame (frame (is-a?/c frame:basic<%>))) void))]{
@defmethod*[(((remove-frame (frame (is-a?/c frame:basic<%>))) void?))]{
Removes a frame from the group.
@ -89,7 +89,7 @@
@method[group:% can-close-all?].
}
@defmethod*[(((on-close-all) void))]{
@defmethod*[(((on-close-all) void?))]{
Call this method to close all of the frames in the group.
The function
@method[group:% can-close-all?]
@ -104,7 +104,7 @@
method (with @scheme[#f] as argument)
on each frame in the group.
}
@defmethod*[(((can-close-all?) void))]{
@defmethod*[(((can-close-all?) void?))]{
Call this method to make sure that closing all of the frames in the frame groups is
permitted by the user. The function
@method[group:% on-close-all]

View File

@ -7,16 +7,16 @@
@definterface[keymap:aug-keymap<%> (keymap%)]{
This keymap overrides some of the built in @scheme[keymap%] methods
to be able to extract the keybindings from the keymap.
@defmethod*[(((get-chained-keymaps) (listof (instance keymap%))))]{
@defmethod*[(((get-chained-keymaps) (listof (is-a?/c keymap%))))]{
Returns the list of keymaps that are chained to this one.
}
@defmethod*[(((get-map-function-table) hash-table))]{
@defmethod*[(((get-map-function-table) hash?))]{
Returns a hash-table that maps symbols naming key sequences to the
names of the keymap functions the are bound to.
}
@defmethod*[(((get-map-function-table/ht (ht hash-table)) hash-table))]{
@defmethod*[(((get-map-function-table/ht (ht hash?)) hash?))]{
This is a helper function for
@method[keymap:aug-keymap<%> get-map-function-table]
@ -26,7 +26,7 @@
}
}
@defmixin[keymap:aug-keymap-mixin (keymap%) (keymap:aug-keymap<%>)]{
@defmethod*[#:mode override (((chain-to-keymap (next (instance keymap%)) (prefix? boolean?)) void))]{
@defmethod*[#:mode override (((chain-to-keymap (next (is-a?/c keymap%)) (prefix? boolean?)) void))]{
Keeps a list of the keymaps chained to this one.
}

View File

@ -7,7 +7,7 @@
@definterface[menu:can-restore<%> (selectable-menu-item<%>)]{
Classes created with this mixin remember their keybindings so the
keybindings can be removed and then restored.
@defmethod*[(((restore-keybinding) void))]{
@defmethod*[(((restore-keybinding) void?))]{
Sets the keyboard shortcut to the setting it had when the class was
created.
@ -25,13 +25,13 @@
is @scheme[#f], calls
@method[menu:can-restore-underscore<%> erase-underscores]
during initialization.
@defmethod*[(((erase-underscores) void))]{
@defmethod*[(((erase-underscores) void?))]{
Erases the underscores in the label of this menu, but
remembers them so they can be restores with
@method[menu:can-restore-underscore<%> restore-underscores].
}
@defmethod*[(((restore-underscores) void))]{
@defmethod*[(((restore-underscores) void?))]{
Restores underscores in the menu's label to their original
state.

View File

@ -7,7 +7,7 @@
@definterface[panel:single<%> (area-container<%>)]{
See
@scheme[panel:single-mixin%].
@defmethod*[(((active-child (child (is-a?/c area<%>))) void) ((active-child) (is-a?/c area<%>)))]{
@defmethod*[(((active-child (child (is-a?/c area<%>))) void?) ((active-child) (is-a?/c area<%>)))]{
Sets the active child to be @scheme[child]
@ -27,17 +27,17 @@
The
@method[window<%> show]
method is used to hide and show the children of a single panel.
@defmethod*[#:mode override (((after-new-child (child subarea<%>)) void))]{
@defmethod*[#:mode override (((after-new-child (child (is-a?/c subarea<%>))) void?))]{
Hides this child by calling @scheme[(send child show #f)], unless
this is the first child in which case it does nothing.
}
@defmethod*[#:mode override (((container-size) (values exact-integer exact-integer)))]{
@defmethod*[#:mode override (((container-size) (values exact-integer? exact-integer?)))]{
Returns the maximum width of all the children and the maximum height
of all of the children.
}
@defmethod*[#:mode override (((place-children) (listof (list exact-integer exact-integer exact-integer exact-integer))))]{
@defmethod*[#:mode override (((place-children) (listof (list/c exact-integer? exact-integer? exact-integer? exact-integer?))))]{
Returns the positions for single panels and panes.
}
@ -47,7 +47,7 @@
}
@defmixin[panel:single-window-mixin (panel:single<%> window<%>) (panel:single-window<%>)]{
@defmethod*[#:mode override (((container-size (info (list-of (list exact-integer exact-integer boolean boolean?)))) (values exact-integer exact-integer)))]{
@defmethod*[#:mode override (((container-size (info (listof (list/c exact-integer? exact-integer? boolean? boolean?)))) (values exact-integer? exact-integer?)))]{
Factors the border width into the size calculation.
}
@ -59,7 +59,7 @@
user can adjust the percentage of the space that each takes
up. The user adjusts the size by clicking and dragging the
empty space between the children.
@defmethod*[(((after-percentage-change) void))]{
@defmethod*[(((after-percentage-change) void?))]{
This method is called when the user changes the percentage
by dragging the bar between the children, or when a new
child is added to the frame, but not when
@ -72,7 +72,7 @@
}
@defmethod*[(((set-percentages (new-percentages (listof number))) void))]{
@defmethod*[(((set-percentages (new-percentages (listof number?))) void?))]{
Call this method to set the percentages that each window
takes up of the panel.
@ -85,7 +85,7 @@
minimum with of the child, as reported by
@method[area<%> min-width].
}
@defmethod*[(((get-percentages) (listof numbers)))]{
@defmethod*[(((get-percentages) (listof number?)))]{
Return the current percentages of the children.
}
@ -124,24 +124,25 @@
method is overridden.
@defmethod*[#:mode override (((after-new-child (child (instance-of (is-a?/c area<%>)))) void))]{
@defmethod*[#:mode override (((after-new-child (child (is-a?/c subarea<%>))) void?))]{
Updates the number of percentages to make sure that it
matches the number of children and calls
@method[panel:dragable<%> after-percentage-change].
}
@defmethod*[#:mode override (((on-subwindow-event (receiver (instanceof window<%>)) (event (instanceof mouse-event%))) boolean?))]{
@defmethod*[#:mode override (((on-subwindow-event (receiver (is-a?/c window<%>)) (event (is-a?/c mouse-event%))) boolean?))]{
When the cursor is dragging the middle bar around, this
method handles the resizing of the two panes.
}
@defmethod*[#:mode override (((place-children (info (list-of (list exact-int exact-int))) (w exact-int) (h exact-int)) (list-of (list exact-int exact-int exact-int exact-int))))]{
@defmethod*[#:mode override (((place-children (info (listof (list/c exact-integer? exact-integer?))) (w exact-integer?) (h exact-integer?)) (listof (list/c exact-integer? exact-integer? exact-integer? exact-integer?))))]{
Places the children vertically in the panel, based on the percentages
returned from
@method[panel:dragable<%> get-percentages]. Also leaves a little gap between each pair of children.
}
@defmethod*[#:mode override (((container-size (info list)) two))]{
@defmethod*[#:mode override (((container-size (info (listof (list/c exact-integer? exact-integer? any/c any/c))))
(values exact-integer? exact-integer?)))]{
Computes the minimum size the panel would have to be in
order to have the current percentages (see
@ -171,37 +172,37 @@
Returns @scheme[#f].
}
}
@defclass[panel:vertical-dragable% (panel:vertical-dragable-mixin (panel:dragable-mixin vertical-panel%)) ()]{}
@defclass[panel:horizontal-dragable% (panel:horizontal-dragable-mixin (panel:dragable-mixin horizontal-panel%)) ()]{}
@defclass[panel:vertical-dragable% (panel:vertical-dragable-mixin (panel:dragable-mixin panel%)) ()]{}
@defclass[panel:horizontal-dragable% (panel:horizontal-dragable-mixin (panel:dragable-mixin panel%)) ()]{}
@definterface[panel:splitter<%> ()]{
A panel that implements @scheme[panel:splitter<%>]. Children can be split
horizonally or vertically.
}
@defmixin[panel:splitter-mixin (area-container<%> panel:dragable<%>) (splitter<%>)]{
@defmixin[panel:splitter-mixin (area-container<%> panel:dragable<%>) (panel:splitter<%>)]{
This mixin allows panels to split their children either horizontally or
vertically. Children that are split can be further split independant of any
other splitting.
@defmethod[(split-vertical (canvas (instance-of (is-a?/c canvas<%>)))
(maker (-> (instance-of (is-a?/c splitter<%>))
(instance-of (is-a?/c canvas<%>)))))
(instance-of (is-a?/c canvas<%>))]{
@defmethod[(split-vertical (canvas (is-a?/c canvas<%>))
(maker (-> (is-a?/c panel:splitter<%>)
(is-a?/c canvas<%>))))
(is-a?/c canvas<%>)]{
Splits the @scheme[canvas] vertically by creating a new instance using
@scheme[maker]. This splitter object is passed as the argument to
@scheme[maker] and should be used as the @scheme[parent] field of the newly
created canvas.
}
@defmethod[(split-horizontal (canvas (instance-of (is-a?/c canvas<%>)))
(maker (-> (instance-of (is-a?/c splitter<%>))
(instance-of (is-a?/c canvas<%>)))))
(instance-of (is-a?/c canvas<%>))]{
@defmethod[(split-horizontal (canvas (is-a?/c canvas<%>))
(maker (-> (is-a?/c panel:splitter<%>)
(is-a?/c canvas<%>))))
(is-a?/c canvas<%>)]{
Similar to @scheme[split-vertical] but splits horizontally.
}
@defmethod[(collapse (canvas (instance-of (is-a?/c canvas<%>)))) void]{
@defmethod[(collapse (canvas (is-a?/c canvas<%>))) void]{
Removes the given @scheme[canvas] from the splitter hierarchy and collapses
any split panes as necessary.
}

View File

@ -5,46 +5,49 @@
@title{Racket}
@definterface[scheme:sexp-snip<%> ()]{
@defmethod*[(((get-saved-snips) (listof snip%)))]{
@defmethod*[(((get-saved-snips) (listof (is-a?/c snip%))))]{
This returns the list of snips hidden by the sexp snip.
}
}
@defclass[scheme:sexp-snip% snip% (scheme:sexp-snip<%> readable-snip<%>)]{
@defmethod*[#:mode override
(((get-text (offset number) (num number)
(flattened? boolean #f))
string))]{
(((get-text (offset number?) (num number?)
(flattened? boolean? #f))
string?))]{
Returns the concatenation of the text for all of the hidden snips.
}
@defmethod*[#:mode override (((copy) (is-a?/c scheme:sexp-snip%)))]{
Returns a copy of this snip that includes the hidden snips.
}
@defmethod*[#:mode override (((write (stream-out editor-stream-out%)) void))]{
@defmethod*[#:mode override (((write (stream-out (is-a?/c editor-stream-out%))) void?))]{
Saves the embedded snips
}
@defmethod*[#:mode override
(((draw (dc dc<%>) (x real) (y real)
(left real) (top real) (right real) (bottom real)
(dx real) (dy real) (draw-caret symbol?))
void))]{
(((draw (dc dc<%>) (x real?) (y real?)
(left real?) (top real?) (right real?) (bottom real?)
(dx real?) (dy real?) (draw-caret symbol?))
void?))]{
Draws brackets with a centered ellipses between them.
}
@defmethod*[#:mode override
(((get-extent (dc (is-a?/c dc<%>)) (x real) (y real)
(w boxed #f) (h boxed #f)
(descent boxed #f) (space boxed #f)
(lspace boxed #f) (rspace boxed #f))
void))]{
(((get-extent (dc (is-a?/c dc<%>)) (x real?) (y real?)
(w (or/c (box/c (and/c real? (not/c negative?))) #f) #f)
(h (or/c (box/c (and/c real? (not/c negative?))) #f) #f)
(descent (or/c (box/c (and/c real? (not/c negative?))) #f) #f)
(space (or/c (box/c (and/c real? (not/c negative?))) #f) #f)
(lspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f)
(rspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f))
void?))]{
Returns a size corresponding to what this snip draws.
}
}
@definterface[scheme:text<%> (text:basic<%> mode:host-text<%> color:text<%>)]{
Texts matching this interface support Racket mode operations.
@defmethod*[(((get-limit (start exact-integer)) int))]{
@defmethod*[(((get-limit (start exact-integer?)) exact-integer?))]{
Returns a limit for backward-matching parenthesis starting at
position @scheme[start].
}
@defmethod*[(((balance-parens (key-event (instance key-event%))) void))]{
@defmethod*[(((balance-parens (key-event (is-a?/c key-event%))) void?))]{
This function is called when the user types a close parenthesis in
the @scheme[text%]. If the close parenthesis that the user inserted
does not match the corresponding open parenthesis and the
@ -60,20 +63,20 @@
Override it to change its behavior.
}
@defmethod*[(((tabify (start-pos exact-integer
@defmethod*[(((tabify (start-pos exact-integer?
(send this text get-start-position)))
void))]{
void?))]{
Tabs the line containing by @scheme[start-pos]
}
@defmethod*[(((tabify-selection (start exact-integer) (end exact-integer))
void))]{
@defmethod*[(((tabify-selection (start exact-integer?) (end exact-integer?))
void?))]{
Sets the tabbing for the lines containing positions @scheme[start]
through @scheme[end].
}
@defmethod*[(((tabify-all) void))]{
@defmethod*[(((tabify-all) void?))]{
Tabs all lines.
}
@defmethod*[(((insert-return) void))]{
@defmethod*[(((insert-return) void?))]{
Inserts a newline into the buffer. If
@method[scheme:text<%> tabify-on-return?] returns @scheme[#t], this
will tabify the new line.
@ -81,7 +84,7 @@
@defmethod*[(((box-comment-out-selection
(start-pos (or/c (symbols 'start) exact-integer?))
(end-pos (or/c (symbols 'end) exact-integer?)))
void))]{
void?))]{
This method comments out a selection in the text by putting it into
a comment box.
@ -93,109 +96,107 @@
selection is used. If @scheme[end-pos] is @scheme['end], the ending
point of the selection is used.
}
@defmethod*[(((comment-out-selection (start exact-integer)
(end exact-integer))
void))]{
@defmethod*[(((comment-out-selection (start exact-integer?)
(end exact-integer?))
void?))]{
Comments the lines containing positions @scheme[start] through
@scheme[end] by inserting a semi-colon at the front of each line.
}
@defmethod*[(((uncomment-selection (start int) (end int)) void))]{
@defmethod*[(((uncomment-selection (start exact-integer?) (end exact-integer?)) void?))]{
Uncomments the lines containing positions @scheme[start] through
@scheme[end].
}
@defmethod*[(((get-forward-sexp (start exact-integer))
(union #f exact-integer)))]{
@defmethod*[(((get-forward-sexp (start exact-integer?))
(or/c #f exact-integer?)))]{
Returns the position of the end of next S-expression after position
@scheme[start], or @scheme[#f] if there is no appropriate answer.
}
@defmethod*[(((remove-sexp (start exact-integer)) void))]{
@defmethod*[(((remove-sexp (start exact-integer?)) void?))]{
Forward-deletes the S-expression starting after the position
@scheme[start].
}
@defmethod*[(((forward-sexp (start |#t|)) exact-integer))]{
@defmethod*[(((forward-sexp (start exact-integer?)) void?))]{
Moves forward over the S-expression starting at position
@scheme[start].
}
@defmethod*[(((flash-forward-sexp (start-pos exact-integer)) void))]{
@defmethod*[(((flash-forward-sexp (start-pos exact-integer?)) void?))]{
Flashes the parenthesis that closes the sexpression at
@scheme[start-pos].
}
@defmethod*[(((get-backward-sexp (start exact-integer))
(union exact-integer #f)))]{
@defmethod*[(((get-backward-sexp (start exact-integer?))
(or/c exact-integer? #f)))]{
Returns the position of the start of the S-expression before or
containing @scheme[start], or @scheme[#f] if there is no appropriate
answer.
}
@defmethod*[(((flash-backward-sexp (start-pos exact-integer)) void))]{
@defmethod*[(((flash-backward-sexp (start-pos exact-integer?)) void?))]{
Flashes the parenthesis that opens the sexpression at
@scheme[start-pos].
}
@defmethod*[(((backward-sexp (start-pos exact-integer)) void))]{
@defmethod*[(((backward-sexp (start-pos exact-integer?)) void?))]{
Move the caret backwards one sexpression
Moves the caret to the beginning of the sexpression that ends at
@scheme[start-pos].
}
@defmethod*[(((find-up-sexp (start-pos exact-integer))
(union #f exact-integer)))]{
@defmethod*[(((find-up-sexp (start-pos exact-integer?))
(or/c #f exact-integer?)))]{
Returns the position of the beginning of the next sexpression
outside the sexpression that contains @scheme[start-pos]. If there
is no such sexpression, it returns @scheme[#f].
}
@defmethod*[(((up-sexp (start exact-integer)) void))]{
@defmethod*[(((up-sexp (start exact-integer?)) void?))]{
Moves backward out of the S-expression containing the position
@scheme[start].
}
@defmethod*[(((find-down-sexp (start-pos exact-integer))
(union #f exact-integer)))]{
@defmethod*[(((find-down-sexp (start-pos exact-integer?))
(or/c #f exact-integer?)))]{
Returns the position of the beginning of the next sexpression inside
the sexpression that contains @scheme[start-pos]. If there is no
such sexpression, it returns @scheme[#f].
}
@defmethod*[(((down-sexp (start exact-integer)) void))]{
@defmethod*[(((down-sexp (start exact-integer?)) void?))]{
Moves forward into the next S-expression after the position
@scheme[start].
}
@defmethod*[(((remove-parens-forward (start exact-integer)) void))]{
@defmethod*[(((remove-parens-forward (start exact-integer?)) void?))]{
Removes the parentheses from the S-expression starting after the
position @scheme[start].
}
@defmethod*[(((select-forward-sexp (start exact-integer)) |#t|))]{
Selects the next S-expression, starting at position @scheme[start].
@defmethod*[(((select-forward-sexp) void?))]{
Selects the next S-expression, starting at the start of the current selection.
}
@defmethod*[(((select-backward-sexp (start exact-integer)) |#t|))]{
Selects the previous S-expression, starting at position
@scheme[start].
@defmethod*[(((select-backward-sexp) void?))]{
Selects the previous S-expression, starting at the start of the current selection.
}
@defmethod*[(((select-up-sexp (start exact-integer)) |#t|))]{
Selects the region to the enclosing S-expression, starting at
position @scheme[start].
@defmethod*[(((select-up-sexp) void?))]{
Selects the region to the enclosing S-expression, starting at the start of the current selection.
}
@defmethod*[(((select-down-sexp (start exact-integer)) |#t|))]{
Selects the region to the next contained S-expression, starting at
position @scheme[start].
@defmethod*[(((select-down-sexp) void?))]{
Selects the region to the next contained S-expression, starting at the start of the current selection.
}
@defmethod*[(((transpose-sexp (start exact-integer)) void))]{
Swaps the S-expression beginning before the position @scheme[start]
with the next S-expression following @scheme[start].
@defmethod*[(((transpose-sexp (start exact-integer?)) void?))]{
Swaps the S-expression beginning before the position @scheme[start] with
the next S-expression following @scheme[start].
}
@defmethod*[(((mark-matching-parenthesis (pos exact-positive-integer))
void))]{
If the paren after @scheme[pos] is matched, this method highlights
it and its matching counterpart in dark green.
@defmethod*[(((mark-matching-parenthesis (pos exact-positive-integer?)) void?))]{
If the paren after @scheme[pos] is matched, this method
highlights it and its matching counterpart in dark green.
}
@defmethod*[(((get-tab-size) exact-integer))]{
@defmethod*[(((get-tab-size) exact-integer?))]{
This method returns the current size of the tabs for scheme mode.
See also @method[scheme:text<%> set-tab-size].
}
@defmethod*[(((set-tab-size (new-size exact-integer)) void))]{
@defmethod*[(((set-tab-size (new-size exact-integer?)) void?))]{
This method sets the tab size for this text.
}
@defmethod*[(((introduce-let-ans) void))]{
@defmethod*[(((introduce-let-ans (start-pos exact-integer?)) void?))]{
Adds a let around the current s-expression and a printf into the
body of the let.
}
@defmethod*[(((move-sexp-out) void))]{
@defmethod*[(((move-sexp-out (start-pos exact-integer?)) void?))]{
Replaces the sexpression surrounding the insertion point with the
sexpression following the insertion point.
}
@ -207,9 +208,8 @@
The result of this mixin uses the same initialization arguments as the
mixin's argument.
@defmethod*[#:mode override
(((get-word-at (pos positive-exact-integer)) string))]{
(((get-word-at (pos exact-positive-integer?)) string?))]{
Returns the word just before @scheme[pos], which is then used as the
prefix for auto-completion.
}
@ -233,11 +233,11 @@
into. The resulting mode assumes that it is only set to an editor
that is the result of @scheme[scheme:text-mixin].
@defmethod*[#:mode override (((on-disable-surrogate) void))]{
@defmethod*[#:mode override (((on-disable-surrogate) void?))]{
Removes the scheme keymap (see also @scheme[scheme:get-keymap]) and
disables any parenthesis highlighting in the host editor.
}
@defmethod*[#:mode override (((on-enable-surrogate) void))]{
@defmethod*[#:mode override (((on-enable-surrogate) void?))]{
Adds the scheme keymap (see also @scheme[scheme:get-keymap]) and
enables a parenthesis highlighting in the host editor.
}

View File

@ -13,7 +13,7 @@
(caret-space boolean? #f)
(priority (symbols 'high 'low) 'low)
(style (symbols 'rectangle 'ellipse 'hollow-ellipse 'dot) 'rectangle))
(-> void)))]{
(-> void?)))]{
This function highlights a region of text in the buffer.
The range between @scheme[start] and @scheme[end] will
@ -87,7 +87,7 @@
@method[text:basic<%> set-styles-fixed]when setting the styles.
}
@defmethod*[(((set-styles-fixed (fixed? boolean?)) void))]{
@defmethod*[(((set-styles-fixed (fixed? boolean?)) void?))]{
Sets the styles fixed parameter of this
@scheme[text%]. See also
@method[text:basic<%> get-styles-fixed]
@ -95,7 +95,7 @@
@method[text:basic<%> get-fixed-style].
}
@defmethod*[(((move/copy-to-edit (dest-text (instance text%)) (start exact-integer) (end exact-integer) (dest-pos exact-integer)) void))]{
@defmethod*[(((move/copy-to-edit (dest-text (is-a?/c text%)) (start exact-integer?) (end exact-integer?) (dest-pos exact-integer?)) void?))]{
This moves or copies text and snips to another edit.
@ -107,7 +107,7 @@
moved. A snip may refuse to be moved by returning @scheme[#f] from
@method[snip% release-from-owner].
}
@defmethod*[(((initial-autowrap-bitmap) (union #f (instance bitmap%))))]{
@defmethod*[(((initial-autowrap-bitmap) (or/c #f (is-a?/c bitmap%))))]{
The result of this method is used as the initial autowrap
bitmap. Override this method to change the initial
@scheme[bitmap%]. See also
@ -117,7 +117,7 @@
Defaultly returns the result of
@scheme[icon:get-autowrap-bitmap]
}
@defmethod*[(((get-port-name) symbol?))]{
@defmethod*[(((get-port-name) (or/c path-string? symbol? #f)))]{
The result of this method is a symbol that identifies this
editor and that is used as the port-name of a port that is
@ -125,7 +125,7 @@
See also
@method[text:basic<%> port-name-matches?].
}
@defmethod*[(((port-name-matches? (id (or/c path? symbol?))) boolean?))]{
@defmethod*[(((port-name-matches? (id any/c)) boolean?))]{
Indicates if @scheme[id] matches the port name of this file. If
the file is saved, the port name matches when the save file
@ -157,22 +157,22 @@
The class that this mixin produces uses the same initialization
arguments as its input.
@defmethod*[#:mode override (((on-paint (before? any/c) (dc (is-a?/c dc<%>)) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (one-of/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void))]{
@defmethod*[#:mode override (((on-paint (before? any/c) (dc (is-a?/c dc<%>)) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (one-of/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void?))]{
Draws the rectangles installed by
@method[text:basic<%> highlight-range].
}
@defmethod*[#:mode augment (((on-insert (start exact-int) (end exact-int)) void))]{
@defmethod*[#:mode augment (((on-insert (start exact-nonnegative-integer?) (end exact-nonnegative-integer?)) void?))]{
See
@method[text:basic<%> set-styles-fixed].
}
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void))]{
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{
See
@method[text:basic<%> set-styles-fixed].
}
@defmethod*[#:mode override (((put-file (directory path) (default-name path)) void))]{
@defmethod*[#:mode override (((put-file (directory (or/c path? #f)) (default-name string?)) (or/c path? #f)))]{
Like
@method[editor<%> put-file]
@ -268,7 +268,7 @@
This mixin changes the default text style to have
the foreground color controlled by
@scheme[editor:set-default-font-color].
@defmethod*[#:mode override (((default-style-name) string))]{
@defmethod*[#:mode override (((default-style-name) string?))]{
Returns the result of
@scheme[editor:get-default-color-style-name].
@ -287,7 +287,7 @@
}
@defmixin[text:hide-caret/selection-mixin (text:basic<%>) (text:hide-caret/selection<%>)]{
@defmethod*[#:mode augment (((after-set-position) void))]{
@defmethod*[#:mode augment (((after-set-position) void?))]{
Calls
@method[text% hide-caret]
@ -301,12 +301,12 @@
}
@defmixin[text:nbsp->space-mixin (text%) (text:nbsp->space<%>)]{
@defmethod*[#:mode augment (((on-insert (start exact-int) (end exact-int)) void))]{
@defmethod*[#:mode augment (((on-insert (start exact-nonnegative-integer?) (end exact-nonnegative-integer?)) void?))]{
Starts an edit-sequence by calling
@method[editor<%> begin-edit-sequence].
}
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-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)]
@ -332,7 +332,7 @@
}
@defmixin[text:normalize-paste-mixin (text:basic<%>) (text:normalize-paste<%>)]{
@defmethod[#:mode override (do-paste [start exact-nonnegative-integer?] [time (and/c exact? integer?)]) void?]{
@defmethod[#:mode override (do-paste [start exact-nonnegative-integer?] [time exact-integer?]) void?]{
Overridden to detect when insertions are due to pasting. Sets some internal state and calls the super.
}
@defmethod[#:mode augment (on-insert [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{
@ -391,8 +391,8 @@
}
@defmethod[(get-search-bubbles)
(listof (list/c (cons/c number number)
(list/c number number number)))]{
(listof (list/c (cons/c number? number?)
(list/c number? number? number?)))]{
Returns information about the search bubbles in the editor. Each
item in the outermost list corresponds to a single bubble. The pair
of numbers is the range of the bubble and the triple of numbers is
@ -417,7 +417,7 @@
The result of this mixin uses the same initialization arguments as the
mixin's argument.
@defmethod*[#:mode override (((get-keymaps) (list-of (instance keymap%))))]{
@defmethod*[#:mode override (((get-keymaps) (listof (is-a?/c keymap%))))]{
This returns a list containing the super-class's keymaps, plus the
result of
@ -446,7 +446,7 @@
@defconstructor[((return (-> boolean?)))]{
}
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void))]{
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void?))]{
If @scheme[key] is either return or newline, only invoke the @scheme[return]
thunk (initialization argument) and do nothing else.
@ -454,7 +454,7 @@
}
@definterface[text:wide-snip<%> (text:basic<%>)]{
@defmethod*[(((add-wide-snip (snip (instance snip%))) void))]{
@defmethod*[(((add-wide-snip (snip (is-a?/c snip%))) void?))]{
Registers a snip in this editor to be resized when its viewing area
changes. Ensures the snip is as wide as the viewing area.
@ -462,7 +462,7 @@
@xmethod[canvas:wide-snip<%> add-wide-snip].
}
@defmethod*[(((add-tall-snip (snip (is-a?/c snip%))) void))]{
@defmethod*[(((add-tall-snip (snip (is-a?/c snip%))) void?))]{
Registers a snip in this editor. It is resized when the
viewing area of the editor changes.
@ -488,13 +488,13 @@
The contents of the two
editor are kept in sync, as modifications
to this object happen.
@defmethod*[(((get-delegate) (union #f (instanceof text%))))]{
@defmethod*[(((get-delegate) (or/c #f (is-a?/c text%))))]{
The result of this method is the @scheme[text%] object
that the contents of this editor are being delegated to, or
@scheme[#f], if there is none.
}
@defmethod*[(((set-delegate (delegate (union #f (instanceof text%)))) void))]{
@defmethod*[(((set-delegate (delegate (or/c #f (is-a?/c text%)))) void?))]{
This method sets the current delegate.
@ -521,36 +521,36 @@
and
@scheme[text:delegate<%>]
interfaces.
@defmethod*[#:mode override (((split (position exact) (first (box (instanceof snip%))) (second (box (instanceof snip%)))) void))]{
@defmethod*[#:mode override (((split (position exact) (first (box/c (is-a?/c snip%))) (second (box/c (is-a?/c snip%)))) void?))]{
Fills the boxes with instance of
@scheme[text:1-pixel-string-snip%]s.
}
@defmethod*[#:mode override (((copy) (instanceof snip%)))]{
@defmethod*[#:mode override (((copy) (is-a?/c snip%)))]{
Creates and returns an instance of
@scheme[text:1-pixel-string-snip%].
}
@defmethod*[#:mode override
(((get-extent
(dc (instanceof dc<%>))
(x real) (y real)
(w (box (union non-negative-real-number #f)) #f)
(h (box (union non-negative-real-number #f)) #f)
(descent (box (union non-negative-real-number #f)) #f)
(space (box (union non-negative-real-number #f)) #f)
(lspace (box (union non-negative-real-number #f)) #f)
(rspace (box (union non-negative-real-number #f)) #f))
void))]{
(dc (is-a?/c dc<%>))
(x real?) (y real?)
(w (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f)
(h (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f)
(descent (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f)
(space (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f)
(lspace (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f)
(rspace (or/c (box/c (or/c (and/c real? (not/c negative?)))) #f) #f))
void?))]{
Sets the descent, space, lspace, and rspace to zero. Sets
the height to 1. Sets the width to the number of characters
in the string.
}
@defmethod*[#:mode override (((insert (s string) (len exact) (pos exact 0)) void))]{
@defmethod*[#:mode override (((insert (s string?) (len exact-nonnegative-integer?) (pos exact-nonnegative-integer? 0)) void?))]{
}
@defmethod*[#:mode override (((draw (dc (instanceof dc<%>)) (x real) (y real) (left real) (top real) (right real) (bottom real) (dx real) (dy real) (draw-caret (union (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void))]{
@defmethod*[#:mode override (((draw (dc (is-a?/c dc<%>)) (x real?) (y real?) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (or/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void?))]{
Draws black pixels for non-whitespace characters and draws
nothing for whitespace characters.
@ -573,17 +573,17 @@
and
@scheme[text:delegate<%>]
interfaces.
@defmethod*[#:mode override (((split (position exact) (first (box (instanceof snip%))) (second (box (instanceof snip%)))) void))]{
@defmethod*[#:mode override (((split (position exact) (first (box/c (is-a?/c snip%))) (second (box/c (is-a?/c snip%)))) void?))]{
Fills the boxes with instance of
@scheme[text:1-pixel-tab-snip%]s.
}
@defmethod*[#:mode override (((copy) (instanceof snip%)))]{
@defmethod*[#:mode override (((copy) (is-a?/c snip%)))]{
Creates and returns an instance of
@scheme[text:1-pixel-tab-snip%].
}
@defmethod*[#:mode override (((get-extent (dc (instanceof dc<%>)) (x real) (y real) (w (box (union non-negative-real-number #f)) #f) (h (box (union non-negative-real-number #f)) #f) (descent (box (union non-negative-real-number #f)) #f) (space (box (union non-negative-real-number #f)) #f) (lspace (box (union non-negative-real-number #f)) #f) (rspace (box (union non-negative-real-number #f)) #f)) void))]{
@defmethod*[#:mode override (((get-extent (dc (is-a?/c dc<%>)) (x real?) (y real?) (w (or/c (box/c (and/c real? (not/c negative?)) #f)) #f) (h (or/c (box/c (and/c real? (not/c negative?)) #f)) #f) (descent (or/c (box/c (and/c real? (not/c negative?)) #f)) #f) (space (or/c (box/c (and/c real? (not/c negative?)) #f)) #f) (lspace (or/c (box/c (and/c real? (not/c negative?)) #f)) #f) (rspace (or/c (box/c (and/c real? (not/c negative?)) #f)) #f)) void?))]{
Sets the descent, space, lspace, and rspace to zero. Sets
the height to 1. Sets the width to the width of tabs as
@ -592,7 +592,7 @@
method.
}
@defmethod*[#:mode override (((draw (dc (instanceof dc<%>)) (x real) (y real) (left real) (top real) (right real) (bottom real) (dx real) (dy real) (draw-caret (union (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void))]{
@defmethod*[#:mode override (((draw (dc (is-a?/c dc<%>)) (x real?) (y real?) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (or/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void?))]{
Draws nothing.
@ -602,13 +602,13 @@
This mixin provides an implementation of the
@scheme[text:delegate<%>]
interface.
@defmethod*[#:mode override (((highlight-range (start exact-integer)
@defmethod*[#:mode override (((highlight-range (start exact-integer?)
(end exact-nonnegative-integer?)
(color (or/c string? (is-a?/c color%)))
(caret-space boolean? #f)
(priority (symbols 'high 'low) 'low)
(style (symbols 'rectangle 'ellipse 'hollow-ellipse 'dot) 'rectangle))
(-> void)))]{
(-> void?)))]{
In addition to calling the super method,
@method[text:basic<%> highlight-range], this method forwards the highlighting to
@ -624,42 +624,42 @@
void?]{
This method propagates the call to the delegate and calls the super method.
}
@defmethod*[#:mode override (((on-paint (before? any/c) (dc (is-a?/c dc<%>)) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (one-of/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void))]{
@defmethod*[#:mode override (((on-paint (before? any/c) (dc (is-a?/c dc<%>)) (left real?) (top real?) (right real?) (bottom real?) (dx real?) (dy real?) (draw-caret (one-of/c (quote no-caret) (quote show-inactive-caret) (quote show-caret)))) void?))]{
Draws a blue region in the delegatee editor that shows where
the visible region of the delegate editor is.
}
@defmethod*[#:mode augment (((on-edit-sequence) void))]{
@defmethod*[#:mode augment (((on-edit-sequence) void?))]{
starts an edit sequence in the delegate.
}
@defmethod*[#:mode augment (((after-edit-sequence) void))]{
@defmethod*[#:mode augment (((after-edit-sequence) void?))]{
ends an edit sequence in the delegate.
}
@defmethod*[#:mode override (((resized (snip (is-a?/c snip%)) (redraw-now? boolean?)) void))]{
@defmethod*[#:mode override (((resized (snip (is-a?/c snip%)) (redraw-now? boolean?)) void?))]{
Sends a message to the delegate to update the size of the
copied snip, if there is one.
}
@defmethod*[#:mode augment (((after-insert (start number) (len number)) void))]{
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{
forwards the change to the delegate
}
@defmethod*[#:mode augment (((after-delete (start number) (len number)) void))]{
@defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{
forwards the change to the delegate.
}
@defmethod*[#:mode augment (((after-change-style (start number) (len number)) void))]{
@defmethod*[#:mode augment (((after-change-style (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{
forwards the changed style to the delegate.
}
@defmethod*[#:mode augment (((on-load-file (filename string) (format symbol?)) void))]{
@defmethod*[#:mode augment (((on-load-file (filename string?) (format symbol?)) void?))]{
remembers the filename, for use in
@method[text:delegate-mixin after-load-file].
}
@defmethod*[#:mode augment (((after-load-file (success? boolean?)) void))]{
@defmethod*[#:mode augment (((after-load-file (success? boolean?)) void?))]{
updates the delegate with the new contents of the text.
}
@ -674,7 +674,7 @@
@scheme[editor:basic<%>]
is displayed in a frame, that frame must have been created with
@scheme[frame:info-mixin].
@defmethod*[#:mode override (((set-anchor (on? any/c)) void))]{
@defmethod*[#:mode override (((set-anchor (on? any/c)) void?))]{
Calls the
@method[frame:text-info<%> anchor-status-changed]
@ -684,7 +684,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode override (((set-overwrite-mode (on? any/c)) void))]{
@defmethod*[#:mode override (((set-overwrite-mode (on? any/c)) void?))]{
Calls the
@method[frame:text-info<%> overwrite-status-changed]method of the frame that is viewing this object. It uses
@ -693,7 +693,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode augment (((after-set-position) void))]{
@defmethod*[#:mode augment (((after-set-position) void?))]{
Calls the
@method[frame:text-info<%> editor-position-changed]
@ -703,7 +703,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-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]
@ -713,7 +713,7 @@
@scheme[top-level-window<%>]
as the frame.
}
@defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-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]
@ -741,7 +741,7 @@
for more information. If not, the file format passed to
@method[editor<%> save-file]
is used.
@defmethod*[#:mode augment (((on-save-file (filename path?) (format (one-of/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)))) void))]{
@defmethod*[#:mode augment (((on-save-file (filename path?) (format (one-of/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)))) void?))]{
If the method
@method[text% get-file-format]
@ -773,21 +773,21 @@
}
}
@defmixin[text:file-mixin (editor:file<%> text:basic<%>) (text:file<%>)]{
@defmethod*[#:mode augment (((can-insert? (start number) (len number)) boolean?))]{
@defmethod*[#:mode augment (((can-insert? (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) boolean?))]{
Returns false if the result of
@method[text:file<%> get-read-write?]
is true, otherwise returns the
result of calling @scheme[inner].
}
@defmethod*[#:mode augment (((can-delete? (start number) (len number)) boolean?))]{
@defmethod*[#:mode augment (((can-delete? (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) boolean?))]{
Returns false if the result of
@method[text:file<%> get-read-write?]
is true, otherwise returns the
result of calling @scheme[inner].
}
@defmethod*[#:mode augment (((after-save-file) void))]{
@defmethod*[#:mode augment (((after-save-file) void?))]{
Checks if the newly saved file is write-only in the filesystem. If
so, locks the editor with the
@ -806,7 +806,7 @@
with the last part of the filename (ie, the name of the file, not the
directory the file is in).
}
@defmethod*[#:mode augment (((after-load-file) void))]{
@defmethod*[#:mode augment (((after-load-file) void?))]{
Checks if the newly loaded file is write-only in the filesystem. If
so, locks the editor with the
@ -844,7 +844,7 @@
They create three threads to mediate access to the input and
output ports (one for each input port and one for all of the
output ports).
@defmethod*[(((delete/io (start exact-integer) (end exact-integer)) void))]{
@defmethod*[(((delete/io (start exact-integer?) (end exact-integer?)) void?))]{
Deletes the text between @scheme[start] and @scheme[end] without
changing the behavior of the ports (otherwise, deleting the
text would break internal invariants of the port).
@ -856,23 +856,23 @@
}
@defmethod*[(((get-insertion-point) exact-integer))]{
@defmethod*[(((get-insertion-point) exact-integer?))]{
Returns the position where characters put into the output
port will appear.
}
@defmethod*[(((set-insertion-point (ip exact-integer)) void))]{
@defmethod*[(((set-insertion-point (ip exact-integer?)) void?))]{
Sets the position where the output port will insert characters.
See also
@method[text:ports<%> get-insertion-point].
}
@defmethod*[(((get-unread-start-point) exact-integer))]{
@defmethod*[(((get-unread-start-point) exact-integer?))]{
Returns the position where input will be taken into the
input port (after the next time return is typed).
}
@defmethod*[(((set-unread-start-point (usp exact-integer)) void))]{
@defmethod*[(((set-unread-start-point (usp exact-integer?)) void?))]{
Sets the position where input will be taken into the
input port (after the next time return is typed).
@ -880,7 +880,7 @@
@method[text:ports<%> get-unread-start-point].
}
@defmethod*[(((set-allow-edits (allow-edits? boolean?)) void))]{
@defmethod*[(((set-allow-edits (allow-edits? boolean?)) void?))]{
Enables or disables editing in the buffer. Be sure to update
the unread start point (via
@method[text:ports<%> set-unread-start-point]) and the insertion point (via
@ -891,7 +891,7 @@
Indicates if editing is allowed in the buffer at this point.
}
@defmethod*[(((insert-between (str (union snip% string))) void))]{
@defmethod*[(((insert-between (str (or/c (is-a?/c snip%) string?))) void?))]{
Inserts some text between the unread start point and the
insertion point (and updates them properly). To insert
before the two points, see
@ -903,7 +903,7 @@
@method[text:ports<%> set-insertion-point].
}
@defmethod*[(((insert-before (str (union snip% string))) void))]{
@defmethod*[(((insert-before (str (or/c (is-a?/c snip%) string?))) void?))]{
Inserts some text before the unread start point and updates
it and the insertion point properly. To insert between
the two points, see
@ -915,43 +915,43 @@
@method[text:ports<%> set-insertion-point].
}
@defmethod*[(((submit-to-port? (key char)) boolean?))]{
@defmethod*[(((submit-to-port? (key (is-a?/c key-event%))) boolean?))]{
Augment this method to help control when characters should
be submitted to the input port.
Return @scheme[#t] or the result of calling @scheme[inner].
}
@defmethod*[(((on-submit) void))]{
@defmethod*[(((on-submit) void?))]{
This method is called when text is sent into the input port.
Does nothing.
}
@defmethod*[(((send-eof-to-in-port) void))]{
@defmethod*[(((send-eof-to-in-port) void?))]{
This method puts an eof into the input port.
}
@defmethod*[(((send-eof-to-box-in-port) void))]{
@defmethod*[(((send-eof-to-box-in-port) void?))]{
This method puts an eof into the box input port.
}
@defmethod*[(((reset-input-box) void))]{
@defmethod*[(((reset-input-box) void?))]{
This method removes the current input box from the editor
(and all input in it is lost).
}
@defmethod*[(((clear-output-ports) void))]{
@defmethod*[(((clear-output-ports) void?))]{
Flushes all of the data in all of the output ports that
hasn't appeared in the editor yet.
}
@defmethod*[(((clear-input-port) void))]{
@defmethod*[(((clear-input-port) void?))]{
Flushes all of the data in the input port that hasn't yet
been read. Reading will now block.
}
@defmethod*[(((clear-box-input-port) void))]{
@defmethod*[(((clear-box-input-port) void?))]{
Flushes all of the data in the box input port that hasn't
yet been read. Reading will now block.
@ -1006,15 +1006,15 @@
@scheme[editor:get-standard-style-list].
}
@defmethod*[(((get-in-port) input-port))]{
@defmethod*[(((get-in-port) input-port?))]{
Returns the input port that data in this editor is sent to.
}
@defmethod*[(((get-in-box-port) input-port))]{
@defmethod*[(((get-in-box-port) input-port?))]{
Returns the box input port that data in this editor is sent to.
}
@defmethod*[(((get-out-port) output-port))]{
@defmethod*[(((get-out-port) output-port?))]{
Returns an output port that writes into this editor. The
only difference between this port and the ports returned by
@method[text:ports<%> get-err-port]
@ -1023,7 +1023,7 @@
is the font style and color.
}
@defmethod*[(((get-err-port) output-port))]{
@defmethod*[(((get-err-port) output-port?))]{
Returns an output port that writes into this editor. The
only difference between this port and the ports returned by
@method[text:ports<%> get-err-port]
@ -1032,7 +1032,7 @@
is the font style and color.
}
@defmethod*[(((get-value-port) output-port))]{
@defmethod*[(((get-value-port) output-port?))]{
Returns an output port that writes into this editor. The
only difference between this port and the ports returned by
@method[text:ports<%> get-err-port]
@ -1041,16 +1041,16 @@
is the font style and color.
}
@defmethod*[(((after-io-insertion) void))]{
@defmethod*[(((after-io-insertion) void?))]{
This method is called after an insertion due to IO occurs.
}
@defmethod*[(((get-box-input-editor-snip%) (subclass editor-snip%)))]{
@defmethod*[(((get-box-input-editor-snip%) (subclass?/c editor-snip%)))]{
The result of this method is used as the class of editor
snips that is inserted by the box port in this editor.
}
@defmethod*[(((get-box-input-text%) (is-a?/c text:input-box)))]{
@defmethod*[(((get-box-input-text%) (is-a?/c text:input-box<%>)))]{
The result of this method is instantiated and placed inside the result of
@method[text:ports<%> get-box-input-editor-snip%].
@ -1058,19 +1058,19 @@
}
@defmixin[text:ports-mixin (text:wide-snip<%>) (text:ports<%>)]{
@defmethod*[#:mode augment (((can-insert? (start exact-integer) (len exact-integer)) boolean?))]{
@defmethod*[#:mode augment (((can-insert? (start exact-integer?) (len exact-integer?)) boolean?))]{
Returns the results of the @scheme[inner] call, unless
@method[text:ports<%> get-allow-edits]
returns @scheme[#f].
}
@defmethod*[#:mode augment (((can-delete? (start exact-integer) (len exact-integer)) boolean?))]{
@defmethod*[#:mode augment (((can-delete? (start exact-integer?) (len exact-integer?)) boolean?))]{
Returns the results of the @scheme[inner] call, unless
@method[text:ports<%> get-allow-edits]
returns @scheme[#f].
}
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void))]{
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void?))]{
Sends the data between the last position and the result of
@method[text:ports<%> get-unread-start-point]
@ -1081,7 +1081,7 @@
Also calls
@method[text:ports<%> on-submit].
}
@defmethod*[#:mode augment (((on-display-size) void))]{
@defmethod*[#:mode augment (((on-display-size) void?))]{
Adjusts the embedded editor-snip (used for reading input to the
@method[text:ports<%> get-in-box-port]) to match the width of the editor.
@ -1098,7 +1098,7 @@
@scheme[text:input-box<%>]
for use with
@scheme[text:ports<%>].
@defmethod*[#:mode override (((on-default-char (event key-event%)) void))]{
@defmethod*[#:mode override (((on-default-char (event (is-a?/c key-event%))) void?))]{
Notifies the
@scheme[text:ports<%>]
@ -1110,7 +1110,7 @@
unintrusive autocompletion menu when a particular
(configurable) keystroke is pressed.
@defmethod*[(((auto-complete) void))]{
@defmethod*[(((auto-complete) void?))]{
Starts a completion.
}
@ -1129,17 +1129,17 @@
@scheme[(make-object color% 204 153 255)].
}
@defmethod*[(((completion-mode-key-event? (key-event key-event%)) boolean?))]{
@defmethod*[(((completion-mode-key-event? (key-event (is-a?/c key-event%))) boolean?))]{
Returns true when the key event passed to it should initiate
the completions menu.
}
@defmethod*[(((get-all-words) (listof string)))]{
@defmethod*[(((get-all-words) (listof string?)))]{
Returns the list of the words that autocompletion should
choose from.
}
@defmethod*[(((get-word-at (pos positive-exact-integer)) string))]{
@defmethod*[(((get-word-at (pos exact-positive-integer?)) string?))]{
Given an editor location, returns the prefix ending at that location
that autocompletion should try to complete.
@ -1147,11 +1147,11 @@
}
@defmixin[text:autocomplete-mixin (text%) (text:autocomplete<%>)]{
@defmethod*[#:mode override (((on-paint) void))]{
@defmethod*[#:mode override (((on-paint) void?))]{
Draws the completion menu (when it is popped up).
}
@defmethod*[#:mode override (((on-char) void))]{
@defmethod*[#:mode override (((on-char) void?))]{
Takes over the handling of key events when the completions
menu is visible. Also, when the completions menu is not
@ -1159,7 +1159,7 @@
@method[text:completion<%> completion-mode-key-event?]
method to see if it should start completing.
}
@defmethod*[#:mode override (((on-event) void))]{
@defmethod*[#:mode override (((on-event) void?))]{
This method is overridden to allow mouse access of the
completions menu. It only handles events when there is a
@ -1188,7 +1188,7 @@
@definterface[text:line-numbers<%> ()]{
@defmethod*[(((show-line-numbers! (show boolean?)) void))]{
@defmethod*[(((show-line-numbers! (show boolean?)) void?))]{
Enables or disables line number drawing.
}
@ -1206,12 +1206,12 @@
@defmixin[text:line-numbers-mixin (text%) (text:line-numbers<%>)]{
@defmethod*[#:mode override (((on-paint) void))]{
@defmethod*[#:mode override (((on-paint) void?))]{
Draws the line numbers.
}
@defmethod*[(((show-line-numbers! (show boolean?)) void))]{
@defmethod*[(((show-line-numbers! (show boolean?)) void?))]{
Enables or disables line number drawing.
}

View File

@ -131,8 +131,8 @@ See
}
@defmethod[(get-alignment)
(values (symbols/c right center left)
(symbols/c bottom center top))]{
(values (symbols 'right 'center 'left)
(symbols 'bottom 'center 'top))]{
Returns the container's current alignment specification. See
@method[area-container<%> set-alignment] for more information.
@ -193,8 +193,8 @@ See also @method[area-container<%> container-flow-modified].
}
@defmethod[(set-alignment [horiz-align (symbols/c right center left)]
[vert-align (symbols/c bottom center top)])
@defmethod[(set-alignment [horiz-align (symbols 'right 'center 'left)]
[vert-align (symbols 'bottom 'center 'top)])
void?]{
Sets the alignment specification for a container, which determines how
it positions its children when the container has leftover space (when

View File

@ -48,7 +48,7 @@ Returns the area's parent. A top-level window may have no parent (in
}
@defmethod[(get-top-level-window)
(or/c (is-a?/c frame%) (is-a?/c dialog))]{
(or/c (is-a?/c frame%) (is-a?/c dialog%))]{
Returns the area's closest frame or dialog ancestor. For a frame or
dialog area, the frame or dialog itself is returned.

View File

@ -15,7 +15,7 @@ Whenever a button is clicked by the user, the button's callback
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
(is-a?/c panel%) (is-a?/c pane%))]
[callback ((is-a?/c button%) (is-a?/c control-event%) . -> . any) (lambda (b e) (void))]
[style (one-of/c 'border 'deleted) null]
[style (listof (one-of/c 'border 'deleted)) null]
[font (is-a?/c font%) normal-control-font]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]

View File

@ -10,7 +10,7 @@ A @scheme[checkable-menu-item%] is a string-labelled menu item that
@defconstructor[([label label-string?]
[parent (or/c (is-a?/c menu% popup-menu%))]
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
[callback ((is-a?/c checkable-menu-item%) (is-a?/c control-event%) . -> . any)
(lambda (i e) (void))]
[shortcut (or/c char? symbol? false/c) #f]

View File

@ -10,7 +10,7 @@ A @scheme[control-event%] object contains information about a
@defconstructor[([event-type (one-of/c 'button 'check-box 'choice
'list-box 'list-box-dclick 'list-box-column
'text-field 'text-field-enter
'slider 'radio-box 'tab-panel
'menu 'slider 'radio-box 'tab-panel
'menu-popdown 'menu-popdown-none)]
[time-stamp exact-integer? 0])]{
@ -45,7 +45,7 @@ See @method[event% get-time-stamp] for information about
@defmethod[(get-event-type)
(one-of/c 'button 'check-box 'choice
'list-box 'list-box-dclick 'text-field
'text-field-enter 'slider 'radio-box
'text-field-enter 'menu 'slider 'radio-box
'menu-popdown 'menu-popdown-none 'tab-panel)]{
Returns the type of the control event. See
@scheme[control-event%] for information about each event type symbol.
@ -55,7 +55,7 @@ Returns the type of the control event. See
@defmethod[(set-event-type
[type (one-of/c 'button 'check-box 'choice
'list-box 'list-box-dclick 'text-field
'text-field-enter 'slider 'radio-box
'text-field-enter 'menu 'slider 'radio-box
'menu-popdown 'menu-popdown-none 'tab-panel)])
void?]{

View File

@ -332,26 +332,6 @@ Returns @scheme[#t].
}}
@defmethod*[([(change-style [delta (or/c (is-a?/c style-delta%) #f)])
void?]
[(change-style [style (or/c (is-a?/c style<%>) #f)])
void?])]{
Changes the style for @techlink{items} in the editor, either by
applying a style delta or using a specific style.
To change a large collection of snips from one style to another style,
consider providing a @scheme[style<%>] instance rather than a
@scheme[style-delta%] instance. Otherwise, @method[editor<%>
change-style] must convert the @scheme[style-delta%] instance to the
@scheme[style<%>] instance for every snip; this conversion consumes
both time and (temporary) memory.
@MonitorMethod[@elem{The style within an editor} @elem{the
system (in response to other method calls)} @elem{@xmethod[text% on-change-style]} @elem{style}]
}
@defmethod[(clear)
void?]{

View File

@ -19,10 +19,10 @@ An @scheme[editor-snip%] object is a @scheme[snip%] object that
[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]
[max-height (or/c (and/c real? (not/c negative?)) (one/of 'none)) 'none])]{
[min-width (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
[max-width (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
[min-height (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
[max-height (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none])]{
If @scheme[editor] is non-@scheme[#f], then it will be used as the
editor contained by the snip. See also @method[editor-snip%
@ -156,7 +156,7 @@ snip.
@defmethod[(get-max-height)
(or/c (and/c real? (not/c negative?)) (one/of 'none))]{
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
Gets the maximum display height of the snip; zero or @scheme['none]
indicates that there is no maximum.
@ -165,7 +165,7 @@ Gets the maximum display height of the snip; zero or @scheme['none]
@defmethod[(get-max-width)
(or/c (and/c real? (not/c negative?)) (one/of 'none))]{
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
Gets the maximum display width of the snip; zero or @scheme['none]
indicates that there is no maximum.
@ -173,7 +173,7 @@ Gets the maximum display width of the snip; zero or @scheme['none]
}
@defmethod[(get-min-height)
(or/c (and/c real? (not/c negative?)) (one/of 'none))]{
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
Gets the minimum display height of the snip; zero or @scheme['none]
indicates that there is no minimum.
@ -181,7 +181,7 @@ Gets the minimum display height of the snip; zero or @scheme['none]
}
@defmethod[(get-min-width)
(or/c (and/c real? (not/c negative?)) (one/of 'none))]{
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
Gets the minimum display width of the snip; zero or @scheme['none]
indicates that there is no minimum.
@ -268,7 +268,7 @@ Sets the current margins for the snip. The margin sets how much space
}
@defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) (one/of 'none))])
@defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{
@edsnipmax[(scheme height)]
@ -277,7 +277,7 @@ Zero or @scheme['none] disables the limit.
}
@defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) (one/of 'none))])
@defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{
@edsnipmax[(scheme width)] The contained editor's width limits are not
@ -287,7 +287,7 @@ Zero or @scheme['none] disables the limit.
}
@defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) (one/of 'none))])
@defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{
@edsnipmin[(scheme height) @elem{top}]
@ -296,7 +296,7 @@ Zero or @scheme['none] disables the limit.
}
@defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) (one/of 'none))])
@defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
void?]{
@edsnipmin[(scheme width) @elem{left}] The contained editor's width

View File

@ -297,7 +297,7 @@ If a mask bitmap is provided, the mask must be monochrome. In the mask
}
@defmethod[(set-status-text [text string])
@defmethod[(set-status-text [text string?])
void?]{
Sets the frame's status line text and redraws the status line. See

View File

@ -25,7 +25,7 @@ Creates an image snip, loading the image @racket[file] if
}
@defmethod[(equal-hash-code [hash-code (any/c . -> . exact-integer?)])
@defmethod[(equal-hash-code-of [hash-code (any/c . -> . exact-integer?)])
exact-integer?]{
Returns an integer that can be used as a @racket[equal?]-based hash
@ -34,7 +34,7 @@ code for @this-obj[] (using the same notion of @racket[equal?] as
See also @racket[equal<%>].}
@defmethod[(equal-secondary-hash-code [hash-code (any/c . -> . exact-integer?)])
@defmethod[(equal-secondary-hash-code-of [hash-code (any/c . -> . exact-integer?)])
exact-integer?]{
Returns an integer that can be used as a @racket[equal?]-based

View File

@ -36,7 +36,7 @@ Removes all user-selectable items from the control.
}
@defmethod[(find-string [s string])
@defmethod[(find-string [s string?])
(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
@ -96,7 +96,7 @@ is called.
}
@defmethod[(set-string-selection [s string])
@defmethod[(set-string-selection [s string?])
void?]{
Selects the item that matches the given string. If no match
is found in the list control, @|MismatchExn|.

View File

@ -9,7 +9,7 @@ A @scheme[menu-item%] is a plain string-labelled menu item. Its
@defconstructor[([label label-string?]
[parent (or/c (is-a?/c menu% popup-menu%))]
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
[callback ((is-a?/c menu-item%) (is-a?/c control-event%) . -> . any)
(lambda (i e) (void))]
[shortcut (or/c char? symbol? false/c) #f]

View File

@ -9,7 +9,7 @@ A message control is a static line of text or a static bitmap. The
@defconstructor[([label (or/c label-string? (is-a?/c bitmap%)
(or-of/c 'app 'caution 'stop))]
(one-of/c 'app 'caution 'stop))]
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
(is-a?/c panel%) (is-a?/c pane%))]
[style (listof (one-of/c 'deleted)) null]

View File

@ -456,8 +456,7 @@ Returns @scheme[#t].
}}
@defmethod*[#:mode override
([(change-style [style (or/c (is-a?/c style-delta%) (is-a?/c style<%>) #f) #f]
@defmethod*[([(change-style [style (or/c (is-a?/c style-delta%) (is-a?/c style<%>) #f) #f]
[snip (or/c (is-a?/c snip%) #f) #f])
void?])]{
@ -466,7 +465,12 @@ Changes the style of @scheme[snip] to a specific style or by applying
selected snips are changed. If @scheme[style] is @scheme[#f], then
the default style is used, according to @method[editor<%> default-style-name].
See also @xmethod[editor<%> change-style].
To change a large collection of snips from one style to another style,
consider providing a @scheme[style<%>] instance rather than a
@scheme[style-delta%] instance. Otherwise, @method[pasteboard%
change-style] must convert the @scheme[style-delta%] instance to the
@scheme[style<%>] instance for every snip; this conversion consumes
both time and (temporary) memory.
When a @scheme[style] is provided: @InStyleListNote[@scheme[style]]

View File

@ -229,19 +229,19 @@ Draws nothing.
more specific equivalence comparison.}}
@defmethod[(other-equal-to? [that (is-a?/c snip%)]
[equal? (-> any/c any/ boolean?)])
[equal? (-> any/c any/c boolean?)])
boolean?]{
@methimpl{Returns @racket[(eq? @#,(this-obj) that)].}
}
@defmethod[(equal-hash-code [hash-code (any/c . -> . exact-integer?)])
@defmethod[(equal-hash-code-of [hash-code (any/c . -> . exact-integer?)])
exact-integer?]{
@methspec{See @racket[equal<%>].}
@methimpl{Returns @racket[(eq-hash-code @#,(this-obj))].}}
@defmethod[(equal-secondary-hash-code [hash-code (any/c . -> . exact-integer?)])
@defmethod[(equal-secondary-hash-code-of [hash-code (any/c . -> . exact-integer?)])
exact-integer?]{
@methspec{See @racket[equal<%>].}

View File

@ -108,7 +108,7 @@ Removes all tabs from the panel and installs tabs with the given
@defmethod[(set-item-label [n exact-nonnegative-integer?]
[label label-string?])
string?]{
void?]{
Set the label for tab @scheme[n] to @scheme[label]. If @scheme[n] is equal to
or larger than the number of tabs in the panel, @|MismatchExn|.

View File

@ -323,8 +323,7 @@ See also @method[text% hide-caret].
}
@defmethod*[#:mode extend
([(change-style [delta (or/c (is-a?/c style-delta%) #f)]
@defmethod*[([(change-style [delta (or/c (is-a?/c style-delta%) #f)]
[start (or/c exact-nonnegative-integer? 'start) 'start]
[end (or/c exact-nonnegative-integer? 'end) 'end]
[counts-as-mod? any/c #t])
@ -344,6 +343,13 @@ Changes the style for a region in the editor by applying a style delta
then @method[editor<%> set-modified] is not called after applying the
style change.
To change a large collection of snips from one style to another style,
consider providing a @scheme[style<%>] instance rather than a
@scheme[style-delta%] instance. Otherwise, @method[text%
change-style] must convert the @scheme[style-delta%] instance to the
@scheme[style<%>] instance for every snip; this conversion consumes
both time and (temporary) memory.
When @scheme[style] is provided: @InStyleListNote[@scheme[style]]
}

View File

@ -75,7 +75,7 @@ See also @method[top-level-window<%> get-focus-window] and
}
@defmethod[(get-eventspace)
eventspace]{
eventspace?]{
Returns the window's eventspace.
}

View File

@ -192,7 +192,7 @@ If the window does not have a label, @scheme[#f] is returned.
@defmethod[(get-plain-label)
(or/c string #f)]{
(or/c string? #f)]{
Like
@method[window<%> get-label], except that ampersands in the label are removed. If the window has
@ -283,7 +283,7 @@ The result is @scheme[#t] if this window is shown when its ancestors are
}
@defmethod[(on-drop-file [pathname path])
@defmethod[(on-drop-file [pathname path?])
void?]{
@index["drag-and-drop"]{Called} when the user drags a file onto the