Some random tidyings.

This commit is contained in:
Eli Barzilay 2011-02-16 15:26:11 -05:00
parent 8886b87876
commit 1be26400cb
7 changed files with 1279 additions and 1531 deletions

View File

@ -9,216 +9,223 @@
The preferences dialog consists of several panels.
@section{@onscreen{Font}}
This panel controls the main font used by DrRacket.
This panel controls the main font used by DrRacket.
@section{@onscreen{Colors}}
The @onscreen{Colors} panel has several sub-panels that let you
configure the colors that DrRacket uses for the editor background,
for highlighting matching parentheses, for the online coloring for
Racket and Java modes, for @onscreen{Check Syntax}, and for the
colors of the text in the @tech{interactions window}.
The @onscreen{Colors} panel has several sub-panels that let you
configure the colors that DrRacket uses for the editor background, for
highlighting matching parentheses, for the online coloring for Racket
and Java modes, for @onscreen{Check Syntax}, and for the colors of the
text in the @tech{interactions window}.
It also has two buttons, @onscreen{White on Black} and @onscreen{Black
on White}, which set a number of defaults for the color preferences and
change a few other aspects of DrRacket's behavior to make DrRacket's
colors look nicer for those two modes.
It also has two buttons, @onscreen{White on Black} and
@onscreen{Black on White}, which set a number of defaults for the
color preferences and change a few other aspects of DrRacket's
behavior to make DrRacket's colors look nicer for those two modes.
@section{@onscreen{Editing}}
The @onscreen{Editing} panel consists of several sub-panels:
@itemize[
The @onscreen{Editing} panel consists of several sub-panels:
@item{@onscreen{Indenting}
@itemize[
This panel controls which keywords DrRacket recognizes for
indenting, and how each keyword is treated.}
@item{@onscreen{Square bracket}
@item{@onscreen{Indenting}
This panel controls which keywords DrRacket uses to determine
when to rewrite @litchar["["] to @litchar["("]. For
@racket[cond]-like keywords, the number in parenthesis indicates
how many sub-expressions are skipped before square brackets are
started.
This panel controls which keywords DrRacket recognizes for
indenting, and how each keyword is treated.}
@item{@onscreen{Square bracket}
This panel controls which keywords DrRacket uses to determine when
to rewrite @litchar["["] to @litchar["("]. For @racket[cond]-like
keywords, the number in parenthesis indicates how many
sub-expressions are skipped before square brackets are started.
See @secref["editor"] for details on how the entries in the
columns behave.}
@item{@onscreen{General}
@itemize[@item{@PrefItem{Map delete to backspace} --- If checked, the editor
treats the Delete key like the Backspace key.}
@item{@onscreen{General}
@item{@PrefItem{Wrap words in editor buffers} --- If checked,
DrRacket editors auto-wrap text lines by default. Changing this
preference affects new windows only.}
@itemize[
@item{@PrefItem{Map delete to backspace} --- If checked, the editor
treats the Delete key like the Backspace key.}
@item{@PrefItem{Wrap words in editor buffers} --- If checked,
DrRacket editors auto-wrap text lines by default. Changing
this preference affects new windows only.}
@item{@PrefItem{Reuse existing frames when opening new files} ---
If checked, new files are opened in the same DrRacket
window, rather than creating a new DrRacket window for each
new file.}
@item{@PrefItem{Enable keybindings in menus} --- If checked, some
DrRacket menu items have keybindings. Otherwise, no menu
items have key bindings. This preference is designed for
people who are comfortable editing in Emacs and find the
standard menu keybindings interfere with the Emacs
keybindings.}
@item{@PrefItem{Treat command key as meta} --- If checked,
DrRacket will use the command key for some Emacs-like
keybindings, instead of using it for menu shortcuts. This
option is only available under Mac OS X.}
@item{@PrefItem{Color syntax interactively} --- If checked,
DrRacket colors your syntax as you type.}
@item{@PrefItem{Search using anchors} --- If checked, DrRacket's
searching mode will jump directly to the first search hit,
using an ``anchor'' to determine where to search if the
search string changes.}
@item{@PrefItem{Normalize pasted strings} --- If checked, DrRacket
adjusts strings that are pasted into the editor to avoid
confusion. For example, non-breaking spaces look just like
spaces but are not considered separators like ordinary
spaces are. If this is checked DrRacket will automatically
turn those non-breaking spaces into regular spaces.
Similarly with other (less common) characters.}
@item{@PrefItem{Enable overwrite mode keybindings} --- If checked,
DrRacket enables the insert keybinding to swap into
overwrite mode}
@item{@PrefItem{Show line numbers} --- If checked, DrRacket shows
line numbers for the file being edited in the left-hand
column}]}
@item{@PrefItem{Reuse existing frames when opening new files} ---
If checked, new files are opened in the same DrRacket window,
rather than creating a new DrRacket window for each new file.}
@item{@onscreen{Racket}
@item{@PrefItem{Enable keybindings in menus} --- If checked, some
DrRacket menu items have keybindings. Otherwise, no menu items
have key bindings. This preference is designed for people who are
comfortable editing in Emacs and find the standard menu
keybindings interfere with the Emacs keybindings.}
@itemize[
@item{@PrefItem{Highlight between matching parens} --- If checked,
the editor marks the region between matching parenthesis
with a gray background (in color) or a stipple pattern (in
monochrome) when the blinking caret is next to a
parenthesis.}
@item{@PrefItem{Automatically adjust closing parens} --- If
checked, the editor automatically converts a typed
@litchar[")"] to @litchar["]"] to match @litchar["["], or it
converts a typed @litchar["]"] to @litchar[")"] to match
@litchar["("].}
@item{@PrefItem{Automatically adjust opening square brackets} If
checked, the editor changes typed @litchar["["] to match the
context (as explained in @secref["editor"]).}
@item{@PrefItem{Flash paren match} --- If checked, typing a
closing parenthesis, square bracket, or quotation mark
flashes the matching open parenthesis/bracket/quote.}]}
@item{@PrefItem{Treat command key as meta} --- If checked, DrRacket will use the command key for some Emacs-like keybindings, instead of using it for menu shortcuts. This option is only available under Mac OS X.}
@item{@PrefItem{Color syntax interactively} --- If checked, DrRacket
colors your syntax as you type.}
@item{@PrefItem{Search using anchors} --- If checked, DrRacket's searching mode will jump directly to the first search hit, using an ``anchor'' to determine where to search if the search string changes.}
@item{@PrefItem{Normalize pasted strings} --- If checked, DrRacket adjusts strings that are pasted into the editor to avoid confusion. For example, non-breaking spaces look just like spaces but are not considered separators like ordinary spaces are. If this is checked DrRacket will automatically turn those non-breaking spaces into regular spaces. Similarly with other (less common) characters.}
@item{@PrefItem{Enable overwrite mode keybindings} --- If checked, DrRacket enables the insert keybinding to swap into overwrite mode}
@item{@PrefItem{Show line numbers} --- If checked, DrRacket shows line numbers for the file being edited in the left-hand column}
]}
]
@item{@onscreen{Racket}
@itemize[
@item{@PrefItem{Highlight between matching parens} --- If checked, the
editor marks the region between matching parenthesis with a gray
background (in color) or a stipple pattern (in monochrome) when
the blinking caret is next to a parenthesis.}
@item{@PrefItem{Automatically adjust closing parens} --- If checked, the editor
automatically converts a typed @litchar[")"] to @litchar["]"] to
match @litchar["["], or it converts a typed @litchar["]"] to
@litchar[")"] to match @litchar["("].}
@item{@PrefItem{Automatically adjust opening square brackets} If checked, the editor changes
typed @litchar["["] to match the context (as explained in
@secref["editor"]).}
@item{@PrefItem{Flash paren match} --- If checked, typing a closing
parenthesis, square bracket, or quotation mark flashes the
matching open parenthesis/bracket/quote.}
]}]
@section{@onscreen{Warnings}}
@itemize[
@itemize[
@item{@PrefItem{Ask before changing save format} --- If checked,
DrRacket consults the user before saving a file in non-text format
(see @secref["drracket-file-formats"]).}
@item{@PrefItem{Ask before changing save format} --- If checked,
DrRacket consults the user before saving a file in non-text format
(see @secref["drracket-file-formats"]).}
@item{@PrefItem{Verify exit} --- If checked, DrRacket consults the
user before exiting.}
@item{@PrefItem{Verify exit} --- If checked, DrRacket consults the
user before exiting.}
@item{@PrefItem{Ask about normalizing strings} --- If checked, DrRacket
consults the user before normalizing a string pasted into the editor.}
@item{@PrefItem{Only warn once when executions and interactions are
not synchronized} --- If checked, DrRacket warns the user on the
first interaction after the definitions window, language, or
teachpack is changed without a corresponding click on
@onscreen{Run}. Otherwise, the warning appears on every
interaction.}
@item{@PrefItem{Ask about normalizing strings} --- If checked, DrRacket
consults the user before normalizing a string pasted into the
editor.}
@item{@PrefItem{Ask about clearing test coverage} --- If checked,
when test coverage annotations are displayed DrRacket prompts
about removing them. This setting only applies to the PLT
languages. DrRacket never asks in the teaching languages.}
@item{@PrefItem{Only warn once when executions and interactions are not
synchronized} --- If checked, DrRacket warns the user on the first
interaction after the definitions window, language, or teachpack
is changed without a corresponding click on @onscreen{Run}.
Otherwise, the warning appears on every interaction.}
@item{@PrefItem{Check for newer Racket versions} --- If
checked, DrRacket periodically polls a server to determine
whether a newer version of DrRacket is available.}
@item{@PrefItem{Ask about clearing test coverage} --- If checked, when
test coverage annotations are displayed DrRacket prompts about
removing them. This setting only applies to the PLT languages.
DrRacket never asks in the teaching languages.}
@item{@PrefItem{Check for newer Racket versions} --- If checked,
DrRacket periodically polls a server to determine whether a newer
version of DrRacket is available.}
]
]
@section{@onscreen{General}}
@itemize[
@itemize[
@item{@PrefItem{Number of recent items} --- controls the
length of the @onscreen{Open Recent} menu (in the @onscreen{File}
menu).}
@item{@PrefItem{Number of recent items} --- controls the length of the
@onscreen{Open Recent} menu (in the @onscreen{File} menu).}
@item{@PrefItem{Auto-save files} --- If checked, the editor
generates autosave files (see @secref["drracket-autosave-files"])
for files that have not been saved after five minutes.}
@item{@PrefItem{Backup files} --- If checked, when saving a file for
the first time in each editing session, the original copy of the
file is copied to a backup file in the same directory. The backup
files have the same name as the original, except that they end in
either @indexed-file{.bak} or @indexed-file{~}.}
@item{@PrefItem{Auto-save files} --- If checked, the editor generates
autosave files (see @secref["drracket-autosave-files"]) for files
that have not been saved after five minutes.}
@item{@PrefItem{Show status-line} --- If checked, DrRacket shows a
status line at the bottom of each window.}
@item{@PrefItem{Backup files} --- If checked, when saving a file for the
first time in each editing session, the original copy of the file
is copied to a backup file in the same directory. The backup
files have the same name as the original, except that they end in
either @indexed-file{.bak} or @indexed-file{~}.}
@item{@PrefItem{Count column numbers from one} --- If checked, the
status line's column counter counts from one. Otherwise, it counts
from zero.}
@item{@PrefItem{Show status-line} --- If checked, DrRacket shows a
status line at the bottom of each window.}
@item{@PrefItem{Display line numbers in buffer; not character
offsets} --- If checked, the status line shows a
@nonterm{line}:@nonterm{column} display for the current selection
rather than the character offset into the text.}
@item{@PrefItem{Count column numbers from one} --- If checked, the
status line's column counter counts from one. Otherwise, it
counts from zero.}
@item{@PrefItem{Automatically print to PostScript file} --- If
checked, printing will automatically save PostScript files. If
not, printing will use the standard printing mechanisms for your
computer.}
@item{@PrefItem{Display line numbers in buffer; not character offsets}
--- If checked, the status line shows a
@nonterm{line}:@nonterm{column} display for the current selection
rather than the character offset into the text.}
@item{@PrefItem{Open files in separate tabs (not separate windows)}
-- If checked, DrRacket will use tabs in the front-most window to
open new files, rather than creating new windows for new files.}
@item{@PrefItem{Automatically print to PostScript file} --- If checked,
printing will automatically save PostScript files. If not,
printing will use the standard printing mechanisms for your
computer.}
@item{@PrefItem{Automatically open interactions window when running
a program} -- If checked, DrRacket shows the interactions window
(if it is hidden) when a program is run.}
@item{@PrefItem{Open files in separate tabs (not separate windows)} ---
If checked, DrRacket will use tabs in the front-most window to
open new files, rather than creating new windows for new files.}
@item{@PrefItem{Automatically switch to the module language when opening a module} --
If checked, DrRacket will recognize files that have a @tt{#lang} line
and adjust the language setting automatically.}
@item{@PrefItem{Automatically open interactions window when running a
program} --- If checked, DrRacket shows the interactions window
(if it is hidden) when a program is run.}
@item{@PrefItem{Automatically switch to the module language when opening
a module} --- If checked, DrRacket will recognize files that have
a @tt{#lang} line and adjust the language setting automatically.}
@item{@PrefItem{Put the interactions window beside the definitions
window} -- If checked, DrRacket puts the interactions window to the
right of the definitions window. By default, the interactions
window is below the definitions window.}
window} --- If checked, DrRacket puts the interactions window to
the right of the definitions window. By default, the interactions
window is below the definitions window.}
@item{@PrefItem{Always show the #lang line in the Module language} --
If checked, the module language always shows the @hash-lang[]
line (even when it would ordinarily be scrolled off of the page), assuming
that the @hash-lang[] line is the first line in the file.
}
@item{@PrefItem{Always show the #lang line in the Module language} ---
If checked, the module language always shows the @hash-lang[] line
(even when it would ordinarily be scrolled off of the page),
assuming that the @hash-lang[] line is the first line in the file.}
]
]
@section{@onscreen{Profiling}}
This preference panel configures the profiling report. The band of
color shows the range of colors that profiled functions take
on. Colors near the right are used for code that is not invoked
often and colors on the right are used for code that is invoked
often.
If you are interested in more detail at the low end, choose the
@onscreen{Square root} check box. If you are interested in more
detail at the upper end, choose the @onscreen{Square} check box.
This preference panel configures the profiling report. The band of
color shows the range of colors that profiled functions take on. Colors
near the right are used for code that is not invoked often and colors on
the right are used for code that is invoked often.
If you are interested in more detail at the low end, choose the
@onscreen{Square root} check box. If you are interested in more detail
at the upper end, choose the @onscreen{Square} check box.
@section{@onscreen{Browser}}
This preferences panel allows you to configure your HTTP
proxy. Contact your system administrator for details.
This preferences panel allows you to configure your HTTP proxy. Contact
your system administrator for details.
@section{@onscreen{Tools}}
This preference panel allows you to configure the currently active plugins.
This preference panel allows you to configure the currently active
plugins.

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 (union 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) (union #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 (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?))]{
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 (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?))]{
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.
@ -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
@ -399,7 +399,7 @@
Returns @scheme[#t].
}
@defmethod*[(((do-autosave) (union |#f| string)))]{
@defmethod*[(((do-autosave) (union #f string)))]{
This method is called to perform the autosaving.
See also
@scheme[autosave:register]

View File

@ -7,272 +7,251 @@
@definterface[scheme:sexp-snip<%> ()]{
@defmethod*[(((get-saved-snips) (listof 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))]{
Returns the concatenation of the text for all of the hidden
snips.
@defmethod*[#:mode override
(((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))]{
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))]{
@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))]{
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))]{
@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))]{
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))]{
Returns a limit for backward-matching parenthesis starting at position
@scheme[start].
Returns a limit for backward-matching parenthesis starting at
position @scheme[start].
}
@defmethod*[(((balance-parens (key-event (instance 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 @scheme['framework:fixup-parens] preference is
@scheme[#t] (see
@scheme[preferences:get]) the correct closing parenthesis is inserted.
If the @scheme['framework:paren-match] preference is
@scheme[#t] (see
@scheme[preferences:get]) the matching open parenthesis is flashed.
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
@scheme['framework:fixup-parens] preference is @scheme[#t] (see
@scheme[preferences:get]) the correct closing parenthesis is
inserted. If the @scheme['framework:paren-match] preference is
@scheme[#t] (see @scheme[preferences:get]) the matching open
parenthesis is flashed.
}
@defmethod*[(((tabify-on-return?) boolean?))]{
The result of this method is used to determine if the return key
automatically tabs over to the correct position.
Override it to change its behavior.
}
@defmethod*[(((tabify (start-pos exact-integer (send this text get-start-position))) void))]{
@defmethod*[(((tabify (start-pos exact-integer
(send this text get-start-position)))
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))]{
Tabs all lines.
}
@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.
Inserts a newline into the buffer. If
@method[scheme:text<%> tabify-on-return?] returns @scheme[#t], this
will tabify the new line.
}
@defmethod*[(((box-comment-out-selection (start-pos (or/c (symbols 'start) exact-integer?)) (end-pos (or/c (symbols 'end) exact-integer?))) void))]{
This method comments out a selection in the text by putting it into a comment box.
@defmethod*[(((box-comment-out-selection
(start-pos (or/c (symbols 'start) exact-integer?))
(end-pos (or/c (symbols 'end) exact-integer?)))
void))]{
This method comments out a selection in the text by putting it into
a comment box.
Removes the region from @scheme[start-pos] to @scheme[end-pos] from
the editor and inserts a comment box with that region of text
inserted into the box.
Removes the region from @scheme[start-pos] to @scheme[end-pos]
from the editor and inserts a comment box with that region
of text inserted into the box.
If @scheme[start-pos] is @scheme['start], the starting point of
the selection is used. If @scheme[end-pos] is @scheme['end],
the ending point of the selection is used.
If @scheme[start-pos] is @scheme['start], the starting point of the
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))]{
Comments the lines containing positions @scheme[start] through @scheme[end]
by inserting a semi-colon at the front of each line.
@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))]{
Uncomments the lines containing positions @scheme[start] through @scheme[end].
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))
(union #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))]{
Forward-deletes the S-expression starting after the position @scheme[start].
Forward-deletes the S-expression starting after the position
@scheme[start].
}
@defmethod*[(((forward-sexp (start |#t|)) exact-integer))]{
Moves forward over the S-expression starting at position @scheme[start].
Moves forward over the S-expression starting at position
@scheme[start].
}
@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))
(union 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))]{
Flashes the parenthesis that opens the sexpression at
@scheme[start-pos].
}
@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)))]{
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*[(((find-up-sexp (start-pos exact-integer))
(union #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))]{
Moves backward out of the S-expression containing the position @scheme[start].
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))
(union #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].
the sexpression that contains @scheme[start-pos]. If there is no
such sexpression, it returns @scheme[#f].
}
@defmethod*[(((down-sexp (start exact-integer)) void))]{
Moves forward into the next S-expression after the position @scheme[start].
Moves forward into the next S-expression after the position
@scheme[start].
}
@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-backward-sexp (start exact-integer)) |#t|))]{
Selects the previous S-expression, starting at position @scheme[start].
Selects the previous S-expression, starting at position
@scheme[start].
}
@defmethod*[(((select-up-sexp (start exact-integer)) |#t|))]{
Selects the region to the enclosing S-expression, starting at position @scheme[start].
Selects the region to the enclosing S-expression, starting at
position @scheme[start].
}
@defmethod*[(((select-down-sexp (start exact-integer)) |#t|))]{
Selects the region to the next contained S-expression, starting at position @scheme[start].
Selects the region to the next contained S-expression, starting at
position @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].
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))]{
This method returns the current size of the tabs for scheme mode.
See also
@method[scheme:text<%> set-tab-size].
See also @method[scheme:text<%> set-tab-size].
}
@defmethod*[(((set-tab-size (new-size exact-integer)) void))]{
This method sets the tab size for this
text.
This method sets the tab size for this text.
}
@defmethod*[(((introduce-let-ans) void))]{
Adds a let around the current s-expression and a printf into the body
of the let.
Adds a let around the current s-expression and a printf into the
body of the let.
}
@defmethod*[(((move-sexp-out) void))]{
Replaces the sexpression surrounding the insertion point with the
sexpression following the insertion point.
}
}
@defmixin[scheme:text-mixin (text:basic<%> mode:host-text<%> color:text<%> text:autocomplete<%>) (scheme:text<%>)]{
@defmixin[scheme:text-mixin
(text:basic<%> mode:host-text<%> color:text<%> text:autocomplete<%>)
(scheme:text<%>)]{
This mixin adds functionality for editing Racket files.
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))]{
Returns the word just before @scheme[pos], which is then used
as the prefix for auto-completion.
@defmethod*[#:mode override
(((get-word-at (pos positive-exact-integer)) string))]{
Returns the word just before @scheme[pos], which is then used as the
prefix for auto-completion.
}
@defmethod[#:mode override (get-start-of-line [pos exact-nonnegative-integer?]) exact-nonnegative-integer?]{
Returns the first non-whitespace character in the paragraph containing @racket[pos],
unless the position is already there, in which case it returns the first position of the paragraph.
@defmethod[#:mode override
(get-start-of-line [pos exact-nonnegative-integer?])
exact-nonnegative-integer?]{
Returns the first non-whitespace character in the paragraph
containing @racket[pos], unless the position is already there, in
which case it returns the first position of the paragraph.
}
}
@definterface[scheme:text-mode<%> ()]{
The result of
@scheme[scheme:text-mode-mixin]
implements this interface.
The result of @scheme[scheme:text-mode-mixin] implements this
interface.
}
@defmixin[scheme:text-mode-mixin (color:text-mode<%> mode:surrogate-text<%>) (scheme:text-mode<%>)]{
This mixin adds Racket mode functionality
to the mode that it is mixed 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))]{
@defmixin[scheme:text-mode-mixin
(color:text-mode<%> mode:surrogate-text<%>)
(scheme:text-mode<%>)]{
This mixin adds Racket mode functionality to the mode that it is mixed
into. The resulting mode assumes that it is only set to an editor
that is the result of @scheme[scheme:text-mixin].
Removes the scheme keymap (see also
@scheme[scheme:get-keymap]) and disables any parenthesis
highlighting in the host editor.
@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))]{
Adds the scheme keymap (see also
@scheme[scheme:get-keymap]) and enables a parenthesis
highlighting in the host editor.
Adds the scheme keymap (see also @scheme[scheme:get-keymap]) and
enables a parenthesis highlighting in the host editor.
}
}
@defmixin[scheme:set-mode-mixin (scheme:text<%> mode:host-text<%>) ()]{
This mixin creates a new instance of
@scheme[scheme:text-mode%]
and installs it, by calling its own
@method[mode:host-text<%> set-surrogate]
method with the object.
This mixin creates a new instance of @scheme[scheme:text-mode%] and
installs it, by calling its own @method[mode:host-text<%>
set-surrogate] method with the object.
}
@defclass[scheme:text% (scheme:set-mode-mixin (scheme:text-mixin (text:autocomplete-mixin (mode:host-text-mixin color:text%)))) ()]{}
@defclass[scheme:text%
(scheme:set-mode-mixin
(scheme:text-mixin
(text:autocomplete-mixin (mode:host-text-mixin color:text%))))
()]{}
@defclass[scheme:text-mode% (scheme:text-mode-mixin color:text-mode%) ()]{}
@(include-previously-extracted "main-extracts.ss" #rx"^scheme:")

View File

@ -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) (union #f (instance bitmap%))))]{
The result of this method is used as the initial autowrap
bitmap. Override this method to change the initial
@scheme[bitmap%]. See also
@ -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) (union #f (instanceof 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 (union #f (instanceof text%)))) void))]{
This method sets the current delegate.
@ -531,7 +531,17 @@
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))]{
@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))]{
Sets the descent, space, lspace, and rspace to zero. Sets
the height to 1. Sets the width to the number of characters
@ -573,7 +583,7 @@
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 (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))]{
Sets the descent, space, lspace, and rspace to zero. Sets
the height to 1. Sets the width to the width of tabs as

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -713,7 +713,10 @@ that the button is not referenced by this frame and thus can be gc'd.
}
@defclass[drracket:unit:definitions-text% (drracket:rep:drs-bindings-keymap-mixin (drracket:unit:program-editor-mixin (scheme:text-mixin text:info%))) (drracket:unit:definitions-text<%>)]{
@defclass[drracket:unit:definitions-text%
(drracket:rep:drs-bindings-keymap-mixin
(drracket:unit:program-editor-mixin (scheme:text-mixin text:info%)))
(drracket:unit:definitions-text<%>)]{
@defconstructor[()]{
Passes all arguments to @scheme[super-init].