rewrote lots of latexisms

svn: r9967
This commit is contained in:
Robby Findler 2008-05-26 23:27:30 +00:00
parent b07c20085e
commit 1eb4f0ffc1
12 changed files with 507 additions and 526 deletions

View File

@ -14,7 +14,7 @@
Mixins that implement this interface initialize the
background color of the canvas to the value of the
\index{'framework:basic-canvas-background}
\scheme|'framework:basic-canvas-background| preference.
@scheme['framework:basic-canvas-background] preference.
Adds a callback so that when that preference is modified,
the background color changes.

View File

@ -16,60 +16,58 @@
and should return the style-name that the token should be colored.
get-token takes an input port and returns the next token as 5 values:
\begin{enumerate}
\item
@itemize{
@item{
An unused value. This value is intended to represent the textual
component of the token and may be used as such in the future.
\item
component of the token and may be used as such in the future.}
@item{
A symbol describing the type of the token. This symbol is transformed
into a style-name via the token-sym->style argument. The symbols
'white-space and 'comment have special meaning and should always be
returned for white space and comment tokens respectively. The symbol
'no-color can be used to indicate that although the token is not white
@scheme['no-color] can be used to indicate that although the token is not white
space, it should not be colored. The symbol 'eof must be used to
indicate when all the tokens have been consumed.
\item
indicate when all the tokens have been consumed.}
@item{
A symbol indicating how the token should be treated by the paren
matcher or \#f. This symbol should be in the pairs argument.
\item
The starting position of the token.
\item
The ending position of the token.
\end{enumerate}
matcher or @scheme[#f]. This symbol should be in the pairs argument.}
@item{
The starting position of the token.}
@item{
The ending position of the token.}}
get-token will usually be implemented with a lexer using the (lib
"lex.ss" "parser-tools") library.\\
get-token will usually be implemented with a lexer using the
@scheme[parser-tools/lex] library.
get-token must obey the following invariants:
\begin{itemize}
\item
@itemize{
@item{
Every position in the buffer must be accounted for in exactly one
token.
\item
token.}
@item{
The token returned by get-token must rely only on the contents of the
input port argument. This means that the tokenization of some part of
the input cannot depend on earlier parts of the input.
\item
the input cannot depend on earlier parts of the input.}
@item{
No edit to the buffer can change the tokenization of the buffer prior
to the token immediately preceding the edit. In the following
example this invariant does not hold. If the buffer contains:\\
" 1 2 3\\
example this invariant does not hold. If the buffer contains:
@verbatim["\" 1 2 3"]
and the tokenizer treats the unmatched " as its own token (a string
error token), and separately tokenizes the 1 2 and 3, an edit to make
the buffer look like:\\
" 1 2 3"\\
the buffer look like:
@verbatim["\" 1 2 3\""]
would result in a single string token modifying previous tokens. To
handle these situations, get-token must treat the first line as a
single token.
\end{itemize}
single token.}}
pairs is a list of different kinds of matching parens. The second
@scheme[pairs] is a list of different kinds of matching parens. The second
value returned by get-token is compared to this list to see how the
paren matcher should treat the token. An example: Suppose pairs is
\scheme+'((|(| |)|) (|[| |]|) (begin end))+. This means that there
@scheme['((|(| |)|) (|[| |]|) (begin end))]. This means that there
are three kinds of parens. Any token which has 'begin as its second
return value will act as an open for matching tokens with 'end.
Similarly any token with \scheme+'|]|+ will act as a closing match for
tokens with \scheme+'|[|+. When trying to correct a mismatched
Similarly any token with @scheme['|]|] will act as a closing match for
tokens with @scheme['|[|]. When trying to correct a mismatched
closing parenthesis, each closing symbol in pairs will be converted to
a string and tried as a closing parenthesis.
}
@ -112,11 +110,11 @@
Start coloring a frozen buffer again.
If recolor? is \scheme|#t|, the text is re-colored. If it is
\scheme|#f| the text is not recolored. When recolor? is \scheme|#t|,
retokenize? controls how the text is recolored. \scheme|#f| causes
If recolor? is @scheme[#t], the text is re-colored. If it is
@scheme[#f] the text is not recolored. When recolor? is @scheme[#t],
retokenize? controls how the text is recolored. @scheme[#f] causes
the text to be entirely re-colored before thaw-colorer returns using
the existing tokenization. \scheme|#t| causes the entire text to be
the existing tokenization. @scheme[#t] causes the entire text to be
retokenized and recolored from scratch. This will happen in the
background after the call to thaw-colorer returns.
@ -127,7 +125,7 @@
}
@defmethod*[(((reset-regions (regions (listof (list number (union (quote end) number))))) void))]{
Sets the currently active regions to be \var{regions}.
Sets the currently active regions to be @scheme[regions].
}
@defmethod*[(((get-regions) (listof (list number (union (quote end) number)))))]{
This returns the list of regions that are currently being colored in the editor.
@ -150,8 +148,8 @@
Skip all consecutive whitespaces and comments (using skip-whitespace)
immediately preceding the position. If the token at this position is
a close, return the position of the matching open, or \scheme|#f| if
there is none. If the token was an open, return \scheme|#f|. For any
a close, return the position of the matching open, or @scheme[#f] if
there is none. If the token was an open, return @scheme[#f]. For any
other token, return the start of that token.
Must only be called while the tokenizer is started.
@ -159,7 +157,7 @@
@defmethod*[(((backward-containing-sexp (position natural-number?) (cutoff natural-number?)) (union natural-number? false?)))]{
Return the starting position of the interior of the (non-atomic)
s-expression containing position, or \scheme|#f| is there is none.
s-expression containing position, or @scheme[#f] is there is none.
Must only be called while the tokenizer is started.
}
@ -169,7 +167,7 @@
Skip all consecutive whitespaces and comments (using skip-whitespace)
immediately following position. If the token at this position is an
open, return the position of the matching close, or \scheme|#f| if
open, return the position of the matching close, or @scheme[#f] if
there is none. For any other token, return the end of that token.
Must only be called while the tokenizer is started.
@ -188,7 +186,7 @@
Return a symbol for the lexer-determined token type for the token that
contains the item after \scheme|position|.
contains the item after @scheme[position].
Must only be called while the tokenizer is started.
}

View File

@ -11,9 +11,9 @@
@defmethod*[#:mode override (((make-editor) (is-a?/c text%)))]{
Makes an instance of
\begin{schemedisplay}
(scheme:text-mixin text:keymap%)
\end{schemedisplay}
@schemeblock[
(scheme:text-mixin text:keymap%)]
}
@defmethod*[#:mode override (((make-snip) (is-a?/c comment-snip%)))]{
@ -24,13 +24,13 @@
@defmethod*[#:mode override (((get-corner-bitmap) (is-a?/c bitmap%)))]{
Returns the semicolon bitmap from the file
\begin{schemedisplay}
(build-path (collection-path "icons") "semicolon.gif")
\end{schemedisplay}
@schemeblock[
(build-path (collection-path "icons") "semicolon.gif")]
}
@defmethod*[#:mode override (((get-position) (symbols (quote left-top) (quote top-right))))]{
Returns \scheme|'left-top|
Returns @scheme['left-top]
}
@defmethod*[#:mode override (((get-text) string))]{

View File

@ -9,7 +9,7 @@
@scheme[editor<%>]
functionality required by the framework.
@defmethod*[(((has-focus?) boolean))]{
This function returns \rawscm{\#t} when the editor has the keyboard
This function returns @scheme[#t] when the editor has the keyboard
focus. It is implemented using:
@method[editor<%> on-focus]
@ -30,11 +30,11 @@
edit-sequence completes.
The procedure \var{thunk} will be called immediately if the edit is
The procedure @scheme[thunk] will be called immediately if the edit is
not in an edit-sequence. If the edit is in an edit-sequence, it will
be called when the edit-sequence completes.
If \var{tag} is a symbol, the \var{thunk} is keyed on that symbol, and
If @scheme[tag] is a symbol, the @scheme[thunk] is keyed on that symbol, and
only one thunk per symbol will be called after the
edit-sequence. Specifically, the last call to
@method[editor:basic<%> run-after-edit-sequence]'s argument will be called.
@ -50,7 +50,7 @@
}
@defmethod*[(((save-file-out-of-date?) boolean))]{
Returns \rawscm{\#t} if the file on disk has been modified, by some other program.
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))]{
@ -59,8 +59,8 @@
opens a dialog with an error message showing the error.
The result indicates if an error happened (the error has
already been shown to the user). It returns \rawscm{\#t} if
no error occurred and \rawscm{\#f} if an error occurred.
already been shown to the user). It returns @scheme[#t] if
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))]{
@ -69,8 +69,8 @@
opens a dialog with an error message showing the error.
The result indicates if an error happened (the error has
already been shown to the user). It returns \rawscm{\#t} if
no error occurred and \rawscm{\#f} if an error occurred.
already been shown to the user). It returns @scheme[#t] if
no error occurred and @scheme[#f] if an error occurred.
}
@defmethod*[(((on-close) void))]{
@ -94,15 +94,15 @@
@method[editor:basic<%> close].
Returns \scheme|#t|.
Returns @scheme[#t].
}
@defmethod*[(((close) boolean))]{
This method is merely
\begin{schemedisplay}
@schemeblock[
(if (can-close?)
(begin (on-close) #t)
#f)
\end{schemedisplay}
#f)]
It is intended as a shorthand, helper method for closing
an editor. See also
@method[editor:basic<%> can-close?]
@ -125,11 +125,11 @@
mixin's argument.
Each instance of a class created with this mixin contains a private
\iscmclass{keymap} that is chained to the global keymap via:
\rawscm{(send \var{keymap} chain-to-keymap (keymap:get-global) \#f)}.
@scheme[keymap%] that is chained to the global keymap via:
@scheme[(send keymap chain-to-keymap (keymap:get-global) #f)].
This installs the global keymap \iscmprocedure{keymap:get-global} to
handle keyboard and mouse mappings not handled by \var{keymap}. The
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))]{
@ -165,7 +165,7 @@
}
@defmethod*[#:mode augment (((on-edit-sequence) boolean))]{
Always returns \rawscm{\#t}. Updates a flag for
Always returns @scheme[#t]. Updates a flag for
@method[editor:basic<%> local-edit-sequence?]
}
@defmethod*[#:mode augment (((after-edit-sequence) void))]{
@ -218,7 +218,7 @@
In addition, it calls
@method[editor<%> set-load-overwrites-styles]
with \scheme|#f|.
with @scheme[#f].
This ensures that saved files with different
settings for the style list do not clobber
the shared style list.
@ -236,15 +236,15 @@
@scheme[add-pasteboard-keymap-functions].
@defmethod*[(((get-keymaps) (list-of (instance keymap%))))]{
The keymaps returned from this method are chained to this
\iscmintf{editor}'s keymap.
@scheme[editor<%>]'s keymap.
The result of this method should not change -- that is, it
should return the same list of keymaps each time it is
called.
Defaultly returns \rawscm{(list
@scheme[keymap:get-global])}
Defaultly returns @scheme[(list
@scheme[keymap:get-global])]
}
}
@defmixin[editor:keymap-mixin (editor:basic<%>) (editor:keymap<%>)]{
@ -256,16 +256,15 @@
Classes implementing this interface keep the
@method[editor<%> auto-wrap]
state set based on the
\rawscm{'framework:auto-set-wrap?} preference
(see
\hyperref{the preferences section}{section~}{ for more info about preferences}{fw:preferences}).
@scheme['framework:auto-set-wrap?] preference
(see @scheme[preferences:get] for more information about preferences).
They install a preferences callback with
@scheme[preferences:add-callback]
that sets the state when the preference changes and
initialize the value of
@method[editor<%> auto-wrap]
to the current value of \rawscm{'framework:auto-set-wrap?}
to the current value of @scheme['framework:auto-set-wrap?]
via
@scheme[preferences:get].
}
@ -280,7 +279,7 @@
dialog that asks about closing.
Defaultly returns \scheme|#f|.
Defaultly returns @scheme[#f].
}
@defmethod*[(((update-frame-filename) void))]{
Attempts to find a frame that displays this editor. If it
@ -294,7 +293,7 @@
@method[editor:file-mixin can-close?].
Defaultly returns \scheme|#f|.
Defaultly returns @scheme[#f].
}
}
@defmixin[editor:file-mixin (editor:keymap<%>) (editor:file<%>)]{
@ -313,13 +312,13 @@
If the
@method[editor:file<%> allow-close-with-no-filename?]
method returns \scheme|#f|, this method checks to see if the file
method returns @scheme[#f], this method checks to see if the file
has been saved at all yet. If not, it asks the user
about saving (and saves if they ask).
If the
@method[editor:file<%> allow-close-with-no-filename?]
method returns \scheme|#t|, this method does as before,
method returns @scheme[#t], this method does as before,
except only asks if the editor's
@method[editor<%> get-filename]method returns a path.
@ -343,8 +342,8 @@
Returns the value of the
@scheme[preferences:get]
applied to
\rawscm{'framework:backup-files?}.
\index{'framework:backup-files?}
@scheme['framework:backup-files?].
@index{'framework:backup-files?}
}
@defmethod*[(((autosave?) boolean))]{
@ -353,7 +352,7 @@
should be autosaved.
Returns \rawscm{\#t}.
Returns @scheme[#t].
}
@defmethod*[(((do-autosave) (union |#f| string)))]{
This method is called to perform the autosaving.
@ -368,7 +367,7 @@
@scheme[editor<%>].
Returns the filename where the autosave took place, or
\rawscm{\#f} if none did.
@scheme[#f] if none did.
}
@defmethod*[(((remove-autosave) void))]{
This method removes the autosave file associated with this
@ -400,7 +399,7 @@
}
@defmethod*[#:mode augment (((on-change) void))]{
Sets a flag indicating that this \iscmintf{editor} needs to be autosaved.
Sets a flag indicating that this @scheme[editor<%>] needs to be autosaved.
}
@defmethod*[#:mode override (((set-modified (modified? any/c)) void))]{

File diff suppressed because it is too large Load Diff

View File

@ -61,7 +61,7 @@
@method[group:% get-frames].
Applies \var{f} to each frame in the group
Applies @scheme[f] to each frame in the group
}
@defmethod*[(((get-active-frame) (is-a?/c frame:basic<%>)))]{
Returns the frame with the keyboard focus or the first frame in the
@ -94,14 +94,14 @@
The function
@method[group:% can-close-all?]
must have been called just before this function and it must have returned
\rawscm{\#t}.
@scheme[#t].
Calls the
@method[top-level-window<%> on-close]
method and the
@method[top-level-window<%> show]
method (with \rawscm{\#f} as argument)
method (with @scheme[#f] as argument)
on each frame in the group.
}
@defmethod*[(((can-close-all?) void))]{

View File

@ -5,7 +5,7 @@
@title{Keymap}
@definterface[keymap:aug-keymap<%> (keymap%)]{
This keymap overrides some of the built in \iscmclass{keymap} methods
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%))))]{
@ -22,7 +22,7 @@
@method[keymap:aug-keymap<%> get-map-function-table]
that returns the same result, except it accepts a hash-table that
it inserts the bindings into. It does not replace any bindings already in
\var{ht}.
@scheme[ht].
}
}
@defmixin[keymap:aug-keymap-mixin (keymap%) (keymap:aug-keymap<%>)]{

View File

@ -21,8 +21,8 @@
via the \& characters in the original labels) in their
labels.
If the preference \scm{'framework:menu-bindings}
is \scm{\#f}, calls
If the preference @scheme['framework:menu-bindings]
is @scheme[#f], calls
@method[menu:can-restore-underscore<%> erase-underscores]
during initialization.
@defmethod*[(((erase-underscores) void))]{

View File

@ -9,7 +9,7 @@
@scheme[panel:single-mixin%].
@defmethod*[(((active-child (child (is-a?/c area<%>))) void) ((active-child) (is-a?/c area<%>)))]{
Sets the active child to be \var{child}
Sets the active child to be @scheme[child]
Returns the current active child.
@ -17,7 +17,7 @@
}
@defmixin[panel:single-mixin (area-container<%>) (panel:single<%>)]{
This mixin adds single panel functionality to an implementation of the
\iscmintf{area-container} interface.
@scheme[area-container<%>] interface.
Single panels place all of the children in the center of the panel,
and allow make one child to be visible at a time. The
@ -29,7 +29,7 @@
method is used to hide and show the children of a single panel.
@defmethod*[#:mode override (((after-new-child (child subarea<%>)) void))]{
Hides this child by calling \scmline{(send child show \#f)}, unless
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)))]{
@ -77,7 +77,7 @@
takes up of the panel.
The argument, \var{new-percentages} must be a list of
The argument, @scheme[new-percentages] must be a list of
numbers that sums to 1. It's length must be equal to the
number of children of the panel (see
@method[area-container<%> get-children]) and each percentage must correspond to a number of pixels
@ -93,8 +93,8 @@
This method controls the behavior of the other overridden
methods in mixins that implement this interface.
If it returns \scheme|#t|, the panel will be vertically
aligned and if it returns \scheme|#f|, they will be
If it returns @scheme[#t], the panel will be vertically
aligned and if it returns @scheme[#f], they will be
horizontally aligned.
}
@ -148,10 +148,10 @@
@method[panel:dragable<%> get-vertical?]
method of the
@scheme[panel:dragable-mixin]
to return \scheme|#t|.
to return @scheme[#t].
@defmethod*[#:mode override (((get-vertical?) boolean))]{
Returns \scheme|#t|.
Returns @scheme[#t].
}
}
@defmixin[panel:horizontal-dragable-mixin (panel:dragable<%>) (panel:vertical-dragable<%>)]{
@ -159,10 +159,10 @@
@method[panel:dragable<%> get-vertical?]
method of the
@scheme[panel:dragable-mixin]
to return \scheme|#f|.
to return @scheme[#f].
@defmethod*[#:mode override (((get-vertical?) boolean))]{
Returns \scheme|#f|.
Returns @scheme[#f].
}
}
@defclass[panel:vertical-dragable% (panel:vertical-dragable-mixin (panel:dragable-mixin vertical-panel%)) ()]{}

View File

@ -39,17 +39,17 @@
@defmethod*[(((get-limit (start exact-integer)) int))]{
Returns a limit for backward-matching parenthesis starting at position
\var{start}.
@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 \rawscm{'framework:fixup-parens} preference is
\rawscm{\#t} (see
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 \rawscm{'framework:paren-match} preference is
\rawscm{\#t} (see
If the @scheme['framework:paren-match] preference is
@scheme[#t] (see
@scheme[preferences:get]) the matching open parenthesis is flashed.
}
@ -61,15 +61,15 @@
}
@defmethod*[(((tabify (start-pos exact-integer (send this iscmclassmethod (text) (get-start-position)))) void))]{
@defmethod*[(((tabify (start-pos exact-integer (send this text get-start-position))) void))]{
Tabs the line containing by \var{start-pos}
Tabs the line containing by @scheme[start-pos]
}
@defmethod*[(((tabify-selection (start exact-integer) (end exact-integer)) void))]{
Sets the tabbing for the lines containing positions \var{start}
through \var{end}.
Sets the tabbing for the lines containing positions @scheme[start]
through @scheme[end].
}
@defmethod*[(((tabify-all) void))]{
@ -79,49 +79,49 @@
Inserts a newline into the buffer. If
@method[scheme:text<%> tabify-on-return?]
returns \rawscm{\#t}, this will tabify the new line.
returns @scheme[#t], this will tabify the new line.
}
@defmethod*[(((box-comment-out-selection (start-pos (union (quote start) exact-integer) rawscm) (end-pos (union (quote end) exact-integer) rawscm)) void))]{
@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 \var{start-pos} to \var{end-pos}
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 \var{start-pos} is \rawscm{'start}, the starting point of
the selection is used. If \var{end-pos} is \rawscm{'end},
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 \var{start} through \var{end}
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 \var{start} through \var{end}.
Uncomments the lines containing positions @scheme[start] through @scheme[end].
}
@defmethod*[(((get-forward-sexp (start exact-integer)) (union |#f| exact-integer)))]{
Returns the position of the end of next S-expression after position
\var{start}, or \rawscm{\#f} if there is no appropriate answer.
@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 \var{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 \var{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
\var{start-pos}.
@scheme[start-pos].
}
@ -129,13 +129,13 @@
Returns the position of the start of the S-expression before or
containing \var{start}, or \rawscm{\#f} if there is no appropriate
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
\var{start-pos}.
@scheme[start-pos].
}
@defmethod*[(((backward-sexp (start-pos exact-integer)) void))]{
@ -143,62 +143,62 @@
Moves the caret to the beginning of the sexpression that ends at
\var{start-pos}.
@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 \var{start-pos}. If there is no such
sexpression, it returns \rawscm{\#f}.
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 \var{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)))]{
Returns the position of the beginning of the next sexpression inside
the sexpression that contains \var{start-pos}. If there is no such
sexpression, it returns \rawscm{\#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 \var{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 \var{start}.
position @scheme[start].
}
@defmethod*[(((select-forward-sexp (start exact-integer)) |#t|))]{
Selects the next S-expression, starting at position \var{start}.
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 \var{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 \var{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 \var{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 \var{start} with
the next S-expression following \var{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 \var{pos} is matched, this method
If the paren after @scheme[pos] is matched, this method
highlights it and it's matching counterpart in dark green.
}
@ -230,7 +230,7 @@
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 \var{pos}, which is then used
Returns the word just before @scheme[pos], which is then used
as the prefix for auto-completion.
}

View File

@ -97,7 +97,7 @@ The code started by the primitive actions must run in the handler
thread of the eventspace where the event takes place. As a result,
the test suite that invokes the primitive actions must @italic{not} run
in that handler thread (or else some actions will deadlock). See
\Mrhyperref{the eventspace section}{see section~}{}{eventspaceinfo}
@scheme[make-eventspace]
for more info.
@subsection{Window Manager (Unix only)}

View File

@ -11,23 +11,23 @@
This function highlights a region of text in the buffer.
The range between \var{start} and \var{end} will be highlighted with the
color in color, and \var{bitmap} will be painted over the range of text in
black and white. If \var{bitmap} is \rawscm{\#f}, the range will be inverted,
The range between @scheme[start] and @scheme[end] will be highlighted with the
color in color, and @scheme[bitmap] will be painted over the range of text in
black and white. If @scheme[bitmap] is @scheme[#f], the range will be inverted,
using the platform specific xor. This method is not recommended, because the
selection is also displayed using xor.
If \var{caret-space?} is not \rawscm{\#f}, the left edge of the range
If @scheme[caret-space?] is not @scheme[#f], the left edge of the range
will be one pixel short, to leave space for the caret. The caret does
not interfere with the right hand side of the range. Note that under X
windows the caret is drawn with XOR, which means almost anything can
happen. So if the caret is in the middle of the range it may be hard
to see, or if it is on the left of the range and \var{caret-space?} is
\rawscm{\#f} it may also be hard to see.
to see, or if it is on the left of the range and @scheme[caret-space?] is
@scheme[#f] it may also be hard to see.
The \var{priority} argument indicates the relative priority for
The @scheme[priority] argument indicates the relative priority for
drawing overlapping regions. If two regions overlap and have different
priorities, the region with \rawscm{'high} priority will be drawn second
priorities, the region with @scheme['high] priority will be drawn second
and only it will be visible in the overlapping region.
This method returns a thunk, which, when invoked, will turn off
@ -52,12 +52,12 @@
ranges in the editor.
}
@defmethod*[(((get-styles-fixed) boolean))]{
If the result of this function is \rawscm{\#t}, the styles in this
If the result of this function is @scheme[#t], the styles in this
@scheme[text:basic<%>]
will be fixed. This means
that any text inserted to this editor
has its style set to this editor's
@scheme[style-list%]'s \rawscm{"Standard"} style.
@scheme[style-list%]'s @scheme["Standard"] style.
See also
@method[text:basic<%> set-styles-fixed].
@ -80,12 +80,12 @@
This moves or copies text and snips to another edit.
Moves or copies from the edit starting at \var{start} and ending at
\var{end}. It puts the copied text and snips in \var{dest-text}
starting at location \var{dest-pos}.
Moves or copies from the edit starting at @scheme[start] and ending at
@scheme[end]. It puts the copied text and snips in @scheme[dest-text]
starting at location @scheme[dest-pos].
If a snip refused to be moved, it will be copied, otherwise it will be
moved. A snip may refuse to be moved by returning \rawscm{\#f} from
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%))))]{
@ -108,9 +108,9 @@
}
@defmethod*[(((port-name-matches? (id (or/c path? symbol?))) boolean))]{
Indicates if \var{id} matches the port name of this file. If
Indicates if @scheme[id] matches the port name of this file. If
the file is saved, the port name matches when the save file
is the path as \var{id}. If the file has not been saved, the
is the path as @scheme[id]. If the file has not been saved, the
port name matches if the symbol is the same as the result of
@method[text:basic<%> port-name-matches?].
@ -144,7 +144,7 @@
@method[editor<%> put-file]
but uses
@scheme[finder:put-file]
instead of \scheme|put-file|.
instead of @scheme[put-file].
}
}
@ -184,8 +184,7 @@
}
@definterface[text:nbsp->space<%> (text%)]{
Classes that implement this interface silently change
non-breaking spaces, ie the character \scheme|(integer->char
160)|, to regular spaces when inserted into the editor.
non-breaking spaces, ie the character @scheme[(integer->char 160)], to regular spaces when inserted into the editor.
}
@defmixin[text:nbsp->space-mixin (text%) (text:nbsp->space<%>)]{
@ -197,10 +196,8 @@
@defmethod*[#:mode augment (((after-insert (start nonnegative-exact-integer?) (len nonnegative-exact-integer?)) void))]{
Replaces all non-breaking space characters
\begin{schemedisplay}
(integer->char 160)
\end{schemedisplay}
by \scheme|#\space| characters.
@scheme[(integer->char 160)]
by @scheme[#\space] characters.
Ends the edit sequence (by calling
@method[editor<%> end-edit-sequence]) started in
@ -236,7 +233,7 @@
}
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void))]{
If \var{key} is either return or newline, only invoke the \var{return}
If @scheme[key] is either return or newline, only invoke the @scheme[return]
thunk (initialization argument) and do nothing else.
}
}
@ -277,9 +274,9 @@
editor are kept in sync, as modifications
to this object happen.
@defmethod*[(((get-delegate) (union |#f| (instanceof text%))))]{
The result of this method is the \iscmclass{text} object
The result of this method is the @scheme[text%] object
that the contents of this editor are being delegated to, or
\rawscm{\#f}, if there is none.
@scheme[#f], if there is none.
}
@defmethod*[(((set-delegate (delegate (union |#f| (instanceof text%)))) void))]{
@ -287,9 +284,9 @@
When it is set, all of the snips are copied from this object
to \var{delegate}. Additionally, if this object implements
to @scheme[delegate]. Additionally, if this object implements
@scheme[scheme:text<%>]
the tab settings of \var{delegate} are updated to match this
the tab settings of @scheme[delegate] are updated to match this
objects.
}
}
@ -365,7 +362,7 @@
Sets the descent, space, lspace, and rspace to zero. Sets
the height to 1. Sets the width to the width of tabs as
returned in the \scm{tab-width} parameter of the
returned in the @scheme[tab-width] parameter of the
@method[text% get-tabs]
method.
@ -502,7 +499,7 @@
When files are saved from this
@scheme[text%], a check is made to see if there are any non-@scheme[string-snip%]
objects in the
@scheme[text%]. If so, it is saved using the file format \rawscm{'std}. (see
@scheme[text%]. If so, it is saved using the file format @scheme['std]. (see
@method[text% set-file-format]
for more information. If not, the file format passed to
@method[editor<%> save-file]
@ -511,18 +508,18 @@
If the method
@method[text% get-file-format]
returns \rawscm{'standard} and the text has only
@scheme[string-snip%]s, the file format is set to \rawscm{'text}.
returns @scheme['standard] and the text has only
@scheme[string-snip%]s, the file format is set to @scheme['text].
If the method
@method[text% get-file-format]
returns \rawscm{'text} and the text has some non
@scheme[string-snip%]s, the file format is set to \rawscm{'standard}.
returns @scheme['text] and the text has some non
@scheme[string-snip%]s, the file format is set to @scheme['standard].
Depending on the user's preferences, the user may also be queried.
Also, the changes to the file format only happen if the argument
\var{file-format} is \rawscm{'copy} or \rawscm{'same}.
@scheme[file-format] is @scheme['copy] or @scheme['same].
}
}
@definterface[text:file<%> (editor:file<%> text:basic<%>)]{
@ -535,7 +532,7 @@
@defmethod*[(((while-unlocked (thunk (-> any/c))) any/c))]{
Unlocks the editor, calls the thunk, and then relocks the
editor, all using a \scheme{dynamic-wind}.
editor, all using a @scheme[dynamic-wind].
}
}
@defmixin[text:file-mixin (editor:file<%> text:basic<%>) (text:file<%>)]{
@ -544,14 +541,14 @@
Returns false if the result of
@method[text:file<%> get-read-write?]
is true, otherwise returns the
result of calling \scheme|inner|.
result of calling @scheme[inner].
}
@defmethod*[#:mode augment (((can-delete? (start number) (len number)) boolean))]{
Returns false if the result of
@method[text:file<%> get-read-write?]
is true, otherwise returns the
result of calling \scheme|inner|.
result of calling @scheme[inner].
}
@defmethod*[#:mode augment (((after-save-file) void))]{
@ -606,11 +603,11 @@
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))]{
Deletes the text between \var{start} and \var{end} without
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).
Both \var{start} and \var{end} must be less than
Both @scheme[start] and @scheme[end] must be less than
@method[text:ports<%> get-insertion-point]
(or else it is safe to delete them so you don't need this
method).
@ -681,7 +678,7 @@
be submitted to the input port.
Return \scheme|#t| or the result of calling \scheme|inner|.
Return @scheme[#t] or the result of calling @scheme[inner].
}
@defmethod*[(((on-submit) void))]{
This method is called when text is sent into the input port.
@ -723,13 +720,13 @@
@method[text:ports<%> get-out-port].
If the result is a string that is not mapped in the editor's
style list, the style named \scheme|"Standard"| is used and
if that isn't mapped, the style named \scheme|"Basic"| is used.
style list, the style named @scheme["Standard"] is used and
if that isn't mapped, the style named @scheme["Basic"] is used.
This method is called during the initialization of the class.
Defaultly returns \scheme|"text:ports out"| which is mapped
Defaultly returns @scheme["text:ports out"] which is mapped
to a blue style in the style list returned by
@scheme[editor:get-standard-style-list].
}
@ -739,13 +736,13 @@
@method[text:ports<%> get-err-port].
If the result is a string that is not mapped in the editor's
style list, the style named \scheme|"Standard"| is used and
if that isn't mapped, the style named \scheme|"Basic"| is used.
style list, the style named @scheme["Standard"] is used and
if that isn't mapped, the style named @scheme["Basic"] is used.
This method is called during the initialization of the class.
Defaultly returns \scheme|"text:ports err"| which is mapped
Defaultly returns @scheme["text:ports err"] which is mapped
to a red italic style in the style list returned by
@scheme[editor:get-standard-style-list].
}
@ -755,14 +752,14 @@
@method[text:ports<%> get-value-port].
If the result is a string that is not mapped in the editor's
style list, the style named \scheme|"Standard"| is used and
if that isn't mapped, the style named \scheme|"Basic"| is used.
style list, the style named @scheme["Standard"] is used and
if that isn't mapped, the style named @scheme["Basic"] is used.
This method is called during the initialization of the class.
Defaultly returns \scheme|"text:ports value"| which is mapped
Defaultly returns @scheme["text:ports value"] which is mapped
to a blue style in the style list returned by
@scheme[editor:get-standard-style-list].
@ -811,9 +808,9 @@
snips that is inserted by the box port in this editor.
}
@defmethod*[(((get-box-input-text%) (implements iscmmixin (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\%].
@method[text:ports<%> get-box-input-editor-snip%].
}
}
@ -821,15 +818,15 @@
@defmethod*[#:mode augment (((can-insert? (start exact-integer) (len exact-integer)) boolean))]{
Returns the results of the \scheme|inner| call, unless
Returns the results of the @scheme[inner] call, unless
@method[text:ports<%> get-allow-edits]
returns \scheme|#f|.
returns @scheme[#f].
}
@defmethod*[#:mode augment (((can-delete? (start exact-integer) (len exact-integer)) boolean))]{
Returns the results of the \scheme|inner| call, unless
Returns the results of the @scheme[inner] call, unless
@method[text:ports<%> get-allow-edits]
returns \scheme|#f|.
returns @scheme[#f].
}
@defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void))]{
@ -837,7 +834,7 @@
@method[text:ports<%> get-unread-start-point]
to the input port, unless
@method[text:ports<%> submit-to-port?]
returns \scheme|#f|.
returns @scheme[#f].
Also calls
@method[text:ports<%> on-submit].
@ -877,17 +874,17 @@
}
@defmethod*[(((get-autocomplete-border-color) (or/c string? (is-a?/c color%))))]{
The border color for the autocomplete menu. Defaults to
\scheme|"black"|.
@scheme["black"].
}
@defmethod*[(((get-autocomplete-background-color) (or/c string? (is-a?/c color%))))]{
The background color for the non-selected menu
items. Defaults to \scheme|"lavender"|.
items. Defaults to @scheme["lavender"].
}
@defmethod*[(((get-autocomplete-selected-color) (or/c string? (is-a?/c color%))))]{
The background color for the selected menu item. Defaults to
\scheme|(make-object color% 204 153 255)|.
@scheme[(make-object color% 204 153 255)].
}
@defmethod*[(((completion-mode-key-event? (key-event key-event%)) boolean))]{