diff --git a/collects/embedded-gui/scribblings/aligned-pasteboard.scrbl b/collects/embedded-gui/scribblings/aligned-pasteboard.scrbl index 5e878d76..7b5dd3ac 100644 --- a/collects/embedded-gui/scribblings/aligned-pasteboard.scrbl +++ b/collects/embedded-gui/scribblings/aligned-pasteboard.scrbl @@ -3,4 +3,4 @@ @defclass/title[aligned-pasteboard% pasteboard% (alignment-parent<%>)]{ -Acts as the top of an @scheme[alignment<%>] tree.} +Acts as the top of an @racket[alignment<%>] tree.} diff --git a/collects/embedded-gui/scribblings/alignment.scrbl b/collects/embedded-gui/scribblings/alignment.scrbl index 8961ecee..2f141975 100644 --- a/collects/embedded-gui/scribblings/alignment.scrbl +++ b/collects/embedded-gui/scribblings/alignment.scrbl @@ -16,7 +16,7 @@ Tells the alignment that its sizes should be calculated.} [width (and/c real? (not/c negative?))] [height (and/c real? (not/c negative?))]) void?]{ Tells itself to align its children on the pasteboard -in the given rectangle defined by @scheme[width], @scheme[height] and a top +in the given rectangle defined by @racket[width], @racket[height] and a top left corner point given as offsets into the pasteboards top left corner.} @@ -30,7 +30,7 @@ The minimum height this alignment must be.} @defmethod*[([(stretchable-width) boolean?] [(stretchable-width [value boolean?]) void?])]{ - + Gets/sets the property of stretchability in the x dimension.} @defmethod*[([(stretchable-height) boolean?] diff --git a/collects/embedded-gui/scribblings/button-snip.scrbl b/collects/embedded-gui/scribblings/button-snip.scrbl index 5915a10e..622f8449 100644 --- a/collects/embedded-gui/scribblings/button-snip.scrbl +++ b/collects/embedded-gui/scribblings/button-snip.scrbl @@ -8,11 +8,11 @@ A clickable button with a bitmap label. @defconstructor[([images (cons/c path-string? path-string?)] [callback ((is-a?/c button-snip%) (is-a?/c event%) . -> . void?)])]{ -The @scheme[images] argument is a pair filenames to be load as the +The @racket[images] argument is a pair filenames to be load as the button-label image, where the first is the image for when the button is at rest, and the second is the image for the button while its pressed. -The @scheme[callback] is called when the button is clicked.} +The @racket[callback] is called when the button is clicked.} } diff --git a/collects/embedded-gui/scribblings/dllist.scrbl b/collects/embedded-gui/scribblings/dllist.scrbl index d7af53e3..4b050bba 100644 --- a/collects/embedded-gui/scribblings/dllist.scrbl +++ b/collects/embedded-gui/scribblings/dllist.scrbl @@ -17,12 +17,12 @@ Gets/sets the previous item in the list.} @defmethod[(for-each [f ((is-a?/c dllist<%>) . -> . void?)]) void?]{ -Applies @scheme[f] to every element of the dllist.} +Applies @racket[f] to every element of the dllist.} @defmethod[(map-to-list [f ((is-a?/c dllist<%>) . -> . any/c)]) (listof any/c)]{ -Creates a Scheme list by applying @scheme[f] to every element +Creates a Scheme list by applying @racket[f] to every element of @this-obj[].} } diff --git a/collects/embedded-gui/scribblings/embedded-button.scrbl b/collects/embedded-gui/scribblings/embedded-button.scrbl index 7560ee99..73d4675e 100644 --- a/collects/embedded-gui/scribblings/embedded-button.scrbl +++ b/collects/embedded-gui/scribblings/embedded-button.scrbl @@ -8,11 +8,11 @@ A clickable button with a bitmap label. @defconstructor[([images (cons/c path-string? path-string?)] [callback ((is-a?/c button-snip%) (is-a?/c event%) . -> . void?)])]{ -The @scheme[images] argument is a pair filenames to be load as the +The @racket[images] argument is a pair filenames to be load as the button-label image, where the first is the image for when the button is at rest, and the second is the image for the button while its pressed. -The @scheme[callback] is called when the button is clicked.} +The @racket[callback] is called when the button is clicked.} } diff --git a/collects/embedded-gui/scribblings/embedded-gui.scrbl b/collects/embedded-gui/scribblings/embedded-gui.scrbl index 347097ef..e394d9dd 100644 --- a/collects/embedded-gui/scribblings/embedded-gui.scrbl +++ b/collects/embedded-gui/scribblings/embedded-gui.scrbl @@ -1,16 +1,16 @@ #lang scribble/doc @(require "common.rkt" (for-label framework)) -@title{@bold{Embedded GUI}: Widgets within @scheme[editor<%>]} +@title{@bold{Embedded GUI}: Widgets within @racket[editor<%>]} @author["Mike T. McHenry"] @defmodule[embedded-gui] -The @schememodname[embedded-gui] library provides a class hierarchy -for creating graphical boxes within @scheme[editor<%>] objects with -geometry management that mirrors that of @scheme[vertical-panel%] and -@scheme[horizontal-panel%]. +The @racketmodname[embedded-gui] library provides a class hierarchy +for creating graphical boxes within @racket[editor<%>] objects with +geometry management that mirrors that of @racket[vertical-panel%] and +@racket[horizontal-panel%]. @table-of-contents[] @@ -24,10 +24,10 @@ geometry management that mirrors that of @scheme[vertical-panel%] and @defmixin[stretchable-editor-snip-mixin (editor-snip%) (stretchable-snip<%>)]{ - Extends an editor snip the @scheme[stretchable-snip<%>] interface, + Extends an editor snip the @racket[stretchable-snip<%>] interface, which allows it to be stretched to fit an - @scheme[alignment-parent<%>]'s allotted width. Stretchable snips are - useful as the snip of a @scheme[snip-wrapper%] } + @racket[alignment-parent<%>]'s allotted width. Stretchable snips are + useful as the snip of a @racket[snip-wrapper%] } @defclass[stretchable-editor-snip% editor-snip% (stretchable-editor-snip-mixin editor-snip%)]{ @@ -41,11 +41,11 @@ geometry management that mirrors that of @scheme[vertical-panel%] and @defproc[(fixed-width-label-snip [possible-labels (listof string?)]) (subclass?/c snip%)]{ - Returns a subclass of @scheme[snip%] that takes a single + Returns a subclass of @racket[snip%] that takes a single initialization argument. The argument provided when instantiating the - class must be a member of @scheme[possible-labels]; the given label + class must be a member of @racket[possible-labels]; the given label is displayed by the snip, but the snip is sized to match the longest - of the labels in @scheme[possible-labels]. + of the labels in @racket[possible-labels]. In other words, the resulting class helps align multiple GUI elements t hat are labeled from a particular set of strings.} @@ -53,11 +53,11 @@ t hat are labeled from a particular set of strings.} @definterface[tabbable-text<%> ()]{ - An interface for tabbing between embedded @scheme[text%]s. + An interface for tabbing between embedded @racket[text%]s. @defmethod[(set-caret-owner) void?]{ - Moves the caret into the @scheme[tabbable-text<%>].} + Moves the caret into the @racket[tabbable-text<%>].} @defmethod[(set-ahead) void?]{ @@ -70,15 +70,15 @@ t hat are labeled from a particular set of strings.} @defmixin[tabbable-text-mixin (editor:keymap<%>) (tabbable-text<%>)]{ - Adds the @scheme[tabbable-text<%>] interface to an - @scheme[editor:text%] class, where instantiation installs key + Adds the @racket[tabbable-text<%>] interface to an + @racket[editor:text%] class, where instantiation installs key bindings to tab ahead and backward} @defproc[(set-tabbing [a-text (is-a?/c tabbable-text<%>)] ...) void?]{ -Sets the tabbing order of @scheme[tabbable-text<%>]s by setting each +Sets the tabbing order of @racket[tabbable-text<%>]s by setting each text's @method[tabbable-text<%> set-ahead] and @method[tabbable-text<%> set-back] thunks to point to its neighbor in the argument list.} @@ -86,13 +86,13 @@ the argument list.} @defmixin[grey-editor-snip-mixin (editor-snip%) ()]{ - Gives an @scheme[editor-snip%] a colored background indicating that + Gives an @racket[editor-snip%] a colored background indicating that is disabled. The editor is not disabled by the mixin however, and must be locked separately.} @defmixin[grey-editor-mixin (editor<%>) ()]{ - Gives an @scheme[editor<%>] a colored background indicating that is + Gives an @racket[editor<%>] a colored background indicating that is disabled. The editor is not disabled by the mixin however, and must be locked separately.} @@ -105,8 +105,8 @@ the argument list.} @defmixin[cue-text-mixin (text%) ()]{ - Gives a @scheme[text%] an instantiation argument of a string that is - displayed in the @scheme[text%] initially in grey; the text + Gives a @racket[text%] an instantiation argument of a string that is + displayed in the @racket[text%] initially in grey; the text disappears when the text gets focus. This technique is useful for labeling texts without needing to take up space.} diff --git a/collects/embedded-gui/scribblings/embedded-message.scrbl b/collects/embedded-gui/scribblings/embedded-message.scrbl index bcf1950a..8ae8cd95 100644 --- a/collects/embedded-gui/scribblings/embedded-message.scrbl +++ b/collects/embedded-gui/scribblings/embedded-message.scrbl @@ -8,4 +8,4 @@ A static text label. @defconstructor[([parent (is-a?/c alignment-parent<%>)] [label string?])]{ -Creates a static control that displays @scheme[label].}} +Creates a static control that displays @racket[label].}} diff --git a/collects/embedded-gui/scribblings/embedded-text-button.scrbl b/collects/embedded-gui/scribblings/embedded-text-button.scrbl index f246eece..8e9f3e49 100644 --- a/collects/embedded-gui/scribblings/embedded-text-button.scrbl +++ b/collects/embedded-gui/scribblings/embedded-text-button.scrbl @@ -8,6 +8,6 @@ A button with a text label. @defconstructor[([label string?] [callback ((is-a?/c text-button-snip%) (is-a?/c event%) . -> . void?)])]{ -The @scheme[callback] is called when the button is clicked.} +The @racket[callback] is called when the button is clicked.} } diff --git a/collects/embedded-gui/scribblings/embedded-toggle-button.scrbl b/collects/embedded-gui/scribblings/embedded-toggle-button.scrbl index 2b0caa78..67f6e898 100644 --- a/collects/embedded-gui/scribblings/embedded-toggle-button.scrbl +++ b/collects/embedded-gui/scribblings/embedded-toggle-button.scrbl @@ -3,7 +3,7 @@ @defclass/title[embedded-toggle-button% snip-wrapper% (alignment<%>)]{ -A @scheme[check-box%]-like control that a user can toggle between +A @racket[check-box%]-like control that a user can toggle between checked and unchecked states. @defconstructor[([images-off (cons/c path-string? path-string?)] @@ -12,17 +12,17 @@ checked and unchecked states. [turn-off ((is-a?/c toggle-button-snip%) (is-a?/c event%) . -> . void?)] [state (symbols 'on 'off) 'on])]{ -The @scheme[images-off] argument is a pair filenames to be load as the +The @racket[images-off] argument is a pair filenames to be load as the button-label image, where the first is the image for when the button is at rest, and the second is the image for the button while its pressed---in both cases when the button is not checked by the -user. The @scheme[images-on] argument similarly determines the images +user. The @racket[images-on] argument similarly determines the images for then the button is checked. -The @scheme[turn-on] and @scheme[turn-off] callbacks are invoked when +The @racket[turn-on] and @racket[turn-off] callbacks are invoked when the button changes to checked or unchecked, respectively. -The @scheme[state] argument determines whether the button is initially +The @racket[state] argument determines whether the button is initially checked.} } diff --git a/collects/embedded-gui/scribblings/horizontal-alignment.scrbl b/collects/embedded-gui/scribblings/horizontal-alignment.scrbl index f08bf745..75f73d95 100644 --- a/collects/embedded-gui/scribblings/horizontal-alignment.scrbl +++ b/collects/embedded-gui/scribblings/horizontal-alignment.scrbl @@ -8,5 +8,5 @@ [after (or/c (is-a?/c alignment<%>) false/c) #f])]{ Inserts a new horizontal-alignment container into -@scheme[parent]---optionally after a given container also in -@scheme[parent]. The new container can be initially shown or hidden.}} +@racket[parent]---optionally after a given container also in +@racket[parent]. The new container can be initially shown or hidden.}} diff --git a/collects/embedded-gui/scribblings/snip-procs.scrbl b/collects/embedded-gui/scribblings/snip-procs.scrbl index 51f3a96c..027fdced 100644 --- a/collects/embedded-gui/scribblings/snip-procs.scrbl +++ b/collects/embedded-gui/scribblings/snip-procs.scrbl @@ -28,8 +28,8 @@ The pasteboard that contains the snip.} [snip (is-a?/c snip%)]) any/c]{ -Applies @scheme[f] to all snips in the parent of @scheme[snip], -starting with @scheme[snip].} +Applies @racket[f] to all snips in the parent of @racket[snip], +starting with @racket[snip].} @defproc[(for-each-snip [f ((is-a?/c snip%) . -> . any/c)] [first-snip (is-a?/c snip%)] @@ -37,9 +37,9 @@ starting with @scheme[snip].} void?]{ Applies the function to each snip in the parent of -@scheme[first-snip], starting with @scheme[first-snip]. If -@scheme[more] lists are supplied, they are used for extra arguments to -@scheme[f], just like extra lists provided to @scheme[for-each].} +@racket[first-snip], starting with @racket[first-snip]. If +@racket[more] lists are supplied, they are used for extra arguments to +@racket[f], just like extra lists provided to @racket[for-each].} @defproc[(map-snip [f ((is-a?/c snip%) . -> . any/c)] [first-snip (is-a?/c snip%)] @@ -47,10 +47,10 @@ Applies the function to each snip in the parent of void?]{ Applies the function to each snip in the parent of -@scheme[first-snip], starting with @scheme[first-snip], and -accumulates the results into a list. If @scheme[more] lists are -supplied, they are used for extra arguments to @scheme[f], just like -extra lists provided to @scheme[map].} +@racket[first-snip], starting with @racket[first-snip], and +accumulates the results into a list. If @racket[more] lists are +supplied, they are used for extra arguments to @racket[f], just like +extra lists provided to @racket[map].} @defproc[(stretchable-width? [snip (is-a?/c snip%)]) boolean?]{ diff --git a/collects/embedded-gui/scribblings/snip-wrapper.scrbl b/collects/embedded-gui/scribblings/snip-wrapper.scrbl index f14eee31..f74fc4ae 100644 --- a/collects/embedded-gui/scribblings/snip-wrapper.scrbl +++ b/collects/embedded-gui/scribblings/snip-wrapper.scrbl @@ -3,10 +3,10 @@ @defclass/title[snip-wrapper% dllist<%> (alignment<%>)]{ -Adapts an arbitrary @scheme[snip<%>] to work in an alignment +Adapts an arbitrary @racket[snip<%>] to work in an alignment container. @defconstructor[([parent (is-a?/c alignment-parent<%>)] [snip (is-a?/c snip%)])]{ -Adds @scheme[snip] to @scheme[parent].}} +Adds @racket[snip] to @racket[parent].}} diff --git a/collects/embedded-gui/scribblings/stretchable-snip.scrbl b/collects/embedded-gui/scribblings/stretchable-snip.scrbl index 2a4eca06..a0d7a8fc 100644 --- a/collects/embedded-gui/scribblings/stretchable-snip.scrbl +++ b/collects/embedded-gui/scribblings/stretchable-snip.scrbl @@ -4,8 +4,8 @@ @definterface/title[stretchable-snip<%> ()]{ Must be implemented by any snip class whose objects will be -stretchable when inserted into an @scheme[aligned-pasteboard<%>] -within a @scheme[snip-wrapper%]. +stretchable when inserted into an @racket[aligned-pasteboard<%>] +within a @racket[snip-wrapper%]. @defmethod[(get-aligned-min-width) (and/c real? (not/c negative?))]{ diff --git a/collects/embedded-gui/scribblings/text-button-snip.scrbl b/collects/embedded-gui/scribblings/text-button-snip.scrbl index a6567306..9ec63966 100644 --- a/collects/embedded-gui/scribblings/text-button-snip.scrbl +++ b/collects/embedded-gui/scribblings/text-button-snip.scrbl @@ -8,6 +8,6 @@ A button with a text label. @defconstructor[([label string?] [callback ((is-a?/c text-button-snip%) (is-a?/c event%) . -> . void)])]{ -The @scheme[callback] is called when the button is clicked.} +The @racket[callback] is called when the button is clicked.} } diff --git a/collects/embedded-gui/scribblings/toggle-button-snip.scrbl b/collects/embedded-gui/scribblings/toggle-button-snip.scrbl index 3f6a4ece..db4fb20a 100644 --- a/collects/embedded-gui/scribblings/toggle-button-snip.scrbl +++ b/collects/embedded-gui/scribblings/toggle-button-snip.scrbl @@ -3,7 +3,7 @@ @defclass/title[toggle-button-snip% snip% ()]{ -A @scheme[check-box%]-like control that a user can toggle between +A @racket[check-box%]-like control that a user can toggle between checked and unchecked states. @defconstructor[([images-off (cons/c path-string? path-string?)] @@ -12,17 +12,17 @@ checked and unchecked states. [turn-off ((is-a?/c toggle-button-snip%) (is-a?/c event%) . -> . void?)] [state (symbols 'on 'off) 'on])]{ -The @scheme[images-off] argument is a pair filenames to be load as the +The @racket[images-off] argument is a pair filenames to be load as the button-label image, where the first is the image for when the button is at rest, and the second is the image for the button while its pressed---in both cases when the button is not checked by the -user. The @scheme[images-on] argument similarly determines the images +user. The @racket[images-on] argument similarly determines the images for then the button is checked. -The @scheme[turn-on] and @scheme[turn-off] callbacks are invoked when +The @racket[turn-on] and @racket[turn-off] callbacks are invoked when the button changes to checked or unchecked, respectively. -The @scheme[state] argument determines whether the button is initially +The @racket[state] argument determines whether the button is initially checked.} } diff --git a/collects/embedded-gui/scribblings/vertical-alignment.scrbl b/collects/embedded-gui/scribblings/vertical-alignment.scrbl index 63814dee..146a83ed 100644 --- a/collects/embedded-gui/scribblings/vertical-alignment.scrbl +++ b/collects/embedded-gui/scribblings/vertical-alignment.scrbl @@ -8,5 +8,5 @@ [after (or/c (is-a?/c alignment<%>) false/c) #f])]{ Inserts a new vertical-alignment container into -@scheme[parent]---optionally after a given container also in -@scheme[parent]. The new container can be initially shown or hidden.}} +@racket[parent]---optionally after a given container also in +@racket[parent]. The new container can be initially shown or hidden.}} diff --git a/collects/framework/gui-utils.rkt b/collects/framework/gui-utils.rkt index 6faa0923..52d3659a 100644 --- a/collects/framework/gui-utils.rkt +++ b/collects/framework/gui-utils.rkt @@ -39,9 +39,7 @@ ;; quote-literal-label: string -> string (define (quote-literal-label a-str) (trim-string (regexp-replace* #rx"(&)" a-str "\\1\\1") - maximum-string-label-length)) - - + maximum-string-label-length)) ;; selected-text-color : color (define selected-text-color (send the-color-database find-color "black")) @@ -302,7 +300,7 @@ (λ (str) ((string-length str) . <= . size)))]) @{Constructs a string whose size is less - than @scheme[size] by trimming the @scheme[str] + than @racket[size] by trimming the @racket[str] and inserting an ellispses into it.}) (proc-doc @@ -334,12 +332,12 @@ gui-utils:cancel-on-right? (-> boolean?) () - @{Returns @scheme[#t] if cancel should be on the right-hand side (or below) - in a dialog and @scheme[#f] otherwise. + @{Returns @racket[#t] if cancel should be on the right-hand side (or below) + in a dialog and @racket[#f] otherwise. - Just returns what @scheme[system-position-ok-before-cancel?] does. + Just returns what @racket[system-position-ok-before-cancel?] does. - See also @scheme[gui-utils:ok/cancel-buttons].}) + See also @racket[gui-utils:ok/cancel-buttons].}) (proc-doc/names gui-utils:ok/cancel-buttons (->* ((is-a?/c area-container<%>) @@ -365,12 +363,12 @@ The first result is be the OK button and the second is the cancel button. - By default, the confirmation action button has the @scheme['(border)] style, + By default, the confirmation action button has the @racket['(border)] style, meaning that hitting return in the dialog will trigger the confirmation action. The @racket[confirm-style] argument can override this behavior, tho. See @racket[button%] for the precise list of allowed styles. - See also @scheme[gui-utils:cancel-on-right?].}) + See also @racket[gui-utils:cancel-on-right?].}) (proc-doc/names gui-utils:next-untitled-name @@ -390,13 +388,13 @@ The first case in the case lambda returns the current delay in seconds before a watch cursor is shown, - when either @scheme[gui-utils:local-busy-cursor] or - @scheme[gui-utils:show-busy-cursor] is called. + when either @racket[gui-utils:local-busy-cursor] or + @racket[gui-utils:show-busy-cursor] is called. The second case in the case lambda Sets the delay, in seconds, before a watch cursor is shown, when - either @scheme[gui-utils:local-busy-cursor] or - @scheme[gui-utils:show-busy-cursor] is called.}) + either @racket[gui-utils:local-busy-cursor] or + @racket[gui-utils:show-busy-cursor] is called.}) (proc-doc/names gui-utils:show-busy-cursor (->* ((-> any/c)) @@ -404,12 +402,12 @@ any/c) ((thunk) ((delay (gui-utils:cursor-delay)))) - @{Evaluates @scheme[(thunk)] with a watch cursor. The argument - @scheme[delay] specifies the amount of time before the watch cursor is - opened. Use @scheme[gui-utils:cursor-delay] to set this value + @{Evaluates @racket[(thunk)] with a watch cursor. The argument + @racket[delay] specifies the amount of time before the watch cursor is + opened. Use @racket[gui-utils:cursor-delay] to set this value to all calls. - This function returns the result of @scheme[thunk].}) + This function returns the result of @racket[thunk].}) (proc-doc/names gui-utils:delay-action (real? @@ -424,7 +422,7 @@ to appear after 2 seconds and the action may or may not take more than two seconds, use this pattern: - @schemeblock[(let ([close-down + @racketblock[(let ([close-down (gui-utils:delay-action 2 (λ () .. init watch cursor ...) @@ -432,11 +430,11 @@ ;; .. do action ... (close-down))] - Creates a thread that waits @scheme[delay-time]. After @scheme[delay-time] + Creates a thread that waits @racket[delay-time]. After @racket[delay-time] has elapsed, if the result thunk has @italic{not} been called, call - @scheme[open]. Then, when the result thunk is called, call - @scheme[close]. The function @scheme[close] will only be called if - @scheme[open] has been called.}) + @racket[open]. Then, when the result thunk is called, call + @racket[close]. The function @racket[close] will only be called if + @racket[open] has been called.}) (proc-doc/names gui-utils:local-busy-cursor @@ -447,13 +445,13 @@ any/c) ((window thunk) ((delay (gui-utils:cursor-delay)))) - @{Evaluates @scheme[(thunk)] with a watch cursor in @scheme[window]. If - @scheme[window] is @scheme[#f], the watch cursor is turned on globally. - The argument @scheme[delay] specifies the amount of time before the watch - cursor is opened. Use @scheme[gui-utils:cursor-delay] + @{Evaluates @racket[(thunk)] with a watch cursor in @racket[window]. If + @racket[window] is @racket[#f], the watch cursor is turned on globally. + The argument @racket[delay] specifies the amount of time before the watch + cursor is opened. Use @racket[gui-utils:cursor-delay] to set this value for all uses of this function. - The result of this function is the result of @scheme[thunk].}) + The result of this function is the result of @racket[thunk].}) (proc-doc/names gui-utils:unsaved-warning @@ -473,17 +471,17 @@ @{This displays a dialog that warns the user of a unsaved file. - The string, @scheme[action], indicates what action is about to + The string, @racket[action], indicates what action is about to take place, without saving. For example, if the application - is about to close a file, a good action is @scheme["Close" "Anyway"]. + is about to close a file, a good action is @racket["Close" "Anyway"]. The result symbol indicates the user's choice. If - @scheme[can-save-now?] is @scheme[#f], this function does not + @racket[can-save-now?] is @racket[#f], this function does not give the user the ``Save'' option and thus will not return - @scheme['save]. + @racket['save]. - If @scheme[cancel?] is @scheme[#t] there is a cancel button - in the dialog and the result may be @scheme['cancel]. If it - is @scheme[#f], then there is no cancel button, and @scheme['cancel] + If @racket[cancel?] is @racket[#t] there is a cancel button + in the dialog and the result may be @racket['cancel]. If it + is @racket[#f], then there is no cancel button, and @racket['cancel] will not be the result of the function. }) @@ -514,30 +512,30 @@ dialog opens a message box asking the user to actually choose one of the two options. - The dialog will contain the string @scheme[message] and two buttons, - labeled with the @scheme[true-choice] and the @scheme[false-choice]. If the - user clicks on @scheme[true-choice] @scheme[#t] is returned. If the user - clicks on @scheme[false-choice], @scheme[#f] is returned. + The dialog will contain the string @racket[message] and two buttons, + labeled with the @racket[true-choice] and the @racket[false-choice]. If the + user clicks on @racket[true-choice] @racket[#t] is returned. If the user + clicks on @racket[false-choice], @racket[#f] is returned. - The argument @scheme[default-result] determines how closing the window is - treated. If the argument is @scheme['disallow-close], closing the window + The argument @racket[default-result] determines how closing the window is + treated. If the argument is @racket['disallow-close], closing the window is not allowed. If it is anything else, that value is returned when the user closes the window. - If @scheme[gui-utils:cancel-on-right?] - returns @scheme[#t], the false choice is on the right. + If @racket[gui-utils:cancel-on-right?] + returns @racket[#t], the false choice is on the right. Otherwise, the true choice is on the right. - The @scheme[style] parameter is (eventually) passed to - @scheme[message] + The @racket[style] parameter is (eventually) passed to + @racket[message] as an icon in the dialog. - If @scheme[checkbox-proc] is given, it should be a procedure that behaves + If @racket[checkbox-proc] is given, it should be a procedure that behaves like a parameter for getting/setting a boolean value. The intention for this value is that it can be used to disable the dialog. When it is - given, a checkbox will appear with a @scheme[checkbox-label] label - (defaults to the @scheme[dont-ask-again] string constant), and that - checkbox value will be sent to the @scheme[checkbox-proc] when the dialog + given, a checkbox will appear with a @racket[checkbox-label] label + (defaults to the @racket[dont-ask-again] string constant), and that + checkbox value will be sent to the @racket[checkbox-proc] when the dialog is closed. Note that the dialog will always pop-up --- it is the caller's responsibility to avoid the dialog if not needed.}) @@ -550,13 +548,13 @@ ((white-on-black? #f))) @{This delta is designed for use with @method[text set-clickback]. - Use it as one of the @scheme[style-delta%] argument to + Use it as one of the @racket[style-delta%] argument to @method[text% set-clickback]. - If @scheme[white-on-black?] is true, the function returns + If @racket[white-on-black?] is true, the function returns a delta suitable for use on a black background. - See also @scheme[gui-utils:get-clickback-delta].}) + See also @racket[gui-utils:get-clickback-delta].}) (proc-doc/names gui-utils:get-clickback-delta @@ -569,8 +567,8 @@ Use the result of this function as the style for the region text where the clickback is set. - If @scheme[white-on-black?] is true, the function returns + If @racket[white-on-black?] is true, the function returns a delta suitable for use on a black background. See also - @scheme[gui-utils:get-clicked-clickback-delta].})) + @racket[gui-utils:get-clicked-clickback-delta].})) diff --git a/collects/framework/main.rkt b/collects/framework/main.rkt index 7c577af4..fb73b327 100644 --- a/collects/framework/main.rkt +++ b/collects/framework/main.rkt @@ -69,7 +69,7 @@ (proc-doc/names text:range? (-> any/c boolean?) (arg) - @{Determines if @scheme[arg] is an instance of the @tt{range} struct.}) + @{Determines if @racket[arg] is an instance of the @tt{range} struct.}) (proc-doc/names text:range-start @@ -108,16 +108,16 @@ (parameter/c string?) suffix @{A string that is inserted after a completion is inserted by a - @scheme[text:autocomplete] instance. + @racket[text:autocomplete] instance. - Defaults to @scheme[""].}) + Defaults to @racket[""].}) (parameter-doc text:autocomplete-limit (parameter/c (and/c integer? exact? positive?)) count @{Controls the number of completions visible at a time in the menu produced - by @scheme[text:autocomplete] instances. + by @racket[text:autocomplete] instances. Defaults to 15.}) @@ -125,38 +125,38 @@ text:get-completions/manuals (-> (or/c false/c (listof symbol?)) (listof string?)) (manuals) - @{Returns the list of keywords for the manuals from @scheme[manuals] by + @{Returns the list of keywords for the manuals from @racket[manuals] by extracting all of the documented exports of the manuals. The symbols are meant to be module paths, e.g., the quoted form of the argument to - @scheme[require]. + @racket[require]. - If @scheme[manuals] is false, then all of the documented names are used.}) + If @racket[manuals] is false, then all of the documented names are used.}) (proc-doc/names text:lookup-port-name (-> symbol? (or/c (is-a?/c editor:basic<%>) false/c)) (manuals) @{Returns the editor instance whose port-name matches the given symbol. - If no editor can be found, then returns @scheme[false].}) + If no editor can be found, then returns @racket[false].}) (proc-doc/names number-snip:make-repeating-decimal-snip (number? boolean? . -> . (is-a?/c snip%)) (num show-prefix?) - @{Makes a number snip that shows the decimal expansion for @scheme[number]. + @{Makes a number snip that shows the decimal expansion for @racket[number]. The boolean indicates if a @litchar{#e} prefix appears on the number. - See also @scheme[number-snip:make-fraction-snip].}) + See also @racket[number-snip:make-fraction-snip].}) (proc-doc/names number-snip:make-fraction-snip (number? boolean? . -> . (is-a?/c snip%)) (num show-prefix-in-decimal-view?) - @{Makes a number snip that shows a fractional view of @scheme[number]. + @{Makes a number snip that shows a fractional view of @racket[number]. The boolean indicates if a @litchar{#e} prefix appears on the number, when shown in the decimal state. - See also @scheme[number-snip:make-repeating-decimal-snip].}) + See also @racket[number-snip:make-repeating-decimal-snip].}) (thing-doc comment-box:snipclass @@ -167,13 +167,13 @@ version:add-spec (any/c any/c . -> . void?) (spec revision) - @{The two values are appended to the version string. @scheme[write] is used + @{The two values are appended to the version string. @racket[write] is used to transform them to strings. For example: - @scheme[(version:add-spec 's 1)] + @racket[(version:add-spec 's 1)] in version 205 will make the version string be @litchar{205s1}. The - symbols @scheme['f] and @scheme['d] were used internally for framework and + symbols @racket['f] and @racket['d] were used internally for framework and drscheme revisions in the past.}) (proc-doc/names @@ -181,17 +181,17 @@ (-> string?) () @{This function returns a string describing the version of this application. - See also @scheme[version:add-spec].}) + See also @racket[version:add-spec].}) (parameter-doc application:current-app-name (parameter/c string?) name @{This is a parameter specifying the name of the current application. It is - used in the help menu (see @scheme[frame:standard-menus%]) and in frame - titles (see @scheme[frame:editor%]). The first case in the case-lambda + used in the help menu (see @racket[frame:standard-menus%]) and in frame + titles (see @racket[frame:editor%]). The first case in the case-lambda returns the current name, and the second case in the case-lambda sets the - name of the application to @scheme[name].}) + name of the application to @racket[name].}) (proc-doc/names preferences:put-preferences/gui @@ -199,7 +199,7 @@ (listof any/c) any) (name-list val-list) - @{Like @scheme[put-preferences], but has more sophisticated error handling. + @{Like @racket[put-preferences], but has more sophisticated error handling. In particular, it @itemize[ @item{waits for three consecutive failures before informing the user} @@ -216,7 +216,7 @@ any/c) ((sym) ((default (λ () (error 'get-preference/gui "unknown pref ~s" sym))))) - @{Like @scheme[get-preference], but has more sophisticated error handling. + @{Like @racket[get-preference], but has more sophisticated error handling. In particular, it passes a @racket[#:timeout-lock-there] argument that informs the user that the preferences file is locked (and offers the alternative of not showing the message again).}) @@ -236,20 +236,20 @@ (send parent get-children)))))]) void?) (labels f) - @{@scheme[preferences:add-preference-panel] adds the result of @scheme[f] - with name @scheme[labels] to the preferences dialog box. + @{@racket[preferences:add-preference-panel] adds the result of @racket[f] + with name @racket[labels] to the preferences dialog box. The labels determine where this preference panel is placed in the dialog. If the list is just one string, the preferences panel is placed at the top level of the dialog. If there are more strings, a hierarchy of nested panels is created and the new panel is added at the end. If multiple calls - to @scheme[preferences:add-preference-panel] pass the same prefix of + to @racket[preferences:add-preference-panel] pass the same prefix of strings, those panels are placed in the same children. When the preference dialog is opened for the first time, the function - @scheme[f] is called with a panel, and @scheme[f] is expected to add a new + @racket[f] is called with a panel, and @racket[f] is expected to add a new child panel to it and add whatever preferences configuration controls it - wants to that panel. Then, @scheme[f]'s should return the panel it added.}) + wants to that panel. Then, @racket[f]'s should return the panel it added.}) (proc-doc/names preferences:add-editor-checkbox-panel @@ -279,14 +279,14 @@ preferences:add-to-warnings-checkbox-panel (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) - @{Saves @scheme[proc] until the preferences panel is created, when it is + @{Saves @racket[proc] until the preferences panel is created, when it is called with the Misc. panel to add new children to the panel.}) (proc-doc/names preferences:add-to-scheme-checkbox-panel (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) - @{Saves @scheme[proc] until the preferences panel is created, when it is + @{Saves @racket[proc] until the preferences panel is created, when it is called with the Racket preferences panel to add new children to the panel.}) @@ -294,7 +294,7 @@ preferences:add-to-editor-checkbox-panel (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) - @{Saves @scheme[proc] until the preferences panel is created, when it is + @{Saves @racket[proc] until the preferences panel is created, when it is called with the editor preferences panel to add new children to the panel.}) @@ -302,7 +302,7 @@ preferences:add-to-general-checkbox-panel (((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (proc) - @{Saves @scheme[proc] until the preferences panel is created, when it is + @{Saves @racket[proc] until the preferences panel is created, when it is called with the general preferences panel to add new children to the panel.}) @@ -328,20 +328,20 @@ preferences:add-on-close-dialog-callback ((-> void?) . -> . void?) (cb) - @{Registers @scheme[cb]. Next time the user clicks the OK button the - preferences dialog, all of the @scheme[cb] functions are called, assuming + @{Registers @racket[cb]. Next time the user clicks the OK button the + preferences dialog, all of the @racket[cb] functions are called, assuming that each of the callbacks passed to - @scheme[preferences:add-can-close-dialog-callback] succeed.}) + @racket[preferences:add-can-close-dialog-callback] succeed.}) (proc-doc/names preferences:add-can-close-dialog-callback ((-> boolean?) . -> . void?) (cb) - @{Registers @scheme[cb]. Next time the user clicks the OK button the - preferences dialog, all of the @scheme[cb] functions are called. If any of - them return @scheme[#f], the dialog is not closed. + @{Registers @racket[cb]. Next time the user clicks the OK button the + preferences dialog, all of the @racket[cb] functions are called. If any of + them return @racket[#f], the dialog is not closed. - See also @scheme[preferences:add-on-close-dialog-callback].}) + See also @racket[preferences:add-on-close-dialog-callback].}) (proc-doc/names autosave:register @@ -350,8 +350,8 @@ . -> . void?) (obj) - @{Adds @scheme[obj] to the list of objects to be autosaved. When it is time - to autosave, the @scheme[do-autosave] method of the object is called. This + @{Adds @racket[obj] to the list of objects to be autosaved. When it is time + to autosave, the @racket[do-autosave] method of the object is called. This method is responsible for performing the autosave. There is no need to de-register an object because the autosaver keeps a @@ -372,18 +372,18 @@ exit:exiting? (-> boolean?) () - @{Returns @scheme[#t] to indicate that an exit operation is taking place. + @{Returns @racket[#t] to indicate that an exit operation is taking place. Does not indicate that the app will actually exit, since the user may cancel the exit. - See also @scheme[exit:insert-on-callback] and - @scheme[exit:insert-can?-callback].}) + See also @racket[exit:insert-on-callback] and + @racket[exit:insert-can?-callback].}) (proc-doc/names exit:set-exiting (boolean? . -> . void?) (exiting?) - @{Sets a flag that affects the result of @scheme[exit:exiting?].}) + @{Sets a flag that affects the result of @racket[exit:exiting?].}) (proc-doc/names exit:insert-on-callback @@ -391,7 +391,7 @@ (callback) @{Adds a callback to be called when exiting. This callback must not fail. If a callback should stop an exit from happening, use - @scheme[exit:insert-can?-callback].}) + @racket[exit:insert-can?-callback].}) (proc-doc/names exit:insert-can?-callback @@ -399,7 +399,7 @@ (callback) @{Use this function to add a callback that determines if an attempted exit can proceed. This callback should not clean up any state, since another - callback may veto the exit. Use @scheme[exit:insert-on-callback] for + callback may veto the exit. Use @racket[exit:insert-on-callback] for callbacks that clean up state.}) (proc-doc/names @@ -407,29 +407,29 @@ (-> boolean?) () @{Calls the ``can-callbacks'' and returns their results. See - @scheme[exit:insert-can?-callback] for more information.}) + @racket[exit:insert-can?-callback] for more information.}) (proc-doc/names exit:on-exit (-> void?) () - @{Calls the ``on-callbacks''. See @scheme[exit:insert-on-callback] for more + @{Calls the ``on-callbacks''. See @racket[exit:insert-on-callback] for more information.}) (proc-doc/names exit:exit (-> any) () - @{@scheme[exit:exit] performs four actions: + @{@racket[exit:exit] performs four actions: @itemize[ - @item{sets the result of the @scheme[exit:exiting?] function to - @scheme[#t].} - @item{invokes the exit-callbacks, with @scheme[exit:can-exit?] if none of - the ``can?'' callbacks return @scheme[#f],} - @item{invokes @scheme[exit:on-exit] and then} - @item{queues a callback that calls @scheme[exit] (a racket procedure) - and (if @scheme[exit] returns) sets the result of - @scheme[exit:exiting?] back to @scheme[#t].}]}) + @item{sets the result of the @racket[exit:exiting?] function to + @racket[#t].} + @item{invokes the exit-callbacks, with @racket[exit:can-exit?] if none of + the ``can?'' callbacks return @racket[#f],} + @item{invokes @racket[exit:on-exit] and then} + @item{queues a callback that calls @racket[exit] (a racket procedure) + and (if @racket[exit] returns) sets the result of + @racket[exit:exiting?] back to @racket[#t].}]}) (proc-doc/names exit:user-oks-exit @@ -442,43 +442,43 @@ path-utils:generate-autosave-name (string? . -> . string?) (filename) - @{Generates a name for an autosave file from @scheme[filename].}) + @{Generates a name for an autosave file from @racket[filename].}) (proc-doc/names path-utils:generate-backup-name (path? . -> . path?) (filename) - @{Generates a name for an backup file from @scheme[filename].}) + @{Generates a name for an backup file from @racket[filename].}) (parameter-doc finder:dialog-parent-parameter (parameter/c (or/c false/c (is-a?/c dialog%) (is-a?/c frame%))) parent @{This parameter determines the parent of the dialogs created by - @scheme[finder:get-file], @scheme[finder:put-file], - @scheme[finder:common-get-file], @scheme[finder:common-put-file], - @scheme[finder:common-get-file-list], @scheme[finder:std-get-file], - and @scheme[finder:std-put-file].}) + @racket[finder:get-file], @racket[finder:put-file], + @racket[finder:common-get-file], @racket[finder:common-put-file], + @racket[finder:common-get-file-list], @racket[finder:std-get-file], + and @racket[finder:std-put-file].}) (parameter-doc finder:default-extension (parameter/c string?) extension @{This parameter controls the default extension for the framework's - @scheme[finder:put-file] dialog. Its value gets passed as the - @scheme[default-extension] argument to @scheme[put-file]. + @racket[finder:put-file] dialog. Its value gets passed as the + @racket[default-extension] argument to @racket[put-file]. - Its default value is @scheme[""].}) + Its default value is @racket[""].}) (parameter-doc finder:default-filters (parameter/c (listof (list/c string? string?))) filters @{This parameter controls the default filters for the framework's - @scheme[finder:put-file] dialog. Its value gets passed as the - @scheme[default-filters] argument to @scheme[put-file]. + @racket[finder:put-file] dialog. Its value gets passed as the + @racket[default-filters] argument to @racket[put-file]. - Its default value is @scheme['(("Any" "*.*"))].}) + Its default value is @racket['(("Any" "*.*"))].}) (proc-doc/names finder:common-put-file @@ -500,7 +500,7 @@ (filter-msg "That filename does not have the right form.") (parent (finder:dialog-parent-parameter)))) @{This procedure queries the user for a single filename, using a - platform-independent dialog box. Consider using @scheme[finder:put-file] + platform-independent dialog box. Consider using @racket[finder:put-file] instead of this function.}) (proc-doc/names @@ -520,7 +520,7 @@ (parent #f))) @{This procedure queries the user for a single filename, using a platform-independent dialog box. Consider using - @scheme[finder:get-file] instead of this function.}) + @racket[finder:get-file] instead of this function.}) (proc-doc/names finder:std-put-file @@ -542,7 +542,7 @@ (filter-msg "That filename does not have the right form.") (parent (finder:dialog-parent-parameter)))) @{This procedure queries the user for a single filename, using a - platform-dependent dialog box. Consider using @scheme[finder:put-file] + platform-dependent dialog box. Consider using @racket[finder:put-file] instead of this function.}) (proc-doc/names @@ -561,7 +561,7 @@ (filter-msg "That filename does not have the right form.") (parent #f))) @{This procedure queries the user for a single filename, using a - platform-dependent dialog box. Consider using @scheme[finder:get-file] + platform-dependent dialog box. Consider using @racket[finder:get-file] instead of this function.}) (proc-doc/names @@ -585,9 +585,9 @@ (parent (finder:dialog-parent-parameter)))) @{Queries the user for a filename. - If the result of @scheme[(preferences:get 'framework:file-dialogs)] is - @scheme['std] this calls @scheme[finder:std-put-file], and if it is - @scheme['common], @scheme[finder:common-put-file] is called.}) + If the result of @racket[(preferences:get 'framework:file-dialogs)] is + @racket['std] this calls @racket[finder:std-put-file], and if it is + @racket['common], @racket[finder:common-put-file] is called.}) (proc-doc/names finder:get-file @@ -606,9 +606,9 @@ (parent #f))) @{Queries the user for a filename. - If the result of @scheme[(preferences:get 'framework:file-dialogs)] is - @scheme['std] this calls @scheme[finder:std-get-file], and if it is - @scheme['common], @scheme[finder:common-get-file] is called.}) + If the result of @racket[(preferences:get 'framework:file-dialogs)] is + @racket['std] this calls @racket[finder:std-get-file], and if it is + @racket['common], @racket[finder:common-get-file] is called.}) (proc-doc/names finder:common-get-file-list @@ -632,7 +632,7 @@ frame:setup-size-pref (symbol? number? number? . -> . void) (size-pref-sym width height) - @{Initializes a preference for the @scheme[frame:size-pref] mixin. + @{Initializes a preference for the @racket[frame:size-pref] mixin. The first argument should be the preferences symbol, and the second and third should be the default width and height, respectively.}) @@ -644,12 +644,12 @@ void?) ((menu menu-item%) ((func void))) - @{Inserts three menu items into @scheme[menu], one that inserts a text box, + @{Inserts three menu items into @racket[menu], one that inserts a text box, one that inserts a pasteboard box, and one that inserts an image into the - currently focused editor (if there is one). Uses @scheme[menu-item%] as + currently focused editor (if there is one). Uses @racket[menu-item%] as the class for the menu items. - Calls @scheme[func] right after inserting each menu item.}) + Calls @racket[func] right after inserting each menu item.}) (proc-doc/names frame:reorder-menus @@ -677,20 +677,20 @@ (is-a?/c bitmap%)))) icon-spec @{The value of this parameter is used by the initialization code of - @scheme[frame:basic-mixin]. + @racket[frame:basic-mixin]. @itemize[ - @item{If it is @scheme[#f], then its value is ignored.} - @item{If it is a @scheme[bitmap%], then the @method[frame% set-icon] is + @item{If it is @racket[#f], then its value is ignored.} + @item{If it is a @racket[bitmap%], then the @method[frame% set-icon] is called with the bitmap, the result of invoking the - @scheme[bitmap% get-loaded-mask] method, and @scheme['both].} + @racket[bitmap% get-loaded-mask] method, and @racket['both].} @item{If it is a pair of bitmaps, then the @method[frame% set-icon] method is invoked twice, once with each bitmap in the pair. The first bitmap is passed (along with the result of its - @scheme[bitmap% get-loaded-mask]) and @scheme['small], and then the + @racket[bitmap% get-loaded-mask]) and @racket['small], and then the second bitmap is passed (also along with the result of its - @scheme[bitmap% get-loaded-mask]) and @scheme['large].}] + @racket[bitmap% get-loaded-mask]) and @racket['large].}] - Defaults to @scheme[#f].}) + Defaults to @racket[#f].}) (proc-doc/names group:get-the-frame-group @@ -702,7 +702,7 @@ group:on-close-action (-> void?) () - @{See also @scheme[group:can-close-check]. + @{See also @racket[group:can-close-check]. Call this function from the @method[top-level-window<%> can-close?] callback of a frame in order for the group to properly close the @@ -712,7 +712,7 @@ group:can-close-check (-> boolean?) () - @{See also @scheme[group:on-close-action]. + @{See also @racket[group:on-close-action]. Call this function from the @method[top-level-window<%> can-close?] callback of a frame in order for the group to properly close the @@ -760,12 +760,12 @@ (name pred handler) @{This function inserts a format handler. - The string, @scheme[name] names the format handler for use with - @scheme[handler:find-named-format-handler]. If @scheme[pred] is a string, + The string, @racket[name] names the format handler for use with + @racket[handler:find-named-format-handler]. If @racket[pred] is a string, it is matched with the extension of a filename by - @scheme[handler:find-format-handler]. If @scheme[pred] is a list of + @racket[handler:find-format-handler]. If @racket[pred] is a list of strings, they are each matched with the extension of a filename by - @scheme[handler:find-format-handler]. If it is a function, the filename is + @racket[handler:find-format-handler]. If it is a function, the filename is applied to the function and the functions result determines if this is the handler to use. @@ -777,18 +777,18 @@ (string? . -> . (path? . -> . (is-a?/c frame:editor<%>))) (name) @{This function selects a format handler. See also - @scheme[handler:insert-format-handler]. + @racket[handler:insert-format-handler]. - It finds a handler based on @scheme[name].}) + It finds a handler based on @racket[name].}) (proc-doc/names handler:find-format-handler (path? . -> . (path? . -> . (is-a?/c frame:editor<%>))) (filename) @{This function selects a format handler. See also - @scheme[handler:insert-format-handler]. + @racket[handler:insert-format-handler]. - It finds a handler based on @scheme[filename].}) + It finds a handler based on @racket[filename].}) (proc-doc/names handler:edit-file @@ -800,29 +800,29 @@ (λ () ((handler:current-create-new-window) filename))))) @{This function creates a frame or re-uses an existing frame to edit a file. - If the preference @scheme['framework:open-here] is set to @scheme[#t], and - @scheme[(send (group:get-the-frame-group) get-open-here-frame)] returns a + If the preference @racket['framework:open-here] is set to @racket[#t], and + @racket[(send (group:get-the-frame-group) get-open-here-frame)] returns a frame, the @method[frame:open-here<%> open-here] method of that frame is used to load the file in the existing frame. Otherwise, it invokes the appropriate format handler to open the file (see - @scheme[handler:insert-format-handler]). + @racket[handler:insert-format-handler]). @itemize[ - @item{If @scheme[filename] is a string, this function checks the result - of @scheme[group:get-the-frame-group] to see if the - @scheme[filename] is already open by a frame in the group. + @item{If @racket[filename] is a string, this function checks the result + of @racket[group:get-the-frame-group] to see if the + @racket[filename] is already open by a frame in the group. @itemize[ @item{If so, it returns the frame.} @item{If not, this function calls - @scheme[handler:find-format-handler] with - @scheme[filename]. + @racket[handler:find-format-handler] with + @racket[filename]. @itemize[ @item{If a handler is found, it is applied to - @scheme[filename] and its result is the final + @racket[filename] and its result is the final result.} - @item{If not, @scheme[make-default] is used.}]}]} - @item{If @scheme[filename] is @scheme[#f], @scheme[make-default] is + @item{If not, @racket[make-default] is used.}]}]} + @item{If @racket[filename] is @racket[#f], @racket[make-default] is used.}]}) (parameter-doc @@ -833,7 +833,7 @@ windows. The default setting is this: - @schemeblock[(λ (filename) + @racketblock[(λ (filename) (let ([frame (make-object frame:text-info-file% filename)]) (send frame show #t) frame))]}) @@ -846,11 +846,11 @@ (() ((dir #f))) @{This function queries the user for a filename and opens the file for - editing. It uses @scheme[handler:edit-file] to open the file, once the + editing. It uses @racket[handler:edit-file] to open the file, once the user has chosen it. - Calls @scheme[finder:get-file] and @scheme[handler:edit-file], passing - along @scheme[dir].}) + Calls @racket[finder:get-file] and @racket[handler:edit-file], passing + along @racket[dir].}) (proc-doc/names handler:install-recent-items @@ -858,7 +858,7 @@ (menu) @{This function deletes all of the items in the given menu and adds one menu item for each recently opened file. These menu items, when selected, call - @scheme[handler:edit-file] with the filename of the recently opened file. + @racket[handler:edit-file] with the filename of the recently opened file. The menu's size is limited to 10.}) @@ -867,7 +867,7 @@ ((implementation?/c frame:standard-menus<%>) . -> . void?) (frame) @{Sets the superclass for the recently opened files frame. It must be - derived from @scheme[frame:standard-menus].}) + derived from @racket[frame:standard-menus].}) (proc-doc/names handler:add-to-recent @@ -879,104 +879,104 @@ handler:set-recent-position (path? number? number? . -> . void?) (filename start end) - @{Sets the selection of the recently opened file to @scheme[start] and - @scheme[end].}) + @{Sets the selection of the recently opened file to @racket[start] and + @racket[end].}) (proc-doc/names handler:size-recently-opened-files (number? . -> . void?) (num) - @{Sizes the @scheme['framework:recently-opened-files/pos] preference list - length to @scheme[num].}) + @{Sizes the @racket['framework:recently-opened-files/pos] preference list + length to @racket[num].}) (proc-doc/names icon:get-paren-highlight-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the parenthesis highlight @scheme[bitmap%]. It is only used + @{This returns the parenthesis highlight @racket[bitmap%]. It is only used on black and white screens.}) (proc-doc/names icon:get-eof-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the @scheme[bitmap%] used for the clickable ``eof'' icon from - @scheme[text:ports].}) + @{This returns the @racket[bitmap%] used for the clickable ``eof'' icon from + @racket[text:ports].}) (proc-doc/names icon:get-autowrap-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the autowrap's @scheme[bitmap%]. + @{This returns the autowrap's @racket[bitmap%]. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names icon:get-lock-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the lock's @scheme[bitmap]. + @{This returns the lock's @racket[bitmap]. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names icon:get-unlock-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the reset unlocked @scheme[bitmap]. + @{This returns the reset unlocked @racket[bitmap]. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names icon:get-anchor-bitmap (-> (is-a?/c bitmap%)) () - @{This returns the anchor's @scheme[bitmap]. + @{This returns the anchor's @racket[bitmap]. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names icon:get-left/right-cursor (-> (is-a?/c cursor%)) () - @{This function returns a @scheme[cursor%] object that indicates left/right + @{This function returns a @racket[cursor%] object that indicates left/right sizing is possible, for use with columns inside a window. - The cursor may not respond @scheme[#t] to the @method[cursor% ok?] + The cursor may not respond @racket[#t] to the @method[cursor% ok?] method.}) (proc-doc/names icon:get-up/down-cursor (-> (is-a?/c cursor%)) () - @{This function returns a @scheme[cursor%] object that indicates up/down + @{This function returns a @racket[cursor%] object that indicates up/down sizing is possible, for use with columns inside a window. - The cursor may not respond @scheme[#t] to the @method[cursor% ok?] + The cursor may not respond @racket[#t] to the @method[cursor% ok?] method.}) (proc-doc/names icon:get-gc-on-bitmap (-> (is-a?/c bitmap%)) () - @{This returns a bitmap to be displayed in an @scheme[frame:info<%>] frame + @{This returns a bitmap to be displayed in an @racket[frame:info<%>] frame when garbage collection is taking place. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names icon:get-gc-off-bitmap (-> (is-a?/c bitmap%)) () - @{This returns a bitmap to be displayed in an @scheme[frame:info<%>] frame + @{This returns a bitmap to be displayed in an @racket[frame:info<%>] frame when garbage collection is not taking place. - The bitmap may not respond @scheme[#t] to the @method[bitmap% ok?] + The bitmap may not respond @racket[#t] to the @method[bitmap% ok?] method.}) (proc-doc/names @@ -984,19 +984,19 @@ (-> any/c any) (user-keybindings-path) @{Removes the keymap previously added by - @scheme[keymap:add-user-keybindings-file].}) + @racket[keymap:add-user-keybindings-file].}) (proc-doc/names keymap:add-user-keybindings-file (-> any/c any) (user-keybindings-path-or-require-spec) - @{Chains the keymap defined by @scheme[user-keybindings-path-or-require-spec] - to the global keymap, returned by @scheme[keymap:get-global]. + @{Chains the keymap defined by @racket[user-keybindings-path-or-require-spec] + to the global keymap, returned by @racket[keymap:get-global]. - If @scheme[user-keybindings-path-or-require-spec] is a path, the module is + If @racket[user-keybindings-path-or-require-spec] is a path, the module is loaded directly from that path. Otherwise, - @scheme[user-keybindings-path-or-require-spec] is treated like an argument - to @scheme[require].}) + @racket[user-keybindings-path-or-require-spec] is treated like an argument + to @racket[require].}) (parameter-doc keymap:add-to-right-button-menu @@ -1006,34 +1006,34 @@ (is-a?/c event%) void?)) proc - @{When the keymap that @scheme[keymap:get-global] returns is installed into + @{When the keymap that @racket[keymap:get-global] returns is installed into an editor, this parameter's value is used for right button clicks. Before calling this procedure, the function - @scheme[append-editor-operation-menu-items] is called. + @racket[append-editor-operation-menu-items] is called. - See also @scheme[keymap:add-to-right-button-menu/before].}) + See also @racket[keymap:add-to-right-button-menu/before].}) (parameter-doc keymap:add-to-right-button-menu/before (parameter/c (-> (is-a?/c popup-menu%) (is-a?/c editor<%>) (is-a?/c event%) void?)) proc - @{When the keymap that @scheme[keymap:get-global] returns is installed into + @{When the keymap that @racket[keymap:get-global] returns is installed into an editor, this function is called for right button clicks. After calling this procedure, the function - @scheme[append-editor-operation-menu-items] is called. + @racket[append-editor-operation-menu-items] is called. - See also @scheme[keymap:add-to-right-button-menu].}) + See also @racket[keymap:add-to-right-button-menu].}) (proc-doc/names keymap:call/text-keymap-initializer ((-> any/c) . -> . any/c) (thunk-proc) - @{This function parameterizes the call to @scheme[thunk-proc] by setting the + @{This function parameterizes the call to @racket[thunk-proc] by setting the keymap-initialization procedure (see - @scheme[current-text-keymap-initializer]) to install the framework's + @racket[current-text-keymap-initializer]) to install the framework's standard text bindings.}) (proc-doc/names @@ -1042,7 +1042,7 @@ (keybinding-string) @{Returns a string that denotes the same keybindings as the input string, except that it is in canonical form; two canonical keybinding strings can - be compared with @scheme[string=?].}) + be compared with @racket[string=?].}) (proc-doc/names keymap:get-editor @@ -1052,16 +1052,16 @@ these keys: @itemize[ - @item{@scheme["z"]: undo} - @item{@scheme["y"]: redo} - @item{@scheme["x"]: cut} - @item{@scheme["c"]: copy} - @item{@scheme["v"]: paste} - @item{@scheme["a"]: select all}] + @item{@racket["z"]: undo} + @item{@racket["y"]: redo} + @item{@racket["x"]: cut} + @item{@racket["c"]: copy} + @item{@racket["v"]: paste} + @item{@racket["a"]: select all}] where each key is prefixed with the menu-shortcut key, based on the - platform. Under Unix, the shortcut is @scheme["a:"]; under windows the - shortcut key is @scheme["c:"] and under MacOS, the shortcut key is - @scheme["d:"].}) + platform. Under Unix, the shortcut is @racket["a:"]; under windows the + shortcut key is @racket["c:"] and under MacOS, the shortcut key is + @racket["d:"].}) (proc-doc/names keymap:get-file @@ -1074,14 +1074,14 @@ (-> (is-a?/c keymap%)) () @{This returns a keymap that contains all of the keybindings in the keymaps - loaded via @scheme[keymap:add-user-keybindings-file]}) + loaded via @racket[keymap:add-user-keybindings-file]}) (proc-doc/names keymap:get-global (-> (is-a?/c keymap%)) () @{This returns a keymap for general operations. See - @scheme[keymap:setup-global] for a list of the bindings this keymap + @racket[keymap:setup-global] for a list of the bindings this keymap contains.}) (proc-doc/names @@ -1100,8 +1100,8 @@ Takes a keymap, a base key specification, and a function name; it prefixes the base key with all ``meta'' combination prefixes, and installs the new combinations into the keymap. For example, - @scheme[(keymap:send-map-function-meta keymap "a" func)] maps - @scheme["m:a"] and @scheme["ESC;a"] to @scheme[func].}) + @racket[(keymap:send-map-function-meta keymap "a" func)] maps + @racket["m:a"] and @racket["ESC;a"] to @racket[func].}) (proc-doc/names keymap:send-map-function-meta @@ -1109,43 +1109,43 @@ (keymap key func) @{@index{Meta} Most keyboard and mouse mappings are inserted into a keymap by calling the keymap's @method[keymap% map-function] method. However, - ``meta'' combinations require special attention. The @scheme["m:"] prefix + ``meta'' combinations require special attention. The @racket["m:"] prefix recognized by @method[keymap% map-function] applies only to the Meta key that exists on some keyboards. By convention, however, ``meta'' combinations can also be accessed by using ``ESC'' as a prefix. This procedure binds all of the key-bindings obtained by prefixing - @scheme[key] with a meta-prefix to @scheme[func] in @scheme[keymap].}) + @racket[key] with a meta-prefix to @racket[func] in @racket[keymap].}) (proc-doc/names keymap:setup-editor ((is-a?/c keymap%) . -> . void?) (keymap) @{This sets up the input keymap with the bindings described in - @scheme[keymap:get-editor].}) + @racket[keymap:get-editor].}) (proc-doc/names keymap:setup-file ((is-a?/c keymap%) . -> . void?) (keymap) - @{This extends a @scheme[keymap%] with the bindings for files.}) + @{This extends a @racket[keymap%] with the bindings for files.}) (proc-doc/names keymap:setup-global ((is-a?/c keymap%) . -> . void?) (keymap) - @{This function extends a @scheme[keymap%] with the following functions: + @{This function extends a @racket[keymap%] with the following functions: @itemize[ - @item{@mapdesc[ring-bell any] --- Rings the bell (using @scheme[bell]) + @item{@mapdesc[ring-bell any] --- Rings the bell (using @racket[bell]) and removes the search panel from the frame, if there.} @item{@mapdesc[save-file key] --- Saves the buffer. If the buffer has no - name, then @scheme[finder:put-file]@index["finder:put-file"] is + name, then @racket[finder:put-file]@index["finder:put-file"] is invoked.} @item{@mapdesc[save-file-as key] --- Calls - @scheme[finder:put-file]@index["finder:put-file"] to save the + @racket[finder:put-file]@index["finder:put-file"] to save the buffer.} @item{@mapdesc[load-file key] --- Invokes - @scheme[finder:open-file]@index["finder:open-file"].} + @racket[finder:open-file]@index["finder:open-file"].} @item{@mapdesc[find-string key] --- Opens the search buffer at the bottom of the frame, unless it is already open, in which case it searches for the text in the search buffer.} @@ -1292,7 +1292,7 @@ keymap:setup-search ((is-a?/c keymap%) . -> . void?) (keymap) - @{This extends a @scheme[keymap%] with the bindings for searching.}) + @{This extends a @racket[keymap%] with the bindings for searching.}) (proc-doc/names keymap:set-chained-keymaps @@ -1301,8 +1301,8 @@ . -> . void?) (keymap children-keymaps) - @{Sets @scheme[keymap]'s chained keymaps to @scheme[children-keymaps], - unchaining any keymaps that are currently chained to @scheme[keymap].}) + @{Sets @racket[keymap]'s chained keymaps to @racket[children-keymaps], + unchaining any keymaps that are currently chained to @racket[keymap].}) (proc-doc/names keymap:remove-chained-keymap @@ -1311,14 +1311,14 @@ . -> . void?) (editor keymap) - @{Removes @scheme[keymap] from the keymaps chained to @scheme[editor]. - Also (indirectly) removes all keymaps chained to @scheme[keymap] from - @scheme[editor], since they are removed when unchaining @scheme[keymap] + @{Removes @racket[keymap] from the keymaps chained to @racket[editor]. + Also (indirectly) removes all keymaps chained to @racket[keymap] from + @racket[editor], since they are removed when unchaining @racket[keymap] itself. - Each of the keymaps chained to @scheme[editor] must be an - @scheme[keymap:aug-keymap%] and @scheme[keymap] cannot be the result of - @scheme[(send editor get-keymap)] That is, @scheme[keymap] must be chained + Each of the keymaps chained to @racket[editor] must be an + @racket[keymap:aug-keymap%] and @racket[keymap] cannot be the result of + @racket[(send editor get-keymap)] That is, @racket[keymap] must be chained to some keymap attached to the editor.}) (proc-doc/names @@ -1328,16 +1328,16 @@ boolean?) ((text) ((start 0) (end #f))) - @{Determines if the range in the editor from @scheme[start] to @scheme[end] - in @scheme[text] has at least one complete s-expression and there are no - incomplete s-expressions. If @scheme[end] is @scheme[#f], it defaults to - the last position of the @scheme[text]. The designation ``complete'' is + @{Determines if the range in the editor from @racket[start] to @racket[end] + in @racket[text] has at least one complete s-expression and there are no + incomplete s-expressions. If @racket[end] is @racket[#f], it defaults to + the last position of the @racket[text]. The designation ``complete'' is defined to be something that does not cause @racket[read] to raise a @racket[exn:fail:read:eof?] exception, so there may be all kinds of strange read-level (not to speak of parse level) errors in the expressions. The implementation of this function creates a port with - @scheme[open-input-text-editor] and then uses @racket[read] to parse the + @racket[open-input-text-editor] and then uses @racket[read] to parse the range of the buffer.}) (proc-doc/names @@ -1367,10 +1367,10 @@ colorer uses for Racket mode coloring) to their colors. These symbols are suitable for input to - @scheme[scheme:short-sym->pref-name] and - @scheme[scheme:short-sym->style-name]. + @racket[scheme:short-sym->pref-name] and + @racket[scheme:short-sym->style-name]. - See also @scheme[scheme:get-white-on-black-color-prefs-table].}) + See also @racket[scheme:get-white-on-black-color-prefs-table].}) (proc-doc/names scheme:get-white-on-black-color-prefs-table @@ -1380,66 +1380,66 @@ colorer uses for Racket mode coloring) to their colors when the user chooses the white-on-black mode in the preferences dialog. - See also @scheme[scheme:get-color-prefs-table].}) + See also @racket[scheme:get-color-prefs-table].}) (proc-doc/names scheme:short-sym->pref-name (symbol? . -> . symbol?) (short-sym) @{Builds the symbol naming the preference from one of the symbols in the - table returned by @scheme[scheme:get-color-prefs-table].}) + table returned by @racket[scheme:get-color-prefs-table].}) (proc-doc/names scheme:short-sym->style-name (symbol? . -> . string?) (short-sym) @{Builds the symbol naming the editor style from one of the symbols in the - table returned by @scheme[scheme:get-color-prefs-table]. This style is a + table returned by @racket[scheme:get-color-prefs-table]. This style is a named style in the style list returned by - @scheme[editor:get-standard-style-list].}) + @racket[editor:get-standard-style-list].}) (proc-doc/names scheme:get-wordbreak-map (-> (is-a?/c editor-wordbreak-map%)) () - @{This method returns a @scheme[editor-wordbreak-map%] that is suitable for + @{This method returns a @racket[editor-wordbreak-map%] that is suitable for Racket.}) (proc-doc/names scheme:init-wordbreak-map ((is-a?/c keymap%) . -> . void?) (key) - @{Initializes the workdbreak map for @scheme[keymap].}) + @{Initializes the workdbreak map for @racket[keymap].}) (proc-doc/names scheme:setup-keymap ((is-a?/c keymap%) . -> . void?) (keymap) - @{Initializes @scheme[keymap] with Racket-mode keybindings.}) + @{Initializes @racket[keymap] with Racket-mode keybindings.}) (proc-doc/names editor:set-default-font-color (-> (is-a?/c color%) void?) (color) @{Sets the color of the style named - @scheme[editor:get-default-color-style-name].}) + @racket[editor:get-default-color-style-name].}) (proc-doc/names editor:get-default-color-style-name (-> string?) () @{The name of the style (in the list returned by - @scheme[editor:get-standard-style-list]) that holds the default color.}) + @racket[editor:get-standard-style-list]) that holds the default color.}) (proc-doc/names editor:set-standard-style-list-delta (string? (is-a?/c style-delta%) . -> . void?) (name delta) - @{Finds (or creates) the style named by @scheme[name] in the result of - @scheme[editor:get-standard-style-list] and sets its delta to - @scheme[delta]. + @{Finds (or creates) the style named by @racket[name] in the result of + @racket[editor:get-standard-style-list] and sets its delta to + @racket[delta]. - If the style named by @scheme[name] is already in the style list, it must + If the style named by @racket[name] is already in the style list, it must be a delta style.}) (proc-doc/names @@ -1447,7 +1447,7 @@ (-> any) () @{Installs the font preference callbacks that update the style list returned - by @scheme[editor:get-standard-style-list] based on the font preference + by @racket[editor:get-standard-style-list] based on the font preference symbols.}) (proc-doc/names @@ -1455,15 +1455,15 @@ (-> (is-a?/c style-list%)) () @{Returns a style list that is used for all instances of - @scheme[editor:standard-style-list%].}) + @racket[editor:standard-style-list%].}) (proc-doc/names editor:add-after-user-keymap (-> (is-a?/c keymap%) (listof (is-a?/c keymap%)) (listof (is-a?/c keymap%))) (keymap keymaps) - @{Returns a list that contains all of the keymaps in @scheme[keymaps], in the - same relative order, but also with @scheme[keymap], where @scheme[keymap] - is now the first keymap after @scheme[keymap:get-user] (if that keymap is + @{Returns a list that contains all of the keymaps in @racket[keymaps], in the + same relative order, but also with @racket[keymap], where @racket[keymap] + is now the first keymap after @racket[keymap:get-user] (if that keymap is in the list.)}) (proc-doc/names @@ -1534,25 +1534,25 @@ color-model:xyz? (any/c . -> . boolean?) (val) - @{Determines if @scheme[val] an xyz color record.}) + @{Determines if @racket[val] an xyz color record.}) (proc-doc/names color-model:xyz-x (color-model:xyz? . -> . number?) (xyz) - @{Extracts the x component of @scheme[xyz].}) + @{Extracts the x component of @racket[xyz].}) (proc-doc/names color-model:xyz-y (color-model:xyz? . -> . number?) (xyz) - @{Extracts the y component of @scheme[xyz].}) + @{Extracts the y component of @racket[xyz].}) (proc-doc/names color-model:xyz-z (color-model:xyz? . -> . number?) (xyz) - @{Extracts the z component of @scheme[xyz].}) + @{Extracts the z component of @racket[xyz].}) (proc-doc/names color-prefs:set-default/color-scheme @@ -1564,8 +1564,8 @@ @{Registers a preference whose value will be updated when the user clicks on one of the color scheme default settings in the preferences dialog. - Also calls @scheme[preferences:set-default] and - @scheme[preferences:set-un/marshall] with appropriate arguments to register + Also calls @racket[preferences:set-default] and + @racket[preferences:set-un/marshall] with appropriate arguments to register the preference.}) (proc-doc/names @@ -1578,26 +1578,26 @@ ((white-on-black-color #f) (background #f))) @{This function registers a color preference and initializes the style list - returned from @scheme[editor:get-standard-style-list]. In particular, it - calls @scheme[preferences:set-default] and - @scheme[preferences:set-un/marshall] to install the pref for - @scheme[pref-name], using @scheme[color/sd] as the default color. The - preference is bound to a @scheme[style-delta%], and initially the - @scheme[style-delta%] changes the foreground color to @scheme[color/sd], - unless @scheme[color/sd] is a style delta already, in which case it is just + returned from @racket[editor:get-standard-style-list]. In particular, it + calls @racket[preferences:set-default] and + @racket[preferences:set-un/marshall] to install the pref for + @racket[pref-name], using @racket[color/sd] as the default color. The + preference is bound to a @racket[style-delta%], and initially the + @racket[style-delta%] changes the foreground color to @racket[color/sd], + unless @racket[color/sd] is a style delta already, in which case it is just used directly. Then, it calls - @scheme[editor:set-standard-style-list-delta] passing the - @scheme[style-name] and the current value of the preference - @scheme[pref-name]. + @racket[editor:set-standard-style-list-delta] passing the + @racket[style-name] and the current value of the preference + @racket[pref-name]. - Finally, it adds calls @scheme[preferences:add-callback] to set a callback - for @scheme[pref-name] that updates the style list when the preference + Finally, it adds calls @racket[preferences:add-callback] to set a callback + for @racket[pref-name] that updates the style list when the preference changes. - If @scheme[white-on-black-color] is not @scheme[#f], then the color of the - @scheme[color/sd] argument is used in combination with - @scheme[white-on-black-color] to register this preference with - @scheme[color-prefs:set-default/color-scheme]. + If @racket[white-on-black-color] is not @racket[#f], then the color of the + @racket[color/sd] argument is used in combination with + @racket[white-on-black-color] to register this preference with + @racket[color-prefs:set-default/color-scheme]. If either @racket[background] is not @racket[#f], then it is used to construct the default background color @@ -1610,14 +1610,14 @@ (-> void?) () @{Adds a preferences panel that configures the background color for - @scheme[editor:basic-mixin].}) + @racket[editor:basic-mixin].}) (proc-doc/names color-prefs:add-to-preferences-panel (string? ((is-a?/c vertical-panel%) . -> . void?) . -> . void?) (name func) - @{Calls @scheme[func] with the subpanel of the preferences coloring panel - that corresponds to @scheme[name].}) + @{Calls @racket[func] with the subpanel of the preferences coloring panel + that corresponds to @racket[name].}) (proc-doc/names color-prefs:build-color-selection-panel @@ -1628,12 +1628,12 @@ ((background? #f))) @{Builds a panel with a number of controls for configuring a font: its color (including a background configuration if @racket[background] is @racket[#t]) - and check boxes for bold, italic, and underline. The @scheme[parent] - argument specifies where the panel will be placed. The @scheme[pref-sym] - should be a preference (suitable for use with @scheme[preferences:get] and - @scheme[preferences:set]). The @scheme[style-name] specifies the name of a + and check boxes for bold, italic, and underline. The @racket[parent] + argument specifies where the panel will be placed. The @racket[pref-sym] + should be a preference (suitable for use with @racket[preferences:get] and + @racket[preferences:set]). The @racket[style-name] specifies the name of a style in the style list returned from - @scheme[editor:get-standard-style-list] and @scheme[example-text] is shown + @racket[editor:get-standard-style-list] and @racket[example-text] is shown in the panel so users can see the results of their configuration.}) (proc-doc/names @@ -1646,19 +1646,19 @@ color-prefs:unmarshall-style-delta (-> printable/c (or/c false/c (is-a?/c style-delta%))) (marshalled-style-delta) - @{Builds a style delta from its printed representation. Returns @scheme[#f] + @{Builds a style delta from its printed representation. Returns @racket[#f] if the printed form cannot be parsed.}) (proc-doc/names color-prefs:white-on-black (-> any) () - @{Sets the colors registered by @scheme[color-prefs:register-color-preference] + @{Sets the colors registered by @racket[color-prefs:register-color-preference] to their white-on-black variety.}) (proc-doc/names color-prefs:black-on-white (-> any) () - @{Sets the colors registered by @scheme[color-prefs:register-color-preference] + @{Sets the colors registered by @racket[color-prefs:register-color-preference] to their black-on-white variety.})) diff --git a/collects/framework/private/gen-standard-menus.rkt b/collects/framework/private/gen-standard-menus.rkt index 7e603022..86fd7df4 100644 --- a/collects/framework/private/gen-standard-menus.rkt +++ b/collects/framework/private/gen-standard-menus.rkt @@ -155,7 +155,7 @@ [(an-item? x) (pop-out `@defmethod[(,(an-item->get-item-name x)) (or/c false/c (is-a?/c menu-item%))]{ - This method returns the @scheme[menu-item%] object corresponding + This method returns the @racket[menu-item%] object corresponding to this menu item, if it has been created (as controlled by @method[frame:standard-menus<%> ,(an-item->create-menu-item-name x)]).}) @@ -163,8 +163,8 @@ `@defmethod[(,(an-item->create-menu-item-name x)) boolean?]{ The result of this method determines if the corresponding menu item is created. Override it to control the creation of the menu item. - - Defaults to @scheme[,(an-item-create x)].}) + + Defaults to @racket[,(an-item-create x)].}) (match (an-item-proc x) [`(λ (,item-name ,evt-name) ,bodies ...) @@ -173,7 +173,7 @@ [,item-name (is-a?/c menu-item%)] [,evt-name (is-a?/c control-event%)]) void?]{ - Defaults to @schemeblock[,(if (= 1 (length bodies)) + Defaults to @racketblock[,(if (= 1 (length bodies)) (car bodies) `(begin ,@bodies))] })]) @@ -182,21 +182,21 @@ (pop-out `@defmethod[(,(an-item->on-demand-name x) [,item-name (is-a?/c menu-item%)]) void?]{ The menu item's on-demand proc calls this method. - - Defaults to @schemeblock[,body]})]) + + Defaults to @racketblock[,body]})]) (pop-out - `@defmethod[(,(an-item->string-name x)) string?]{ - The result of this method is used as the name of the @scheme[menu-item%]. - - Defaults to @scheme[,(an-item-menu-string x)].}) + `@defmethod[(,(an-item->string-name x)) string?]{ + The result of this method is used as the name of the @racket[menu-item%]. + + Defaults to @racket[,(an-item-menu-string x)].}) (pop-out `@defmethod[(,(an-item->help-string-name x)) string?]{ The result of this method is used as the help string - when the @scheme[menu-item%] object is created. - - Defaults to @scheme[,(an-item-help-string x)].})])) + when the @racket[menu-item%] object is created. + + Defaults to @racket[,(an-item-help-string x)].})])) items) (display docs-footer-text port)) @@ -282,6 +282,7 @@ ;; THIS FILE IS GENERATED. DO NOT EDIT. @definterface[frame:standard-menus<%> (frame:basic<%>)]{ - + + -- ) diff --git a/collects/framework/private/standard-menus-items.rkt b/collects/framework/private/standard-menus-items.rkt index bf067693..7620c70f 100644 --- a/collects/framework/private/standard-menus-items.rkt +++ b/collects/framework/private/standard-menus-items.rkt @@ -155,7 +155,7 @@ The result of this method is used as the class for creating the menu items in this frame. - Defaultly returns @scheme[menu:can-restore-menu-item].})) + Defaultly returns @racket[menu:can-restore-menu-item].})) (make-generic-method 'get-checkable-menu-item% '(λ () menu:can-restore-checkable-menu-item%) (list @@ -163,7 +163,7 @@ The result of this method is used as the class for creating checkable menu items in this class. - Defaultly returns @scheme[menu:can-restore-checkable-menu-item].})) + Defaultly returns @racket[menu:can-restore-checkable-menu-item].})) (make-generic-method 'get-file-menu diff --git a/collects/framework/test.rkt b/collects/framework/test.rkt index cfad76ac..fe4bf793 100644 --- a/collects/framework/test.rkt +++ b/collects/framework/test.rkt @@ -854,7 +854,7 @@ (λ (c) (eq? c btn)))))) void?) (button) - @{Simulates pushing @scheme[button]. If a string is supplied, the + @{Simulates pushing @racket[button]. If a string is supplied, the primitive searches for a button labelled with that string in the active frame. Otherwise, it pushes the button argument.}) @@ -862,52 +862,52 @@ test:set-radio-box! (-> (or/c string? regexp? (is-a?/c radio-box%)) (or/c string? number?) void?) (radio-box state) - @{Sets the radio-box to the label matching @scheme[state]. If @scheme[state] is a + @{Sets the radio-box to the label matching @racket[state]. If @racket[state] is a string, this function finds the choice with that label. If it is a regexp, this function finds the first choice whose label matches the regexp. If it is a number, it uses the number as an index into the state. If the number is out of range or if the label isn't in the radio box, an exception is raised. - If @scheme[radio-box] is a string, this function searches for a - @scheme[radio-box%] object with a label matching that string, - otherwise it uses @scheme[radio-box] itself.}) + If @racket[radio-box] is a string, this function searches for a + @racket[radio-box%] object with a label matching that string, + otherwise it uses @racket[radio-box] itself.}) (proc-doc/names test:set-radio-box-item! (-> (or/c string? regexp?) void?) (entry) - @{Finds a @scheme[radio-box%] that has a label matching @scheme[entry] - and sets the radio-box to @scheme[entry].}) + @{Finds a @racket[radio-box%] that has a label matching @racket[entry] + and sets the radio-box to @racket[entry].}) (proc-doc/names test:set-check-box! (-> (or/c string? (is-a?/c check-box%)) boolean? void?) (check-box state) - @{Clears the @scheme[check-box%] item if @scheme[state] is @scheme[#f], and sets it + @{Clears the @racket[check-box%] item if @racket[state] is @racket[#f], and sets it otherwise. - If @scheme[check-box] is a string, - this function searches for a @scheme[check-box%] with a label matching that string, - otherwise it uses @scheme[check-box] itself.}) + If @racket[check-box] is a string, + this function searches for a @racket[check-box%] with a label matching that string, + otherwise it uses @racket[check-box] itself.}) (proc-doc/names test:set-choice! (-> (or/c string? (is-a?/c choice%)) (or/c string? (and/c number? exact? integer? positive?)) void?) (choice str) - @{Selects @scheme[choice]'s item @scheme[str]. If @scheme[choice] is a string, - this function searches for a @scheme[choice%] with a label matching - that string, otherwise it uses @scheme[choice] itself.}) + @{Selects @racket[choice]'s item @racket[str]. If @racket[choice] is a string, + this function searches for a @racket[choice%] with a label matching + that string, otherwise it uses @racket[choice] itself.}) (proc-doc/names test:set-list-box! (-> (or/c string? (is-a?/c list-box%)) (or/c string? (and/c number? exact? integer? positive?)) void?) (choice str) - @{Selects @scheme[list-box]'s item @scheme[str]. If @scheme[list-box] is a string, - this function searches for a @scheme[list-box%] with a label matching - that string, otherwise it uses @scheme[list-box] itself.}) + @{Selects @racket[list-box]'s item @racket[str]. If @racket[list-box] is a string, + this function searches for a @racket[list-box%] with a label matching + that string, otherwise it uses @racket[list-box] itself.}) (proc-doc/names test:keystroke @@ -916,19 +916,19 @@ void?) ((key) ((modifier-list null))) - @{This function simulates a user pressing a key. The argument, @scheme[key], + @{This function simulates a user pressing a key. The argument, @racket[key], is just like the argument to the @method[key-event% get-key-code] - method of the @scheme[key-event%] class. + method of the @racket[key-event%] class. @italic{Note:} - To send the ``Enter'' key, use @scheme[#\return], - not @scheme[#\newline]. + To send the ``Enter'' key, use @racket[#\return], + not @racket[#\newline]. - The @scheme['shift] or @scheme['noshift] modifier is implicitly set from @scheme[key], - but is overridden by the argument list. The @scheme['shift] modifier is + The @racket['shift] or @racket['noshift] modifier is implicitly set from @racket[key], + but is overridden by the argument list. The @racket['shift] modifier is set for any capitol alpha-numeric letters and any of the following characters: - @schemeblock[ + @racketblock[ #\? #\: #\~ #\\ #\| #\< #\> #\{ #\} #\[ #\] #\( #\) #\! #\@ #\# #\$ #\% #\^ #\& #\* #\_ #\+ @@ -940,7 +940,7 @@ test:menu-select (string? string? . -> . void?) (menu item) - @{Selects the menu-item named @scheme[item] in the menu named @scheme[menu]. + @{Selects the menu-item named @racket[item] in the menu named @racket[menu]. @italic{Note:} The string for the menu item does not include its keyboard equivalent. @@ -958,17 +958,17 @@ ((button x y) ((modifiers null))) @{Simulates a mouse click at the coordinate (x,y) in the currently - focused @scheme[window], assuming that it supports the + focused @racket[window], assuming that it supports the @method[canvas<%> on-event] method. - Use @scheme[test:button-push] to click on a button. + Use @racket[test:button-push] to click on a button. - On the Macintosh, @scheme['right] corresponds to holding down the command - modifier key while clicking and @scheme['middle] cannot be generated. + On the Macintosh, @racket['right] corresponds to holding down the command + modifier key while clicking and @racket['middle] cannot be generated. - Under Windows, @scheme['middle] can only be generated if the user has a + Under Windows, @racket['middle] can only be generated if the user has a three button mouse. - The modifiers later in the list @scheme[modifiers] take precedence over + The modifiers later in the list @racket[modifiers] take precedence over ones that appear earlier.}) (proc-doc/names @@ -979,7 +979,7 @@ ((msec) ()) @{See also @secref{test:actions-completeness}. The first case in the case-lambda sets - the run interval to @scheme[msec] milliseconds and the second + the run interval to @racket[msec] milliseconds and the second returns the current setting.}) (parameter-doc @@ -991,7 +991,7 @@ (see also @secref[#:doc '(lib "scribblings/gui/gui.scrbl") "eventspaceinfo"]) are considered when finding the frontmost frame. The first case - sets the parameter to @scheme[func]. The procedure @scheme[func] will be + sets the parameter to @racket[func]. The procedure @racket[func] will be invoked with no arguments to determine the eventspaces to consider when finding the frontmost frame for simulated user events. The second case @@ -1011,8 +1011,8 @@ (-> (is-a?/c top-level-window<%>) void?) (tlw) @{Use this function to simulate clicking on the close box of a frame. - Closes @scheme[tlw] with this expression: - @schemeblock[ + Closes @racket[tlw] with this expression: + @racketblock[ (when (send tlw can-close?) (send tlw on-close) (send tlw show #f))]}) @@ -1021,10 +1021,10 @@ test:top-level-focus-window-has? (-> (-> (is-a?/c area<%>) boolean?) boolean?) (test) - @{Calls @scheme[test] for each child of the top-level-focus-frame - and returns @scheme[#t] if @scheme[test] ever does, otherwise - returns @scheme[#f]. If there - is no top-level-focus-window, returns @scheme[#f].}) + @{Calls @racket[test] for each child of the top-level-focus-frame + and returns @racket[#t] if @racket[test] ever does, otherwise + returns @racket[#f]. If there + is no top-level-focus-window, returns @racket[#f].}) (proc-doc @@ -1041,6 +1041,4 @@ test:run-one (-> (-> void?) void?) (f) - @{Runs the function @scheme[f] as if it was a simulated event.})) - - + @{Runs the function @racket[f] as if it was a simulated event.})) diff --git a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-intf.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-intf.scrbl index 48ee650d..efe7f21c 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-intf.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-intf.scrbl @@ -25,8 +25,8 @@ fit the widths of all of its children. [(realign) void?])]{ -Realigns the children inside the @scheme[aligned-pasteboard<%>] to -either a given @scheme[width] and @scheme[height] or the previously +Realigns the children inside the @racket[aligned-pasteboard<%>] to +either a given @racket[width] and @racket[height] or the previously alloted width and height.} @defmethod[(set-aligned-min-sizes) diff --git a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-parent-intf.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-parent-intf.scrbl index 16d2a2a0..a8ed2280 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-parent-intf.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard-parent-intf.scrbl @@ -4,7 +4,7 @@ @definterface/title[aligned-pasteboard-parent<%> ()]{ This interface must be implemented by any class who's editor -is an @scheme[aligned-pasteboard<%>]. +is an @racket[aligned-pasteboard<%>]. @defmethod[(set-aligned-min-sizes) void?]{} diff --git a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard.scrbl index c1842770..fddb49ef 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/aligned-pasteboard.scrbl @@ -4,8 +4,8 @@ @title[#:style 'toc]{Aligned Pasteboard} The aligned-pasteboard library provides classes derived from -@scheme[pasteboard%] with geometry management that mirrors that of -@scheme[vertical-panel%] and @scheme[horizontal-panel%]. +@racket[pasteboard%] with geometry management that mirrors that of +@racket[vertical-panel%] and @racket[horizontal-panel%]. @defmodule[mrlib/aligned-pasteboard] diff --git a/collects/mrlib/scribblings/aligned-pasteboard/horizontal-pasteboard-class.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/horizontal-pasteboard-class.scrbl index 2abf5ea6..c1435eed 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/horizontal-pasteboard-class.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/horizontal-pasteboard-class.scrbl @@ -4,7 +4,7 @@ @defclass/title[horizontal-pasteboard% pasteboard% (aligned-pasteboard<%>)]{ @defconstructor/auto-super[()]{ -Passes all arguments to @scheme[super-init]. +Passes all arguments to @racket[super-init]. } @defmethod[#:mode override diff --git a/collects/mrlib/scribblings/aligned-pasteboard/stretchable-snip-intf.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/stretchable-snip-intf.scrbl index 167e1cd7..016b55dc 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/stretchable-snip-intf.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/stretchable-snip-intf.scrbl @@ -5,7 +5,7 @@ This interface must be implemented by any snip class who's objects will be stretchable when inserted into an -@scheme[aligned-pasteboard<%>]. +@racket[aligned-pasteboard<%>]. diff --git a/collects/mrlib/scribblings/aligned-pasteboard/vertical-pasteboard-class.scrbl b/collects/mrlib/scribblings/aligned-pasteboard/vertical-pasteboard-class.scrbl index 6a3e9b53..dc863faa 100644 --- a/collects/mrlib/scribblings/aligned-pasteboard/vertical-pasteboard-class.scrbl +++ b/collects/mrlib/scribblings/aligned-pasteboard/vertical-pasteboard-class.scrbl @@ -4,7 +4,7 @@ @defclass/title[vertical-pasteboard% pasteboard% (aligned-pasteboard<%>)]{ @defconstructor/auto-super[()]{ -Passes all arguments to @scheme[super-init]. +Passes all arguments to @racket[super-init]. } @defmethod[#:mode override diff --git a/collects/mrlib/scribblings/bitmap-label.scrbl b/collects/mrlib/scribblings/bitmap-label.scrbl index dc8b8290..2c280d1a 100644 --- a/collects/mrlib/scribblings/bitmap-label.scrbl +++ b/collects/mrlib/scribblings/bitmap-label.scrbl @@ -11,7 +11,7 @@ (is-a?/c bitmap%)]{ Constructs a bitmap label suitable for use a button that contains the -image specified by @scheme[img] followed by the text in @scheme[str].} +image specified by @racket[img] followed by the text in @racket[str].} @defproc[((bitmap-label-maker [str string?] @@ -19,5 +19,5 @@ image specified by @scheme[img] followed by the text in @scheme[str].} [future-parent (is-a?/c area-container<%>)]) (is-a?/c bitmap%)]{ -And older variant of @scheme[make-bitmap-label] that obtains a -font to use from a container @scheme[future-parent].} +And older variant of @racket[make-bitmap-label] that obtains a +font to use from a container @racket[future-parent].} diff --git a/collects/mrlib/scribblings/cache-image-snip.scrbl b/collects/mrlib/scribblings/cache-image-snip.scrbl index d2b85759..b725bf56 100644 --- a/collects/mrlib/scribblings/cache-image-snip.scrbl +++ b/collects/mrlib/scribblings/cache-image-snip.scrbl @@ -5,21 +5,21 @@ @defmodule[mrlib/cache-image-snip]{ -The @schememodname[mrlib/cache-image-snip] library provides the core +The @racketmodname[mrlib/cache-image-snip] library provides the core data structure for DrRacket's @filepath{image.rkt} teachpack. Images in the @filepath{image.rkt} teachpack are instances of the -@scheme[cache-image-snip%] class.} +@racket[cache-image-snip%] class.} -The library also defines a new type, @scheme[argb], that represents a +The library also defines a new type, @racket[argb], that represents a bitmap, but with alpha values. It has a maker, two selectors, and a predicate. @defclass[cache-image-snip% image-snip% ()]{ -The @scheme[cache-image-snip%] class is a subclass of -@scheme[image-snip%] simply so that its instances can be compared with -@scheme[image-snip%] using @scheme[equal?]. All @scheme[image-snip%] +The @racket[cache-image-snip%] class is a subclass of +@racket[image-snip%] simply so that its instances can be compared with +@racket[image-snip%] using @racket[equal?]. All @racket[image-snip%] functionality is overridden or ignored. @defmethod[#:mode overrride @@ -28,7 +28,7 @@ functionality is overridden or ignored. boolean?]{ Calls the @method[cache-image-snip% other-equal-to?] method of -@scheme[snip] if it is also a @scheme[cache-image-snip%] instance, +@racket[snip] if it is also a @racket[cache-image-snip%] instance, otherwise calls the @method[cache-image-snip% other-equal-to?] of @this-obj[].} @@ -52,7 +52,7 @@ otherwise calls the @method[cache-image-snip% other-equal-to?] of @defmethod[(get-argb/no-compute) (or/c false/c argb?)]{ - Returns a pixel array for this image or @scheme[#f] if it has not + Returns a pixel array for this image or @racket[#f] if it has not been computed yet. @@ -64,8 +64,8 @@ otherwise calls the @method[cache-image-snip% other-equal-to?] of Builds (if not yet built) a bitmap corresponding to this snip and returns it. - If the width or the height of the snip is @scheme[0], - this method return @scheme[#f]. + If the width or the height of the snip is @racket[0], + this method return @racket[#f]. } @defmethod[(get-dc-proc) @@ -119,20 +119,20 @@ This snipclass is used for saved cache image snips.} @defproc[(argb-vector [argb argb?]) (vectorof (integer-in 0 255))]{ - Extracts the vector from @scheme[argb].} + Extracts the vector from @racket[argb].} @defproc[(argb-width [argb argb?]) exact-nonnegative-integer?]{ - Extracts the width from @scheme[argb].} + Extracts the width from @racket[argb].} @defproc[(argb-height [argb argb?]) exact-nonnegative-integer?]{ - Extracts the height from @scheme[argb].} + Extracts the height from @racket[argb].} @defproc[(argb? [v any/c]) boolean?]{ -Returns @scheme[#t] if @scheme[v] is an argb, @scheme[#f] otherwise.} +Returns @racket[#t] if @racket[v] is an argb, @racket[#f] otherwise.} @defproc[(overlay-bitmap [dest argb?] @@ -142,8 +142,8 @@ Returns @scheme[#t] if @scheme[v] is an argb, @scheme[#f] otherwise.} [mask (is-a?/c bitmap%)]) void?]{ -Changes @scheme[argb], overlaying @scheme[img] with masking based on -@scheme[mask] at @math{(@scheme[dx], @scheme[dy])} from the top-left.} +Changes @racket[argb], overlaying @racket[img] with masking based on +@racket[mask] at @math{(@racket[dx], @racket[dy])} from the top-left.} @defproc[(build-bitmap [draw ((is-a?/c dc<%>) . -> . any)] @@ -151,34 +151,34 @@ Changes @scheme[argb], overlaying @scheme[img] with masking based on [height (integer-in 1 10000)]) (is-a?/c bitmap%)]{ -Builds a bitmap of size @scheme[width] by @scheme[height], using the -procedure @scheme[draw] to render the bitmap content into the given -@scheme[dc<%>].} +Builds a bitmap of size @racket[width] by @racket[height], using the +procedure @racket[draw] to render the bitmap content into the given +@racket[dc<%>].} @defproc[(flatten-bitmap [bitmap (is-a?/c bitmap%)]) (is-a?/c bitmap%)]{ - Builds a new bitmap that flattens the original @scheme[bitmap] + Builds a new bitmap that flattens the original @racket[bitmap] with its mask (as determined by @xmethod[bitmap% get-loaded-mask]), producing a bitmap that has no mask, and looks the way that bitmap would draw (when drawn with the mask) onto a white background.} - + @defproc[(argb->cache-image-snip [argb argb?][dx real?][dy real?]) (is-a?/c cache-image-snip%)]{ - Builds a new @scheme[cache-image-snip%] based on the contents of - @scheme[argb], using @scheme[dx] and @scheme[dy] as the pinhole.} + Builds a new @racket[cache-image-snip%] based on the contents of + @racket[argb], using @racket[dx] and @racket[dy] as the pinhole.} @defproc[(argb->bitmap [argb argb?]) (or/c false/c (is-a?/c bitmap%))]{ - Builds a bitmap that draws the same way as @scheme[argb]; the alpha + Builds a bitmap that draws the same way as @racket[argb]; the alpha pixels are put into the bitmap's @method[bitmap% get-loaded-mask] bitmap. - If the width or height of @scheme[argb] is @scheme[0], - this returns @scheme[#f]. + If the width or height of @racket[argb] is @racket[0], + this returns @racket[#f]. } diff --git a/collects/mrlib/scribblings/close-icon.scrbl b/collects/mrlib/scribblings/close-icon.scrbl index 963b3dc7..1b2cc7e9 100644 --- a/collects/mrlib/scribblings/close-icon.scrbl +++ b/collects/mrlib/scribblings/close-icon.scrbl @@ -5,7 +5,7 @@ @title{Close Icon} -@defmodule[mrlib/close-icon]{The @scheme[close-icon%] class +@defmodule[mrlib/close-icon]{The @racket[close-icon%] class provides a clickable close button icon.} @defclass[close-icon% canvas% ()]{ @@ -14,8 +14,8 @@ provides a clickable close button icon.} [bg-color (or/c #f string (is-a?/c color%))] [horizontal-pad positive-integer? 4] [vertical-pad positive-integer? 4])]{ - The @scheme[callback] is called when the close icon is clicked. - - If @scheme[bg-color] is specified, it is used as the background color of the icon. + The @racket[callback] is called when the close icon is clicked. + + If @racket[bg-color] is specified, it is used as the background color of the icon. } } diff --git a/collects/mrlib/scribblings/gif.scrbl b/collects/mrlib/scribblings/gif.scrbl index cd7a7340..7703a7f5 100644 --- a/collects/mrlib/scribblings/gif.scrbl +++ b/collects/mrlib/scribblings/gif.scrbl @@ -11,11 +11,11 @@ [filename path-string]) void?]{ -Writes the given @scheme[bitmap] to @scheme[filename] as a GIF image, -where @scheme[bitmap] is either an instance of @scheme[bitmap%] or a +Writes the given @racket[bitmap] to @racket[filename] as a GIF image, +where @racket[bitmap] is either an instance of @racket[bitmap%] or a thunk (to be called just once) that generates such an object. If the bitmap uses more than 256 colors, it is automatically quantized using -a simple algorithm; see @scheme[quantize]. If the bitmap has a mask +a simple algorithm; see @racket[quantize]. If the bitmap has a mask bitmap via @method[bitmap% get-loaded-mask], it is used to determine transparent pixels in the generated GIF image.} @@ -30,28 +30,28 @@ transparent pixels in the generated GIF image.} [#:last-frame-delay last-frame-delay (or/c (integer-in 0 #xFFFFFFFF) false/c) #f]) void?]{ -Writes the bitmaps in @scheme[bitmaps] to @scheme[filename] as an -animated GIF. The @scheme[bitmaps] list can contain a mixture of -@scheme[bitmap%] objects and thunks (each called just once) that -produce @scheme[bitmap%] objects. The @scheme[delay-csec] argument is +Writes the bitmaps in @racket[bitmaps] to @racket[filename] as an +animated GIF. The @racket[bitmaps] list can contain a mixture of +@racket[bitmap%] objects and thunks (each called just once) that +produce @racket[bitmap%] objects. The @racket[delay-csec] argument is the amount of time in 1/100s of a second to wait between transitions. -If @scheme[loop?] is a true value, then the GIF is marked as a looping +If @racket[loop?] is a true value, then the GIF is marked as a looping animation. -If @scheme[one-at-a-time?] is @scheme[#f], then the content of all +If @racket[one-at-a-time?] is @racket[#f], then the content of all images is collected and quantized at once, to produce a single colortable; a drawback to this approach is that it uses more memory, and it allows less color variation among animation frames. Even when -@scheme[one-at-a-time?] is @scheme[#f], the result of each thunk in -@scheme[bitmaps] is converted to a byte-string one at a time. +@racket[one-at-a-time?] is @racket[#f], the result of each thunk in +@racket[bitmaps] is converted to a byte-string one at a time. -If @scheme[one-at-a-time?] is true, then the bitmaps are quantized and +If @racket[one-at-a-time?] is true, then the bitmaps are quantized and written to the file one at a time; that is, for each thunk in -@scheme[bitmaps], its result is written and discarded before another +@racket[bitmaps], its result is written and discarded before another thunk is called. A drawback to this approach is that a separate colortable is written for each frame in the animation, which can make the resulting file large. -If @scheme[last-frame-delay] is not false, a delay of -@scheme[last-frame-delay] (in 1/100s of a second) is added to the last -frame. This extra delay is useful when @scheme[loop?] is true.} +If @racket[last-frame-delay] is not false, a delay of +@racket[last-frame-delay] (in 1/100s of a second) is added to the last +frame. This extra delay is useful when @racket[loop?] is true.} diff --git a/collects/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl b/collects/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl index a55cbff5..5d0b6a7d 100644 --- a/collects/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl +++ b/collects/mrlib/scribblings/graph/graph-pasteboard-intf.scrbl @@ -70,8 +70,8 @@ different nodes. graph pasteboard, and is expected to draw the edges between the snips. The argments are a subset of those passed to @method[editor<%> on-paint] and it is only called when the - @scheme[before?] argument to @method[editor<%> on-paint] - is @scheme[#t]. + @racket[before?] argument to @method[editor<%> on-paint] + is @racket[#t]. } @defmethod[(draw-single-edge [dc (is-a?/c dc<%>)] @@ -88,25 +88,25 @@ different nodes. This method is called to draw each edge in the graph, except for the edges that connect a node to itself. -The @scheme[dc], @scheme[dx], and @scheme[dy] arguments are +The @racket[dc], @racket[dx], and @racket[dy] arguments are the same as in @method[editor<%> on-paint]. The -@scheme[from-x], @scheme[from-y], @scheme[to-x], and -@scheme[to-y] arguments specify points on the source and +@racket[from-x], @racket[from-y], @racket[to-x], and +@racket[to-y] arguments specify points on the source and destination snip's bounding box where a straight line between the centers of the snip would intersect. -The @scheme[arrow-point-ok?] function returns @scheme[#t] +The @racket[arrow-point-ok?] function returns @racket[#t] when the point specified by its arguments is inside the smallest rectangle that covers both the source and destination snips, but is outside of both of the rectangles that surround the source and destination snips themselves. -This default implementation uses @scheme[update-polygon] to compute +This default implementation uses @racket[update-polygon] to compute the arrowheads and otherwise draws a straight line between the two points and then the arrowheads, unless the arrowhead points -are not ok according to @scheme[arrow-point-ok?], in which case +are not ok according to @racket[arrow-point-ok?], in which case it just draws the line. } @@ -116,8 +116,8 @@ it just draws the line. [point3 (is-a?/c point%)] [point4 (is-a?/c point%)]) void?]{ -Updates the arguments @scheme[point1], @scheme[point2], @scheme[point3], @scheme[point4] with the coordinates -of an arrowhead for a line that connects (@scheme[from-x],@scheme[from-y]) to (@scheme[to-x],@scheme[to-y]). +Updates the arguments @racket[point1], @racket[point2], @racket[point3], @racket[point4] with the coordinates +of an arrowhead for a line that connects (@racket[from-x],@racket[from-y]) to (@racket[to-x],@racket[to-y]). } } diff --git a/collects/mrlib/scribblings/graph/graph-pasteboard-mixin.scrbl b/collects/mrlib/scribblings/graph/graph-pasteboard-mixin.scrbl index 646e3d50..fccff0da 100644 --- a/collects/mrlib/scribblings/graph/graph-pasteboard-mixin.scrbl +++ b/collects/mrlib/scribblings/graph/graph-pasteboard-mixin.scrbl @@ -7,12 +7,12 @@ [edge-label-font (or/c #f (is-a?/c font%)) #f] [cache-arrow-drawing? any])]{ -If @scheme[edge-labels?] is @scheme[#f], no edge labels are +If @racket[edge-labels?] is @racket[#f], no edge labels are drawn. Otherwise, they are. -If @scheme[edge-label-font] is supplied, it is used when drawing the +If @racket[edge-label-font] is supplied, it is used when drawing the labels on the edges. Otherwise, the font is not set before drawing -the labels, defaulting to the @scheme[dc<%>] object's font. +the labels, defaulting to the @racket[dc<%>] object's font. If @racket[cache-arrow-drawing?] is @racket[#f], then the arrows in the snip are not cached in a bitmap (to speed up drawing when the mouse moves around). @@ -21,4 +21,4 @@ Otherwise, they are. } This mixin overrides many methods to draw lines between -@scheme[graph-snip<%>] that it contains.} +@racket[graph-snip<%>] that it contains.} diff --git a/collects/mrlib/scribblings/graph/graph-snip-intf.scrbl b/collects/mrlib/scribblings/graph/graph-snip-intf.scrbl index 0032ff6e..679e5a9d 100644 --- a/collects/mrlib/scribblings/graph/graph-snip-intf.scrbl +++ b/collects/mrlib/scribblings/graph/graph-snip-intf.scrbl @@ -9,7 +9,7 @@ void?]{ Adds a child of this snip. Instead of calling this method, - consider using the @scheme[add-links] function. + consider using the @racket[add-links] function. } @@ -23,7 +23,7 @@ void?])]{ Adds a parent of this snip. Instead of calling this - method, consider using the @scheme[add-links] function. + method, consider using the @racket[add-links] function. } @@ -31,7 +31,7 @@ (listof snip%)]{ returns a list of snips that implement -@scheme[graph-snip<%>]. Each of these snips will have a line +@racket[graph-snip<%>]. Each of these snips will have a line drawn from it, pointing at this snip. } @@ -40,7 +40,7 @@ drawn from it, pointing at this snip. @defmethod[(get-parents) (listof graph-snip<%>)]{ -Returns a list of snips that implement @scheme[graph-snip<%>]. Each +Returns a list of snips that implement @racket[graph-snip<%>]. Each of these snips will have a line drawn to it, starting from this snip. } @@ -52,7 +52,7 @@ this snip. Removes a child snip from this snip. Be sure to remove this snip as a parent from the argument, too. Instead of calling this method, consider using the - @scheme[remove-links] function. + @racket[remove-links] function. } @@ -62,7 +62,7 @@ this snip. Removes a parent snip from this snip. Be sure to remove this snip as a child from the argument, too. Instead of calling this method, consider using the - @scheme[remove-links] function. + @racket[remove-links] function. } @@ -70,8 +70,8 @@ this snip. [label (or/c false/c string/)]) void?]{ - Changes the label on the edge going to the @scheme[parent] to be - @scheme[label]. Ignored if no such egde exists. + Changes the label on the edge going to the @racket[parent] to be + @racket[label]. Ignored if no such egde exists. } } diff --git a/collects/mrlib/scribblings/graph/graph.scrbl b/collects/mrlib/scribblings/graph/graph.scrbl index e2712e9a..74d13f20 100644 --- a/collects/mrlib/scribblings/graph/graph.scrbl +++ b/collects/mrlib/scribblings/graph/graph.scrbl @@ -3,8 +3,8 @@ @title[#:style 'toc]{Graphs} -@defmodule[mrlib/graph]{The @schememodname[mrlib/graph] library -provides a graph drawing toolkit built out of @scheme[pasteboard%]s.} +@defmodule[mrlib/graph]{The @racketmodname[mrlib/graph] library +provides a graph drawing toolkit built out of @racket[pasteboard%]s.} @local-table-of-contents[] @@ -42,20 +42,20 @@ provides a graph drawing toolkit built out of @scheme[pasteboard%]s.} Connects a parent snip to a child snip within a pasteboard. -The default @scheme[dark-pen]/@scheme[dark-brush] and -@scheme[light-pen]/@scheme[light-brush] are blue and purple, -respectively. The @scheme[dark-pen] and @scheme[dark-brush] are used +The default @racket[dark-pen]/@racket[dark-brush] and +@racket[light-pen]/@racket[light-brush] are blue and purple, +respectively. The @racket[dark-pen] and @racket[dark-brush] are used when the mouse cursor is over the snip (or a child or parent), and the -@scheme[light-pen] and @scheme[light-brush] are used when the mouse +@racket[light-pen] and @racket[light-brush] are used when the mouse cursor is not over the snip. The brush is used to draw inside the arrow head and the pen is used to draw the border of the arrowhead and the line connecting the two snips. -if @scheme[label] is provided and not @scheme[#f], it is used as a +if @racket[label] is provided and not @racket[#f], it is used as a label on the edge. -When @scheme[dx] and @scheme[dy] are provided, the are offsets for the -head and the tail of the arrow. Otherwise, @scheme[0] offsets are +When @racket[dx] and @racket[dy] are provided, the are offsets for the +head and the tail of the arrow. Otherwise, @racket[0] offsets are used.} @defproc[(add-links/text-colors [parent (is-a?/c graph-snip<%>)] @@ -71,8 +71,8 @@ used.} [label (or/c string? false/c)]) void?]{ -Like @scheme[add-links], but with extra @scheme[dark-text] and -@scheme[light-text] arguments to set the colors of the label.} +Like @racket[add-links], but with extra @racket[dark-text] and +@racket[light-text] arguments to set the colors of the label.} @defproc[(remove-links [parent (is-a?/c graph-snip<%>)] [child (is-a?/c graph-snip<%>)]) @@ -85,6 +85,6 @@ Disconnects a parent snip from a child snip within a pasteboard.} [label (or/c string? false/c)]) void?]{ -Changes the label on the edge going from @scheme[child] to -@scheme[parent] to be @scheme[label]. If there is no existing edge +Changes the label on the edge going from @racket[child] to +@racket[parent] to be @racket[label]. If there is no existing edge between the two nodes, then nothing happens.} diff --git a/collects/mrlib/scribblings/hierlist/compound-item.scrbl b/collects/mrlib/scribblings/hierlist/compound-item.scrbl index 9bbfee1c..a1407b94 100644 --- a/collects/mrlib/scribblings/hierlist/compound-item.scrbl +++ b/collects/mrlib/scribblings/hierlist/compound-item.scrbl @@ -32,7 +32,7 @@ Like @xmethod[hierarchical-list% new-list].} @defmethod[(delete-item [i (is-a?/c hierarchical-list-item<%>)]) void?]{ -Deletes immediate item or sub-list @scheme[i] from the sub-list.} +Deletes immediate item or sub-list @racket[i] from the sub-list.} @defmethod[(get-items) (listof (is-a?/c hierarchical-list-item<%>))]{ diff --git a/collects/mrlib/scribblings/hierlist/hierlist.scrbl b/collects/mrlib/scribblings/hierlist/hierlist.scrbl index 8adc0dd6..b68c9cfd 100644 --- a/collects/mrlib/scribblings/hierlist/hierlist.scrbl +++ b/collects/mrlib/scribblings/hierlist/hierlist.scrbl @@ -5,7 +5,7 @@ @defmodule[mrlib/hierlist] -A @scheme[hierarchical-list%] control is a list of items, some of +A @racket[hierarchical-list%] control is a list of items, some of which can themselves be hierarchical lists. Each such sub-list has an arrow that the user can click to hide or show the sub-list's items. diff --git a/collects/mrlib/scribblings/hierlist/item.scrbl b/collects/mrlib/scribblings/hierlist/item.scrbl index 0c421e06..a6c1d2a5 100644 --- a/collects/mrlib/scribblings/hierlist/item.scrbl +++ b/collects/mrlib/scribblings/hierlist/item.scrbl @@ -21,7 +21,7 @@ Reports whether the item is selected.} [(click-select [on? any/c]) void?])]{ Calls @method[hierarchical-list% select] or @method[hierarchical-list% -click-select]. The @scheme[on?] argument can be @scheme[#f] only if +click-select]. The @racket[on?] argument can be @racket[#f] only if @xmethod[hierarchical-list% allow-deselect] allows it.} diff --git a/collects/mrlib/scribblings/hierlist/list.scrbl b/collects/mrlib/scribblings/hierlist/list.scrbl index 0fc3b3e8..b6114e3d 100644 --- a/collects/mrlib/scribblings/hierlist/list.scrbl +++ b/collects/mrlib/scribblings/hierlist/list.scrbl @@ -17,9 +17,9 @@ Creates a hierarchical-list control. Creates the control. -If the style @scheme['transparent] is passed, then the +If the style @racket['transparent] is passed, then the @method[editor-snip% use-style-background] method will be -called with @scheme[#t] when editor snips are created as part of +called with @racket[#t] when editor snips are created as part of the hierarchical list, ensuring that the entire control is transparent. @@ -39,11 +39,11 @@ Returns the currently selected item, if any.} (is-a?/c hierarchical-list-item<%>)]{ Creates and returns a new (empty) item in the list. See -@scheme[hierarchical-list-item<%>] for methods to fill in the item's +@racket[hierarchical-list-item<%>] for methods to fill in the item's label. -The @scheme[mixin] argument is applied to a class implementing -@scheme[hierarchical-list-item<%>], and the resulting class is +The @racket[mixin] argument is applied to a class implementing +@racket[hierarchical-list-item<%>], and the resulting class is instantiated as the list item.} @@ -62,17 +62,17 @@ list is empty.} (is-a?/c hierarchical-list-compound-item<%>)]{ Creates and returns a new (empty) sub-list in the list. See -@scheme[hierarchical-list-compound-item<%>] for methods to fill in the +@racket[hierarchical-list-compound-item<%>] for methods to fill in the item's label and content. -The @scheme[mixin] argument is applied to a class implementing -@scheme[hierarchical-list-compound-item<%>], and the resulting class +The @racket[mixin] argument is applied to a class implementing +@racket[hierarchical-list-compound-item<%>], and the resulting class is instantiated as the sub-list.} @defmethod[(delete-item [i (is-a?/c hierarchical-list-item<%>)]) void?]{ -Deletes immediate item or sub-list @scheme[i] from the list.} +Deletes immediate item or sub-list @racket[i] from the list.} @defmethod[(get-items) (listof (is-a?/c hierarchical-list-item<%>))]{ @@ -89,7 +89,7 @@ selection.} @defmethod[(on-select [i (or/c (is-a?/c hierarchical-list-item<%>) false/c)]) any]{ -Called for new select of @scheme[i], where @scheme[i] is @scheme[#f] +Called for new select of @racket[i], where @racket[i] is @racket[#f] if no item is now selected.} @@ -103,17 +103,17 @@ set-allow-selection].} @defmethod[(on-double-select [i (is-a?/c hierarchical-list-item<%>)]) any]{ -Called for a double-click on @scheme[i].} +Called for a double-click on @racket[i].} @defmethod[(on-item-opened [i (is-a?/c hierarchical-list-compound-item<%>)]) any]{ -Called when the arrow for @scheme[i] is turned down.} +Called when the arrow for @racket[i] is turned down.} @defmethod[(on-item-closed [i (is-a?/c hierarchical-list-compound-item<%>)]) any]{ -Called when the arrow for @scheme[i] is turned up.} +Called when the arrow for @racket[i] is turned up.} @defmethod[(sort [less-than-proc ((is-a?/c hierarchical-list-item<%>) @@ -122,8 +122,8 @@ Called when the arrow for @scheme[i] is turned up.} [recur? any/c #t]) void?]{ -Sorts items in the list by calling @scheme[less-than-proc] on pairs of -items. If @scheme[recur?] is true, items in sub-lists are sorted +Sorts items in the list by calling @racket[less-than-proc] on pairs of +items. If @racket[recur?] is true, items in sub-lists are sorted recursively.} @@ -131,7 +131,7 @@ recursively.} boolean?]{ Like @xmethod[editor<%> can-do-edit-operation?]. The default -implementation always returns @scheme[#f].} +implementation always returns @racket[#f].} @defmethod[(do-edit-operation [op symbol?] [recursive? any/c #t]) @@ -161,7 +161,7 @@ Moves the selection, scrolls as necessary to show it, and calls @method[hierarchical-list% on-select-always]. The @method[hierarchical-list% allow-deselect] method controls whether -@scheme[i] is allowed to be @scheme[#f] to deselect the currently +@racket[i] is allowed to be @racket[#f] to deselect the currently selected item.} @@ -199,7 +199,7 @@ This is initially disabled, by default.} Gets/sets whether the @method[hierarchical-list% on-select] can be -called with a @scheme[#f] argument to deselect the current item +called with a @racket[#f] argument to deselect the current item (leaving none selected). The initial mode does not allow deselection.} diff --git a/collects/mrlib/scribblings/hierlist/snips.scrbl b/collects/mrlib/scribblings/hierlist/snips.scrbl index f638fb78..a237ef7d 100644 --- a/collects/mrlib/scribblings/hierlist/snips.scrbl +++ b/collects/mrlib/scribblings/hierlist/snips.scrbl @@ -1,17 +1,17 @@ #lang scribble/doc @(require "../common.rkt" (for-label mrlib/hierlist)) -@title{Snips in a @scheme[hierarchical-list%] Instance} +@title{Snips in a @racket[hierarchical-list%] Instance} The @xmethod[text% find-snip] method of the editor in a -@scheme[hierarchical-list%] return instances of -@scheme[hierarchical-item-snip%] and @scheme[hierarchical-list-snip%]. +@racket[hierarchical-list%] return instances of +@racket[hierarchical-item-snip%] and @racket[hierarchical-list-snip%]. @defclass[hierarchical-item-snip% editor-snip% ()]{ @defmethod[(get-item) (is-a?/c hierarchical-list-item<%>)]{ - Returns the @scheme[hierarchical-list-item<%>] corresponding to the + Returns the @racket[hierarchical-list-item<%>] corresponding to the snip.} } @@ -21,7 +21,7 @@ The @xmethod[text% find-snip] method of the editor in a @defmethod[(get-item) (is-a?/c hierarchical-list-compound-item<%>)]{ - Returns the @scheme[hierarchical-list-compound-item<%>] corresponding to the + Returns the @racket[hierarchical-list-compound-item<%>] corresponding to the snip.} @defmethod[(get-content-buffer) (is-a?/c text%)]{ diff --git a/collects/mrlib/scribblings/image-core.scrbl b/collects/mrlib/scribblings/image-core.scrbl index 616464ff..1d68280d 100644 --- a/collects/mrlib/scribblings/image-core.scrbl +++ b/collects/mrlib/scribblings/image-core.scrbl @@ -18,7 +18,7 @@ up an image. void?]{ Draws @racket[image] in @racket[dc] at the position (@racket[dx],@racket[dy]). } - + @defproc[(image? [v any/c]) boolean?]{ Recognizes the images that library handles. } diff --git a/collects/mrlib/scribblings/include-bitmap.scrbl b/collects/mrlib/scribblings/include-bitmap.scrbl index 0b6a8148..365024ff 100644 --- a/collects/mrlib/scribblings/include-bitmap.scrbl +++ b/collects/mrlib/scribblings/include-bitmap.scrbl @@ -4,28 +4,28 @@ @title{Include Bitmap} -@defmodule[mrlib/include-bitmap]{The @scheme[include-bitmap] form +@defmodule[mrlib/include-bitmap]{The @racket[include-bitmap] form takes a filename containing a bitmap and ``inlines'' the bitmap into the program.} Historically, the advantage of inlining the bitmap is that a stand-alone executable can be created that contains the bitmap and does not refer to the original image file. The -@scheme[define-runtime-path] form, however, now provides a better +@racket[define-runtime-path] form, however, now provides a better alternative. @defform*[[(include-bitmap path-spec) (include-bitmap path-spec type-expr)]]{ -The @scheme[path-spec] is the same as for @scheme[include] form. The -@scheme[type-expr] should produce @scheme['unknown], -@scheme['unknown/mask], etc., as for @scheme[bitmap%], and the default -is @scheme['unknown/mask].} +The @racket[path-spec] is the same as for @racket[include] form. The +@racket[type-expr] should produce @racket['unknown], +@racket['unknown/mask], etc., as for @racket[bitmap%], and the default +is @racket['unknown/mask].} @defform*[[(include-bitmap/relative-to source path-spec) (include-bitmap/relative-to source path-spec [type-expr])]]{ -Analogous to @scheme[include-at/relative-to], though only a source is +Analogous to @racket[include-at/relative-to], though only a source is needed (no context).} diff --git a/collects/mrlib/scribblings/interactive-value-port.scrbl b/collects/mrlib/scribblings/interactive-value-port.scrbl index a35062b4..768718e1 100644 --- a/collects/mrlib/scribblings/interactive-value-port.scrbl +++ b/collects/mrlib/scribblings/interactive-value-port.scrbl @@ -8,8 +8,8 @@ @defproc[(set-interactive-display-handler [port output-port?]) void?]{ -Sets @scheme[port]'s display handler (via -@scheme[port-display-handler]) so that when it encounters these +Sets @racket[port]'s display handler (via +@racket[port-display-handler]) so that when it encounters these values: @itemize[ @@ -20,21 +20,21 @@ values: ] -it uses @scheme[write-special] to send snips to the port, +it uses @racket[write-special] to send snips to the port, instead of those values. Otherwise, it behaves like the default handler. To show values embedded in lists and other compound object, it uses -@scheme[pretty-print].} +@racket[pretty-print].} @defproc[(set-interactive-write-handler [port output-port?]) void?]{ -Like @scheme[set-interactive-display-handler], but sets the -@scheme[port-write-handler].} +Like @racket[set-interactive-display-handler], but sets the +@racket[port-write-handler].} @defproc[(set-interactive-print-handler [port output-port?]) void?]{ -Like @scheme[set-interactive-display-handler], but sets the -@scheme[port-print-handler].} +Like @racket[set-interactive-display-handler], but sets the +@racket[port-print-handler].} diff --git a/collects/mrlib/scribblings/name-message.scrbl b/collects/mrlib/scribblings/name-message.scrbl index 34b5a77b..fb009f9a 100644 --- a/collects/mrlib/scribblings/name-message.scrbl +++ b/collects/mrlib/scribblings/name-message.scrbl @@ -71,7 +71,7 @@ saying that there is no file name until the file is saved.} the label is determined by the @method[name-message% set-message]. } - + @defmethod[(get-background-color) (or/c #f (is-a/c color%) string?)]{ The result of this method is used for the background color diff --git a/collects/mrlib/scribblings/path-dialog.scrbl b/collects/mrlib/scribblings/path-dialog.scrbl index 5a79f9c1..ceba2e11 100644 --- a/collects/mrlib/scribblings/path-dialog.scrbl +++ b/collects/mrlib/scribblings/path-dialog.scrbl @@ -8,11 +8,11 @@ @defclass[path-dialog% dialog% ()]{ -The @scheme[path-dialog%] class implements a platform-independent +The @racket[path-dialog%] class implements a platform-independent file/directory dialog. The dialog is similar in functionality to the -@scheme[get-file], @scheme[put-file], @scheme[get-directory], and -@scheme[get-file-list] procedures, but considerable extra functionality -is available through the @scheme[path-dialog%] class. +@racket[get-file], @racket[put-file], @racket[get-directory], and +@racket[get-file-list] procedures, but considerable extra functionality +is available through the @racket[path-dialog%] class. @defconstructor[([label (or/c label-string? false/c) #f] @@ -34,79 +34,79 @@ is available through the @scheme[path-dialog%] class. [ok? (or/c (path? . -> . any) false/c) #f] [guard (or/c (path? . -> . any) false/c) #f])]{ -The @scheme[label] argument is the dialog's title string. If -@scheme[label] is @scheme[#f], the default is based on other field +The @racket[label] argument is the dialog's title string. If +@racket[label] is @racket[#f], the default is based on other field values. -The @scheme[message] argument is a prompt message to show at the top -of the dialog. If it is @scheme[#f], no prompt line. +The @racket[message] argument is a prompt message to show at the top +of the dialog. If it is @racket[#f], no prompt line. -The @scheme[parent] argument is the parent frame or dialog, if any, +The @racket[parent] argument is the parent frame or dialog, if any, for this dialog. -The @scheme[directory] argument specifies the dialog's initial -directory. If it is @scheme[#f], the initial directory is the last +The @racket[directory] argument specifies the dialog's initial +directory. If it is @racket[#f], the initial directory is the last directory that was used by the user (or the current directory on first use). -The @scheme[filename] argument provides an initial filename text, if +The @racket[filename] argument provides an initial filename text, if any. -If @scheme[put?] is true, the dialog operates in choose-file-to-write +If @racket[put?] is true, the dialog operates in choose-file-to-write mode (and warn the user if choosing an existing name). -If @scheme[dir?] is true, the dialog operates in directory-choice +If @racket[dir?] is true, the dialog operates in directory-choice mode. -If @scheme[existing?] is true, the use must choose an existing file. +If @racket[existing?] is true, the use must choose an existing file. -If @scheme[new?] is true, the user must choose a non-existant -path. Providing both @scheme[new?] and @scheme[existing?] as true +If @racket[new?] is true, the user must choose a non-existant +path. Providing both @racket[new?] and @racket[existing?] as true triggers an exception. -If @scheme[multi?] is true, the dialog allows selection of multiple +If @racket[multi?] is true, the dialog allows selection of multiple paths. -If @scheme[can-mkdir?] is true, the dialog includes a button for the +If @racket[can-mkdir?] is true, the dialog includes a button for the user to create a new directory. -The @scheme[filters] argument is one of: +The @racket[filters] argument is one of: @itemize[ - @item{@scheme[(list (list _filter-name _filter-glob) ...)] --- a - list of pattern names (e.g., @scheme["Scheme Files"]) and glob - patterns (e.g., @scheme["*.rkt;*.scrbl"]). Any list, including an + @item{@racket[(list (list _filter-name _filter-glob) ...)] --- a + list of pattern names (e.g., @racket["Scheme Files"]) and glob + patterns (e.g., @racket["*.rkt;*.scrbl"]). Any list, including an empty list, enables a filter box for the user to enter glob patterns, and the given list of choices is available in a combo-box drop-down menu. Glob patterns are the usual Unix ones - (see @scheme[glob->regexp]), and a semicolon can be used to allow + (see @racket[glob->regexp]), and a semicolon can be used to allow multiple patterns.} - @item{@scheme[#f] --- no patterns and no filter input box.} + @item{@racket[#f] --- no patterns and no filter input box.} - @item{@scheme[#t] --- use a generic @scheme["All"] filter, which is - @scheme["*.*"] on Windows and @scheme["*"] on other + @item{@racket[#t] --- use a generic @racket["All"] filter, which is + @racket["*.*"] on Windows and @racket["*"] on other platforms.} ] -The @scheme[show-file?] predicate is used to filter file paths that +The @racket[show-file?] predicate is used to filter file paths that are shown in the dialog. The predicate is applied to the file name as a string while the current-directory parameter is set. This predicate is intended to be a lightweight filter for choosing which names to display. -The @scheme[show-dir?] predicate is similar, but for directories +The @racket[show-dir?] predicate is similar, but for directories instead of files. -The @scheme[ok?] predicate is used in a similar fashion to the -@scheme[show-file?] and @scheme[show-dir?] predicate, but it is used +The @racket[ok?] predicate is used in a similar fashion to the +@racket[show-file?] and @racket[show-dir?] predicate, but it is used to determine whether the @onscreen{OK} button should be enabled when a file or directory is selected (so it need not be as lightweight as the other predicates). -The @scheme[guard] procedure is a generic verifier for the dialog's +The @racket[guard] procedure is a generic verifier for the dialog's final result, as produced by the @method[path-dialog% run] method. It receives the result that is about to be returned (which can be a list in a multi-selection dialog), and can return a different value (any @@ -119,9 +119,9 @@ message.} @defmethod[(run) any/c]{ -Shows the dialog and returns the selected result. If a @scheme[guard] +Shows the dialog and returns the selected result. If a @racket[guard] procedure is not supplied when the dialog is created, then the result is either a path or a list of paths (and the latter only when -@scheme[_multi?] is true when the dialog is created). If a -@scheme[_guard] procedure is supplied, its result determines the result +@racket[_multi?] is true when the dialog is created). If a +@racket[_guard] procedure is supplied, its result determines the result of this method.}} diff --git a/collects/mrlib/scribblings/plot.scrbl b/collects/mrlib/scribblings/plot.scrbl index 66a90935..53236b1a 100644 --- a/collects/mrlib/scribblings/plot.scrbl +++ b/collects/mrlib/scribblings/plot.scrbl @@ -3,7 +3,7 @@ @title{Plot} -@defmodule[mrlib/plot]{The @schememodname[mrlib/plot] library provides +@defmodule[mrlib/plot]{The @racketmodname[mrlib/plot] library provides a simple tool for plotting data values to a device context.} @defstruct[data-set ([points (listof (is-a?/c point%))] @@ -14,9 +14,9 @@ a simple tool for plotting data values to a device context.} [min-y real?] [max-y real?])]{ -The @scheme[points] field contains the data values to plot, and -@scheme[connected?] indicates whether the points are connected by a -line. The @scheme[pen] field provides a pen for plotting +The @racket[points] field contains the data values to plot, and +@racket[connected?] indicates whether the points are connected by a +line. The @racket[pen] field provides a pen for plotting points/lines. The remaining fields determine the plotting area within a drawing context.} @@ -30,9 +30,9 @@ a drawing context.} [x-axis-label string?] [y-axis-label string?])]{ -Configures a plot. The @scheme[grid?] field determines whether to draw -a grid at axis markings, and the @scheme[x-axis-marking] and -@scheme[y-axis-marking] lists supply locations for marks on each +Configures a plot. The @racket[grid?] field determines whether to draw +a grid at axis markings, and the @racket[x-axis-marking] and +@racket[y-axis-marking] lists supply locations for marks on each axis. The other fields are self-explanatory.} @defproc[(plot [dc (is-a?/c dc<%>)] @@ -40,6 +40,6 @@ axis. The other fields are self-explanatory.} [setup plot-setup?]) void?]{ -Draws the @scheme[data-set]s in @scheme[data] into the given -@scheme[dc]. Uses drawing-context coordinates in @scheme[data-set]s +Draws the @racket[data-set]s in @racket[data] into the given +@racket[dc]. Uses drawing-context coordinates in @racket[data-set]s that will accommodate all of the data sets.} diff --git a/collects/mrlib/scribblings/switchable-button.scrbl b/collects/mrlib/scribblings/switchable-button.scrbl index db4dff6f..df25e4cb 100644 --- a/collects/mrlib/scribblings/switchable-button.scrbl +++ b/collects/mrlib/scribblings/switchable-button.scrbl @@ -7,7 +7,7 @@ @defclass[switchable-button% canvas% ()]{ - A @scheme[switchable-button%] control displays + A @racket[switchable-button%] control displays and icon and a string label. It toggles between display of just the icon and a display with the label and the icon side-by-side. @@ -17,15 +17,15 @@ [bitmap (is-a?/c bitmap%)] [alternate-bitmap (is-a?/c bitmap%) bitmap] [vertical-tight? boolean? #f])]{ - The @scheme[callback] is called when the button - is pressed. The @scheme[string] and @scheme[bitmap] are + The @racket[callback] is called when the button + is pressed. The @racket[string] and @racket[bitmap] are used as discussed above. - If @scheme[alternate-bitmap] is supplied, then it is used + If @racket[alternate-bitmap] is supplied, then it is used when the button is switched to the view that just shows the bitmap. If it is not supplied, both modes show the same bitmap. - If the @scheme[vertical-tight?] argument is @scheme[#t], then the button takes up + If the @racket[vertical-tight?] argument is @racket[#t], then the button takes up as little as possible vertical space. } diff --git a/collects/mrlib/scribblings/tex-table.scrbl b/collects/mrlib/scribblings/tex-table.scrbl index 5269439b..783c67be 100644 --- a/collects/mrlib/scribblings/tex-table.scrbl +++ b/collects/mrlib/scribblings/tex-table.scrbl @@ -17,7 +17,7 @@ DrRacket uses with its @tt{control-\} (or @tt{command-\}) strings to their corresponding unicode characters. For example, it contains this mapping: - @schemeblock[ + @racketblock[ ("alpha" "α") ] as well as many more. diff --git a/collects/scribblings/framework/autosave.scrbl b/collects/scribblings/framework/autosave.scrbl index 167ac8cd..47bdd510 100644 --- a/collects/scribblings/framework/autosave.scrbl +++ b/collects/scribblings/framework/autosave.scrbl @@ -8,7 +8,7 @@ Classes that implement this interface can be autosaved. @defmethod*[(((do-autosave) void?))]{ This method is called when the object is registered to be - autosaved (see @scheme[autosave:register]). + autosaved (see @racket[autosave:register]). } } diff --git a/collects/scribblings/framework/canvas.scrbl b/collects/scribblings/framework/canvas.scrbl index fbb9f4af..8de31c86 100644 --- a/collects/scribblings/framework/canvas.scrbl +++ b/collects/scribblings/framework/canvas.scrbl @@ -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. + @racket['framework:basic-canvas-background] preference. Adds a callback so that when that preference is modified, the background color changes. @@ -26,7 +26,7 @@ } @defmixin[canvas:delegate-mixin (canvas:basic<%>) (canvas:delegate<%>)]{ Provides an implementation of - @scheme[canvas:delegate<%>]. + @racket[canvas:delegate<%>]. @defmethod*[#:mode override (((on-superwindow-show (shown? boolean?)) void?))]{ Notifies the delegate window when the original window is @@ -51,7 +51,7 @@ } @definterface[canvas:wide-snip<%> (canvas:basic<%>)]{ Any - @scheme[canvas%] + @racket[canvas%] that matches this interface will automatically resize selected snips when its size changes. Use @method[canvas:wide-snip<%> add-tall-snip] @@ -66,14 +66,11 @@ 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 (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. - } } @defmixin[canvas:wide-snip-mixin (canvas:basic<%>) (canvas:wide-snip<%>)]{ diff --git a/collects/scribblings/framework/color.scrbl b/collects/scribblings/framework/color.scrbl index f6b25021..067c6bb0 100644 --- a/collects/scribblings/framework/color.scrbl +++ b/collects/scribblings/framework/color.scrbl @@ -28,99 +28,93 @@ (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], - and it should return the style-name that the token should be colored. + The @racket[token-sym->style] argument will be passed the first return + symbol from @racket[get-token], and it should return the style-name that + the token should be colored. - The @scheme[get-token] argument takes an input port and optionally an offset and mode value. - When it accepts just an input port, @scheme[get-token] returns the next token as 5 values: + The @racket[get-token] argument takes an input port and optionally an + offset and mode value. When it accepts just an input port, + @racket[get-token] returns the next token as 5 values: @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{ - A symbol describing the type of the token. This symbol is transformed - into a style-name via the @scheme[token-sym->style] argument. The symbols - @scheme['white-space] and @scheme['comment] have special meaning and should always be - returned for white space and comment tokens respectively. The symbol - @scheme['no-color] can be used to indicate that although the token is not white - space, it should not be colored. The symbol @scheme['eof] must be used to - indicate when all the tokens have been consumed.} - @item{ - A symbol indicating how the token should be treated by the paren - matcher or @scheme[#f]. This symbol should be in the pairs argument.} - @item{ - The starting position of the token (or @scheme[#f] if eof).} - @item{ - The ending position of the token (or @scheme[#f] if eof).}] + @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{A symbol describing the type of the token. This symbol is + transformed into a style-name via the @racket[token-sym->style] argument. + The symbols @racket['white-space] and @racket['comment] have special + meaning and should always be returned for white space and comment tokens + respectively. The symbol @racket['no-color] can be used to indicate that + although the token is not white space, it should not be colored. The + symbol @racket['eof] must be used to indicate when all the tokens have + been consumed.} + @item{A symbol indicating how the token should be treated by the paren + matcher or @racket[#f]. This symbol should be in the pairs argument.} + @item{The starting position of the token (or @racket[#f] if eof).} + @item{The ending position of the token (or @racket[#f] if eof).}] - When @scheme[get-token] accepts an offset and mode value in addition to an + When @racket[get-token] accepts an offset and mode value in addition to an input port, it must also return two extra results, which are a backup - distance and new mode. The offset given to @scheme[get-token] can be added - to the position of the input port to obtain absolute coordinates within a - text stream. The mode argument allows @scheme[get-token] to communicate information - from earlier parsing to later. - When @scheme[get-token] is called for the beginning on a - stream, the mode argument is @scheme[#f]; thereafter, the mode - returned for the previous token is provided to @scheme[get-token] - for the next token. The mode should not be a mutable value; if - part of the stream is re-tokenized, the mode saved from the - immediately preceding token is given again to the - @scheme[get-token] function. The backup distance returned by @scheme[get-token] - indicates the maximum number of characters to back up (counting from the start of the token) - and for re-parsing after a change to the editor within the token's region. + distance and new mode. The offset given to @racket[get-token] can be added + to the position of the input port to obtain absolute coordinates within a + text stream. The mode argument allows @racket[get-token] to communicate + information from earlier parsing to later. When @racket[get-token] is + called for the beginning on a stream, the mode argument is @racket[#f]; + thereafter, the mode returned for the previous token is provided to + @racket[get-token] for the next token. The mode should not be a mutable + value; if part of the stream is re-tokenized, the mode saved from the + immediately preceding token is given again to the @racket[get-token] + function. The backup distance returned by @racket[get-token] indicates the + maximum number of characters to back up (counting from the start of the + token) and for re-parsing after a change to the editor within the token's + region. - The @scheme[get-token] function is usually be implemented with a lexer using the - @scheme[parser-tools/lex] library. The - @scheme[get-token] function must obey the following invariants: + The @racket[get-token] function is usually be implemented with a lexer using the + @racket[parser-tools/lex] library. The + @racket[get-token] function must obey the following invariants: @itemize[ - @item{ - Every position in the buffer must be accounted for in exactly one - token, and every token must have a non-zero width.} - @item{ - The token returned by @scheme[get-token] must rely only on the contents of the - input port argument plus the mode argument. This constraint means that the - tokenization of some part of the input cannot depend on earlier parts of the - input except through the mode (and implicitly through the starting positions - for tokens).} - @item{ - A change to the stream must not change the tokenization of the stream prior - to the token immediately preceding the change plus the backup distance. In the following - example, this invariant does not hold for a zero backup distance: If the buffer contains - @verbatim[#:indent 2]{" 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 - @verbatim[#:indent 2]{" 1 2 3"} - would result in a single string token modifying previous tokens. To - handle these situations, @scheme[get-token] can treat the first line as a - single token, or it can precisely track backup distances.}] + @item{Every position in the buffer must be accounted for in exactly one + token, and every token must have a non-zero width.} + @item{The token returned by @racket[get-token] must rely only on the + contents of the input port argument plus the mode argument. This + constraint means that the tokenization of some part of the input cannot + depend on earlier parts of the input except through the mode (and + implicitly through the starting positions for tokens).} + @item{A change to the stream must not change the tokenization of the + stream prior to the token immediately preceding the change plus the + backup distance. In the following example, this invariant does not hold + for a zero backup distance: If the buffer contains + @verbatim[#:indent 2]{" 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 + @verbatim[#:indent 2]{" 1 2 3"} + would result in a single string token modifying previous tokens. To + handle these situations, @racket[get-token] can treat the first line as a + single token, or it can precisely track backup distances.}] - The @scheme[pairs] argument is a list of different kinds of matching parens. The second - value returned by @scheme[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 - are three kinds of parens. Any token which has @scheme['begin] as its second - return value will act as an open for matching tokens with @scheme['end]. - 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. + The @racket[pairs] argument is a list of different kinds of matching + parens. The second value returned by @racket[get-token] is compared to + this list to see how the paren matcher should treat the token. An example: + Suppose pairs is @racket['((|(| |)|) (|[| |]|) (begin end))]. This means + that there are three kinds of parens. Any token which has @racket['begin] + as its second return value will act as an open for matching tokens with + @racket['end]. Similarly any token with @racket['|]|] will act as a + closing match for tokens with @racket['|[|]. 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. } @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 + If @racket[clear-colors] is true all the text in the buffer will have its style set to Standard. } @defmethod*[(((force-stop-colorer (stop? boolean?)) void?))]{ Causes the entire tokenizing/coloring system to become inactive. Intended for debugging purposes only. - - @scheme[stop?] determines whether the system is being forced to stop or allowed - to wake back up. + @racket[stop?] determines whether the system is being forced to stop or + allowed to wake back up. } @defmethod*[(((is-stopped?) boolean?))]{ Indicates if the colorer for this editor has been stopped, or not. @@ -136,21 +130,20 @@ @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 + @racket[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?))]{ Start coloring a frozen buffer again. - - If @scheme[recolor?] is @scheme[#t], the text is re-colored. If it is - @scheme[#f] the text is not recolored. When @scheme[recolor?] is @scheme[#t], - @scheme[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 - retokenized and recolored from scratch. This will happen in the - background after the call to @scheme[thaw-colorer] returns. + If @racket[recolor?] is @racket[#t], the text is re-colored. If it is + @racket[#f] the text is not recolored. When @racket[recolor?] is + @racket[#t], @racket[retokenize?] controls how the text is recolored. + @racket[#f] causes the text to be entirely re-colored before thaw-colorer + returns using the existing tokenization. @racket[#t] causes the entire + text to be retokenized and recolored from scratch. This will happen in the + background after the call to @racket[thaw-colorer] returns. } @defmethod*[(((reset-region (start natural-number/c) (end (or/c (quote end) natural-number/c))) void?))]{ @@ -159,90 +152,92 @@ } @defmethod*[(((reset-regions (regions (listof (list/c number? (or/c (quote end) number?))))) void?))]{ - Sets the currently active regions to be @scheme[regions]. + Sets the currently active regions to be @racket[regions]. } @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. + This returns the list of regions that are currently being colored in the + editor. } @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 - by direction. If @scheme[comments?] is true, comments are skipped as well as + Starts from position and skips whitespace in the direction indicated by + direction. If @racket[comments?] is true, comments are skipped as well as whitespace. skip-whitespace determines whitespaces and comments by - comparing the token type to @scheme['white-space] and @scheme['comment]. + comparing the token type to @racket['white-space] and @racket['comment]. Must only be called while the tokenizer is started. } @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 - 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. + Skip all consecutive whitespaces and comments (using + @racket[skip-whitespace]) immediately preceding the position. If the token + at this position is a close, return the position of the matching open, or + @racket[#f] if there is none. If the token was an open, return + @racket[#f]. For any other token, return the start of that token. Must only be called while the tokenizer is started. } @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. + s-expression containing position, or @racket[#f] is there is none. Must only be called while the tokenizer is started. } @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 - 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. + Skip all consecutive whitespaces and comments (using + @racket[skip-whitespace]) immediately following position. If the token at + this position is an open, return the position of the matching close, or + @racket[#f] if there is none. For any other token, return the end of that + token. Must only be called while the tokenizer is started. } @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 - parenthesis will be chosen from the set previously passed to - @scheme[start-colorer]---but only if an inserted @scheme[char] would be colored - as a parenthesis (i.e., with the @scheme['parenthesis] classification). - Otherwise, @scheme[char] will be inserted, even if it is not the - right kind. If @scheme[flash?] is true, the matching open parenthesis will be - flashed. + The @racket[position] is the place to put the parenthesis, and + @racket[char] is the parenthesis to be added (e.g., that the user typed). + If @racket[fixup?] is true, the right kind of closing parenthesis will be + chosen from the set previously passed to @racket[start-colorer]---but only + if an inserted @racket[char] would be colored as a parenthesis (i.e., with + the @racket['parenthesis] classification). Otherwise, @racket[char] will + be inserted, even if it is not the right kind. If @racket[flash?] is true, + the matching open parenthesis will be flashed. } @defmethod*[(((classify-position (position exact-nonnegative-integer?)) symbol?))]{ - Return a symbol for the lexer-determined token type for the token that - contains the item after @scheme[position]. + contains the item after @racket[position]. Must only be called while the tokenizer is started. } - + @defmethod[(get-token-range [position exact-nonnegative-integer?]) (values (or/c #f exact-nonnegative-integer?) (or/c #f exact-nonnegative-integer?))]{ - - Returns the range of the token surrounding @racket[position], if there is a token there. - + + Returns the range of the token surrounding @racket[position], if there is a + token there. + This method must be called only when the tokenizer is started. - } - + @defmethod[#:mode augment (on-lexer-valid [valid? boolean?]) any]{ - This method is an observer for when the lexer is working. - 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). - + This method is an observer for when the lexer is working. 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?)]. } - + @defmethod[#:mode public-final (is-lexer-valid?) boolean?]{ Indicates if the lexer is currently valid for this editor. } - + } @defmixin[color:text-mixin (text:basic<%>) (color:text<%>)]{ Adds the functionality needed for on-the-fly coloring and parenthesis diff --git a/collects/scribblings/framework/comment-box.scrbl b/collects/scribblings/framework/comment-box.scrbl index cc8ac3af..946ebe21 100644 --- a/collects/scribblings/framework/comment-box.scrbl +++ b/collects/scribblings/framework/comment-box.scrbl @@ -9,40 +9,26 @@ DrRacket. @defmethod*[#:mode override (((make-editor) (is-a?/c text%)))]{ + Makes an instance of + @racketblock[(scheme:text-mixin text:keymap%)]} - Makes an instance of - @schemeblock[ - (scheme:text-mixin text:keymap%)] - - } @defmethod*[#:mode override (((make-snip) (is-a?/c comment-snip%)))]{ + Returns an instance of the @racket[comment-snip%] class.} - Returns an instance of the - @scheme[comment-snip%] - class. - } @defmethod*[#:mode override (((get-corner-bitmap) (is-a?/c bitmap%)))]{ - Returns the semicolon bitmap from the file - @schemeblock[ - (build-path (collection-path "icons") "semicolon.gif")] + @racketblock[(build-path (collection-path "icons") "semicolon.gif")]} - } @defmethod*[#:mode override (((get-position) (symbols (quote left-top) (quote top-right))))]{ + Returns @racket['left-top]} - Returns @scheme['left-top] - } @defmethod*[#:mode override (((get-text) string))]{ - Returns the same string as the super method, but with - newlines replaced by newline-semicolon-space. - } + newlines replaced by newline-semicolon-space.} + @defmethod*[#:mode override (((get-menu) (is-a?/c popup-menu%)))]{ - Returns a menu with a single item to change the box into - semicolon comments. - - } + semicolon comments.} } @(include-previously-extracted "main-extracts.rkt" #rx"^comment-box:") diff --git a/collects/scribblings/framework/editor-snip.scrbl b/collects/scribblings/framework/editor-snip.scrbl index d3146d76..ca17c3a8 100644 --- a/collects/scribblings/framework/editor-snip.scrbl +++ b/collects/scribblings/framework/editor-snip.scrbl @@ -16,8 +16,8 @@ } @defmethod[(get-position) (symbols 'top-right 'left-top)]{ Returns the location of the image and the clickable - region. The symbol @scheme['top-right] indicates top portion is clickable - and icon on right. The symbol @scheme['left-top] means left portion is + region. The symbol @racket['top-right] indicates top portion is clickable + and icon on right. The symbol @racket['left-top] means left portion is clickable and icon on top. } @defmethod[(reset-min-sizes) void?]{ @@ -29,25 +29,25 @@ @defmixin[editor-snip:decorated-mixin (editor-snip%) (editor-snip:decorated<%>)]{ @defmethod[(get-corner-bitmap) (or/c false/c (is-a?/c bitmap%))]{ - Returns @scheme[#f]. + Returns @racket[#f]. } @defmethod[(get-color) (or/c string? (is-a?/c color%))]{ - Returns @schemeblock[ + Returns @racketblock[ (if (preferences:get 'framework:white-on-black?) "white" "black")] } @defmethod[(get-menu) (or/c false/c (is-a?/c popup-menu%))]{ - Returns @scheme[#f]. + Returns @racket[#f]. } @defmethod[(get-position) (symbols 'top-right 'left-top)]{ - Returns @scheme['top-right]. + Returns @racket['top-right]. } } @defclass[editor-snip:decorated% (editor-snip:decorated-mixin editor-snip%) ()]{ @defconstructor/auto-super[()]{ - Invokes the super constructor with the keyword @scheme[editor] as a call to + Invokes the super constructor with the keyword @racket[editor] as a call to @method[editor-snip:decorated% make-editor]. } @@ -64,7 +64,7 @@ Uses the @method[editor-snip:decorated% make-editor] and @method[editor-snip:decorated% make-snip] methods to create a copy of this snip, as follows: - @schememod[ + @racketmod[ (let ([snip (make-snip)]) (send snip set-editor (send (get-editor) copy-self)) (send snip set-style (get-style)) @@ -74,13 +74,13 @@ @defclass[editor-snip:decorated-snipclass% snip-class% ()]{ @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%]. + Returns an instance of @racket[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: - @schemeblock[ + then invokes its @racket[editor<%>]'s @method[editor<%> read-from-file] method + in order to read a snip from @racket[stream-in], eg: + @racketblock[ (let ([snip (make-snip stream-in)]) (send (send snip get-editor) read-from-file stream-in #f) snip) diff --git a/collects/scribblings/framework/editor.scrbl b/collects/scribblings/framework/editor.scrbl index bcfce271..0eecdae4 100644 --- a/collects/scribblings/framework/editor.scrbl +++ b/collects/scribblings/framework/editor.scrbl @@ -6,10 +6,10 @@ @definterface[editor:basic<%> (editor<%>)]{ Classes matching this interface support the basic - @scheme[editor<%>] + @racket[editor<%>] functionality required by the framework. @defmethod*[(((has-focus?) boolean?))]{ - This function returns @scheme[#t] when the editor has the keyboard + This function returns @racket[#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 @scheme[thunk] will be called immediately if the edit is + The procedure @racket[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 @scheme[tag] is a symbol, the @scheme[thunk] is keyed on that symbol, and + If @racket[tag] is a symbol, the @racket[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. @@ -42,7 +42,7 @@ } @defmethod*[(((get-top-level-window) (or/c #f (is-a?/c top-level-window<%>))))]{ Returns the - @scheme[top-level-window<%>] + @racket[top-level-window<%>] currently associated with this buffer. This does not work for embedded editors. @@ -50,7 +50,7 @@ } @defmethod*[(((save-file-out-of-date?) boolean?))]{ - Returns @scheme[#t] if the file on disk has been modified, by some other program. + Returns @racket[#t] if the file on disk has been modified, by some other program. } @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?))]{ @@ -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 @scheme[#t] if - no error occurred and @scheme[#f] if an error occurred. + already been shown to the user). It returns @racket[#t] if + no error occurred and @racket[#f] if an error occurred. } @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?))]{ @@ -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 @scheme[#t] if - no error occurred and @scheme[#f] if an error occurred. + already been shown to the user). It returns @racket[#t] if + no error occurred and @racket[#f] if an error occurred. } @defmethod*[(((on-close) void?))]{ @@ -81,13 +81,9 @@ editor is considered ``closed'' before the frame it is in is closed (e.g., when a tab in DrRacket is closed), and thus @method[editor:basic<%> on-close] will be called at that point. - - - See also - @method[editor:basic<%> can-close?] - and - @method[editor:basic<%> close]. + See also @method[editor:basic<%> can-close?] and @method[editor:basic<%> + close]. Does nothing. } @@ -103,11 +99,11 @@ @method[editor:basic<%> close]. - Returns @scheme[#t]. + Returns @racket[#t]. } @defmethod*[(((close) boolean?))]{ This method is merely - @schemeblock[ + @racketblock[ (if (can-close?) (begin (on-close) #t) #f)] @@ -117,27 +113,25 @@ @method[editor:basic<%> can-close?] and @method[editor:basic<%> on-close]. - } @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"). - } @defmethod[(get-pos/text [event (is-a?/c mouse-event%)]) (values (or/c false/c number?) (or/c false/c (is-a?/c editor<%>)))]{ - This method's first result is @scheme[#f] when the mouse + This method's first result is @racket[#f] when the mouse event does not correspond to a location in the editor. - - If the second result is a @scheme[text%] object, then the - first result will be a position in the editor and - otherwise the first result will be @scheme[#f]. - The @scheme[editor<%>] object will always be the nearest + If the second result is a @racket[text%] object, then the + first result will be a position in the editor and + otherwise the first result will be @racket[#f]. + + The @racket[editor<%>] object will always be the nearest enclosing editor containing the mouse click. } } @@ -149,11 +143,11 @@ mixin's argument. Each instance of a class created with this mixin contains a private - @scheme[keymap%] that is chained to the global keymap via: - @scheme[(send keymap chain-to-keymap (keymap:get-global) #f)]. + @racket[keymap%] that is chained to the global keymap via: + @racket[(send keymap chain-to-keymap (keymap:get-global) #f)]. - This installs the global keymap @scheme[keymap:get-global] to - handle keyboard and mouse mappings not handled by @scheme[keymap]. The + This installs the global keymap @racket[keymap:get-global] to + handle keyboard and mouse mappings not handled by @racket[keymap]. The global keymap is created when the framework is invoked. @defmethod*[#:mode augment (((can-save-file? (filename string?) (format symbol?)) boolean?))]{ @@ -166,7 +160,7 @@ @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. + @racket[handler:add-to-recent]with the current filename. to add the new filename to the list of recently opened files. @@ -189,7 +183,7 @@ } @defmethod*[#:mode augment (((on-edit-sequence) boolean?))]{ - Always returns @scheme[#t]. Updates a flag for + Always returns @racket[#t]. Updates a flag for @method[editor:basic<%> local-edit-sequence?] } @defmethod*[#:mode augment (((after-edit-sequence) void?))]{ @@ -200,21 +194,21 @@ @defmethod*[#:mode override (((on-new-box (type (or/c (quote pasteboard) (quote text)))) (is-a?/c editor-snip%)))]{ Creates instances of - @scheme[pasteboard:basic%] + @racket[pasteboard:basic%] or - @scheme[text:basic%] + @racket[text:basic%] instead of the built in - @scheme[pasteboard%] + @racket[pasteboard%] and - @scheme[text%] - classes. + @racket[text%] + classes. } @defmethod[#:mode override (on-new-image-snip [filename (or/c path? false/c)] - [kind (one-of/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)] + [kind (one-of/c 'unknown 'gif 'jpeg 'xbm 'xpm 'bmp 'pict)] [relative-path? any/c] [inline? any/c]) (is-a?/c image-snip%)]{ - @schemeblock[ + @racketblock[ (super on-new-image-snip (if (eq? kind 'unknown) 'unknown/mask kind) relative-path? @@ -224,25 +218,25 @@ @defmethod*[#:mode override (((get-file (directory (or/c path-string? false/c))) string))]{ Uses - @scheme[finder:get-file] + @racket[finder:get-file] to find a filename. Also, sets the parameter - @scheme[finder:dialog-parent-parameter] + @racket[finder:dialog-parent-parameter] to the result of @method[editor:basic<%> get-top-level-window]. } @defmethod*[#:mode override (((put-file (directory (or/c path? false/c)) (default-name (or/c path? false/c))) string))]{ Uses - @scheme[finder:put-file] + @racket[finder:put-file] to find a filename. Also, sets the parameter - @scheme[finder:dialog-parent-parameter] + @racket[finder:dialog-parent-parameter] to the result of @method[editor:basic<%> get-top-level-window]. } } @definterface[editor:standard-style-list<%> (editor<%>)]{ This interface is implemented by the results of - @scheme[editor:standard-style-list-mixin]. + @racket[editor:standard-style-list-mixin]. } @defmixin[editor:standard-style-list-mixin (editor<%>) (editor:standard-style-list<%>)]{ The mixin adds code to the initialization @@ -250,11 +244,11 @@ list (via @method[editor<%> set-style-list]) to the result of - @scheme[editor:get-standard-style-list]. + @racket[editor:get-standard-style-list]. In addition, it calls @method[editor<%> set-load-overwrites-styles] - with @scheme[#f]. + with @racket[#f]. This ensures that saved files with different settings for the style list do not clobber the shared style list. @@ -267,46 +261,46 @@ method. This editor is initialized by calling - @scheme[add-editor-keymap-functions], - @scheme[add-text-keymap-functions], and - @scheme[add-pasteboard-keymap-functions]. + @racket[add-editor-keymap-functions], + @racket[add-text-keymap-functions], and + @racket[add-pasteboard-keymap-functions]. @defmethod*[(((get-keymaps) (list-of (is-a?/c keymap%))))]{ The keymaps returned from this method are chained to this - @scheme[editor<%>]'s keymap. + @racket[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. - See also @scheme[editor:add-after-user-keymap]. + See also @racket[editor:add-after-user-keymap]. - Defaultly returns @scheme[(list (keymap:get-user) (keymap:get-global))] + Defaultly returns @racket[(list (keymap:get-user) (keymap:get-global))] } } @defmixin[editor:keymap-mixin (editor:basic<%>) (editor:keymap<%>)]{ This provides a mixin that implements the - @scheme[editor:keymap<%>] + @racket[editor:keymap<%>] interface. } @definterface[editor:autowrap<%> (editor:basic<%>)]{ Classes implementing this interface keep the @method[editor<%> auto-wrap] state set based on the - @scheme['framework:auto-set-wrap?] preference - (see @scheme[preferences:get] for more information about preferences). + @racket['framework:auto-set-wrap?] preference + (see @racket[preferences:get] for more information about preferences). They install a preferences callback with - @scheme[preferences:add-callback] + @racket[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 @scheme['framework:auto-set-wrap?] + to the current value of @racket['framework:auto-set-wrap?] via - @scheme[preferences:get]. + @racket[preferences:get]. } @defmixin[editor:autowrap-mixin (editor:basic<%>) (editor:autowrap<%>)]{ See - @scheme[editor:autowrap<%>] + @racket[editor:autowrap<%>] } @definterface[editor:file<%> (editor:keymap<%>)]{ Objects supporting this interface are expected to support files. @@ -314,8 +308,7 @@ The result of this method is used as the parent for the dialog that asks about closing. - - Defaultly returns @scheme[#f]. + Defaultly returns @racket[#f]. } @defmethod*[(((update-frame-filename) void?))]{ Attempts to find a frame that displays this editor. If it @@ -328,15 +321,14 @@ been saved is a reason to alert the user. See also @method[editor:file-mixin can-close?]. - - Defaultly returns @scheme[#f]. + Defaultly returns @racket[#f]. } @defmethod[(user-saves-or-not-modified? [allow-cancel? #t]) boolean?]{ If the file has not been saved, this prompts the user about saving and, if the user says to save, then it saves the file. - - The result is @scheme[#t] if the save file is up to date, or if + + The result is @racket[#t] if the save file is up to date, or if the user says it is okay to continue without saving. Generally used when closing the file or quiting the app. } @@ -351,19 +343,19 @@ Updates the filename on each frame displaying this editor, for each frame that matches - @scheme[frame:editor<%>]. + @racket[frame:editor<%>]. } @defmethod*[#:mode augment (((can-close?) boolean?))]{ If the @method[editor:file<%> allow-close-with-no-filename?] - method returns @scheme[#f], this method checks to see if the file + method returns @racket[#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 @racket[#t], this method does as before, except only asks if the editor's @method[editor<%> get-filename]method returns a path. @@ -373,60 +365,47 @@ This returns a list containing the super-class's keymaps, plus the result of - @scheme[keymap:get-file] + @racket[keymap:get-file] } } @definterface[editor:backup-autosave<%> (editor:basic<%>)]{ Classes matching this interface support backup files and autosaving. @defmethod*[(((backup?) boolean?))]{ Indicates whether this - @scheme[editor<%>] + @racket[editor<%>] should be backed up. - - Returns the value of the - @scheme[preferences:get] - applied to - @scheme['framework:backup-files?]. - @index{'framework:backup-files?} - + Returns the value of the @racket[preferences:get] applied to + @racket['framework:backup-files?]. @index{'framework:backup-files?} } @defmethod*[(((autosave?) boolean?))]{ Indicates whether this - @scheme[editor<%>] + @racket[editor<%>] should be autosaved. - - Returns @scheme[#t]. + Returns @racket[#t]. } @defmethod*[(((do-autosave) (or/c #f path?)))]{ - This method is called to perform the autosaving. - See also - @scheme[autosave:register] + This method is called to perform the autosaving. See also + @racket[autosave:register] + When the file has been modified since it was last saved and autosaving it + turned on (via the @method[editor:backup-autosave<%> autosave?] method) an + autosave file is created for this @racket[editor<%>]. - When the file has been modified since it was last saved and autosaving - it turned on (via the - @method[editor:backup-autosave<%> autosave?] - method) an autosave file is created for this - @scheme[editor<%>]. - - Returns the filename where the autosave took place, or - @scheme[#f] if none did. + Returns the filename where the autosave took place, or @racket[#f] if none + did. } @defmethod*[(((remove-autosave) void?))]{ This method removes the autosave file associated with this - @scheme[editor<%>]. - - + @racket[editor<%>]. } } @defmixin[editor:backup-autosave-mixin (editor:basic<%>) (editor:backup-autosave<%> autosave:autosavable<%>)]{ This mixin adds backup and autosave functionality to an editor. - During initialization, this object is registered - with - @scheme[autosave:register]. + During initialization, this object is registered with + @racket[autosave:register]. The result of this mixin uses the same initialization arguments as the mixin's argument. @@ -436,7 +415,7 @@ If a backup file has not been created this session for this file, deletes any existing backup file and copies the old save file into the backup file. For the backup file's name, see - @scheme[path-utils:generate-backup-name] + @racket[path-utils:generate-backup-name] } @defmethod*[#:mode augment (((on-close) void?))]{ @@ -444,7 +423,7 @@ } @defmethod*[#:mode augment (((on-change) void?))]{ - Sets a flag indicating that this @scheme[editor<%>] needs to be autosaved. + Sets a flag indicating that this @racket[editor<%>] needs to be autosaved. } @defmethod*[#:mode override (((set-modified (modified? any/c)) void?))]{ @@ -454,13 +433,12 @@ } } @definterface[editor:info<%> (editor:basic<%>)]{ - An @scheme[editor<%>] - matching this interface provides information about its lock state to its - @scheme[top-level-window<%>]. + An @racket[editor<%>] matching this interface provides information about its + lock state to its @racket[top-level-window<%>]. } @defmixin[editor:info-mixin (editor:basic<%>) (editor:info<%>)]{ This editor tells the frame when it is locked and unlocked. - See also @scheme[frame:text-info<%>]. + See also @racket[frame:text-info<%>]. @defmethod*[#:mode override (((lock (lock? boolean?)) void?))]{ diff --git a/collects/scribblings/framework/frame.scrbl b/collects/scribblings/framework/frame.scrbl index 0758ab3c..5a1816dc 100644 --- a/collects/scribblings/framework/frame.scrbl +++ b/collects/scribblings/framework/frame.scrbl @@ -8,17 +8,17 @@ @definterface[frame:basic<%> (frame%)]{ Classes matching this interface support the basic - @scheme[frame%] + @racket[frame%] functionality required by the framework. @defmethod*[(((get-area-container%) (implementation?/c area-container<%>)))]{ The class that this method returns is used to create the - @scheme[area-container<%>] + @racket[area-container<%>] in this frame. } @defmethod*[(((get-area-container) (is-a?/c area-container<%>)))]{ This returns the main - @scheme[area-container<%>] + @racket[area-container<%>] in the frame } @@ -26,16 +26,14 @@ The result of this method is used to create the initial menu bar for this frame. - - Return - @scheme[menu-bar%]. + Return @racket[menu-bar%]. } @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: - @schemeblock[ + @racketblock[ (class ... ... (define status-panel #f) @@ -54,7 +52,7 @@ The searching frame is implemented using this method. - Calls @scheme[make-object] with @scheme[class] and @scheme[parent]. + Calls @racket[make-object] with @racket[class] and @racket[parent]. } @defmethod*[(((close) void?))]{ This method closes the frame by calling the @@ -64,7 +62,7 @@ methods. It's implementation is: - @schemeblock[ + @racketblock[ (inherit can-close? on-close) (public [show @@ -78,132 +76,116 @@ Indicates if this frame contains this buffer (and can edit that file). - - Returns @scheme[#f]. + Returns @racket[#f]. } @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. + or @racket[#f] if there is no appropriate filename. + Defaultly returns @racket[#f]. - Defaultly returns @scheme[#f]. - - If @scheme[temp] is a box, it is filled with @scheme[#t] or @scheme[#f], + If @racket[temp] is a box, it is filled with @racket[#t] or @racket[#f], depending if the filename is a temporary filename. } @defmethod*[(((make-visible (filename string?)) void?))]{ - Makes the file named by @scheme[filename] visible (intended for + Makes the file named by @racket[filename] visible (intended for use with tabbed editing). } } @defmixin[frame:basic-mixin (frame%) (frame:basic<%>)]{ - This mixin provides the basic functionality that the framework - expects. It helps manage the list of frames in the - @scheme[group:%] - object returned by - @scheme[group:get-the-frame-group]. + This mixin provides the basic functionality that the framework expects. It + helps manage the list of frames in the @racket[group:%] object returned by + @racket[group:get-the-frame-group]. - Do not give @scheme[panel%] or @scheme[control<%>] objects this frame as - parent. Instead, use the result of the - @method[frame:basic<%> get-area-container] - method. + Do not give @racket[panel%] or @racket[control<%>] objects this frame as + parent. Instead, use the result of the @method[frame:basic<%> + get-area-container] method. @index{Windows menu} + This mixin also creates a menu bar for the frame, as the frame is initialized. It uses the class returned by - @method[frame:basic<%> get-menu-bar%]. It only passes the frame as an initialization argument. - In addition, it creates the windows menu in the menu bar. + @method[frame:basic<%> get-menu-bar%]. It only passes the frame as an + initialization argument. In addition, it creates the windows menu in the + menu bar. + + This mixin calls its @method[window<%> accept-drop-files] with @racket[#t]. - This mixin calls its @method[window<%> accept-drop-files] with @scheme[#t]. - It also calls its @method[frame% set-icon] method according to the current - value of @scheme[frame:current-icon]. - - See also - @scheme[frame:reorder-menus]. + value of @racket[frame:current-icon]. + + See also @racket[frame:reorder-menus]. + @defmethod*[#:mode override (((show (on? boolean?)) void?))]{ Calls the super method. - When @scheme[on?] is @scheme[#t], inserts the frame into the - frame group and when it is @scheme[#f], removes the frame + When @racket[on?] is @racket[#t], inserts the frame into the + frame group and when it is @racket[#f], removes the frame from the group. } @defmethod*[#:mode override (((can-exit?) boolean?))]{ - This, together with - @method[frame:basic-mixin on-exit] - mimics - @scheme[exit:exit]. + This, together with @method[frame:basic-mixin on-exit] mimics + @racket[exit:exit]. - First, it calls - @scheme[exit:set-exiting] - with @scheme[#t]. - Then, it calls - @scheme[exit:can-exit?]. If it returns @scheme[#t], - so does this method. If - it returns @scheme[#f], - this method calls - @scheme[exit:set-exiting] - with @scheme[#f]. + First, it calls @racket[exit:set-exiting] with @racket[#t]. Then, it calls + @racket[exit:can-exit?]. If it returns @racket[#t], so does this method. If + it returns @racket[#f], this method calls @racket[exit:set-exiting] with + @racket[#f]. } @defmethod*[#:mode override (((on-exit) void?))]{ - Together with - @method[frame:basic-mixin can-exit?] - this mimics the behavior of - @scheme[exit:exit]. + Together with @method[frame:basic-mixin can-exit?] this mimics the + behavior of @racket[exit:exit]. - Calls - @scheme[exit:on-exit] - and then queues a callback - to call Racket's @scheme[exit] - function. If that returns, it - calls - @scheme[exit:set-exiting] - to reset that flag to - @scheme[#f]. + Calls @racket[exit:on-exit] and then queues a callback to call Racket's + @racket[exit] function. If that returns, it calls @racket[exit:set-exiting] + to reset that flag to @racket[#f]. } @defmethod*[#:mode override (((on-superwindow-show (shown? any/c)) void?))]{ - Notifies the result of (@scheme[group:get-the-frame-group]) that a frame has been shown, by calling - the - @method[group:% frame-shown/hidden] - method. + Notifies the result of @racket[(group:get-the-frame-group)] that a frame + has been shown, by calling the @method[group:% frame-shown/hidden] method. } @defmethod*[#:mode override (((on-drop-file (pathname string?)) void?))]{ - Calls - @scheme[handler:edit-file] - with @scheme[pathname] as an argument. + Calls @racket[handler:edit-file] with @racket[pathname] as an argument. } @defmethod*[#:mode override (((after-new-child) void?))]{ - Raises an exception if attempting to add a child to this frame (except if using the - @method[frame:basic<%> make-root-area-container] - method). + Raises an exception if attempting to add a child to this frame (except if + using the @method[frame:basic<%> make-root-area-container] method). } } @definterface[frame:size-pref<%> (frame:basic<%>)]{ } @defmixin[frame:size-pref-mixin (frame:basic<%>) (frame:size-pref<%>)]{ - @defconstructor[((size-preferences-key symbol?) (label label-string?) (parent (or/c (is-a?/c frame%) 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))]{ + @defconstructor[((size-preferences-key symbol?) + (label label-string?) + (parent (or/c (is-a?/c frame%) 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 'no-resize-border 'no-caption 'no-system-menu 'hide-menu-bar 'mdi-parent 'mdi-child 'toolbar-button 'float 'metal)) null) + (enabled any/c #t) + (border (integer-in 0 1000) 0) + (spacing (integer-in 0 1000) 0) + (alignment (list/c (or/c 'left 'center 'right) (or/c 'top 'center 'bottom)) '(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))]{ - The size @scheme[size-preferences-key] symbol is used with - @scheme[preferences:get] - and - @scheme[preferences:set] - to track the current size. + The size @racket[size-preferences-key] symbol is used with + @racket[preferences:get] and @racket[preferences:set] to track the current + size. - Passes the @scheme[width] and @scheme[height] initialization - arguments to the superclass based on the current value - of the preference. + Passes the @racket[width] and @racket[height] initialization arguments to + the superclass based on the current value of the preference. - See also - @scheme[frame:setup-size-pref]. + See also @racket[frame:setup-size-pref]. } @defmethod*[#:mode override (((on-size (width number?) (height number?)) void?))]{ @@ -215,98 +197,70 @@ } @definterface[frame:register-group<%> ()]{ Frames that implement this interface are registered with the group. See - @scheme[group:get-the-frame-group] - and - @scheme[frame:register-group-mixin]. + @racket[group:get-the-frame-group] and @racket[frame:register-group-mixin]. } @defmixin[frame:register-group-mixin (frame:basic<%>) (frame:register-group<%>)]{ During initialization, calls - @method[group:% insert-frame]with @scheme[this]. + @method[group:% insert-frame]with @racket[this]. @defmethod*[#:mode augment (((can-close?) boolean?))]{ - Calls the inner method, with a default of @scheme[#t]. - If that returns @scheme[#t], - it checks for one of the these three conditions: + Calls the inner method, with a default of @racket[#t]. If that returns + @racket[#t], it checks for one of the these three conditions: @itemize[ - @item{ - @scheme[exit:exiting?] - returns @scheme[#t]} - @item{there is more than one - frame in the group returned - by - @scheme[group:get-the-frame-group], or} - @item{the procedure - @scheme[exit:user-oks-exit] - returns @scheme[#t].}] - If any of those conditions hold, the - method returns @scheme[#t]. + @item{@racket[exit:exiting?] returns @racket[#t]} + @item{there is more than one frame in the group returned by + @racket[group:get-the-frame-group], or} + @item{the procedure @racket[exit:user-oks-exit] returns @racket[#t].}] + + If any of those conditions hold, the method returns @racket[#t]. } @defmethod*[#:mode augment (((on-close) void?))]{ - First calls the inner method. - Next, calls the - @method[group:% remove-frame] - method of the result of - @scheme[group:get-the-frame-group] - with @scheme[this] as an argument. - Finally, unless - @scheme[exit:exiting?] - returns @scheme[#t], - and if there are no more - frames open, it calls - @scheme[exit:exit]. + First calls the inner method. Next, calls the @method[group:% + remove-frame] method of the result of @racket[group:get-the-frame-group] + with @racket[this] as an argument. Finally, unless @racket[exit:exiting?] + returns @racket[#t], and if there are no more frames open, it calls + @racket[exit:exit]. } @defmethod*[#:mode override (((on-activate (on? boolean?)) void?))]{ - Calls - @method[group:% set-active-frame] - with @scheme[this] when - @scheme[on?] is true. + Calls @method[group:% set-active-frame] with @racket[this] when + @racket[on?] is true. } } @definterface[frame:status-line<%> (frame:basic<%>)]{ - The mixin that implements this interface provides an - interface to a set of status lines at the bottom of this - frame. + The mixin that implements this interface provides an interface to a set of + status lines at the bottom of this frame. - Each status line must be opened with - @method[frame:status-line<%> open-status-line] - before any messages are shown in the status line and - once - @method[frame:status-line<%> close-status-line] - is called, no more messages may be displayed, - unless the status line is re-opened. + Each status line must be opened with @method[frame:status-line<%> + open-status-line] before any messages are shown in the status line and once + @method[frame:status-line<%> close-status-line] is called, no more messages + may be displayed, unless the status line is re-opened. + + The screen space for status lines is not created until + @method[frame:status-line<%> update-status-line] is called with a + string. Additionally, the screen space for one status line is re-used when by + another status line when the first passes @racket[#f] to + @method[frame:status-line<%> update-status-line]. In this manner, the status + line frame avoids opening too many status lines and avoids flashing the + status lines open and closed too often. - The screen space for status lines is not created - until - @method[frame:status-line<%> update-status-line] - is called with a string. Additionally, - the screen space for one status line is re-used - when by another status line when the first - passes @scheme[#f] to - @method[frame:status-line<%> update-status-line]. In this manner, the status line frame avoids - opening too many status lines and avoids - flashing the status lines open and closed too - often. @defmethod*[(((open-status-line (id symbol?)) void?))]{ Creates a new status line identified by the symbol argument. The line will not appear in the frame until a message is put into it, via @method[frame:status-line<%> update-status-line]. - - } - @defmethod*[(((close-status-line (id symbol?)) void?))]{ - Closes the status line @scheme[id]. + @defmethod*[(((close-status-line (id symbol?)) void?))]{ + Closes the status line @racket[id]. } @defmethod*[(((update-status-line (id symbol?) (status (or/c #f string))) void?))]{ - Updates the status line named by @scheme[id] with - @scheme[status]. If @scheme[status] is @scheme[#f], the status - line is becomes blank (and may be used by other ids). - + Updates the status line named by @racket[id] with @racket[status]. If + @racket[status] is @racket[#f], the status line is becomes blank (and may + be used by other ids). } } @defmixin[frame:status-line-mixin (frame:basic<%>) (frame:status-line<%>)]{ @@ -321,139 +275,126 @@ @definterface[frame:info<%> (frame:basic<%>)]{ Frames matching this interface support a status line. - The preference @scheme['framework:show-status-line] controls - the visibility of the status line. If it is @scheme[#t], the - 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) + The preference @racket['framework:show-status-line] controls the visibility + of the status line. If it is @racket[#t], the status line is visible and if + it is @racket[#f], the status line is not visible (see + @racket[preferences:get] for more info about preferences) + @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. - It is used to calculate the sizes of the edits in the status line. - + This method is used to calculate the size of an @racket[editor-canvas%] + with a particular set of characters in it. It is used to calculate the + sizes of the edits in the status line. } - @defmethod*[(((lock-status-changed) void?))]{ - This method is called when the lock status of the - @scheme[editor<%>] - changes. + @defmethod*[(((lock-status-changed) void?))]{ + This method is called when the lock status of the @racket[editor<%>] + changes. Updates the lock icon in the status line panel. } @defmethod*[(((update-info) void?))]{ This method updates all of the information in the panel. - } @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 - @method[canvas:info-mixin% set-editor] - methods call this method to ensure that the info canvas is set correctly. - + @method[canvas:info-mixin% on-focus] and @method[canvas:info-mixin% + set-editor] methods call this method to ensure that the info canvas is set + correctly. } + @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 - @method[frame:info<%> set-info-canvas] - + Returns the canvas that the @racket[frame:info<%>] currently shows info + about. See also @method[frame:info<%> set-info-canvas] } + @defmethod*[(((get-info-editor) (or/c #f (is-a?/c editor<%>))))]{ Override this method to specify the editor that the status line contains information about. - - Returns the result of - @method[frame:editor<%> get-editor]. + Returns the result of @method[frame:editor<%> get-editor]. } @defmethod*[(((get-info-panel) (is-a?/c horizontal-panel%)))]{ - This method returns the panel where the information about this editor - is displayed. - + This method returns the panel where the information about this editor is + displayed. } + @defmethod*[(((show-info) void?))]{ - Shows the info panel. - - See also - @method[frame:info<%> is-info-hidden?]. + Shows the info panel. + See also @method[frame:info<%> is-info-hidden?]. } + @defmethod*[(((hide-info) void?))]{ Hides the info panel. - See also - @method[frame:info<%> is-info-hidden?]. - + See also @method[frame:info<%> is-info-hidden?]. } @defmethod*[(((is-info-hidden?) boolean?))]{ Result indicates if the show info panel has been explicitly hidden with @method[frame:info<%> hide-info]. - If this method returns @scheme[#t] and - @scheme[(preferences:get 'framework:show-status-line)] is - @scheme[#f], then the info panel will not be visible. - Otherwise, it is visible. + If this method returns @racket[#t] and @racket[(preferences:get + 'framework:show-status-line)] is @racket[#f], then the info panel will not + be visible. Otherwise, it is visible. } } @defmixin[frame:info-mixin (frame:basic<%>) (frame:info<%>)]{ - This mixin provides support for displaying various info in the status - line of the frame. + This mixin provides support for displaying various info in the status line of + the frame. 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<%>))) (is-a?/c area-container<%>)))]{ Builds an extra panel for displaying various information. } @defmethod*[#:mode augment (((on-close) void?))]{ - - Removes the GC icon with - @scheme[unregister-collecting-blit] - and cleans up other callbacks. + Removes the GC icon with @racket[unregister-collecting-blit] and cleans up + other callbacks. } + } @definterface[frame:text-info<%> (frame:info<%>)]{ - Objects matching this interface receive information from editors - constructed with - @scheme[editor:info-mixin] - and display it. - @defmethod*[(((set-macro-recording (on? boolean?)) void?))]{ - Shows/hides the icon in the info bar that indicates if a - macro recording is in progress. + Objects matching this interface receive information from editors constructed + with @racket[editor:info-mixin] and display it. + @defmethod*[(((set-macro-recording (on? boolean?)) void?))]{ + Shows/hides the icon in the info bar that indicates if a macro recording is + in progress. } + @defmethod*[(((overwrite-status-changed) void?))]{ - This method is called when the overwrite mode is turned either on or off in the - @scheme[editor<%>] - in this frame. + This method is called when the overwrite mode is turned either on or off in + the @racket[editor<%>] in this frame. } + @defmethod*[(((anchor-status-changed) void?))]{ This method is called when the anchor is turned either on or off in the - @scheme[editor<%>] + @racket[editor<%>] in this frame. } + @defmethod*[(((editor-position-changed) void?))]{ - This method is called when the position in the - @scheme[editor<%>] - changes. + This method is called when the position in the @racket[editor<%>] changes. } + @defmethod[(add-line-number-menu-items [menu (is-a?/c menu-item-container<%>)]) void?]{ - This method is called when the line/column display in the info bar is clicked. - It is passed a @racket[menu-item-container<%>] that can be filled in with - menu items; those menu items will appear in the menu that appears when line/colun - display is clicked. + This method is called when the line/column display in the info bar is + clicked. It is passed a @racket[menu-item-container<%>] that can be filled + in with menu items; those menu items will appear in the menu that appears + when line/colun display is clicked. } } + @defmixin[frame:text-info-mixin (frame:info<%>) (frame:text-info<%>)]{ This mixin adds status information to the info panel relating to an edit. @defmethod*[#:mode augment (((on-close) void?))]{ - removes a preferences callback for @scheme['framework:line-offsets]. - See @scheme[preferences:add-callback] for more information. + removes a preferences callback for @racket['framework:line-offsets]. + See @racket[preferences:add-callback] for more information. } @defmethod*[#:mode override (((update-info) void?))]{ @@ -473,107 +414,92 @@ @(include/reader "standard-menus.scrbl" s:read-syntax) @defmixin[frame:standard-menus-mixin (frame:basic<%>) (frame:standard-menus<%>)]{ - The result of this mixin implements - @scheme[frame:standard-menus<%>]. + The result of this mixin implements @racket[frame:standard-menus<%>]. + @defmethod*[#:mode augment (((on-close) void?))]{ Removes the preferences callbacks for the menu items } } + @definterface[frame:editor<%> (frame:standard-menus<%>)]{ Frame classes matching this interface support embedded editors. @defmethod*[(((get-entire-label) string))]{ - This method returns the entire label for the frame. - See also - @method[window<%> set-label] - and - @method[frame:editor<%> set-label-prefix]. - + This method returns the entire label for the frame. See also + @method[window<%> set-label] and @method[frame:editor<%> set-label-prefix]. } + @defmethod*[(((get-label-prefix) string?))]{ This returns the prefix for the frame's label. - } + @defmethod*[(((set-label-prefix (prefix string?)) void?))]{ Sets the prefix for the label of the frame. - } + @defmethod*[(((get-canvas%) (subclass?/c editor-canvas%)))]{ The result of this method is used to create the canvas for the - @scheme[editor<%>] - in this frame. + @racket[editor<%>] in this frame. - - Returns - @scheme[editor-canvas%]. + Returns @racket[editor-canvas%]. } + @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. - + @method[frame:editor<%> get-canvas%] method. } + @defmethod*[(((get-editor%) (implementation?/c editor<%>)))]{ - The result of this class is used to create the - @scheme[editor<%>] - in this frame. + The result of this class is used to create the @racket[editor<%>] in this + frame. Override this method to specify a different editor class. - - Returns the value of the init-field @scheme[editor%]. + Returns the value of the init-field @racket[editor%]. } + @defmethod*[(((get-editor<%>) interface?))]{ - The result of this method is used by - @method[frame:editor<%> make-editor] - to check that - @method[frame:editor<%> get-editor%] - is returning a reasonable editor. + The result of this method is used by @method[frame:editor<%> make-editor] + to check that @method[frame:editor<%> get-editor%] is returning a + reasonable editor. - - Returns - @scheme[editor<%>]. + Returns @racket[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<%>] - and uses that interface to make sure the result of - @method[frame:editor<%> get-editor%] - is reasonable. - - - - Calls @scheme[(make-object @#,method[frame:editor<%> get-editor%])]. + This method is called to create the editor in this frame. It calls + @method[frame:editor<%> get-editor<%>] and uses that interface to make sure + the result of @method[frame:editor<%> get-editor%] is reasonable. + Calls @racket[(make-object @#,method[frame:editor<%> get-editor%])]. } + @defmethod*[(((revert) void?))]{ - - Loads the most recently saved version of the file to the disk. If the - @scheme[editor<%>] - is a - @scheme[text%], the start and end positions are restored. + Loads the most recently saved version of the file to the disk. If the + @racket[editor<%>] is a @racket[text%], the start and end positions are + restored. } - @defmethod*[(((save (format (or/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote same))) boolean?))]{ + + @defmethod*[(((save (format (or/c 'guess 'standard 'text 'text-force-cr 'same 'copy) 'same)) + boolean?))]{ Saves the file being edited, possibly calling @method[frame:editor<%> save-as] if the editor has no filename yet. - - Returns @scheme[#f] if the user cancels this operation - (only possible when the file has not been saved before and - the user is prompted for a new filename) and returns - @scheme[#t] if not. + Returns @racket[#f] if the user cancels this operation (only possible when + the file has not been saved before and the user is prompted for a new + filename) and returns @racket[#t] if not. } - @defmethod*[(((save-as (format (or/c (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote same))) boolean?))]{ + + @defmethod*[(((save-as (format (or/c 'guess 'standard 'text 'text-force-cr 'same 'copy) 'same)) + boolean?))]{ Queries the use for a file name and saves the file with that name. - - Returns @scheme[#f] if the user cancells the file-choosing - dialog and returns @scheme[#t] otherwise. + Returns @racket[#f] if the user cancells the file-choosing + dialog and returns @racket[#t] otherwise. } @defmethod*[(((get-canvas) (is-a?/c canvas%)))]{ Returns the canvas used to display the - @scheme[editor<%>] + @racket[editor<%>] in this frame. @@ -584,457 +510,427 @@ } @defmixin[frame:editor-mixin (frame:standard-menus<%>) (frame:editor<%>)]{ This mixin adds functionality to support an - @scheme[editor<%>] + @racket[editor<%>] in the frame. This includes management of the title, implementations of some of the menu items, a reasonable initial size, and access to the - @scheme[editor<%>] + @racket[editor<%>] itself. The size of this frame with be either 600 by 650 or 65 less than the width and height of the screen, whichever is smaller. - @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))]{ + @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 'no-resize-border 'no-caption 'no-system-menu 'hide-menu-bar 'mdi-parent 'mdi-child 'toolbar-button 'float 'metal)) null) + (enabled any/c #t) + (border (integer-in 0 1000) 0) + (spacing (integer-in 0 1000) 0) + (alignment (list/c (or/c 'left 'center 'right) (or/c 'top 'center 'bottom)) '(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?)))]{ - Returns the filename in the editor returned by @method[frame:editor<%> get-editor]. } + @defmethod*[#:mode override (((editing-this-file? (filename path?)) boolean?))]{ - - Returns @scheme[#t] if the filename is the file that this - frame is editing. + Returns @racket[#t] if the filename is the file that this frame is editing. } + @defmethod*[#:mode augment (((on-close) void?))]{ - - Calls the - @scheme[editor:basic<%>]'s method - @method[editor:basic<%> on-close]. + Calls the @racket[editor:basic<%>]'s method @method[editor:basic<%> + on-close]. } + @defmethod*[#:mode augment (((can-close?) void?))]{ - - Calls the - @scheme[editor:basic<%>]'s method - @method[editor:basic<%> can-close?]. + Calls the @racket[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]. } - @defmethod*[#:mode override (((set-label (label string?)) void?))]{ + @defmethod*[#:mode override (((set-label (label string?)) void?))]{ 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 (is-a?/c menu-item<%>)) (evt (is-a?/c mouse-event%))) void?))]{ - - Calls - @scheme[handler:open-file] - with the directory of the saved file associated with this editor - (if any). + Calls @racket[handler:open-file] with the directory of the saved file + associated with this editor (if any). } - @defmethod*[#:mode override (((file-menu:revert-on-demand) void?))]{ + @defmethod*[#:mode override (((file-menu:revert-on-demand) void?))]{ Disables the menu item when the editor is locked. } - @defmethod*[#:mode override (((file-menu:revert-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - Informs the user that this action is not undoable and, - if they still want to continue, calls - @method[frame:editor<%> revert]. + @defmethod*[#:mode override (((file-menu:revert-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ + Informs the user that this action is not undoable and, if they still want + to continue, calls @method[frame:editor<%> revert]. } @defmethod*[#:mode override (((file-menu:create-revert?) boolean?))]{ - - returns #t + returns @racket[#t]. } @defmethod*[#:mode override (((file-menu:save-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - Saves the file in the editor. } + @defmethod*[#:mode override (((file-menu:create-save?) boolean?))]{ - - returns #t + returns @racket[#t]. } + @defmethod*[#:mode override (((file-menu:save-as-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - - Prompts the user for a file name and uses that filename to save the buffer. - Calls - @method[frame:editor<%> save-as] - with no arguments. + Prompts the user for a file name and uses that filename to save the buffer. + Calls @method[frame:editor<%> save-as] with no arguments. } + @defmethod*[#:mode override (((file-menu:create-save-as?) boolean?))]{ - - returns #t + returns @racket[#t]. } + @defmethod*[#:mode override (((file-menu:print-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - - Calls the - @method[editor<%> print] - method of - @scheme[editor<%>] - with the default arguments, except that - the @scheme[output-mode] argument - is the result of calling - @scheme[preferences:get] - with @scheme['framework:print-output-mode]. + Calls the @method[editor<%> print] method of @racket[editor<%>] with the + default arguments, except that the @racket[output-mode] argument is the + result of calling @racket[preferences:get] with + @racket['framework:print-output-mode]. } + @defmethod*[#:mode override (((file-menu:create-print?) boolean?))]{ - - returns #t + returns @racket[#t]. } - @defmethod*[#:mode override (((file-menu:between-save-as-and-print (file-menu (is-a?/c menu%))) void?))]{ + @defmethod*[#:mode override (((file-menu:between-save-as-and-print (file-menu (is-a?/c menu%))) void?))]{ Creates a Print Setup menu item. } + @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] - in the focused text. - + Adds a menu item for toggling @method[editor<%> auto-wrap] in the focused + text. } + @defmethod*[#:mode override (((help-menu:about-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - - Calls - @scheme[message-box] - with a message welcoming the user to the application named by - @scheme[application:current-app-name] - + Calls @racket[message-box] with a message welcoming the user to the + application named by @racket[application:current-app-name] } + @defmethod*[#:mode override (((help-menu:about-string) string))]{ - - Returns the result of (@scheme[application:current-app-name]) + Returns the result of (@racket[application:current-app-name]) } - @defmethod*[#:mode override (((help-menu:create-about?) boolean?))]{ - returns #t + @defmethod*[#:mode override (((help-menu:create-about?) boolean?))]{ + returns @racket[#t]. } } + @definterface[frame:open-here<%> (frame:editor<%>)]{ - Frames implementing this mixin can change the file they are - displaying. + Frames implementing this mixin can change the file they are displaying. - The frame is only re-used when the - @scheme['framework:open-here?] preference is set - (see - @scheme[preferences:get] - and - @scheme[preferences:set] - for details on preferences). + The frame is only re-used when the @racket['framework:open-here?] preference + is set (see @racket[preferences:get] and @racket[preferences:set] for details + on preferences). + + The @racket[frame:open-here-mixin] implements this interface. - The - @scheme[frame:open-here-mixin] - implements this interface. @defmethod*[(((get-open-here-editor) (is-a?/c editor<%>)))]{ - When the user switches the visible file in this frame, - the of this method is the editor that gets switched. + When the user switches the visible file in this frame, the of this method + is the editor that gets switched. - - Defaultly returns the result of - @method[frame:editor<%> get-editor]. + Defaultly returns the result of @method[frame:editor<%> get-editor]. } + @defmethod*[(((open-here (filename string)) void?))]{ - - Opens @scheme[filename] in the current frame, possibly - prompting the user about saving a file (in which case the - frame might not get switched). + Opens @racket[filename] in the current frame, possibly prompting the user + about saving a file (in which case the frame might not get switched). } + } @defmixin[frame:open-here-mixin (frame:editor<%>) (frame:open-here<%>)]{ - Provides an implementation of - @scheme[frame:open-here<%>] + Provides an implementation of @racket[frame:open-here<%>] + @defmethod*[#:mode override (((file-menu:new-on-demand (item (is-a?/c menu-item%))) void?))]{ - - Sets the label of @scheme[item] to - @scheme["New..."] if the preference @scheme['framework:open-here?] is set. + Sets the label of @racket[item] to @racket["New..."] if the preference + @racket['framework:open-here?] is set. } - @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 - they would like to create a new frame, or just clear out - this one. If they clear it out and the file hasn't been + @defmethod*[#:mode override (((file-menu:new-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ + When the preference @racket['framework:open-here?] preference is set, this + method prompts the user, asking if they would like to create a new frame, + or just clear out this one. If they clear it out and the file hasn't been saved, they are asked about saving. } + @defmethod*[#:mode override (((file-menu:open-on-demand (item (is-a?/c menu-item%))) void?))]{ - - Sets the label of @scheme[item] to - "Open Here..." if the preference @scheme['framework:open-here?] is set. + Sets the label of @racket[item] to "Open Here..." if the preference + @racket['framework:open-here?] is set. } + @defmethod*[#:mode augment (((on-close) void?))]{ - - Calls - @method[group:% set-open-here-frame] - with @scheme[#f] if - the result of - @method[group:% get-open-here-frame] - is @scheme[eq?] to @scheme[this]. + Calls @method[group:% set-open-here-frame] with @racket[#f] if the result + of @method[group:% get-open-here-frame] is @racket[eq?] to @racket[this]. } + @defmethod*[#:mode override (((on-activate (on? boolean?)) void?))]{ - - When @scheme[on?] is @scheme[#t], calls - @method[group:% set-open-here-frame] - with @scheme[this]. + When @racket[on?] is @racket[#t], calls @method[group:% + set-open-here-frame] with @racket[this]. } } -@definterface[frame:text<%> (frame:editor<%>)]{ - Frames matching this interface provide support for - @scheme[text%]s. +@definterface[frame:text<%> (frame:editor<%>)]{ + Frames matching this interface provide support for @racket[text%]s. } + @defmixin[frame:text-mixin (frame:editor<%>) (frame:text<%>)]{ - This mixins adds support for - @scheme[text%]s in the frame. + This mixins adds support for @racket[text%]s in the frame. @defconstructor[((editor% (extends text%)))]{ - Calls the super initialization with either the value of the - @scheme[editor%] init or, if none was supplied, it passes @scheme[text%]. + @racket[editor%] init or, if none was supplied, it passes @racket[text%]. } - @defmethod*[#:mode override (((get-editor<%>) interface))]{ - Returns @scheme[(class->interface text%)]. + @defmethod*[#:mode override (((get-editor<%>) interface))]{ + Returns @racket[(class->interface text%)]. } } + @definterface[frame:pasteboard<%> (frame:editor<%>)]{ Frames matching this interface provide support for - @scheme[pasteboard%]s. + @racket[pasteboard%]s. } + @defmixin[frame:pasteboard-mixin (frame:editor<%>) (frame:pasteboard<%>)]{ This mixin provides support for pasteboards in a frame. @defconstructor[((editor% (extends pasteboard%)))]{ - Calls the super initialization with either the value of the - @scheme[editor%] init or, if none was supplied, it passes @scheme[pasteboard%]. - + @racket[editor%] init or, if none was supplied, it passes + @racket[pasteboard%]. } - @defmethod*[#:mode override (((get-editor<%>) interface))]{ - Returns @scheme[(class->interface pasteboard%)]. + @defmethod*[#:mode override (((get-editor<%>) interface))]{ + Returns @racket[(class->interface pasteboard%)]. } } + @definterface[frame:delegate<%> (frame:status-line<%> frame:text<%>)]{ - Frames that implement this interface provide a 20,000 feet - overview of the text in the main editor. The term @bold{delegate} - in these method descriptions refers to the - original editor and the term @bold{delegatee} refers to the - editor showing the 20,000 feet overview. + Frames that implement this interface provide a 20,000 feet overview of the + text in the main editor. The term @bold{delegate} 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) (is-a?/c text:delegate<%>)))]{ Returns the delegate text. - } + @defmethod*[(((delegated-text-shown?) boolean?))]{ - Returns @scheme[#t] if the delegate is visible, and - @scheme[#f] if it isn't. - + Returns @racket[#t] if the delegate is visible, and @racket[#f] if it + isn't. } + @defmethod*[(((hide-delegated-text) void?))]{ Hides the delegated text. - When the delegated text is hidden, it is not being - updated. This is accomplished by calling the - @method[text:delegate<%> set-delegate] - method of - @method[frame:editor<%> get-editor]with @scheme[#f]. - - See also - @method[frame:delegate<%> show-delegated-text] + When the delegated text is hidden, it is not being updated. This is + accomplished by calling the @method[text:delegate<%> set-delegate] method + of @method[frame:editor<%> get-editor]with @racket[#f]. + See also @method[frame:delegate<%> show-delegated-text] } @defmethod*[(((show-delegated-text) void?))]{ Makes the delegated text visible. - When the delegated text is shown, the - @method[text:delegate<%> set-delegate] - method of - @method[frame:delegate<%> get-delegated-text]is called with - the text to delegate messages to. - - See also - @method[frame:delegate<%> hide-delegated-text]. + When the delegated text is shown, the @method[text:delegate<%> + set-delegate] method of @method[frame:delegate<%> get-delegated-text]is + called with the text to delegate messages to. + See also @method[frame:delegate<%> hide-delegated-text]. } + @defmethod*[(((delegate-moved) void?))]{ - This method is called when the visible region of the - delegate editor changes, so that the blue region in the - delegatee is updated. - + This method is called when the visible region of the delegate editor + changes, so that the blue region in the delegatee is updated. } } + @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] + Adds support for a 20,000-feet view via @racket[text:delegate<%>] and + @racket[text:delegate-mixin]. + @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%]. - + Adds a panel outside to hold the delegate @racket[editor-canvas%] and + @racket[text%]. } + @defmethod*[#:mode override (((get-editor<%>) interface))]{ - - Returns @scheme[text:delegate]. - + Returns @racket[text:delegate]. } - @defmethod*[#:mode override (((get-editor%) (is-a?/c text:delegate<%>)))]{ - returns the super result, with the - @scheme[text:delegate-mixin] - mixed in. + @defmethod*[#:mode override (((get-editor%) (is-a?/c text:delegate<%>)))]{ + returns the super result, with the @racket[text:delegate-mixin] mixed in. } } + @definterface[frame:searchable<%> (frame:basic<%>)]{ Frames that implement this interface support searching. @defmethod[(search (direction (symbols 'forward 'backward))) void?]{ Searches for the text in the search edit in the result of - @method[frame:searchable<%> get-text-to-search]. + @method[frame:searchable<%> get-text-to-search]. - If the text is found and it sets the selection to the - found text. + If the text is found and it sets the selection to the found text. } + @defmethod[(search-replace) boolean?]{ - If there is a dark purple bubble (ie, if the replace portion - of the search bar is visible and there is a search hit after - the insertion point), then this will replace it with the - contents of the replace editor and move the insertion point - to just after that, or to the end of the editor (if there - are no more search hits after the insertion point, but there are - search hits before it). + If there is a dark purple bubble (ie, if the replace portion of the search + bar is visible and there is a search hit after the insertion point), then + this will replace it with the contents of the replace editor and move the + insertion point to just after that, or to the end of the editor (if there + are no more search hits after the insertion point, but there are search + hits before it). } + @defmethod[(replace-all) void?]{ - Loops through the text from the beginning to the end, replacing - all occurrences of the search string with the contents of the replace - edit. + Loops through the text from the beginning to the end, replacing all + occurrences of the search string with the contents of the replace edit. } + @defmethod[(get-text-to-search) (is-a?/c text%)]{ - Returns the last value passed to + Returns the last value passed to @method[frame:searchable<%> set-text-to-search]. } + @defmethod[(set-text-to-search [txt (or/c false/c (is-a?/c (subclass?/c text%)))]) void?]{ Sets the current text to be searched. } - @defmethod[(search-hidden?) boolean?]{ - Returns @scheme[#t] if the search subwindow is visiable and @scheme[#f] otherwise. - } - @defmethod[(hide-search) void?]{ - This method hides the searching information on the bottom of the - frame. + @defmethod[(search-hidden?) boolean?]{ + Returns @racket[#t] if the search subwindow is visiable and @racket[#f] + otherwise. } + + @defmethod[(hide-search) void?]{ + This method hides the searching information on the bottom of the frame. + } + @defmethod[(unhide-search [move-focus? boolean?]) void?]{ - When the searching sub window is hidden, makes it visible. If - @scheme[move-focus?] is @scheme[#f], the focus is not moved, - but if it is any other value, the focus is moved to the find - window. + When the searching sub window is hidden, makes it visible. If + @racket[move-focus?] is @racket[#f], the focus is not moved, but if it is + any other value, the focus is moved to the find window. } @defmethod[(get-case-sensitive-search?) boolean?]{ - Returns @scheme[#t] if the search is currently case-sensitive. - (This method's value depends on the preference - @scheme['framework:case-sensitive-search?], but - the preference is only consulted when the frame is created.) + Returns @racket[#t] if the search is currently case-sensitive. (This + method's value depends on the preference + @racket['framework:case-sensitive-search?], but the preference is only + consulted when the frame is created.) } @defmethod[#:mode public-final (search-hits-changed) void?]{ - This method is called when the number of search matches changes and - it updates the GUI. + This method is called when the number of search matches changes and it + updates the GUI. } - } + @defmixin[frame:searchable-mixin (frame:standard-menus<%>) (frame:searchable<%>)]{ - This mixin adds support for searching in the - @scheme[editor<%>] - in this frame. + This mixin adds support for searching in the @racket[editor<%>] in this + frame. @defmethod*[#:mode override (((edit-menu:find-callback) boolean?))]{ Toggles the focus between the find window and the window being searched. - When moving to the window with the search string, selects the entire - range in the buffer. + When moving to the window with the search string, selects the entire range + in the buffer. } + @defmethod*[#:mode override (((edit-menu:create-find?) boolean?))]{ - returns @scheme[#t]. + returns @racket[#t]. } - @defmethod*[#:mode override (((edit-menu:find-again-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - - Calls @method[frame:searchable unhide-search] and then + @defmethod*[#:mode override + (((edit-menu:find-again-callback (item (is-a?/c menu-item%)) + (evt (is-a?/c control-event%))) + void?))]{ + Calls @method[frame:searchable unhide-search] and then @method[frame:searchable<%> search]. } + @defmethod*[#:mode override (((edit-menu:create-find-again?) boolean?))]{ - returns @scheme[#t]. + returns @racket[#t]. } - @defmethod*[#:mode override (((edit-menu:find-again-backwards-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ - Calls @method[frame:searchable unhide-search] and then + @defmethod*[#:mode override (((edit-menu:find-again-backwards-callback (item (is-a?/c menu-item%)) (evt (is-a?/c control-event%))) void?))]{ + Calls @method[frame:searchable unhide-search] and then @method[frame:searchable<%> search]. } + @defmethod*[#:mode override (((edit-menu:create-find-again-backwards?) boolean?))]{ - returns @scheme[#t]. + returns @racket[#t]. } @defmethod*[#:mode override (((edit-menu:replace-all-callback) boolean?))]{ Calls @method[frame:searchable<%> replace-all]. } - @defmethod*[#:mode override (((edit-menu:replace-all-on-demand (item menu-item%)) void?))]{ - Disables @scheme[item] when - @method[frame:searchable<%> search-hidden?] - returns @scheme[#t] and enables it when that method returns - @scheme[#f]. + @defmethod*[#:mode override (((edit-menu:replace-all-on-demand (item menu-item%)) void?))]{ + Disables @racket[item] when @method[frame:searchable<%> search-hidden?] + returns @racket[#t] and enables it when that method returns @racket[#f]. } + @defmethod*[#:mode override (((edit-menu:create-replace-all?) boolean?))]{ - returns @scheme[#t]. + returns @racket[#t]. } @defmethod*[#:mode override (((edit-menu:find-case-sensitive-callback) boolean?))]{ - Updates the state of the case-sensitive searching for this frame, - and sets the @scheme['framework:case-sensitive-search?] preference - for later frames. + Updates the state of the case-sensitive searching for this frame, and sets + the @racket['framework:case-sensitive-search?] preference for later + frames. } + @defmethod*[#:mode override (((edit-menu:find-case-sensitive-on-demand (item menu-item%)) void?))]{ - - Checks @scheme[item] when searching is case-sensitive and unchecks - it otherwise. + Checks @racket[item] when searching is case-sensitive and unchecks it + otherwise. } - @defmethod*[#:mode override (((edit-menu:create-find-case-sensitive?) boolean?))]{ - returns @scheme[#t]. + @defmethod*[#:mode override (((edit-menu:create-find-case-sensitive?) boolean?))]{ + returns @racket[#t]. } @defmethod*[#:mode override (((make-root-area-container) (is-a?/c area-container<%>)))]{ - Builds a panel for the searching information. } - @defmethod*[#:mode augment (((on-close) void?))]{ + @defmethod*[#:mode augment (((on-close) void?))]{ Cleans up after the searching frame. } } -@definterface[frame:searchable-text<%> (frame:searchable<%> frame:text<%>)]{ +@definterface[frame:searchable-text<%> (frame:searchable<%> frame:text<%>)]{ } + @defmixin[frame:searchable-text-mixin (frame:text<%> frame:searchable<%>) (frame:searchable-text<%>)]{ @defmethod*[#:mode override-final (((get-text-to-search) (is-a?/c text%)))]{ - - Returns the result of - @method[frame:editor<%> get-editor]. + Returns the result of @method[frame:editor<%> get-editor]. } - @defmethod*[#:mode override (((get-editor<%>) (is-a?/c editor<%>)))]{ - Returns - @scheme[text:searching<%>]. + @defmethod*[#:mode override (((get-editor<%>) (is-a?/c editor<%>)))]{ + Returns @racket[text:searching<%>]. } @defmethod*[#:mode override (((get-editor%) (is-a?/c editor<%>)))]{ - - Returns - @scheme[(text:searching-mixin (super get-editor%))]. + Returns @racket[(text:searching-mixin (super get-editor%))]. } } + @defclass[frame:basic% (frame:register-group-mixin (frame:basic-mixin frame%)) ()]{} @defclass[frame:size-pref% (frame:size-pref-mixin frame:basic%) ()]{} @defclass[frame:info% (frame:info-mixin frame:basic%) ()]{} diff --git a/collects/scribblings/framework/group.scrbl b/collects/scribblings/framework/group.scrbl index 0949ab14..f89e289a 100644 --- a/collects/scribblings/framework/group.scrbl +++ b/collects/scribblings/framework/group.scrbl @@ -5,119 +5,96 @@ @title{Group} @defclass[group:% object% ()]{ - This class manages a group of frames matching the - @scheme[frame:basic<%>] - interface. There is one instance created by - the framework, returned by the function - @scheme[group:get-the-frame-group] - and every frame that was constructed with - @scheme[frame:basic-mixin] - adds itself to the result of - @scheme[group:get-the-frame-group]. + This class manages a group of frames matching the @racket[frame:basic<%>] + interface. There is one instance created by the framework, returned by the + function @racket[group:get-the-frame-group] and every frame that was + constructed with @racket[frame:basic-mixin] adds itself to the result of + @racket[group:get-the-frame-group]. + @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<%>]. - - + Sets the frame to load new files into. See also + @racket[frame:open-here<%>]. } + @defmethod*[(((get-open-here-frame) (or/c false/c (is-a?/c frame:editor<%>))))]{ - Returns the currently saved frame - to load new files into. - + Returns the currently saved frame to load new files into. } + @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. - + The result of this method must be used as the parent frame for each frame + in the group. } + @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?))]{ - This method is called by frames constructed with - @scheme[frame:basic-mixin] - when their titles change. + @defmethod*[(((frame-label-changed (frame (is-a?/c frame:basic<%>))) void?))]{ + This method is called by frames constructed with @racket[frame:basic-mixin] + when their titles change. Updates the windows menu of each frame in the group. } - @defmethod*[(((frame-shown/hidden) void?))]{ - This method is called by instances of - @scheme[frame:basic%] - to notify the frame group that - a frame's visibility is changed. + @defmethod*[(((frame-shown/hidden) void?))]{ + This method is called by instances of @racket[frame:basic%] to notify the + frame group that a frame's visibility is changed. Updates the Windows menus of all of the frames in the frame group. } + @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. + remembers the function and applies it to any new frames that are added to + the group when they are added. - See also - @method[group:% get-frames]. + See also @method[group:% get-frames]. - - Applies @scheme[f] to each frame in the group + Applies @racket[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 - group. - + Returns the frame with the keyboard focus or the first frame in the group. } + @defmethod*[(((set-active-frame (frame (is-a?/c frame:basic<%>))) void?))]{ - Sets the active frame in the group. - This method is called by + 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?))]{ Inserts a frame into the group. - } + @defmethod*[(((remove-frame (frame (is-a?/c frame:basic<%>))) void?))]{ Removes a frame from the group. - - } + @defmethod*[(((clear) boolean?))]{ - This removes all of the frames in the group. It does not close the frames. See also - @method[group:% on-close-all]and - @method[group:% can-close-all?]. - + This removes all of the frames in the group. It does not close the frames. + See also @method[group:% on-close-all]and @method[group:% can-close-all?]. } + @defmethod*[(((on-close-all) void?))]{ - Call this method to close all of the frames in the group. - The function - @method[group:% can-close-all?] - must have been called just before this function and it must have returned - @scheme[#t]. + Call this method to close all of the frames in the group. The function + @method[group:% can-close-all?] must have been called just before this + function and it must have returned @racket[#t]. - - Calls the - @method[top-level-window<%> on-close] - method and the - @method[top-level-window<%> show] - method (with @scheme[#f] as argument) - on each frame in the group. + Calls the @method[top-level-window<%> on-close] method and the + @method[top-level-window<%> show] method (with @racket[#f] as argument) on + each frame in the group. } + @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] + 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] is expected to be called just after this method is called. - - Calls the - @method[top-level-window<%> can-close?] - method of each frame in the group. + Calls the @method[top-level-window<%> can-close?] method of each frame in + the group. } @defmethod*[(((locate-file [name path?]) (or/c false/c (is-a?/c frame:basic<%>))))]{ - Returns the frame that is editing or viewing the file @scheme[name]. - + Returns the frame that is editing or viewing the file @racket[name]. } } diff --git a/collects/scribblings/framework/keymap.scrbl b/collects/scribblings/framework/keymap.scrbl index d2ecc6d4..d372a785 100644 --- a/collects/scribblings/framework/keymap.scrbl +++ b/collects/scribblings/framework/keymap.scrbl @@ -5,41 +5,40 @@ @title{Keymap} @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 (is-a?/c keymap%))))]{ + This keymap overrides some of the built in @racket[keymap%] methods to be + able to extract the keybindings from the 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?))]{ - - Returns a hash-table that maps symbols naming key sequences to the - names of the keymap functions the are bound to. + 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?)) hash?))]{ - This is a helper function for - @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 - @scheme[ht]. + @defmethod*[(((get-map-function-table/ht (ht hash?)) hash?))]{ + This is a helper function for @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 @racket[ht]. } } @defmixin[keymap:aug-keymap-mixin (keymap%) (keymap:aug-keymap<%>)]{ @defmethod*[#:mode override (((chain-to-keymap (next (is-a?/c keymap%)) (prefix? boolean?)) void))]{ - Keeps a list of the keymaps chained to this one. } - @defmethod*[#:mode override (((remove-chained-keymap (keymap (is-a?/c keymap))) void))]{ + @defmethod*[#:mode override (((remove-chained-keymap (keymap (is-a?/c keymap))) void))]{ Keeps the list of the keymaps chained to this one up to date. } - @defmethod*[#:mode override (((map-function (key-name string) (function-name string)) void))]{ - Keeps a separate record of the key names and functions that they are - bound to in this keymap. + @defmethod*[#:mode override (((map-function (key-name string) (function-name string)) void))]{ + Keeps a separate record of the key names and functions that they are bound + to in this keymap. } } + @defclass[keymap:aug-keymap% (keymap:aug-keymap-mixin keymap%) ()]{} @(include-previously-extracted "main-extracts.rkt" #rx"^keymap:") diff --git a/collects/scribblings/framework/menu.scrbl b/collects/scribblings/framework/menu.scrbl index 117cdd15..6d894390 100644 --- a/collects/scribblings/framework/menu.scrbl +++ b/collects/scribblings/framework/menu.scrbl @@ -5,42 +5,40 @@ @title{Menu} @definterface[menu:can-restore<%> (selectable-menu-item<%>)]{ - Classes created with this mixin remember their keybindings so the - keybindings can be removed and then restored. + Classes created with this mixin remember their keybindings so the keybindings + can be removed and then restored. + @defmethod*[(((restore-keybinding) void?))]{ Sets the keyboard shortcut to the setting it had when the class was created. - } } + @defmixin[menu:can-restore-mixin (selectable-menu-item<%>) (menu:can-restore<%>)]{ - } + @definterface[menu:can-restore-underscore<%> (labelled-menu-item<%>)]{ - These menus can save and restore the underscores (indicated - via the @litchar{&} characters in the original labels) in their - labels. + These menus can save and restore the underscores (indicated via the + @litchar{&} characters in the original labels) in their labels. + + If the preference @racket['framework:menu-bindings] is @racket[#f], calls + @method[menu:can-restore-underscore<%> erase-underscores] during + initialization. - If the preference @scheme['framework:menu-bindings] - is @scheme[#f], calls - @method[menu:can-restore-underscore<%> erase-underscores] - during initialization. @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]. - + 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?))]{ - Restores underscores in the menu's label to their original - state. - - + Restores underscores in the menu's label to their original state. } } -@defmixin[menu:can-restore-underscore-mixin (labelled-menu-item<%>) (menu:can-restore-underscore<%>)]{ +@defmixin[menu:can-restore-underscore-mixin (labelled-menu-item<%>) (menu:can-restore-underscore<%>)]{ } + @defclass[menu:can-restore-menu-item% (menu:can-restore-mixin menu-item%) ()]{} @defclass[menu:can-restore-checkable-menu-item% (menu:can-restore-mixin checkable-menu-item%) ()]{} @defclass[menu:can-restore-underscore-menu% (menu:can-restore-underscore-mixin menu%) ()]{} diff --git a/collects/scribblings/framework/mode-helpers.rkt b/collects/scribblings/framework/mode-helpers.rkt index c6ed06de..c45b99f3 100644 --- a/collects/scribblings/framework/mode-helpers.rkt +++ b/collects/scribblings/framework/mode-helpers.rkt @@ -10,19 +10,19 @@ (syntax-case* spec (override augment) (λ (x y) (eq? (syntax-e x) (syntax-e y))) [(override mtd (x ...) ...) #'@defmethod*[(((mtd (x any/c) ...) any) ...)]{ - Delegates to the result of @method[mode:host-text<%> get-surrogate] if it is not @scheme[#f].}] + Delegates to the result of @method[mode:host-text<%> get-surrogate] if it is not @racket[#f].}] [(augment default mtd (x ...) ...) #'@defmethod*[(((mtd (x any/c) ...) any) ...)]{ - Delegates to the result of @method[mode:host-text<%> get-surrogate] if it is not @scheme[#f].}])) + Delegates to the result of @method[mode:host-text<%> get-surrogate] if it is not @racket[#f].}])) (define (spec->surrogate-method spec) (syntax-case* spec (override augment) (λ (x y) (eq? (syntax-e x) (syntax-e y))) [(override method (x ...) ...) #'@defmethod*[(((method (orig (is-a?/c text%)) (call-super (-> any)) (x any/c) ...) any) ...)]{ - Returns the result of invoking @scheme[call-super]. + Returns the result of invoking @racket[call-super]. }] [(augment default method (x ...) ...) #'@defmethod*[(((method (orig (is-a?/c text%)) (call-inner (-> any)) (x any/c) ...) any) ...)]{ - Returns the result of invoking @scheme[call-super]. + Returns the result of invoking @racket[call-super]. }])) diff --git a/collects/scribblings/framework/mode.scrbl b/collects/scribblings/framework/mode.scrbl index 44f367f9..839052e6 100644 --- a/collects/scribblings/framework/mode.scrbl +++ b/collects/scribblings/framework/mode.scrbl @@ -12,32 +12,32 @@ [(_ spec ...) #`(begin @definterface[mode:surrogate-text<%> ()]{ - @defmethod[(on-enable-surrogate) any]{ - Called by @method[mode:host-text<%> set-surrogate] to - notify the surrogate that it has just become active. - } - @defmethod[(on-disable-surrogate) any]{ - Called by @method[mode:host-text<%> set-surrogate] to - notify the surrogate that it has just been disabled. - } - } + @defmethod[(on-enable-surrogate) any]{ + Called by @method[mode:host-text<%> set-surrogate] to notify the + surrogate that it has just become active. + } + @defmethod[(on-disable-surrogate) any]{ + Called by @method[mode:host-text<%> set-surrogate] to notify the + surrogate that it has just been disabled. + } + } @defclass[mode:surrogate-text% object% (mode:surrogate-text<%>)]{ - @#,@(map spec->surrogate-method (syntax->list #'(spec ...))) + @#,@(map spec->surrogate-method (syntax->list #'(spec ...))) } @definterface[mode:host-text<%> ()]{ - @defmethod[(get-surrogate) - (or/c false/c (is-a?/c mode:surrogate-text<%>))]{ - Returns the currently active surrogate. - } - @defmethod[(set-surrogate - [surrogate (or/c false/c (is-a?/c mode:surrogate-text<%>))]) - void?]{ - Sets the current surrogate to @scheme[surrogate]. - } + @defmethod[(get-surrogate) + (or/c false/c (is-a?/c mode:surrogate-text<%>))]{ + Returns the currently active surrogate. + } + @defmethod[(set-surrogate + [surrogate (or/c false/c (is-a?/c mode:surrogate-text<%>))]) + void?]{ + Sets the current surrogate to @racket[surrogate]. + } } @defmixin[mode:host-text-mixin () (mode:host-text<%>)]{ - @#,@(map spec->host-method (syntax->list #'(spec ...))) -})])) + @#,@(map spec->host-method (syntax->list #'(spec ...))) + })])) (surrogate-methods docs) ) diff --git a/collects/scribblings/framework/panel.scrbl b/collects/scribblings/framework/panel.scrbl index 1de2ea31..f48b4143 100644 --- a/collects/scribblings/framework/panel.scrbl +++ b/collects/scribblings/framework/panel.scrbl @@ -5,178 +5,164 @@ @title{Panel} @definterface[panel:single<%> (area-container<%>)]{ - See - @scheme[panel:single-mixin%]. + See @racket[panel:single-mixin%]. + @defmethod*[(((active-child (child (is-a?/c area<%>))) void?) ((active-child) (is-a?/c area<%>)))]{ - - Sets the active child to be @scheme[child] - + Sets the active child to be @racket[child] Returns the current active child. } } + @defmixin[panel:single-mixin (area-container<%>) (panel:single<%>)]{ - This mixin adds single panel functionality to an implementation of the - @scheme[area-container<%>] interface. + This mixin adds single panel functionality to an implementation of the + @racket[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 - @method[panel:single<%> active-child] - method controls which panel is currently active. + 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 + @method[panel:single<%> active-child] method controls which panel is + currently active. + + The @method[window<%> show] method is used to hide and show the children of a + single panel. - The - @method[window<%> show] - method is used to hide and show the children of a single panel. @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. + Hides this child by calling @racket[(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?)))]{ - - Returns the maximum width of all the children and the maximum height - of all of the children. + Returns the maximum width of all the children and the maximum height of all + of the children. } - @defmethod*[#:mode override (((place-children) (listof (list/c 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. } } + @definterface[panel:single-window<%> (panel:single<%> window<%>)]{ - } + @defmixin[panel:single-window-mixin (panel:single<%> window<%>) (panel:single-window<%>)]{ - @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. } } + @defclass[panel:single% (panel:single-window-mixin (panel:single-mixin panel%)) ()]{} @defclass[panel:single-pane% (panel:single-mixin pane%) ()]{} + @definterface[panel:dragable<%> (window<%> area-container<%>)]{ - Classes matching this interface implement a panel where the - 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. + Classes matching this interface implement a panel where the 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?))]{ - 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 - @method[panel:dragable<%> set-percentages] - is called. - - Use - @method[panel:dragable<%> get-percentages] - to find the current percentages. - + 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 @method[panel:dragable<%> set-percentages] is called. + Use @method[panel:dragable<%> get-percentages] to find the current + percentages. } + @defmethod*[(((set-percentages (new-percentages (listof number?))) void?))]{ - Call this method to set the percentages that each window - takes up of the panel. + Call this method to set the percentages that each window takes up of the + panel. - - 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 - that is equal to or larger than the - minimum with of the child, as reported by - @method[area<%> min-width]. + The argument, @racket[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 that is equal to or larger than the + minimum with of the child, as reported by @method[area<%> min-width]. } + @defmethod*[(((get-percentages) (listof number?)))]{ Return the current percentages of the children. - } + @defmethod*[(((get-vertical?) boolean?))]{ - 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 - horizontally aligned. + This method controls the behavior of the other overridden methods in mixins + that implement this interface. + If it returns @racket[#t], the panel will be vertically aligned and if it + returns @racket[#f], they will be horizontally aligned. } - + @defmethod[(set-orientation [horizontal? boolean?]) void?]{ - Sets the orientation of the panel, switching it from behaving - like a @racket[panel:horizontal-dragable<%>] and + Sets the orientation of the panel, switching it from behaving like a + @racket[panel:horizontal-dragable<%>] and @racket[panel:vertical-dragable<%>]. } } + @definterface[panel:vertical-dragable<%> (panel:dragable<%>)]{ - A panel that implements - @scheme[panel:vertical-dragable<%>]. It aligns its children vertically. + A panel that implements @racket[panel:vertical-dragable<%>]. It aligns its + children vertically. } + @definterface[panel:horizontal-dragable<%> (panel:dragable<%>)]{ - A panel that implements - @scheme[panel:horizontal-dragable<%>]. It aligns its children horizontally. + A panel that implements @racket[panel:horizontal-dragable<%>]. It aligns its + children horizontally. } + @defmixin[panel:dragable-mixin (window<%> area-container<%>) (panel:dragable<%>)]{ - This mixin adds the - @scheme[panel:dragable<%>] - functionality to a - @scheme[panel%]. - - It is not useful unless the - @method[panel:dragable<%> get-vertical?] - method is overridden. + This mixin adds the @racket[panel:dragable<%>] functionality to a + @racket[panel%]. + It is not useful unless the @method[panel:dragable<%> get-vertical?] method + is overridden. @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]. + 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 (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. + When the cursor is dragging the middle bar around, this method handles the + resizing of the two panes. } - @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?))))]{ + @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. + returned from @method[panel:dragable<%> get-percentages]. Also leaves a + little gap between each pair of children. } + @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 - @method[panel:dragable<%> get-percentages]). - + (values exact-integer? exact-integer?)))]{ + Computes the minimum size the panel would have to be in order to have the + current percentages (see @method[panel:dragable<%> get-percentages]). } } -@defmixin[panel:vertical-dragable-mixin (panel:dragable<%>) (panel:vertical-dragable<%>)]{ - This mixin merely overrides the - @method[panel:dragable<%> get-vertical?] - method of the - @scheme[panel:dragable-mixin] - to return @scheme[#t]. - @defmethod*[#:mode override (((get-vertical?) boolean?))]{ - Returns @scheme[#t]. +@defmixin[panel:vertical-dragable-mixin (panel:dragable<%>) (panel:vertical-dragable<%>)]{ + This mixin merely overrides the @method[panel:dragable<%> get-vertical?] + method of the @racket[panel:dragable-mixin] to return @racket[#t]. + + @defmethod*[#:mode override (((get-vertical?) boolean?))]{ + Returns @racket[#t]. } } @defmixin[panel:horizontal-dragable-mixin (panel:dragable<%>) (panel:vertical-dragable<%>)]{ - This mixin merely overrides the - @method[panel:dragable<%> get-vertical?] - method of the - @scheme[panel:dragable-mixin] - to return @scheme[#f]. - @defmethod*[#:mode override (((get-vertical?) boolean?))]{ + This mixin merely overrides the @method[panel:dragable<%> get-vertical?] + method of the @racket[panel:dragable-mixin] to return @racket[#f]. - Returns @scheme[#f]. + @defmethod*[#:mode override (((get-vertical?) boolean?))]{ + Returns @racket[#f]. } } + @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 + A panel that implements @racket[panel:splitter<%>]. Children can be split horizonally or vertically. } @@ -189,9 +175,9 @@ (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 + Splits the @racket[canvas] vertically by creating a new instance using + @racket[maker]. This splitter object is passed as the argument to + @racket[maker] and should be used as the @racket[parent] field of the newly created canvas. } @@ -199,11 +185,11 @@ (maker (-> (is-a?/c panel:splitter<%>) (is-a?/c canvas<%>)))) (is-a?/c canvas<%>)]{ - Similar to @scheme[split-vertical] but splits horizontally. + Similar to @racket[split-vertical] but splits horizontally. } @defmethod[(collapse (canvas (is-a?/c canvas<%>))) void]{ - Removes the given @scheme[canvas] from the splitter hierarchy and collapses + Removes the given @racket[canvas] from the splitter hierarchy and collapses any split panes as necessary. } diff --git a/collects/scribblings/framework/scheme.scrbl b/collects/scribblings/framework/scheme.scrbl index 576aca58..4a822f90 100644 --- a/collects/scribblings/framework/scheme.scrbl +++ b/collects/scribblings/framework/scheme.scrbl @@ -43,159 +43,183 @@ } @definterface[scheme:text<%> (text:basic<%> mode:host-text<%> color:text<%>)]{ Texts matching this interface support Racket mode operations. + @defmethod*[(((get-limit (start exact-integer?)) exact-integer?))]{ - Returns a limit for backward-matching parenthesis starting at - position @scheme[start]. + Returns a limit for backward-matching parenthesis starting at position + @racket[start]. } + @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 - @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 + @racket[text%]. If the close parenthesis that the user inserted does not + match the corresponding open parenthesis and the + @racket['framework:fixup-parens] preference is @racket[#t] (see + @racket[preferences:get]) the correct closing parenthesis is inserted. If + the @racket['framework:paren-match] preference is @racket[#t] (see + @racket[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?))]{ - Tabs the line containing by @scheme[start-pos] + Tabs the line containing by @racket[start-pos] } + @defmethod*[(((tabify-selection (start exact-integer?) (end exact-integer?)) void?))]{ - Sets the tabbing for the lines containing positions @scheme[start] - through @scheme[end]. + Sets the tabbing for the lines containing positions @racket[start] + through @racket[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 @racket[#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. + 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 @racket[start-pos] to @racket[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 @racket[start-pos] is @racket['start], the starting point of the + selection is used. If @racket[end-pos] is @racket['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. + Comments the lines containing positions @racket[start] through @racket[end] + by inserting a semi-colon at the front of each line. } + @defmethod*[(((uncomment-selection (start exact-integer?) (end exact-integer?)) void?))]{ - Uncomments the lines containing positions @scheme[start] through - @scheme[end]. + Uncomments the lines containing positions @racket[start] through + @racket[end]. } + @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. + @racket[start], or @racket[#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]. + @racket[start]. } + @defmethod*[(((forward-sexp (start exact-integer?)) void?))]{ - Moves forward over the S-expression starting at position - @scheme[start]. + Moves forward over the S-expression starting at position @racket[start]. } + @defmethod*[(((flash-forward-sexp (start-pos exact-integer?)) void?))]{ - Flashes the parenthesis that closes the sexpression at - @scheme[start-pos]. + Flashes the parenthesis that closes the sexpression at @racket[start-pos]. } + @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. + Returns the position of the start of the S-expression before or containing + @racket[start], or @racket[#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]. + Flashes the parenthesis that opens the sexpression at @racket[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]. + @racket[start-pos]. } + @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]. + Returns the position of the beginning of the next sexpression outside the + sexpression that contains @racket[start-pos]. If there is no such + sexpression, it returns @racket[#f]. } + @defmethod*[(((up-sexp (start exact-integer?)) void?))]{ Moves backward out of the S-expression containing the position - @scheme[start]. + @racket[start]. } + @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]. + Returns the position of the beginning of the next sexpression inside the + sexpression that contains @racket[start-pos]. If there is no such + sexpression, it returns @racket[#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 @racket[start]. } + @defmethod*[(((remove-parens-forward (start exact-integer?)) void?))]{ - Removes the parentheses from the S-expression starting after the - position @scheme[start]. + Removes the parentheses from the S-expression starting after the position + @racket[start]. } + @defmethod*[(((select-forward-sexp) void?))]{ Selects the next S-expression, starting at the start of the current selection. } + @defmethod*[(((select-backward-sexp) void?))]{ Selects the previous S-expression, starting at the start of the current selection. - } + @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) void?))]{ - Selects the region to the next contained S-expression, starting at the start of the current selection. + 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]. + Swaps the S-expression beginning before the position @racket[start] with + the next S-expression following @racket[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. + If the paren after @racket[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]. } + @defmethod*[(((set-tab-size (new-size exact-integer?)) void?))]{ This method sets the tab size for this text. } + @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 (start-pos exact-integer?)) void?))]{ Replaces the sexpression surrounding the insertion point with the sexpression following the insertion point. @@ -210,48 +234,54 @@ mixin's argument. @defmethod*[#:mode override (((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. + Returns the word just before @racket[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. + 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 + The result of @racket[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]. + 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 @racket[scheme:text-mixin]. @defmethod*[#:mode override (((on-disable-surrogate) void?))]{ - Removes the scheme keymap (see also @scheme[scheme:get-keymap]) and + Removes the scheme keymap (see also @racket[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 @racket[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 @racket[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-mode% (scheme:text-mode-mixin color:text-mode%) ()]{} @(include-previously-extracted "main-extracts.rkt" #rx"^scheme:") diff --git a/collects/scribblings/framework/splash.scrbl b/collects/scribblings/framework/splash.scrbl index 80335dd5..482d658e 100644 --- a/collects/scribblings/framework/splash.scrbl +++ b/collects/scribblings/framework/splash.scrbl @@ -73,7 +73,7 @@ that number to control the gauge along the bottom of the splash screen. the initial bitmap, use @racket[start-splash] instead. } @defproc[(get-splash-canvas) (is-a?/c canvas%)]{ - Returns the canvas where the splash screen bitmap is drawn (if there is a bitmap; see @racket[start-splash] for how the splash is drawn. + Returns the canvas where the splash screen bitmap is drawn (if there is a bitmap); see @racket[start-splash] for how the splash is drawn. } @defproc[(get-splash-eventspace) eventspace?]{ Returns the splash screen's eventspace. @@ -129,5 +129,5 @@ that number to control the gauge along the bottom of the splash screen. Triggers a refresh of the splash, handling the details of double buffering and doing the drawing on the splash's @tech[#:doc '(lib "scribblings/gui/gui.scrbl") #:key "eventspace"]{eventspace's} - main thread. + main thread. } diff --git a/collects/scribblings/framework/test.scrbl b/collects/scribblings/framework/test.scrbl index 594cea24..20b7fc0e 100644 --- a/collects/scribblings/framework/test.scrbl +++ b/collects/scribblings/framework/test.scrbl @@ -7,110 +7,95 @@ @defmodule*/no-declare[(framework/test)] @declare-exporting[framework/test framework] -The framework provides several new primitive functions that simulate -user actions, which may be used to test applications. You use these -primitives and combine them just as regular Racket functions. For -example, -@schemeblock[ -(test:keystroke #\A) -(test:menu-select "File" "Save") +The framework provides several new primitive functions that simulate user +actions, which may be used to test applications. You use these primitives and +combine them just as regular Racket functions. For example, +@racketblock[ + (test:keystroke #\A) + (test:menu-select "File" "Save") ] -sends a keystroke event to the window with the keyboard focus and invokes -the callback function for the ``Save'' menu item from the ``File'' menu. -This has the same effect as if the user typed the key ``A'', pulled -down the ``File'' menu and selected ``Save''. +sends a keystroke event to the window with the keyboard focus and invokes the +callback function for the ``Save'' menu item from the ``File'' menu. This has +the same effect as if the user typed the key ``A'', pulled down the ``File'' +menu and selected ``Save''. -It is possible to load this portion of the framework without loading -the rest of the framework. Use -@scheme[(require framework/test)]. +It is possible to load this portion of the framework without loading the rest +of the framework. Use @racket[(require framework/test)]. -Currently, the test engine has primitives for pushing -buttons, setting check-boxes and choices, sending keystrokes, -selecting menu items and clicking the mouse. Many functions -that are also useful in application testing, such as -traversing a tree of panels, getting the text from a canvas, -determining if a window is shown, and so on, exist in GRacket. +Currently, the test engine has primitives for pushing buttons, setting +check-boxes and choices, sending keystrokes, selecting menu items and clicking +the mouse. Many functions that are also useful in application testing, such as +traversing a tree of panels, getting the text from a canvas, determining if a +window is shown, and so on, exist in GRacket. @section[#:tag "test:actions-completeness"]{Actions and completeness} -The actions associated with a testing primitive may not have finished -when the primitive returns to its caller. -Some actions may yield control before they can complete. -For example, selecting ``Save As...'' from the ``File'' menu -opens a dialog box and will not complete until the ``OK'' -or ``Cancel'' button is pushed. +The actions associated with a testing primitive may not have finished when the +primitive returns to its caller. Some actions may yield control before they +can complete. For example, selecting ``Save As...'' from the ``File'' menu +opens a dialog box and will not complete until the ``OK'' or ``Cancel'' button +is pushed. -However, all testing functions wait at least a minimum interval -before returning to give the action a chance to finish. -This interval controls the speed at which the test suite runs, -and gives some slack time for events to complete. -The default interval is 100 milliseconds. The interval can be queried -or set with @scheme[test:run-interval]. +However, all testing functions wait at least a minimum interval before +returning to give the action a chance to finish. This interval controls the +speed at which the test suite runs, and gives some slack time for events to +complete. The default interval is 100 milliseconds. The interval can be +queried or set with @racket[test:run-interval]. -A primitive action will not return until the run-interval has -expired and the action has finished, raised an error, or yielded. -The number of incomplete actions is given by -@scheme[test:number-pending-actions]. +A primitive action will not return until the run-interval has expired and the +action has finished, raised an error, or yielded. The number of incomplete +actions is given by @racket[test:number-pending-actions]. @italic{Note:} -Once a primitive action is started, it is not possible to undo it -or kill its remaining effect. -Thus, it is not possible to write a utility that flushes the +Once a primitive action is started, it is not possible to undo it or kill its +remaining effect. Thus, it is not possible to write a utility that flushes the incomplete actions and resets number-pending-actions to zero. -However, actions which do not complete right away often provide a -way to cancel themselves. -For example, many dialog boxes have a ``Cancel'' button which will -terminate the action with no further effect. -But this is accomplished by sending an additional action -(the button push), not by undoing the original action. +However, actions which do not complete right away often provide a way to cancel +themselves. For example, many dialog boxes have a ``Cancel'' button which will +terminate the action with no further effect. But this is accomplished by +sending an additional action (the button push), not by undoing the original +action. @section[#:tag "test:errors"]{Errors} -Errors in the primitive actions (which necessarily run in the -handler thread) are caught and reraised in the calling thread. +Errors in the primitive actions (which necessarily run in the handler thread) +are caught and reraised in the calling thread. -However, the primitive actions can only guarantee that the action -has started, and they may return before the action has completed. -As a consequence, an action may raise an error long after the -function that started it has returned. -In this case, the error is saved and reraised at the first opportunity -(the next primitive action). +However, the primitive actions can only guarantee that the action has started, +and they may return before the action has completed. As a consequence, an +action may raise an error long after the function that started it has returned. +In this case, the error is saved and reraised at the first opportunity (the +next primitive action). -The test engine keeps a buffer for one error, saving only the -first error. Any subsequent errors are discarded. -Reraising an error empties the buffer, allowing the next error -to be saved. +The test engine keeps a buffer for one error, saving only the first error. Any +subsequent errors are discarded. Reraising an error empties the buffer, +allowing the next error to be saved. -The function @scheme[test:reraise-error] -reraises any pending errors. +The function @racket[test:reraise-error] reraises any pending errors. @section{Technical Issues} @subsection{Active Frame} -The Self Test primitive actions all implicitly apply to the -top-most (active) frame. +The Self Test primitive actions all implicitly apply to the top-most (active) +frame. @subsection{Thread Issues} -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 -@scheme[make-eventspace] -for more info. +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 @racket[make-eventspace] for more info. @subsection{Window Manager (Unix only)} -In order for the Self Tester to work correctly, the window manager -must set the keyboard focus to follow the active frame. -This is the default behavior in Microsoft Windows and MacOS, -but not in X windows. +In order for the Self Tester to work correctly, the window manager must set the +keyboard focus to follow the active frame. This is the default behavior in +Microsoft Windows and MacOS, but not in X windows. -In X windows, you must explicitly tell your window manager to set the -keyboard focus to the top-most frame, regardless of the position of the -actual mouse. +In X windows, you must explicitly tell your window manager to set the keyboard +focus to the top-most frame, regardless of the position of the actual mouse. @section{Test Functions} diff --git a/collects/scribblings/framework/text.scrbl b/collects/scribblings/framework/text.scrbl index 319b6b6b..cca72421 100644 --- a/collects/scribblings/framework/text.scrbl +++ b/collects/scribblings/framework/text.scrbl @@ -16,41 +16,35 @@ (-> void?)))]{ This function highlights a region of text in the buffer. - The range between @scheme[start] and @scheme[end] will - be highlighted with the color in color, if the style is - @scheme['rectangle] (the default). - If the style is @scheme['ellipse], then an ellipse is drawn - around the range in the editor, using the color. - If the style is - @scheme['hollow-ellipse], then the outline of an ellipse is - drawn around the range in the editor, using the color. + The range between @racket[start] and @racket[end] will be highlighted with + the color in color, if the style is @racket['rectangle] (the default). If + the style is @racket['ellipse], then an ellipse is drawn around the range + in the editor, using the color. If the style is @racket['hollow-ellipse], + then the outline of an ellipse is drawn around the range in the editor, + using the color. - If the style is @scheme['dot], then @scheme[start] and - @scheme[end] must be the same, and a dot is drawn at the bottom of - that position in the editor. + If the style is @racket['dot], then @racket[start] and @racket[end] must be + the same, and a dot is drawn at the bottom of that position in the editor. - 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 some - platforms, 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 @scheme[caret-space?] is - @scheme[#f] it may also be hard to see. + If @racket[caret-space?] is not @racket[#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 some + platforms, 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 @racket[caret-space?] is + @racket[#f] it may also be hard to see. - The @scheme[priority] argument indicates the relative - priority for drawing overlapping regions. If two regions - overlap and have different priorities, the region with - @scheme['high] priority will be drawn second and only it + The @racket[priority] argument indicates the relative priority for drawing + overlapping regions. If two regions overlap and have different priorities, + the region with @racket['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 - the highlighting from this range. + This method returns a thunk, which, when invoked, will turn off the + highlighting from this range. - See also - @method[text:basic<%> unhighlight-range]. + See also @method[text:basic<%> unhighlight-range]. } + @defmethod[(unhighlight-range (start exact-nonnegative-integer?) (end exact-nonnegative-integer?) @@ -58,378 +52,348 @@ (caret-space boolean? #f) (style (symbols 'rectangle 'ellipse 'hollow-ellipse) 'rectangle)) void?]{ - This method removes the highlight from a region of text in - the buffer. + This method removes the highlight from a region of text in the buffer. - The region must match up to a region specified - from an earlier call to + The region must match up to a region specified from an earlier call to @method[text:basic<%> highlight-range]. } + @defmethod*[(((get-highlighted-ranges) (listof text:range?)))]{ - - Returns a list of (opaque) values representing the active - ranges in the editor. + Returns a list of (opaque) values representing the active ranges in the + editor. } + @defmethod*[(((get-styles-fixed) boolean?))]{ - 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 @scheme["Standard"] style. - - See also - @method[text:basic<%> set-styles-fixed]. + If the result of this function is @racket[#t], the styles in this + @racket[text:basic<%>] will be fixed. This means that any text inserted to + this editor has its style set to this editor's @racket[style-list%]'s + @racket["Standard"] style. + See also @method[text:basic<%> set-styles-fixed]. } + @defmethod*[(((get-fixed-style) (is-a?/c style<%>)))]{ - Returns the style used by - @method[text:basic<%> set-styles-fixed]when setting the styles. - + Returns the style used by @method[text:basic<%> set-styles-fixed]when + setting the styles. } + @defmethod*[(((set-styles-fixed (fixed? boolean?)) void?))]{ - Sets the styles fixed parameter of this - @scheme[text%]. See also - @method[text:basic<%> get-styles-fixed] - and - @method[text:basic<%> get-fixed-style]. - + Sets the styles fixed parameter of this @racket[text%]. See also + @method[text:basic<%> get-styles-fixed] and @method[text:basic<%> + get-fixed-style]. } + @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. - - 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]. + Moves or copies from the edit starting at @racket[start] and ending at + @racket[end]. It puts the copied text and snips in @racket[dest-text] + starting at location @racket[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 @scheme[#f] from + moved. A snip may refuse to be moved by returning @racket[#f] from @method[snip% release-from-owner]. } + @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 - @method[text% set-autowrap-bitmap] + The result of this method is used as the initial autowrap bitmap. Override + this method to change the initial @racket[bitmap%]. See also @method[text% + set-autowrap-bitmap] - - Defaultly returns the result of - @scheme[icon:get-autowrap-bitmap] + Defaultly returns the result of @racket[icon:get-autowrap-bitmap] } + @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 - read from this editor if this editor is used in DrRacket. - See also - @method[text:basic<%> port-name-matches?]. + 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 read from this editor if this + editor is used in DrRacket. See also @method[text:basic<%> + port-name-matches?]. } + @defmethod[(port-name-matches? (id any/c)) boolean?]{ + Indicates if @racket[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 + @racket[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<%> get-port-name]. - 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 @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<%> get-port-name]. - - This method calls @racket[normalize-path] and thus can be very - expensive on some filesystems. If it is called many times in a - loop, cache the results to avoid calling it too often. + This method calls @racket[normalize-path] and thus can be very expensive on + some filesystems. If it is called many times in a loop, cache the results + to avoid calling it too often. } + @defmethod[(get-edition-number) exact-nonnegative-integer?]{ - Returns a number that increments every time something in - the editor changes. - + Returns a number that increments every time something in the editor + changes. + The number is updated in @xmethod[text% after-insert] and @xmethod[text% after-delete]. } - + @defmethod[(get-start-of-line [pos exact-nonnegative-integer?]) exact-nonnegative-integer?]{ - This method is used by @racket[keymap:setup-global] to implement - a keybinding for the @racket["home"] key and for @racket["c:a"]. - - Its default implementation is @racket[(#,(method text% line-start-position) (#,(method text% position-line) pos))]. + This method is used by @racket[keymap:setup-global] to implement a + keybinding for the @racket["home"] key and for @racket["c:a"]. + + Its default implementation is + @racket[(#,(method text% line-start-position) (#,(method text% position-line) pos))]. } - } + @defmixin[text:basic-mixin (editor:basic<%> text%) (text:basic<%>)]{ - This mixin implements the basic functionality needed for - @scheme[text%] + This mixin implements the basic functionality needed for @racket[text%] objects in the framework. - The class that this mixin produces uses the same initialization - arguments as its input. + 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?))]{ - - Draws the rectangles installed by - @method[text:basic<%> highlight-range]. + Draws the rectangles installed by @method[text:basic<%> highlight-range]. } + @defmethod*[#:mode augment (((on-insert (start exact-nonnegative-integer?) (end exact-nonnegative-integer?)) void?))]{ - - See - @method[text:basic<%> set-styles-fixed]. + See @method[text:basic<%> set-styles-fixed]. } + @defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{ - - See - @method[text:basic<%> set-styles-fixed]. + See @method[text:basic<%> set-styles-fixed]. } + @defmethod*[#:mode override (((put-file (directory (or/c path? #f)) (default-name string?)) (or/c path? #f)))]{ - - Like - @method[editor<%> put-file] - but uses - @scheme[finder:put-file] - instead of @scheme[put-file]. - + Like @method[editor<%> put-file] but uses @racket[finder:put-file] instead + of @racket[put-file]. } } @definterface[text:first-line<%> (text%)]{ - Objects implementing this interface, when - @method[text:first-line<%> highlight-first-line] - is invoked with @scheme[#t], always show their - first line, even with scrolled (as long as - @method[text:first-line<%> first-line-currently-drawn-specially?] - returns @scheme[#t]). + Objects implementing this interface, when @method[text:first-line<%> + highlight-first-line] is invoked with @racket[#t], always show their first + line, even with scrolled (as long as @method[text:first-line<%> + first-line-currently-drawn-specially?] returns @racket[#t]). @defmethod[#:mode public-final (highlight-first-line [on? boolean?]) void?]{ Call this method to enable special treatment of the first line in the editor. } @defmethod[#:mode public-final (first-line-currently-drawn-specially?) boolean?]{ - Returns @scheme[#t] if @method[text:first-line<%> is-special-first-line?] - returned @scheme[#t] for the current first line - and if the buffer is scrolled down so that the first - line would not (ordinarily) be visible. + Returns @racket[#t] if @method[text:first-line<%> is-special-first-line?] + returned @racket[#t] for the current first line and if the buffer is + scrolled down so that the first line would not (ordinarily) be visible. } @defmethod[#:mode public-final (get-first-line-height) number?]{ - Returns the height, in pixels, of the first line. + Returns the height, in pixels, of the first line. } @defmethod[(is-special-first-line? [line string?]) boolean?]{ - Override this method to control when the first line is always - visible. The argument is the first line, as a string. + Override this method to control when the first line is always visible. The + argument is the first line, as a string. } - } @defmixin[text:first-line-mixin (text%) (text:first-line<%>)]{ - Provides the implementation of @scheme[text:first-line<%>]. - Does so by just painting the text of the first - line over top of what is already there and overriding - @method[text:first-line-mixin scroll-editor-to] to patch - up scrolling and - @method[text:first-line-mixin on-event] to patch up - mouse handling. + Provides the implementation of @racket[text:first-line<%>]. Does so by just + painting the text of the first line over top of what is already there and + overriding @method[text:first-line-mixin scroll-editor-to] to patch up + scrolling and @method[text:first-line-mixin on-event] to patch up mouse + handling. @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 'no-caret 'show-inactive-caret 'show-caret)]) - void?]{ - - Based on the various return values of the methods in @scheme[text:first-line], - draws the first actual line of the editor over top of the first - visible line in the editor. + [dc (is-a?/c dc<%>)] + [left real?] + [top real?] + [right real?] + [bottom real?] + [dx real?] + [dy real?] + [draw-caret (one-of/c 'no-caret 'show-inactive-caret 'show-caret)]) + void?]{ + Based on the various return values of the methods in + @racket[text:first-line], draws the first actual line of the editor over + top of the first visible line in the editor. } @defmethod[#:mode override - (on-event [event (is-a?/c mouse-event%)]) - void?]{ - Clicks in the first line cause the editor to scroll to the - actual first line. + (on-event [event (is-a?/c mouse-event%)]) + void?]{ + Clicks in the first line cause the editor to scroll to the actual first + line. + } + + @defmethod[#:mode override + (scroll-editor-to [localx real?] + [localy real?] + [width (and/c real? (not/c negative?))] + [height (and/c real? (not/c negative?))] + [refresh? any/c] + [bias (one-of/c 'start 'end 'none)]) + void?]{ + Scrolls a little bit more, when a scroll would be requested that scrolls + something so that it is line underneath the first line. } - - @defmethod[#:mode override - (scroll-editor-to [localx real?] - [localy real?] - [width (and/c real? (not/c negative?))] - [height (and/c real? (not/c negative?))] - [refresh? any/c] - [bias (one-of/c 'start 'end 'none)]) - void?]{ - Scrolls a little bit more, when a scroll would be requested - that scrolls something so that it is line underneath the first line. - } } @definterface[text:foreground-color<%> (text:basic<%> editor:standard-style-list<%>)]{ - } @defmixin[text:foreground-color-mixin (text:basic<%> editor:standard-style-list<%>) (text:foreground-color<%>)]{ - This mixin changes the default text style to have - the foreground color controlled by - @scheme[editor:set-default-font-color]. + This mixin changes the default text style to have the foreground color + controlled by @racket[editor:set-default-font-color]. + @defmethod*[#:mode override (((default-style-name) string?))]{ - - Returns the result of - @scheme[editor:get-default-color-style-name]. + Returns the result of @racket[editor:get-default-color-style-name]. } + @defmethod*[#:mode override (((get-fixed-style) (is-a?/c style<%>)))]{ - - Returns the style named by - @scheme[editor:get-default-color-style-name]. + Returns the style named by @racket[editor:get-default-color-style-name]. } } + @definterface[text:hide-caret/selection<%> (text:basic<%>)]{ - This class hides the caret, except when the selection is active. + This class hides the caret, except when the selection is active. - Instances of this class are useful for editors that used for - displaying purposes, but still allow users to copy their text. + Instances of this class are useful for editors that used for displaying + purposes, but still allow users to copy their text. } + @defmixin[text:hide-caret/selection-mixin (text:basic<%>) (text:hide-caret/selection<%>)]{ - @defmethod*[#:mode augment (((after-set-position) void?))]{ - - Calls - @method[text% hide-caret] - to hide the caret when there is only a caret and no selection. - + Calls @method[text% hide-caret] to hide the caret when there is only a + caret and no selection. } } -@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. +@definterface[text:nbsp->space<%> (text%)]{ + Classes that implement this interface silently change non-breaking spaces, ie + the character @racket[(integer->char 160)], to regular spaces when inserted + into the editor. } + @defmixin[text:nbsp->space-mixin (text%) (text:nbsp->space<%>)]{ @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]. + 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?))]{ + Replaces all non-breaking space characters @racket[(integer->char 160)] by + @racket[#\space] characters. - Replaces all non-breaking space characters - @scheme[(integer->char 160)] - by @scheme[#\space] characters. - - Ends the edit sequence (by calling - @method[editor<%> end-edit-sequence]) started in - @method[text:nbsp->space-mixin on-insert]. + Ends the edit sequence (by calling @method[editor<%> end-edit-sequence]) + started in @method[text:nbsp->space-mixin on-insert]. } } @definterface[text:normalize-paste<%> (text:basic<%>)]{ @defmethod[(ask-normalize?) boolean?]{ - Prompts the user if the pasted text should be normalized - (and updates various preferences based on the response). + Prompts the user if the pasted text should be normalized (and updates + various preferences based on the response). - Override this method in the mixin to avoid all GUI and preferences interactions. + Override this method in the mixin to avoid all GUI and preferences + interactions. } + @defmethod[(string-normalize [s string?]) string?]{ - Normalizes @scheme[s]. Defaults to @scheme[string-normalize-nfkc]. + Normalizes @racket[s]. Defaults to @racket[string-normalize-nfkc]. } } @defmixin[text:normalize-paste-mixin (text:basic<%>) (text:normalize-paste<%>)]{ - @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 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?]{ - Calls @method[editor<%> begin-edit-sequence]. + Calls @method[editor<%> begin-edit-sequence]. } + @defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{ Normalizes any next text and calls @method[editor<%> end-edit-sequence]. } - } @definterface[text:searching<%> (editor:keymap<%> text:basic<%>)]{ Any object matching this interface can be searched. - Searches using this class has a non-traditional feature - for performance reasons. Specifically, multiple adjacent - hits are coalesced into a single search results when - bubbles are drawn. This means, for example, that searching - for a space in a file with 80,000 spaces (as one file in - the Racket code base has) is still tractable, since - many of those spaces will be next to each other and thus - there will be far fewer bubbles (the file in question has + Searches using this class has a non-traditional feature for performance + reasons. Specifically, multiple adjacent hits are coalesced into a single + search results when bubbles are drawn. This means, for example, that + searching for a space in a file with 80,000 spaces (as one file in the Racket + code base has) is still tractable, since many of those spaces will be next to + each other and thus there will be far fewer bubbles (the file in question has only 20,000 such bubbles). -@defmethod[(set-searching-state [str (or/c false/c string?)] [cs? boolean?] [replace-start (or/c false/c number?)]) void?]{ + @defmethod[(set-searching-state [str (or/c false/c string?)] + [cs? boolean?] + [replace-start (or/c false/c number?)]) + void?]{ + If @racket[str] is not @racket[#f], then this method highlights every + occurrence of @racket[str] in the editor. If @racket[str] is @racket[#f], + then it clears all of the highlighting in the buffer. - If @scheme[str] is not @scheme[#f], then this method highlights - every occurrence of @scheme[str] in the editor. If @scheme[str] is - @scheme[#f], then it clears all of the highlighting in the buffer. + If @racket[cs?] is @racket[#f], the search is case-insensitive, and otherwise + it is case-sensitive. - If @scheme[cs?] is @scheme[#f], the search is case-insensitive, and - otherwise it is case-sensitive. + If the @racket[replace-start] argument is @racket[#f], then the search is not + in replacement mode. If it is a number, then the first search hit after that + position in the editor is where the next replacement will take place. + } - If the @scheme[replace-start] argument is @scheme[#f], - then the search is not in replacement mode. If it is a - number, then the first search hit after that position in - the editor is where the next replacement will take place. + @defmethod[(set-search-anchor [position (or/c false/c number?)]) void?]{ + Sets the anchor's position in the editor. Only takes effect if the + @racket['framework:anchored-search] preference is on. + } -} -@defmethod[(set-search-anchor [position (or/c false/c number?)]) void?]{ - Sets the anchor's position in the editor. Only takes effect if - the @scheme['framework:anchored-search] preference is on. -} -@defmethod[(get-search-hit-count) number?]{ - Returns the number of hits for the search in the buffer, based on the - count found last time that a search happened. + @defmethod[(get-search-hit-count) number?]{ + Returns the number of hits for the search in the buffer, based on the count + found last time that a search happened. + } + + @defmethod[(set-replace-start [pos (or/c false/c number?)]) void?]{ + Sets the position where replacement next occurs. This is equivalent to + calling @method[text:searching<%> set-searching-state] with a new + @racket[replace-start] argument, but the other arguments the same as the + last call to @method[text:searching<%> set-searching-state], but is more + efficient (since @method[text:searching<%> set-searching-state] will search + the entire buffer and re-build all of the bubbles). + } + + @defmethod[(get-search-bubbles) + (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 the color of the + bubble, in RGB coordinates. + + If @tt{replace-start} has been set (via @method[text:searching<%> + set-replace-start]) and the closest search hit following @tt{replace-start} + does not collapse with an adjacent bubble,the result will include that + bubble. If the closest search hit after @tt{replace-start} is collpased + with another bubble, then the search hit is not reflected in the result. + + This method is intended for use in test suites. + } } -@defmethod[(set-replace-start [pos (or/c false/c number?)]) void?]{ - Sets the position where replacement next occurs. This is equivalent - to calling @method[text:searching<%> set-searching-state] with - a new @scheme[replace-start] argument, but the other arguments the same - as the last call to @method[text:searching<%> set-searching-state], - but is more efficient (since @method[text:searching<%> set-searching-state] - will search the entire buffer and re-build all of the bubbles). -} - -@defmethod[(get-search-bubbles) - (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 - the color of the bubble, in RGB coordinates. - - If @tt{replace-start} has been set (via - @method[text:searching<%> set-replace-start]) and the - closest search hit following @tt{replace-start} does not - collapse with an adjacent bubble,the result will include - that bubble. If the closest search hit after - @tt{replace-start} is collpased with another bubble, then - the search hit is not reflected in the result. - - This method is intended for use in test suites. -} - -} @defmixin[text:searching-mixin (editor:keymap<%> text:basic<%>) (text:searching<%>)]{ - This - @scheme[text%] - can be searched. + This @racket[text%] can be searched. The result of this mixin uses the same initialization arguments as the mixin's argument. - @defmethod*[#:mode override (((get-keymaps) (listof (is-a?/c keymap%))))]{ - This returns a list containing the super-class's keymaps, plus the - result of - @scheme[keymap:get-search] + @defmethod*[#:mode override (((get-keymaps) (listof (is-a?/c keymap%))))]{ + This returns a list containing the super-class's keymaps, plus the result + of @racket[keymap:get-search] } @defmethod[#:mode augment (after-insert [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{ Re-does any search now that the contents of the window have changed. } + @defmethod[#:mode augment (after-delete [start exact-nonnegative-integer?] [len exact-nonnegative-integer?]) void?]{ Re-does any search now that the contents of the window have changed. } @@ -439,22 +403,24 @@ the @method[frame:searchable<%> set-text-to-search] method. } } + @definterface[text:return<%> (text%)]{ - Objects supporting this interface were created by - @scheme[text:return-mixin]. + Objects supporting this interface were created by @racket[text:return-mixin]. } + @defmixin[text:return-mixin (text%) (text:return<%>)]{ Use this buffer to perform some special action when return is typed. @defconstructor[((return (-> boolean?)))]{ - } - @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. + @defmethod*[#:mode override + (((on-local-char (event (is-a?/c key-event%))) void?))]{ + If @racket[key] is either return or newline, only invoke the + @racket[return] thunk (initialization argument) and do nothing else. } } + @definterface[text:wide-snip<%> (text:basic<%>)]{ @defmethod*[(((add-wide-snip (snip (is-a?/c snip%))) void?))]{ @@ -463,77 +429,63 @@ This method should only be called by @xmethod[canvas:wide-snip<%> add-wide-snip]. - } + @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. + Registers a snip in this editor. It is resized when the viewing area of the + editor changes. This method should only be called by @xmethod[canvas:wide-snip<%> add-tall-snip]. - } } + @defmixin[text:wide-snip-mixin (text:basic<%>) (text:wide-snip<%>)]{ - } + @definterface[text:delegate<%> (text:basic<%>)]{ - Implementations of this interface copy all of the - changes to this editor to the result of - @method[text:delegate<%> get-delegate] - except instead of regular string and tab snips, - instead instances of - @scheme[text:1-pixel-string-snip%] - and - @scheme[text:1-pixel-tab-snip%] - are created. + Implementations of this interface copy all of the changes to this editor to + the result of @method[text:delegate<%> get-delegate] except instead of + regular string and tab snips, instead instances of + @racket[text:1-pixel-string-snip%] and @racket[text:1-pixel-tab-snip%] are + created. + + The contents of the two editor are kept in sync, as modifications to this + object happen. - The contents of the two - editor are kept in sync, as modifications - to this object happen. @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. - + The result of this method is the @racket[text%] object that the contents of + this editor are being delegated to, or @racket[#f], if there is none. } + @defmethod*[(((set-delegate (delegate (or/c #f (is-a?/c text%)))) void?))]{ - This method sets the current delegate. + This method sets the current delegate. - - When it is set, all of the snips are copied from this object - to @scheme[delegate]. Additionally, if this object implements - @scheme[scheme:text<%>] - the tab settings of @scheme[delegate] are updated to match this - objects. + When it is set, all of the snips are copied from this object to + @racket[delegate]. Additionally, if this object implements + @racket[scheme:text<%>] the tab settings of @racket[delegate] are updated + to match this objects. } } + @defclass[text:1-pixel-string-snip% string-snip% ()]{ - This class re-uses the implementation of - @scheme[string-snip%] - to implement a string snip that just draws - a single pixel for each character in the string. + This class re-uses the implementation of @racket[string-snip%] to implement a + string snip that just draws a single pixel for each character in the string. - See also - @scheme[text:1-pixel-tab-snip%] - for a similar extension to the - @scheme[tab-snip%]class. + See also @racket[text:1-pixel-tab-snip%] for a similar extension to the + @racket[tab-snip%]class. + + This snip is used in conjunction with the @racket[frame:delegate<%>] and + @racket[text:delegate<%>] interfaces. - This snip is used in conjunction with the - @scheme[frame:delegate<%>] - and - @scheme[text:delegate<%>] - interfaces. @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. + Fills the boxes with instance of @racket[text:1-pixel-string-snip%]s. } + @defmethod*[#:mode override (((copy) (is-a?/c snip%)))]{ - - Creates and returns an instance of - @scheme[text:1-pixel-string-snip%]. + Creates and returns an instance of @racket[text:1-pixel-string-snip%]. } + @defmethod*[#:mode override (((get-extent (dc (is-a?/c dc<%>)) @@ -546,65 +498,52 @@ (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. - + 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-nonnegative-integer?) (pos exact-nonnegative-integer? 0)) 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. - + Draws black pixels for non-whitespace characters and draws nothing for + whitespace characters. } } + @defclass[text:1-pixel-tab-snip% tab-snip% ()]{ - This class re-uses the implementation of - @scheme[tab-snip%] - to implement a string snip that is always one pixel - high. + This class re-uses the implementation of @racket[tab-snip%] to implement a + string snip that is always one pixel high. - See also - @scheme[text:1-pixel-string-snip%] - for a similar extension to the - @scheme[string-snip%]class. + See also @racket[text:1-pixel-string-snip%] for a similar extension to the + @racket[string-snip%]class. + + This snip is used in conjunction with the @racket[frame:delegate<%>] and + @racket[text:delegate<%>] interfaces. - This snip is used in conjunction with the - @scheme[frame:delegate<%>] - and - @scheme[text:delegate<%>] - interfaces. @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. + Fills the boxes with instance of @racket[text:1-pixel-tab-snip%]s. } + @defmethod*[#:mode override (((copy) (is-a?/c snip%)))]{ - - Creates and returns an instance of - @scheme[text:1-pixel-tab-snip%]. + Creates and returns an instance of @racket[text:1-pixel-tab-snip%]. } + @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 - returned in the @scheme[tab-width] parameter of the - @method[text% get-tabs] - method. - + 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 + @racket[tab-width] parameter of the @method[text% get-tabs] method. } + @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. - } } + @defmixin[text:delegate-mixin (text:basic<%>) (text:delegate<%>)]{ - This mixin provides an implementation of the - @scheme[text:delegate<%>] + This mixin provides an implementation of the @racket[text:delegate<%>] interface. + @defmethod*[#:mode override (((highlight-range (start exact-integer?) (end exact-nonnegative-integer?) (color (or/c string? (is-a?/c color%))) @@ -612,11 +551,10 @@ (priority (symbols 'high 'low) 'low) (style (symbols 'rectangle 'ellipse 'hollow-ellipse 'dot) 'rectangle)) (-> void?)))]{ - - In addition to calling the super method, - @method[text:basic<%> highlight-range], this method forwards the highlighting to - the delegatee. + In addition to calling the super method, @method[text:basic<%> + highlight-range], this method forwards the highlighting to the delegatee. } + @defmethod[#:mode override (unhighlight-range (start exact-nonnegative-integer?) @@ -627,552 +565,494 @@ 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?))]{ - - Draws a blue region in the delegatee editor that shows where - the visible region of the delegate editor is. + @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 'no-caret 'show-inactive-caret '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?))]{ - - Sends a message to the delegate to update the size of the - copied snip, if there is one. + Sends a message to the delegate to update the size of the copied snip, if + there is one. } - @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?))]{ forwards the change to the delegate } - @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?))]{ forwards the change to the delegate. } - @defmethod*[#:mode augment (((after-change-style (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) 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?))]{ - remembers the filename, for use in + @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. } } + @definterface[text:info<%> (text:basic<%>)]{ - Objects supporting this interface are expected to send information - about themselves to the frame that is displaying them. + Objects supporting this interface are expected to send information about + themselves to the frame that is displaying them. } @defmixin[text:info-mixin (editor:keymap<%> text:basic<%>) (text:info<%>)]{ This mixin adds support for supplying information to objects created with - @scheme[frame:info-mixin]. When this - @scheme[editor:basic<%>] - is displayed in a frame, that frame must have been created with - @scheme[frame:info-mixin]. + @racket[frame:info-mixin]. When this @racket[editor:basic<%>] is displayed in + a frame, that frame must have been created with @racket[frame:info-mixin]. + @defmethod*[#:mode override (((set-anchor (on? any/c)) void?))]{ - - Calls the - @method[frame:text-info<%> anchor-status-changed] - method of the frame that is viewing this object. It uses - @method[editor<%> get-canvas] - to get the canvas for this frame, and uses that canvas's - @scheme[top-level-window<%>] - as the frame. + Calls the @method[frame:text-info<%> anchor-status-changed] method of the + frame that is viewing this object. It uses @method[editor<%> get-canvas] to + get the canvas for this frame, and uses that canvas's + @racket[top-level-window<%>] as the frame. } + @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 - @method[editor<%> get-canvas] - to get the canvas for this frame, and uses that canvas's - @scheme[top-level-window<%>] - as the frame. + Calls the @method[frame:text-info<%> overwrite-status-changed]method of the + frame that is viewing this object. It uses @method[editor<%> get-canvas] to + get the canvas for this frame, and uses that canvas's + @racket[top-level-window<%>] as the frame. } + @defmethod*[#:mode augment (((after-set-position) void?))]{ - - Calls the - @method[frame:text-info<%> editor-position-changed] - method of the frame that is viewing this object. It uses - @method[editor<%> get-canvas] - to get the canvas for this frame, and uses that canvas's - @scheme[top-level-window<%>] - as the frame. + Calls the @method[frame:text-info<%> editor-position-changed] method of the + frame that is viewing this object. It uses @method[editor<%> get-canvas] to + get the canvas for this frame, and uses that canvas's + @racket[top-level-window<%>] as the frame. } + @defmethod*[#:mode augment (((after-insert (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{ - - Calls the - @method[frame:text-info<%> editor-position-changed] - method of the frame that is viewing this object. It uses - @method[editor<%> get-canvas] - to get the canvas for this frame, and uses that canvas's - @scheme[top-level-window<%>] - as the frame. + Calls the @method[frame:text-info<%> editor-position-changed] method of the + frame that is viewing this object. It uses @method[editor<%> get-canvas] to + get the canvas for this frame, and uses that canvas's + @racket[top-level-window<%>] as the frame. } - @defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{ - Calls the - @method[frame:text-info<%> editor-position-changed] - method of the frame that is viewing this object. It uses - @method[editor<%> get-canvas] - to get the canvas for this frame, and uses that canvas's - @scheme[top-level-window<%>] - as the frame. + @defmethod*[#:mode augment (((after-delete (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) void?))]{ + Calls the @method[frame:text-info<%> editor-position-changed] method of the + frame that is viewing this object. It uses @method[editor<%> get-canvas] to + get the canvas for this frame, and uses that canvas's + @racket[top-level-window<%>] as the frame. } } + @definterface[text:clever-file-format<%> (text%)]{ Objects supporting this interface are expected to support a clever file format when saving. - } + @defmixin[text:clever-file-format-mixin (text%) (text:clever-file-format<%>)]{ The result of this mixin uses the same initialization arguments as the mixin's argument. - 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 @scheme['std]. (see - @method[text% set-file-format] - for more information. If not, the file format passed to - @method[editor<%> save-file] - is used. + When files are saved from this @racket[text%], a check is made to see if + there are any non-@racket[string-snip%] objects in the @racket[text%]. If so, + it is saved using the file format @racket['std]. (see @method[text% + set-file-format] 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?))]{ + If the method @method[text% get-file-format] returns @racket['standard] and + the text has only @racket[string-snip%]s, the file format is set to + @racket['text]. - If the method - @method[text% get-file-format] - 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 @scheme['text] and the text has some non - @scheme[string-snip%]s, the file format is set to @scheme['standard]. + If the method @method[text% get-file-format] returns @racket['text] and the + text has some non @racket[string-snip%]s, the file format is set to + @racket['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 - @scheme[file-format] is @scheme['copy] or @scheme['same]. + @racket[file-format] is @racket['copy] or @racket['same]. } } + @definterface[text:file<%> (editor:file<%> text:basic<%>)]{ - Mixins that implement this interface lock themselves when - the file they are editing is read only. + Mixins that implement this interface lock themselves when the file they are + editing is read only. + @defmethod*[(((get-read-write?) boolean?))]{ Indicates whether or not this editor is in read-write mode. - } + @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]. + Unlocks the editor, calls the thunk, and then relocks the editor, all using + a @racket[dynamic-wind]. } } + @defmixin[text:file-mixin (editor:file<%> text:basic<%>) (text:file<%>)]{ - @defmethod*[#:mode augment (((can-insert? (start exact-nonnegative-integer?) (len exact-nonnegative-integer?)) 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]. + Returns false if the result of @method[text:file<%> get-read-write?] is + true, otherwise returns the result of calling @racket[inner]. } + @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]. + Returns false if the result of @method[text:file<%> get-read-write?] is + true, otherwise returns the result of calling @racket[inner]. } + @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 @method[editor<%> lock] method. Otherwise unlocks + the buffer - Checks if the newly saved file is write-only in the filesystem. If - so, locks the editor with the - @method[editor<%> lock] - method. Otherwise unlocks the buffer - - For each canvas returned from - @method[editor<%> get-canvases] - it checks to see if the - @scheme[canvas%]'s - @method[area<%> get-top-level-window] - matches the - @scheme[frame:editor<%>] - interface. If so, it calls - @method[frame:editor-mixin set-label] - with the last part of the filename (ie, the name of the file, not the - directory the file is in). + For each canvas returned from @method[editor<%> get-canvases] it checks to + see if the @racket[canvas%]'s @method[area<%> get-top-level-window] matches + the @racket[frame:editor<%>] interface. If so, it calls + @method[frame:editor-mixin set-label] 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?))]{ + Checks if the newly loaded file is write-only in the filesystem. If so, + locks the editor with the @method[editor<%> lock] method. Otherwise unlocks + the buffer - Checks if the newly loaded file is write-only in the filesystem. If - so, locks the editor with the - @method[editor<%> lock] - method. Otherwise unlocks the buffer - - For each canvas returned from - @method[editor<%> get-canvases] - it checks to see if the - @scheme[canvas%]'s - @method[area<%> get-top-level-window] - matches the - @scheme[frame:editor<%>] - interface. If so, it calls - @method[frame:editor-mixin set-label] - with the last part of the filename (ie, the name of the file, not the - directory the file is in). + For each canvas returned from @method[editor<%> get-canvases] it checks to + see if the @racket[canvas%]'s @method[area<%> get-top-level-window] matches + the @racket[frame:editor<%>] interface. If so, it calls + @method[frame:editor-mixin set-label] with the last part of the filename + (ie, the name of the file, not the directory the file is in). } } + @definterface[text:ports<%> ()]{ - Classes implementing this interface (via the associated - mixin) support input and output ports that read from and to the - editor. + Classes implementing this interface (via the associated mixin) support input + and output ports that read from and to the editor. - There are two input ports: the normal input port just reads - from the editor's contents directly and the box input port - inserts an editor snip into this text and uses input typed - into the box as input into the port. + There are two input ports: the normal input port just reads from the editor's + contents directly and the box input port inserts an editor snip into this + text and uses input typed into the box as input into the port. + + There are three output ports, designed to match stdout, stderr, and a special + port for printing values. The only difference between them is the output is + rendered in different colors when it comes in via the different ports. + + 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). - There are three output ports, designed to match stdout, stderr, - and a special port for printing values. The only difference - between them is the output is rendered in different colors - when it comes in via the different ports. - - 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?))]{ - 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 @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). - + Deletes the text between @racket[start] and @racket[end] without changing + the behavior of the ports (otherwise, deleting the text would break + internal invariants of the port). + Both @racket[start] and @racket[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). } + @defmethod*[(((get-insertion-point) exact-integer?))]{ - Returns the position where characters put into the output - port will appear. - + Returns the position where characters put into the output port will appear. } + @defmethod*[(((set-insertion-point (ip exact-integer?)) void?))]{ - Sets the position where the output port will insert characters. - See also + 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?))]{ - Returns the position where input will be taken into the - input port (after the next time return is typed). - + 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?))]{ - Sets the position where input will be taken into the - input port (after the next time return is typed). - - See also - @method[text:ports<%> get-unread-start-point]. + Sets the position where input will be taken into the input port (after the + next time return is typed). + See also @method[text:ports<%> get-unread-start-point]. } + @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 - @method[text:ports<%> set-insertion-point]) after making changes to the buffer. - + 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 @method[text:ports<%> set-insertion-point]) after + making changes to the buffer. } + @defmethod*[(((get-allow-edits) boolean?))]{ Indicates if editing is allowed in the buffer at this point. - } + @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 + Inserts some text between the unread start point and the insertion point + (and updates them properly). To insert before the two points, see @method[text:ports<%> insert-before]. - See also - @method[text:ports<%> set-unread-start-point] - and + See also @method[text:ports<%> set-unread-start-point] and @method[text:ports<%> set-insertion-point]. - } + @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 + Inserts some text before the unread start point and updates it and the + insertion point properly. To insert between the two points, see @method[text:ports<%> insert-between]. - See also - @method[text:ports<%> set-unread-start-point] - and + See also @method[text:ports<%> set-unread-start-point] and @method[text:ports<%> set-insertion-point]. - } + @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. + 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]. + Return @racket[#t] or the result of calling @racket[inner]. } + @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?))]{ This method puts an eof into the input port. - } + @defmethod*[(((send-eof-to-box-in-port) void?))]{ This method puts an eof into the box input port. - } + @defmethod*[(((reset-input-box) void?))]{ - This method removes the current input box from the editor - (and all input in it is lost). - + This method removes the current input box from the editor (and all input in + it is lost). } + @defmethod*[(((clear-output-ports) void?))]{ - Flushes all of the data in all of the output ports that - hasn't appeared in the editor yet. - + Flushes all of the data in all of the output ports that hasn't appeared in + the editor yet. } + @defmethod*[(((clear-input-port) void?))]{ - Flushes all of the data in the input port that hasn't yet - been read. Reading will now block. - + 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?))]{ - Flushes all of the data in the box input port that hasn't - yet been read. Reading will now block. - + Flushes all of the data in the box input port that hasn't yet been + read. Reading will now block. } + @defmethod*[(((get-out-style-delta) (or/c (is-a?/c style-delta%) string?)))]{ - The result of this method is the style that is used to color - text submitted to the result of - @method[text:ports<%> get-out-port]. + The result of this method is the style that is used to color text submitted + to the result of @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. + If the result is a string that is not mapped in the editor's style list, + the style named @racket["Standard"] is used and if that isn't mapped, the + style named @racket["Basic"] is used. This method is called during the initialization of the class. - - 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]. + Defaultly returns @racket["text:ports out"] which is mapped to a blue style + in the style list returned by @racket[editor:get-standard-style-list]. } + @defmethod*[(((get-err-style-delta) (or/c (is-a?/c style-delta%) string?)))]{ - The result of this method is the style that is used to color - text submitted to the result of - @method[text:ports<%> get-err-port]. + The result of this method is the style that is used to color text submitted + to the result of @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. + If the result is a string that is not mapped in the editor's style list, + the style named @racket["Standard"] is used and if that isn't mapped, the + style named @racket["Basic"] is used. This method is called during the initialization of the class. - - 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]. + Defaultly returns @racket["text:ports err"] which is mapped to a red italic + style in the style list returned by + @racket[editor:get-standard-style-list]. } + @defmethod*[(((get-value-style-delta) (or/c (is-a?/c style-delta%) string?)))]{ - The result of this method is the style (or the name of the - style) that is used to color text submitted to the result of - @method[text:ports<%> get-value-port]. + The result of this method is the style (or the name of the style) that is + used to color text submitted to the result of @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. + If the result is a string that is not mapped in the editor's style list, + the style named @racket["Standard"] is used and if that isn't mapped, the + style named @racket["Basic"] is used. This method is called during the initialization of the class. - - - 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]. - + Defaultly returns @racket["text:ports value"] which is mapped to a blue + style in the style list returned by + @racket[editor:get-standard-style-list]. } + @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?))]{ Returns the box input port that data in this editor is sent to. - } + @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] - and - @method[text:ports<%> get-value-port] - is the font style and color. - + 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] and @method[text:ports<%> get-value-port] is the font style + and color. } + @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] - and - @method[text:ports<%> get-out-port] - is the font style and color. - + 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] and @method[text:ports<%> get-out-port] is the font style and + color. } + @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] - and - @method[text:ports<%> get-out-port] - is the font style and color. - + 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] and @method[text:ports<%> get-out-port] is the font style and + color. } + @defmethod*[(((after-io-insertion) void?))]{ This method is called after an insertion due to IO occurs. - } + @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. - + 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<%>)))]{ The result of this method is instantiated and placed inside the result of @method[text:ports<%> get-box-input-editor-snip%]. - } } + @defmixin[text:ports-mixin (text:wide-snip<%>) (text:ports<%>)]{ @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]. + Returns the results of the @racket[inner] call, unless + @method[text:ports<%> get-allow-edits] returns @racket[#f]. } + @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]. + Returns the results of the @racket[inner] call, unless + @method[text:ports<%> get-allow-edits] returns @racket[#f]. } + @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] to the input port, unless + @method[text:ports<%> submit-to-port?] returns @racket[#f]. - Sends the data between the last position and the result of - @method[text:ports<%> get-unread-start-point] - to the input port, unless - @method[text:ports<%> submit-to-port?] - returns @scheme[#f]. - - Also calls - @method[text:ports<%> on-submit]. + 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. } } + @definterface[text:input-box<%> (text%)]{ - Classes that implement this interface are used as the - editors for the box input port in - @scheme[text:ports%]. - + Classes that implement this interface are used as the editors for the box + input port in @racket[text:ports%]. } -@defmixin[text:input-box-mixin (text%) (text:input-box<%>)]{ - This mixin provides an implementation of - @scheme[text:input-box<%>] - for use with - @scheme[text:ports<%>]. - @defmethod*[#:mode override (((on-default-char (event (is-a?/c key-event%))) void?))]{ - Notifies the - @scheme[text:ports<%>] - enclosing this editor that a new line of input has been provided. +@defmixin[text:input-box-mixin (text%) (text:input-box<%>)]{ + This mixin provides an implementation of @racket[text:input-box<%>] for use + with @racket[text:ports<%>]. + + @defmethod*[#:mode override + (((on-default-char (event (is-a?/c key-event%))) void?))]{ + Notifies the @racket[text:ports<%>] enclosing this editor that a new line + of input has been provided. } } + @definterface[text:autocomplete<%> (text%)]{ - The mixin implementing this interface provides an - unintrusive autocompletion menu when a particular - (configurable) keystroke is pressed. + The mixin implementing this interface provides an unintrusive autocompletion + menu when a particular (configurable) keystroke is pressed. @defmethod*[(((auto-complete) void?))]{ Starts a completion. - } + @defmethod*[(((get-autocomplete-border-color) (or/c string? (is-a?/c color%))))]{ - The border color for the autocomplete menu. Defaults to - @scheme["black"]. - + The border color for the autocomplete menu. Defaults to @racket["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"]. - + The background color for the non-selected menu items. Defaults to + @racket["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)]. - + @racket[(make-object color% 204 153 255)]. } + @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. - + Returns true when the key event passed to it should initiate the + completions menu. } + @defmethod*[(((get-all-words) (listof string?)))]{ - Returns the list of the words that autocompletion should - choose from. + choose from. } - @defmethod*[(((get-word-at (pos exact-positive-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. } } + @defmixin[text:autocomplete-mixin (text%) (text:autocomplete<%>)]{ @defmethod*[#:mode override (((on-paint) void?))]{ - Draws the completion menu (when it is popped up). } + @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 - visible, it calls the - @method[text:completion<%> completion-mode-key-event?] - method to see if it should start completing. + Takes over the handling of key events when the completions menu is + visible. Also, when the completions menu is not visible, it calls the + @method[text:completion<%> completion-mode-key-event?] method to see if it + should start completing. } + @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 menu open and the mouse is in the menu, + in which case it makes the menu trace the mouse. - This method is overridden to allow mouse access of the - completions menu. It only handles events when there is a - menu open and the mouse is in the menu, in which case it - makes the menu trace the mouse. - - The only time it does not call the super method is when - the mouse is button is pushed. + The only time it does not call the super method is when the mouse is button + is pushed. } } + @defclass[text:basic% (text:basic-mixin (editor:basic-mixin text%)) ()]{} @defclass[text:hide-caret/selection% (text:hide-caret/selection-mixin text:basic%) ()]{} @defclass[text:nbsp->space% (text:nbsp->space-mixin text:basic%) ()]{} @@ -1193,17 +1073,14 @@ @definterface[text:line-numbers<%> ()]{ @defmethod*[(((show-line-numbers! (show boolean?)) void?))]{ - Enables or disables line number drawing. } - - @defmethod*[(((show-line-numbers?) boolean?))]{ + @defmethod*[(((show-line-numbers?) boolean?))]{ Returns whether or not line drawing is enabled. } - - @defmethod*[(((set-line-numbers-color (color string?)) void?))]{ + @defmethod*[(((set-line-numbers-color (color string?)) void?))]{ Sets the color of the line numbers. } } @@ -1211,7 +1088,6 @@ @defmixin[text:line-numbers-mixin (text%) (text:line-numbers<%>)]{ @defmethod*[#:mode override (((on-paint) void?))]{ - Draws the line numbers. } diff --git a/collects/scribblings/gui/add-color-intf.scrbl b/collects/scribblings/gui/add-color-intf.scrbl index d207f565..5adae036 100644 --- a/collects/scribblings/gui/add-color-intf.scrbl +++ b/collects/scribblings/gui/add-color-intf.scrbl @@ -3,33 +3,27 @@ @definterface/title[add-color<%> ()]{ -An @scheme[add-color<%>] object is used to additively change the RGB - values of a @scheme[color%] object. An @scheme[add-color<%>] object - only exists within a @scheme[style-delta%] object. - -See also @method[style-delta% get-foreground-add] and - @method[style-delta% get-background-add]. - +An @racket[add-color<%>] object is used to additively change the RGB values of +a @racket[color%] object. An @racket[add-color<%>] object only exists within a +@racket[style-delta%] object. +See also @method[style-delta% get-foreground-add] and @method[style-delta% +get-background-add]. @defmethod[(get [r (box/c (integer-in -1000 1000))] [g (box/c (integer-in -1000 1000))] [b (box/c (integer-in -1000 1000))]) void?]{ + Gets all of the additive values. -Gets all of the additive values. - -@boxisfill[(scheme r) @elem{the additive value for the red component of the color}] -@boxisfill[(scheme g) @elem{the additive value for the green component of the color}] -@boxisfill[(scheme b) @elem{the additive value for the blue component of the color}] - + @boxisfill[(scheme r) @elem{the additive value for the red component of the color}] + @boxisfill[(scheme g) @elem{the additive value for the green component of the color}] + @boxisfill[(scheme b) @elem{the additive value for the blue component of the color}] } @defmethod[(get-b) (integer-in -1000 1000)]{ - -Gets the additive value for the blue component of the color. - + Gets the additive value for the blue component of the color. } @defmethod[(get-g) @@ -41,38 +35,28 @@ Gets the additive value for the green component of the color. @defmethod[(get-r) (integer-in -1000 1000)]{ - -Gets the additive value for the red component of the color. - + Gets the additive value for the red component of the color. } @defmethod[(set [r (integer-in -1000 1000)] [g (integer-in -1000 1000)] [b (integer-in -1000 1000)]) void?]{ - -Sets all of the additive values. - + Sets all of the additive values. } @defmethod[(set-b [v (integer-in -1000 1000)]) void?]{ - -Sets the additive value for the blue component of the color. - + Sets the additive value for the blue component of the color. } @defmethod[(set-g [v (integer-in -1000 1000)]) void?]{ - -Sets the additive value for the green component of the color. - + Sets the additive value for the green component of the color. } @defmethod[(set-r [v (integer-in -1000 1000)]) void?]{ - -Sets the additive value for the red component of the color. - + Sets the additive value for the red component of the color. }} diff --git a/collects/scribblings/gui/area-container-intf.scrbl b/collects/scribblings/gui/area-container-intf.scrbl index 6bea8e64..51620a2a 100644 --- a/collects/scribblings/gui/area-container-intf.scrbl +++ b/collects/scribblings/gui/area-container-intf.scrbl @@ -3,18 +3,18 @@ @definterface/title[area-container<%> (area<%>)]{ -An @scheme[area-container<%>] is a container @scheme[area<%>]. +An @racket[area-container<%>] is a container @racket[area<%>]. -All @scheme[area-container<%>] classes accept the following named - instantiation arguments: +All @racket[area-container<%>] classes accept the following named +instantiation arguments: @itemize[ - @item{@indexed-scheme[border] --- default is @scheme[0]; passed to + @item{@indexed-racket[border] --- default is @racket[0]; passed to @method[area-container<%> border]} - @item{@indexed-scheme[spacing] --- default is @scheme[0]; passed to + @item{@indexed-racket[spacing] --- default is @racket[0]; passed to @method[area-container<%> spacing]} - @item{@indexed-scheme[alignment] --- default is class-specific, such as - @scheme['(center top)] for @scheme[vertical-panel%]; the list + @item{@indexed-racket[alignment] --- default is class-specific, such as + @racket['(center top)] for @racket[vertical-panel%]; the list elements are passed to @method[area-container<%> set-alignment]} ] @@ -200,15 +200,15 @@ Sets the alignment specification for a container, which determines how it positions its children when the container has leftover space (when a child was not stretchable in a particular dimension). -When the container's horizontal alignment is @scheme['left], the +When the container's horizontal alignment is @racket['left], the children are left-aligned in the container and whitespace is inserted to the right. When the container's horizontal alignment is - @scheme['center], each child is horizontally centered in the + @racket['center], each child is horizontally centered in the container. When the container's horizontal alignment is - @scheme['right], leftover whitespace is inserted to the left. + @racket['right], leftover whitespace is inserted to the left. -Similarly, a container's vertical alignment can be @scheme['top], - @scheme['center], or @scheme['bottom]. +Similarly, a container's vertical alignment can be @racket['top], + @racket['center], or @racket['bottom]. } diff --git a/collects/scribblings/gui/area-intf.scrbl b/collects/scribblings/gui/area-intf.scrbl index a52055fd..d06de46a 100644 --- a/collects/scribblings/gui/area-intf.scrbl +++ b/collects/scribblings/gui/area-intf.scrbl @@ -3,22 +3,22 @@ @definterface/title[area<%> ()]{ -An @scheme[area<%>] object is either a window or a windowless +An @racket[area<%>] object is either a window or a windowless container for managing the position and size of other areas. An - @scheme[area<%>] can be a container, a containee, or both. The only + @racket[area<%>] can be a container, a containee, or both. The only areas without a parent are top-level windows. -All @scheme[area<%>] classes accept the following named instantiation +All @racket[area<%>] classes accept the following named instantiation arguments: @itemize[ - @item{@indexed-scheme[min-width] --- default is the initial graphical minimum width; passed to + @item{@indexed-racket[min-width] --- default is the initial graphical minimum width; passed to @method[area<%> min-width]} - @item{@indexed-scheme[min-height] --- default is the initial graphical minimum height; passed to + @item{@indexed-racket[min-height] --- default is the initial graphical minimum height; passed to @method[area<%> min-height]} - @item{@indexed-scheme[stretchable-width] --- default is class-specific; passed to + @item{@indexed-racket[stretchable-width] --- default is class-specific; passed to @method[area<%> stretchable-width]} - @item{@indexed-scheme[stretchable-height] --- default is class-specific; passed to + @item{@indexed-racket[stretchable-height] --- default is class-specific; passed to @method[area<%> stretchable-height]} ] @@ -42,7 +42,7 @@ See @|geomdiscuss| for more information. Note that the return value (or/c (is-a?/c area-container<%>) false/c)]{ Returns the area's parent. A top-level window may have no parent (in - which case @scheme[#f] is returned), or it may have another top-level + which case @racket[#f] is returned), or it may have another top-level window as its parent. } @@ -72,7 +72,7 @@ An area's initial minimum width is its graphical minimum width. See also @method[area<%> get-graphical-min-size] . -When setting the minimum width, if @scheme[w] is smaller than the +When setting the minimum width, if @racket[w] is smaller than the internal hard minimum, @|MismatchExn|. } @@ -93,7 +93,7 @@ An area's initial minimum height is its graphical minimum height. See also @method[area<%> get-graphical-min-size] . -When setting the minimum height (in pixels); if @scheme[h] is smaller +When setting the minimum height (in pixels); if @racket[h] is smaller than the internal hard minimum, @|MismatchExn|. } diff --git a/collects/scribblings/gui/blurbs.rkt b/collects/scribblings/gui/blurbs.rkt index eb97d645..93674098 100644 --- a/collects/scribblings/gui/blurbs.rkt +++ b/collects/scribblings/gui/blurbs.rkt @@ -35,8 +35,8 @@ @method[top-level-window<%> on-traverse-char]).}) (define (labelstripped where detail what) - @elem{If @litchar{&} occurs in @|where|@|detail|, it - is specially parsed as for @scheme[button%].}) + @elem{If @litchar{&} occurs in @|where|@|detail|, it + is specially parsed as for @racket[button%].}) (define (bitmapuseinfo pre what thing and the) @elem{@|pre| @|what| is @|thing|,@|and| if @|the| @@ -62,7 +62,7 @@ (define (popupmenuinfo what other more) (make-splice (list* - @p{Pops up the given @scheme[popup-menu%] object at the specified + @p{Pops up the given @racket[popup-menu%] object at the specified coordinates (in this window's coordinates), and returns after handling an unspecified number of events; the menu may still be popped up when this method returns. If a menu item is selected from @@ -105,7 +105,7 @@ information@|details|, even if the editor currently has delayed refreshing (see (define FCA (FCAX "C" "")) (define FCAMW (FCAX "C" " if a maximum width is set for the editor")) - (define (FCAME) (FCAX @elem{For @scheme[text%] objects, c} " if a maximum width is set for the editor")) + (define (FCAME) (FCAX @elem{For @racket[text%] objects, c} " if a maximum width is set for the editor")) (define EVD @elem{If the editor is not displayed and the editor has a @@ -158,20 +158,20 @@ information@|details|, even if the editor currently has delayed refreshing (see (define DrawSizeNote "") - (define LineNumbering @elem{Lines are numbered starting with @scheme[0].}) - (define ParagraphNumbering @elem{Paragraphs are numbered starting with @scheme[0].}) + (define LineNumbering @elem{Lines are numbered starting with @racket[0].}) + (define ParagraphNumbering @elem{Paragraphs are numbered starting with @racket[0].}) (define (italicptyStyleNote style) @elem{The @|style| argument is provided for future extensions. Currently, @|style| must be the empty list.}) (define (HVLabelNote style what) - @elem{If @|style| includes @scheme['vertical-label], then the @|what| is + @elem{If @|style| includes @racket['vertical-label], then the @|what| is created with a label above the control; if @|style| does not include - @scheme['vertical-label] (and optionally includes @scheme['horizontal-label]), then the + @racket['vertical-label] (and optionally includes @racket['horizontal-label]), then the label is created to the left of the @|what|.}) (define (DeletedStyleNote style parent what) - @elem{If @|style| includes @scheme['deleted], then the @|what| is created as hidden, + @elem{If @|style| includes @racket['deleted], then the @|what| is created as hidden, and it does not affect its parent's geometry; the @|what| can be made active later by calling @|parent|'s @method[area-container<%> add-child] method.}) @@ -183,18 +183,18 @@ information@|details|, even if the editor currently has delayed refreshing (see (define (FontLabelKWs font label-font) @elem{The @|font| argument determines the font for the control content, and @|label-font| determines the font for the control label.}) - (define (WindowKWs enabled) @elem{For information about the @|enabled| argument, see @scheme[window<%>].}) + (define (WindowKWs enabled) @elem{For information about the @|enabled| argument, see @racket[window<%>].}) (define-inline (SubareaKWs) - @elem{For information about the @scheme[horiz-margin] and @scheme[vert-margin] - arguments, see @scheme[subarea<%>].}) + @elem{For information about the @racket[horiz-margin] and @racket[vert-margin] + arguments, see @racket[subarea<%>].}) (define-inline (AreaContKWs) - @elem{For information about the @scheme[border], @scheme[spacing], and @scheme[alignment] - arguments, see @scheme[area-container<%>].}) + @elem{For information about the @racket[border], @racket[spacing], and @racket[alignment] + arguments, see @racket[area-container<%>].}) (define-inline (AreaKWs) @elem{For information about the - @scheme[min-width], @scheme[min-height], @scheme[stretchable-width], and - @scheme[stretchable-height] arguments, see @scheme[area<%>].}) + @racket[min-width], @racket[min-height], @racket[stretchable-width], and + @racket[stretchable-height] arguments, see @racket[area<%>].}) (define AFM @elem{Adobe Font Metrics}) @@ -246,7 +246,7 @@ information@|details|, even if the editor currently has delayed refreshing (see (bytes->string/latin-1 name)))) (define (edsnipsize a b c) - @elem{An @scheme[editor-snip%] normally stretches to wrap around the size + @elem{An @racket[editor-snip%] normally stretches to wrap around the size of the editor it contains. This method @|a| of the snip (and if the editor is @|b|, @|c|).}) (define (edsnipmax n) diff --git a/collects/scribblings/gui/button-class.scrbl b/collects/scribblings/gui/button-class.scrbl index 099f07d2..25369ef6 100644 --- a/collects/scribblings/gui/button-class.scrbl +++ b/collects/scribblings/gui/button-class.scrbl @@ -31,7 +31,7 @@ Creates a button with a string label, bitmap label, or both. symbol @racket['left], @racket['top], @racket['right], or @racket['bottom] specifies the location of the image relative to the text on the button. -If @litchar{&} occurs in @scheme[label] (when @scheme[label] includes a +If @litchar{&} occurs in @racket[label] (when @racket[label] includes a string), it is specially parsed; on Windows and Unix, the character following @litchar{&} is underlined in the displayed control to indicate a keyboard mnemonic. (On Mac OS X, mnemonic underlines are @@ -41,8 +41,8 @@ mnemonic when the control's top-level-window contains the keyboard focus. The user must also hold down the Meta or Alt key if the keyboard focus is currently in a control that handles normal alphanumeric input. The @litchar{&} itself is removed from -@scheme[label] before it is displayed for the control; a @litchar{&&} -in @scheme[label] is converted to @litchar{&} (with no mnemonic +@racket[label] before it is displayed for the control; a @litchar{&&} +in @racket[label] is converted to @litchar{&} (with no mnemonic underlining). On Mac OS X, a parenthesized mnemonic character is removed (along with any surrounding space) before the label is displayed, since a parenthesized mnemonic is often used for non-Roman @@ -51,15 +51,15 @@ platforms. Mnemonic keyboard events are handled by @method[top-level-window<%> on-traverse-char] (but not on Mac OS X). -The @scheme[callback] procedure is called (with the event type -@indexed-scheme['button]) whenever the user clicks the button. +The @racket[callback] procedure is called (with the event type +@indexed-racket['button]) whenever the user clicks the button. -If @scheme[style] includes @scheme['border], the button is drawn with +If @racket[style] includes @racket['border], the button is drawn with a special border that indicates to the user that it is the default action button (see @method[top-level-window<%> -on-traverse-char]). @DeletedStyleNote[@scheme[style] @scheme[parent]]{button} +on-traverse-char]). @DeletedStyleNote[@racket[style] @racket[parent]]{button} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]} +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[]} @defmethod[#:mode override @@ -67,7 +67,7 @@ on-traverse-char]). @DeletedStyleNote[@scheme[style] @scheme[parent]]{button} (is-a?/c bitmap%))]) void?]{ -The same as @xmethod[window<%> set-label] when @scheme[label] is a +The same as @xmethod[window<%> set-label] when @racket[label] is a string. Otherwise, sets the bitmap label for a bitmap button. @bitmaplabeluseisbm[label] diff --git a/collects/scribblings/gui/canvas-class.scrbl b/collects/scribblings/gui/canvas-class.scrbl index a9e04451..bfca4ca6 100644 --- a/collects/scribblings/gui/canvas-class.scrbl +++ b/collects/scribblings/gui/canvas-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[canvas% object% (canvas<%>)]{ -A @scheme[canvas%] object is a general-purpose window for drawing and +A @racket[canvas%] object is a general-purpose window for drawing and handling events. See @racket[canvas<%>] for information about drawing onto a canvas. @@ -25,77 +25,77 @@ A @scheme[canvas%] object is a general-purpose window for drawing and [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -The @scheme[style] argument indicates one or more of the following styles: +The @racket[style] argument indicates one or more of the following styles: @itemize[ - @item{@scheme['border] --- gives the canvas a thin border} + @item{@racket['border] --- gives the canvas a thin border} - @item{@scheme['control-border] --- gives the canvas a border that is - like a @scheme[text-field%] control} + @item{@racket['control-border] --- gives the canvas a border that is + like a @racket[text-field%] control} - @item{@scheme['combo] --- gives the canvas a combo button that is like - a @scheme[combo-field%] control; this style is intended for use - with @scheme['control-border] and not with @scheme['hscroll] or - @scheme['vscroll]} + @item{@racket['combo] --- gives the canvas a combo button that is like + a @racket[combo-field%] control; this style is intended for use + with @racket['control-border] and not with @racket['hscroll] or + @racket['vscroll]} - @item{@scheme['hscroll] --- enables horizontal scrolling (initially visible but inactive)} + @item{@racket['hscroll] --- enables horizontal scrolling (initially visible but inactive)} - @item{@scheme['vscroll] --- enables vertical scrolling (initially visible but inactive)} + @item{@racket['vscroll] --- enables vertical scrolling (initially visible but inactive)} - @item{@scheme['resize-corner] --- leaves room for a resize control at the canvas's + @item{@racket['resize-corner] --- leaves room for a resize control at the canvas's bottom right when only one scrollbar is visible} - @item{@scheme['gl] --- creates a canvas for OpenGL drawing instead of + @item{@racket['gl] --- creates a canvas for OpenGL drawing instead of normal @racket[dc<%>] drawing; call the @method[dc<%> get-gl-context] method on the result of @method[canvas<%> get-dc]; this style is usually combined with @racket['no-autoclear]} - @item{@scheme['no-autoclear] --- prevents automatic erasing of the + @item{@racket['no-autoclear] --- prevents automatic erasing of the canvas by the windowing system; see @racket[canvas<%>] for information on canvas refresh} - @item{@scheme['transparent] --- the canvas is ``erased'' by the + @item{@racket['transparent] --- the canvas is ``erased'' by the windowing system by letting its parent show through; see @racket[canvas<%>] for information on window refresh and on the interaction of @racket['transparent] and offscreen buffering; the result is undefined if this flag is combined with - @scheme['no-autoclear]} + @racket['no-autoclear]} - @item{@scheme['no-focus] --- prevents the canvas from accepting the + @item{@racket['no-focus] --- prevents the canvas from accepting the keyboard focus when the canvas is clicked, or when the @method[window<%> focus] method is called} - @item{@scheme['deleted] --- creates the canvas as initially hidden and without affecting - @scheme[parent]'s geometry; the canvas can be made active - later by calling @scheme[parent]'s @method[area-container<%> add-child] + @item{@racket['deleted] --- creates the canvas as initially hidden and without affecting + @racket[parent]'s geometry; the canvas can be made active + later by calling @racket[parent]'s @method[area-container<%> add-child] method} ] -The @scheme['hscroll] and @scheme['vscroll] styles create a +The @racket['hscroll] and @racket['vscroll] styles create a canvas with an initially inactive scrollbar. The scrollbars are activated with either @method[canvas% init-manual-scrollbars] or @method[canvas% init-auto-scrollbars], and they can be hidden and re-shown with @method[canvas% show-scrollbars]. -The @scheme[paint-callback] argument is called by the default +The @racket[paint-callback] argument is called by the default @method[canvas% on-paint] method, using the canvas and the DC returned by @method[canvas<%> get-dc] as the argument. -The @scheme[label] argument names the canvas for +The @racket[label] argument names the canvas for @method[window<%> get-label], but it is not displayed with the canvas. -The @scheme[gl-config] argument determines properties of an OpenGL +The @racket[gl-config] argument determines properties of an OpenGL context for this canvas, as obtained through the canvas's drawing context. See also @method[canvas<%> get-dc] and @xmethod[dc<%> get-gl-context]. -@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -104,10 +104,10 @@ The @scheme[gl-config] argument determines properties of an OpenGL (integer-in 1 1000000)]{ Get the current page step size of a manual scrollbar. The result is - @scheme[0] if the scrollbar is not active or it is automatic. + @racket[0] if the scrollbar is not active or it is automatic. -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating whether to get the page step size of +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating whether to get the page step size of the horizontal or vertical scrollbar, respectively. See also @@ -119,10 +119,10 @@ See also (integer-in 0 1000000)]{ Gets the current value of a manual scrollbar. The result is always - @scheme[0] if the scrollbar is not active or it is automatic. + @racket[0] if the scrollbar is not active or it is automatic. -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating that the value of the horizontal or +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating that the value of the horizontal or vertical scrollbar should be returned, respectively. See also @@ -134,10 +134,10 @@ See also (integer-in 0 1000000)]{ Gets the current maximum value of a manual scrollbar. The result is - always @scheme[0] if the scrollbar is not active or it is automatic. + always @racket[0] if the scrollbar is not active or it is automatic. -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating whether to get the maximum value of the +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating whether to get the maximum value of the horizontal or vertical scrollbar, respectively. See also @@ -157,7 +157,7 @@ efficiently redraw only the visible portion of the canvas. The values are in pixels. If the scrollbars are disabled or initialized as manual (see -@method[canvas% init-manual-scrollbars]), the result is @scheme[(values 0 0)]. +@method[canvas% init-manual-scrollbars]), the result is @racket[(values 0 0)]. } @@ -181,8 +181,8 @@ Gets the size in device units of the scrollable canvas area (as Enables and initializes automatic scrollbars for the canvas. A horizontal or vertical scrollbar can be activated only in a canvas - that was created with the @indexed-scheme['hscroll] or - @indexed-scheme['vscroll] style flag, respectively. + that was created with the @indexed-racket['hscroll] or + @indexed-racket['vscroll] style flag, respectively. With automatic scrollbars, the programmer specifies the desired virtual size of the canvas, and the scrollbars are automatically @@ -196,15 +196,15 @@ See also are independently enabled. Automatic scrollbars can be re-initialized as manual, and vice versa. -If either @scheme[horiz-pixels] or @scheme[vert-pixels] is - @scheme[#f], the scrollbar is not enabled in the corresponding +If either @racket[horiz-pixels] or @racket[vert-pixels] is + @racket[#f], the scrollbar is not enabled in the corresponding direction, and the canvas's virtual size in that direction is the same as its client size. -The @scheme[h-value] and @scheme[v-value] arguments specify the initial +The @racket[h-value] and @racket[v-value] arguments specify the initial values of the scrollbars as a fraction of the scrollbar's range. A - @scheme[0.0] value initializes the scrollbar to its left/top, while a - @scheme[1.0] value initializes the scrollbar to its right/bottom. + @racket[0.0] value initializes the scrollbar to its left/top, while a + @racket[1.0] value initializes the scrollbar to its right/bottom. See also @method[canvas% on-scroll] and @@ -222,8 +222,8 @@ See also Enables and initializes manual scrollbars for the canvas. A horizontal or vertical scrollbar can be activated only in a canvas - that was created with the @indexed-scheme['hscroll] or - @indexed-scheme['vscroll] style flag, respectively. + that was created with the @indexed-racket['hscroll] or + @indexed-racket['vscroll] style flag, respectively. With manual scrollbars, the programmer is responsible for managing all details of the scrollbars, and the scrollbar state has no effect on @@ -236,20 +236,20 @@ See also are independently enabled. Automatic scrollbars can be re-initialized as manual, and vice versa. -The @scheme[h-length] and @scheme[v-length] arguments specify the length of +The @racket[h-length] and @racket[v-length] arguments specify the length of each scrollbar in scroll steps (i.e., the maximum value of each - scrollbar). If either is @scheme[#f], the scrollbar is disabled in the + scrollbar). If either is @racket[#f], the scrollbar is disabled in the corresponding direction. -The @scheme[h-page] and @scheme[v-page] arguments set the number of +The @racket[h-page] and @racket[v-page] arguments set the number of scrollbar steps in a page, i.e., the amount moved when pressing above or below the value indicator in the scrollbar control. -The @scheme[h-value] and @scheme[v-value] arguments specify the initial +The @racket[h-value] and @racket[v-value] arguments specify the initial values of the scrollbars. -If @scheme[h-value] is greater than @scheme[h-length] or @scheme[v-value] is - greater than @scheme[v-length], @|MismatchExn|. (The page step may be +If @racket[h-value] is greater than @racket[h-length] or @racket[v-value] is + greater than @racket[v-length], @|MismatchExn|. (The page step may be larger than the total size of a scrollbar.) See also @@ -270,16 +270,15 @@ canvas. See also @racket[make-screen-bitmap].} (on-paint) void?]{ -Calls the procedure supplied as the @scheme[paint-callback] argument when - the @scheme[canvas%] was created. - +Calls the procedure supplied as the @racket[paint-callback] argument when + the @racket[canvas%] was created. } @defmethod[(on-scroll [event (is-a?/c scroll-event%)]) void?]{ Called when the user changes one of the canvas's scrollbars. A - @scheme[scroll-event%] argument provides information about the + @racket[scroll-event%] argument provides information about the scroll action. This method is called only when manual @@ -313,16 +312,16 @@ flushing is enabled, and if @racket[flush?] is true, then Sets the values of automatic scrollbars. (This method has no effect on manual scrollbars.) -If either argument is @scheme[#f], the scrollbar value is not changed in +If either argument is @racket[#f], the scrollbar value is not changed in the corresponding direction. -The @scheme[h-value] and @scheme[v-value] arguments each specify a fraction - of the scrollbar's movement. A @scheme[0.0] value sets the scrollbar to - its left/top, while a @scheme[1.0] value sets the scrollbar to its - right/bottom. A @scheme[0.5] value sets the scrollbar to its middle. In - general, if the canvas's virtual size is @scheme[_v], its client size is - @scheme[_c], and @scheme[(> _v _c)], then scrolling to @scheme[_p] - sets the view start to @scheme[(floor (* _p (- _v _c)))]. +The @racket[h-value] and @racket[v-value] arguments each specify a fraction + of the scrollbar's movement. A @racket[0.0] value sets the scrollbar to + its left/top, while a @racket[1.0] value sets the scrollbar to its + right/bottom. A @racket[0.5] value sets the scrollbar to its middle. In + general, if the canvas's virtual size is @racket[_v], its client size is + @racket[_c], and @racket[(> _v _c)], then scrolling to @racket[_p] + sets the view start to @racket[(floor (* _p (- _v _c)))]. See also @method[canvas% init-auto-scrollbars] and @@ -338,8 +337,8 @@ See also Set the current page step size of a manual scrollbar. (This method has no effect on automatic scrollbars.) -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating whether to set the page step size of +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating whether to set the page step size of the horizontal or vertical scrollbar, respectively. See also @@ -355,8 +354,8 @@ See also Sets the current value of a manual scrollbar. (This method has no effect on automatic scrollbars.) -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating whether to set the value of the +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating whether to set the value of the horizontal or vertical scrollbar set, respectively. @MonitorMethod[@elem{The value of the canvas's scrollbar} @elem{the user scrolling} @elem{@method[canvas% on-scroll]} @elem{scrollbar value}] @@ -375,8 +374,8 @@ See also Sets the current maximum value of a manual scrollbar. (This method has no effect on automatic scrollbars.) -The @scheme[which] argument is either @scheme['horizontal] or - @scheme['vertical], indicating whether to set the maximum value of the +The @racket[which] argument is either @racket['horizontal] or + @racket['vertical], indicating whether to set the maximum value of the horizontal or vertical scrollbar, respectively. See also @@ -389,17 +388,17 @@ See also void?]{ Shows or hides the scrollbars as indicated by -@scheme[show-horiz?] and @scheme[show-vert?]. If -@scheme[show-horiz?] is true and the canvas was not created with -the @scheme['hscroll] style, @|MismatchExn|. Similarly, if -@scheme[show-vert?] is true and the canvas was not created with -the @scheme['vscroll] style, @|MismatchExn|. +@racket[show-horiz?] and @racket[show-vert?]. If +@racket[show-horiz?] is true and the canvas was not created with +the @racket['hscroll] style, @|MismatchExn|. Similarly, if +@racket[show-vert?] is true and the canvas was not created with +the @racket['vscroll] style, @|MismatchExn|. The horizontal scrollbar can be shown only if the canvas was -created with the @scheme['hscroll] style, and the vertical +created with the @racket['hscroll] style, and the vertical scrollbar can be shown only if the canvas was created with the -@scheme['vscroll] style. See also @method[canvas% +@racket['vscroll] style. See also @method[canvas% init-auto-scrollbars] and @method[canvas% init-manual-scrollbars]. diff --git a/collects/scribblings/gui/canvas-intf.scrbl b/collects/scribblings/gui/canvas-intf.scrbl index 36124fda..fdd326f8 100644 --- a/collects/scribblings/gui/canvas-intf.scrbl +++ b/collects/scribblings/gui/canvas-intf.scrbl @@ -6,14 +6,14 @@ A canvas is a subwindow onto which graphics and text can be drawn. Canvases also receive mouse and keyboard events. -The @scheme[canvas<%>] interface is implemented by two classes: +The @racket[canvas<%>] interface is implemented by two classes: @itemize[ - @item{@scheme[canvas%] --- a canvas for arbitrary drawing and + @item{@racket[canvas%] --- a canvas for arbitrary drawing and event handling; and} - @item{@scheme[editor-canvas%] --- a canvas for displaying - @scheme[editor<%>] objects.} + @item{@racket[editor-canvas%] --- a canvas for displaying + @racket[editor<%>] objects.} ] @@ -92,19 +92,19 @@ recorded in the canvas's offscreen buffer, however. @index['("keyboard focus" "navigation")]{Gets} or sets whether tab-focus is enabled for the canvas (assuming that the canvas is -not created with the @scheme['no-focus] style for @scheme[canvas%]). When tab-focus is +not created with the @racket['no-focus] style for @racket[canvas%]). When tab-focus is enabled, the canvas can receive the keyboard focus when the user navigates among a frame or dialog's controls with the Tab and arrow keys. By default, tab-focus is disabled. -When tab-focus is enabled for a @scheme[canvas%] object, Tab, arrow, +When tab-focus is enabled for a @racket[canvas%] object, Tab, arrow, Enter, and Escape keyboard events are consumed by a frame's default @method[top-level-window<%> on-traverse-char] method. (In addition, a dialog's default method consumes Escape key events.) Otherwise, @method[top-level-window<%> on-traverse-char] allows the keyboard events to be propagated to the canvas. -For an @scheme[editor-canvas%] object, handling of Tab, arrow, Enter, +For an @racket[editor-canvas%] object, handling of Tab, arrow, Enter, and Escape keyboard events is determined by the @method[editor-canvas% allow-tab-exit] method. @@ -123,17 +123,17 @@ Returns the color currently used to ``erase'' the canvas content before @method[canvas<%> on-paint] is called. See also @method[canvas<%> set-canvas-background]. -The result is @scheme[#f] if the canvas was created with the - @indexed-scheme['transparent] style, otherwise it is always a - @scheme[color%] object. +The result is @racket[#f] if the canvas was created with the + @indexed-racket['transparent] style, otherwise it is always a + @racket[color%] object. } @defmethod[(get-dc) (is-a?/c dc<%>)]{ -Gets the canvas's device context. See -@scheme[dc<%>] for more information about drawing. +Gets the canvas's device context. See @racket[dc<%>] for more information about +drawing. } @@ -267,7 +267,7 @@ Sets the color used to ``erase'' the canvas content before low level, so that it is used even when a complete refresh of the canvas is delayed by other activity.) -If the canvas was created with the @indexed-scheme['transparent] style, +If the canvas was created with the @indexed-racket['transparent] style, @|MismatchExn|. } @@ -280,7 +280,7 @@ On Mac OS X, enables or disables space for a resize tab at the method has no effect on Windows or Unix, and it has no effect when both or no scrollbars are visible. The resize corner is disabled by default, but it can be enabled when a canvas is created with the - @scheme['resize-corner] style. + @racket['resize-corner] style. } diff --git a/collects/scribblings/gui/check-box-class.scrbl b/collects/scribblings/gui/check-box-class.scrbl index 1fa60f6b..51d2b47e 100644 --- a/collects/scribblings/gui/check-box-class.scrbl +++ b/collects/scribblings/gui/check-box-class.scrbl @@ -30,17 +30,17 @@ Whenever a check box is clicked by the user, the check box's value is Creates a check box with a string or bitmap label. @bitmaplabeluse[label] -@labelstripped[(scheme label) @elem{ (when @scheme[label] is a string)} @elem{effectively click the check box}] +@labelstripped[(scheme label) @elem{ (when @racket[label] is a string)} @elem{effectively click the check box}] -The @scheme[callback] procedure is called (with the event type - @indexed-scheme['check-box]) whenever the user clicks the check box. +The @racket[callback] procedure is called (with the event type + @indexed-racket['check-box]) whenever the user clicks the check box. -@DeletedStyleNote[@scheme[style] @scheme[parent]]{check box} +@DeletedStyleNote[@racket[style] @racket[parent]]{check box} -If @scheme[value] is true, it is passed to +If @racket[value] is true, it is passed to @method[check-box% set-value] so that the box is initially checked. -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] @@ -48,7 +48,7 @@ If @scheme[value] is true, it is passed to @defmethod[(get-value) boolean?]{ -Gets the state of the check box: @scheme[#t] if it is checked, @scheme[#f] +Gets the state of the check box: @racket[#t] if it is checked, @racket[#f] otherwise. } @@ -57,7 +57,7 @@ Gets the state of the check box: @scheme[#t] if it is checked, @scheme[#f] (set-label [label (or/c label-string? (is-a?/c bitmap%))]) void?]{ -The same as @xmethod[window<%> set-label] when @scheme[label] is a +The same as @xmethod[window<%> set-label] when @racket[label] is a string. Otherwise, sets the bitmap label for a bitmap check box. @@ -74,7 +74,7 @@ Sets the check box's state. (The control's callback procedure is @MonitorCallback[@elem{The check box's state} @elem{the user clicking the control} @elem{state}] -If @scheme[state] is @scheme[#f], the box is +If @racket[state] is @racket[#f], the box is unchecked, otherwise it is checked. }} diff --git a/collects/scribblings/gui/checkable-menu-item-class.scrbl b/collects/scribblings/gui/checkable-menu-item-class.scrbl index fa8b5300..c5c095a3 100644 --- a/collects/scribblings/gui/checkable-menu-item-class.scrbl +++ b/collects/scribblings/gui/checkable-menu-item-class.scrbl @@ -3,9 +3,9 @@ @defclass/title[checkable-menu-item% object% (selectable-menu-item<%>)]{ -A @scheme[checkable-menu-item%] is a string-labelled menu item that - maintains a check mark. Its parent must be a @scheme[menu%] or - @scheme[popup-menu%]. When the user selects the menu item, the +A @racket[checkable-menu-item%] is a string-labelled menu item that + maintains a check mark. Its parent must be a @racket[menu%] or + @racket[popup-menu%]. When the user selects the menu item, the item's check mark is toggled and its callback procedure is called. @@ -22,29 +22,29 @@ A @scheme[checkable-menu-item%] is a string-labelled menu item that 'shift 'option)) (get-default-shortcut-prefix)])]{ -Creates a new menu item in @scheme[parent]. The item is initially +Creates a new menu item in @racket[parent]. The item is initially shown, appended to the end of its parent, and unchecked. The - @scheme[callback] procedure is called (with the event type - @indexed-scheme['menu]) when the menu item is selected (either via a + @racket[callback] procedure is called (with the event type + @indexed-racket['menu]) when the menu item is selected (either via a menu bar, @xmethod[window<%> popup-menu], or @xmethod[editor-admin% popup-menu]). See @method[labelled-menu-item<%> set-label] for information about -mnemonic @litchar{&}s in @scheme[label]. +mnemonic @litchar{&}s in @racket[label]. -If @scheme[shortcut] is not @scheme[#f], the item has a shortcut. See +If @racket[shortcut] is not @racket[#f], the item has a shortcut. See @method[selectable-menu-item<%> get-shortcut] for more information. -The @scheme[shortcut-prefix] argument determines the set of modifier +The @racket[shortcut-prefix] argument determines the set of modifier keys for the shortcut; see @method[selectable-menu-item<%> get-shortcut-prefix]. -If @scheme[help] is not @scheme[#f], the item has a help string. See +If @racket[help] is not @racket[#f], the item has a help string. See @method[labelled-menu-item<%> get-help-string] for more information. -The @scheme[demand-callback] procedure is called by the default +The @racket[demand-callback] procedure is called by the default @method[labelled-menu-item<%> on-demand] method with the object itself. -By default, the menu item is initially unchecked. If @scheme[checked] +By default, the menu item is initially unchecked. If @racket[checked] is true, then @method[checkable-menu-item% check] is called so that the menu item is initially checked. @@ -62,7 +62,7 @@ Checks or unchecks the menu item. @defmethod[(is-checked?) boolean?]{ -Returns @scheme[#t] if the item is checked, @scheme[#f] otherwise. +Returns @racket[#t] if the item is checked, @racket[#f] otherwise. }} diff --git a/collects/scribblings/gui/choice-class.scrbl b/collects/scribblings/gui/choice-class.scrbl index 9b2a2115..7724c2d9 100644 --- a/collects/scribblings/gui/choice-class.scrbl +++ b/collects/scribblings/gui/choice-class.scrbl @@ -12,8 +12,7 @@ Whenever the selection of a choice item is changed by the user, the provided as an initialization argument when each choice item is created. -See also -@scheme[list-box%]. +See also @racket[list-box%]. @defconstructor[([label (or/c label-string? false/c)] @@ -35,29 +34,30 @@ See also [stretchable-width any/c #f] [stretchable-height any/c #f])]{ -Creates a choice item. If @scheme[label] is a string, it is used as the - label for the choice item. +Creates a choice item. If @racket[label] is a string, it is used as the + label for the choice item. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the choice item}] -The @scheme[choices] list specifies the initial list of user-selectable +The @racket[choices] list specifies the initial list of user-selectable items for the control. The initial set of choices determines the control's minimum graphical width (see @|geomdiscuss| for more information). -The @scheme[callback] procedure is called (with the event type - @indexed-scheme['choice]) when the user selects a choice item (or +The @racket[callback] procedure is called (with the event type + @indexed-racket['choice]) when the user selects a choice item (or re-selects the currently selected item). -@HVLabelNote[@scheme[style]]{choice item} @DeletedStyleNote[@scheme[style] @scheme[parent]]{choice item} +@HVLabelNote[@racket[style]]{choice item} +@DeletedStyleNote[@racket[style] @racket[parent]]{choice item} By default, the first choice (if any) is initially selected. If - @scheme[selection] is positive, it is passed to -@method[list-control<%> set-selection] to set the initial choice selection. Although @scheme[selection] normally - must be less than the length of @scheme[choices], it can be @scheme[0] - when @scheme[choices] is empty. + @racket[selection] is positive, it is passed to +@method[list-control<%> set-selection] to set the initial choice selection. Although @racket[selection] normally + must be less than the length of @racket[choices], it can be @racket[0] + when @racket[choices] is empty. -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] }} diff --git a/collects/scribblings/gui/clipboard-client-class.scrbl b/collects/scribblings/gui/clipboard-client-class.scrbl index 9cabd9d7..2a6c438f 100644 --- a/collects/scribblings/gui/clipboard-client-class.scrbl +++ b/collects/scribblings/gui/clipboard-client-class.scrbl @@ -3,11 +3,11 @@ @defclass/title[clipboard-client% object% ()]{ -A @scheme[clipboard-client%] object allows a program to take over +A @racket[clipboard-client%] object allows a program to take over the clipboard and service requests for clipboard data. See - @scheme[clipboard<%>] for more information. + @racket[clipboard<%>] for more information. -A @scheme[clipboard-client%] object is associated to an eventspace +A @racket[clipboard-client%] object is associated to an eventspace when it becomes the current client; see @method[clipboard<%> set-clipboard-client] for more information. @@ -24,9 +24,9 @@ Creates a clipboard client that supports no data formats. Adds a new data format name to the list supported by the clipboard client. -The @scheme[format] string is typically four capital letters. (On - Mac OS X, only four characters for @scheme[format] are ever used.) - For example, @scheme["TEXT"] is the name of the UTF-8-encoded string +The @racket[format] string is typically four capital letters. (On + Mac OS X, only four characters for @racket[format] are ever used.) + For example, @racket["TEXT"] is the name of the UTF-8-encoded string format. New format names can be used to communicate application- and platform-specific data formats. @@ -38,7 +38,7 @@ The @scheme[format] string is typically four capital letters. (On Called when a process requests clipboard data while this client is the current one for the clipboard. The requested format is passed to the method, and the result should be a byte string matching the requested - format, or @scheme[#f] if the request cannot be fulfilled. + format, or @racket[#f] if the request cannot be fulfilled. Only data format names in the client's list will be passed to this method; see @method[clipboard-client% add-type]. diff --git a/collects/scribblings/gui/clipboard-intf.scrbl b/collects/scribblings/gui/clipboard-intf.scrbl index 01483df3..1155754f 100644 --- a/collects/scribblings/gui/clipboard-intf.scrbl +++ b/collects/scribblings/gui/clipboard-intf.scrbl @@ -3,23 +3,23 @@ @definterface/title[clipboard<%> ()]{ -A single @scheme[clipboard<%>] object, @indexed-scheme[the-clipboard], +A single @racket[clipboard<%>] object, @indexed-racket[the-clipboard], manages the content of the system-wide clipboard for cut and paste. -On Unix, a second @scheme[clipboard<%>] object, - @indexed-scheme[the-x-selection-clipboard], manages the content of the +On Unix, a second @racket[clipboard<%>] object, + @indexed-racket[the-x-selection-clipboard], manages the content of the system-wide X11 selection. If the @ResourceFirst{selectionAsClipboard} preference (see @|mrprefsdiscuss|) is set to a non-zero true value, - however, then @scheme[the-clipboard] is always the same as - @scheme[the-x-selection-clipboard], and the system-wide X11 clipboard + however, then @racket[the-clipboard] is always the same as + @racket[the-x-selection-clipboard], and the system-wide X11 clipboard is not used. -On Windows and Mac OS X, @scheme[the-x-selection-clipboard] is - always the same as @scheme[the-clipboard]. +On Windows and Mac OS X, @racket[the-x-selection-clipboard] is + always the same as @racket[the-clipboard]. Data can be entered into a clipboard in one of two ways: by setting the current clipboard string or byte string, or by installing a - @scheme[clipboard-client%] object. When a client is installed, + @racket[clipboard-client%] object. When a client is installed, requests for clipboard data are directed to the client. Generic data is always retrieved from the clipboard as a byte @@ -32,13 +32,13 @@ Generic data is always retrieved from the clipboard as a byte (or/c (is-a?/c bitmap%) false/c)]{ Gets the current clipboard contents as a bitmap (Windows, Mac OS X), - returning @scheme[#f] if the clipboard does not contain a bitmap. + returning @racket[#f] if the clipboard does not contain a bitmap. See @method[clipboard<%> get-clipboard-data] for information on eventspaces and the current clipboard client. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -48,19 +48,19 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If (or/c bytes? string? false/c)]{ Gets the current clipboard contents in a specific format, returning - @scheme[#f] if the clipboard does not contain data in the requested + @racket[#f] if the clipboard does not contain data in the requested format. If the clipboard client is associated to an eventspace that is not the current one, the data is retrieved through a callback event in the client's eventspace. If no result is available within one second, the - request is abandoned and @scheme[#f] is returned. + request is abandoned and @racket[#f] is returned. See @xmethod[clipboard-client% add-type] for information on -@scheme[format]. +@racket[format]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -69,13 +69,13 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If (or/c string false/c)]{ Gets the current clipboard contents as simple text, returning - @scheme[#f] if the clipboard does not contain any text. + @racket[#f] if the clipboard does not contain any text. See @method[clipboard<%> get-clipboard-data] for information on eventspaces and the current clipboard client. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -84,19 +84,19 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If @defmethod[(same-clipboard-client? [owner (is-a?/c clipboard-client%)]) boolean?]{ -Returns @scheme[#t] if @scheme[owner] currently owns the clipboard, -@scheme[#f] otherwise.} +Returns @racket[#t] if @racket[owner] currently owns the clipboard, +@racket[#f] otherwise.} @defmethod[(set-clipboard-bitmap [new-bitmap (is-a?/c bitmap%)] [time exact-integer?]) void?]{ -Changes the current clipboard contents to @scheme[new-bitmap] (Windows, Mac OS X) +Changes the current clipboard contents to @racket[new-bitmap] (Windows, Mac OS X) and releases the current clipboard client (if any). See @|timediscuss| for - a discussion of the @scheme[time] argument. If @scheme[time] is outside + a discussion of the @racket[time] argument. If @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -106,13 +106,13 @@ See @|timediscuss| for void?]{ Changes the clipboard-owning client: sets the client to - @scheme[new-owner] and associates @scheme[new-owner] with the current - eventspace (as determined by @scheme[current-eventspace]). The + @racket[new-owner] and associates @racket[new-owner] with the current + eventspace (as determined by @racket[current-eventspace]). The eventspace association is removed when the client is no longer the current one. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -121,11 +121,11 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If [time exact-integer?]) void?]{ -Changes the current clipboard contents to @scheme[new-text], +Changes the current clipboard contents to @racket[new-text], and releases the current clipboard client (if any). See @|timediscuss| for - a discussion of the @scheme[time] argument. If @scheme[time] is outside + a discussion of the @racket[time] argument. If @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } } diff --git a/collects/scribblings/gui/column-control-event-class.scrbl b/collects/scribblings/gui/column-control-event-class.scrbl index cbc26365..05124afb 100644 --- a/collects/scribblings/gui/column-control-event-class.scrbl +++ b/collects/scribblings/gui/column-control-event-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[column-control-event% control-event% ()]{ -A @scheme[column-control-event%] object contains information about a +A @racket[column-control-event%] object contains information about a event on an @racket[list-box%] column header. @defconstructor[([column exact-nonnegative-integer?] diff --git a/collects/scribblings/gui/combo-field-class.scrbl b/collects/scribblings/gui/combo-field-class.scrbl index 007c5215..7b974a4e 100644 --- a/collects/scribblings/gui/combo-field-class.scrbl +++ b/collects/scribblings/gui/combo-field-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[combo-field% text-field% ()]{ -A @scheme[combo-field%] object is a @scheme[text-field%] - object that also resembles a @scheme[choice%] object, because it +A @racket[combo-field%] object is a @racket[text-field%] + object that also resembles a @racket[choice%] object, because it has a small popup button to the right of the text field. Clicking the button pops up a menu, and selecting a menu item typically copies the item into the text field. @@ -31,32 +31,32 @@ A @scheme[combo-field%] object is a @scheme[text-field%] [stretchable-width any/c #t] [stretchable-height any/c #f])]{ -If @scheme[label] is not @scheme[#f], it is used as the combo label. +If @racket[label] is not @racket[#f], it is used as the combo label. Otherwise, the combo does not display its label. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the combo}] -The @scheme[choices] list specifies the initial list of items for the +The @racket[choices] list specifies the initial list of items for the combo's popup menu. The @method[combo-field% append] method adds a new item to the menu with a callback to install the appended item into the combo's text field. The @method[combo-field% get-menu] method returns a menu that can be changed to adjust the content and actions of the combo's menu. -The @scheme[callback] procedure is called when the user changes the text +The @racket[callback] procedure is called when the user changes the text in the combo or presses the Enter key (and Enter is not handled by the combo's frame or dialog; see @xmethod[top-level-window<%> on-traverse-char] ). If the user presses Enter, the type of event passed to the callback - is @indexed-scheme['text-field-enter], otherwise it is - @indexed-scheme['text-field]. + is @indexed-racket['text-field-enter], otherwise it is + @indexed-racket['text-field]. -If @scheme[init-value] is not @scheme[""], the minimum width of the text item - is made wide enough to show @scheme[init-value]. Otherwise, a built-in +If @racket[init-value] is not @racket[""], the minimum width of the text item + is made wide enough to show @racket[init-value]. Otherwise, a built-in default width is selected. -@HVLabelNote[@scheme[style]]{combo} @DeletedStyleNote[@scheme[style] @scheme[parent]]{combo}. +@HVLabelNote[@racket[style]]{combo} @DeletedStyleNote[@racket[style] @racket[parent]]{combo}. -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -74,7 +74,7 @@ Adds a new item to the combo's popup menu. The given label is used for @defmethod[(get-menu) (is-a?/c popup-menu%)]{ -Returns a @scheme[popup-menu%] that is effectively copied into the +Returns a @racket[popup-menu%] that is effectively copied into the combo's popup menu when the combo is clicked. Only the labels can callbacks of the menu's items are used; the enable state, submenus, or separators are ignored. diff --git a/collects/scribblings/gui/control-event-class.scrbl b/collects/scribblings/gui/control-event-class.scrbl index fd377191..5394c810 100644 --- a/collects/scribblings/gui/control-event-class.scrbl +++ b/collects/scribblings/gui/control-event-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[control-event% event% ()]{ -A @scheme[control-event%] object contains information about a - control event. An instance of @scheme[control-event%] is always +A @racket[control-event%] object contains information about a + control event. An instance of @racket[control-event%] is always provided to a control or menu item callback procedure. @defconstructor[([event-type (one-of/c 'button 'check-box 'choice @@ -14,31 +14,31 @@ A @scheme[control-event%] object contains information about a 'menu-popdown 'menu-popdown-none)] [time-stamp exact-integer? 0])]{ -The @scheme[event-type] argument is one of the following: +The @racket[event-type] argument is one of the following: @itemize[ -@item{@scheme['button] --- for @scheme[button%] clicks} -@item{@scheme['check-box] --- for @scheme[check-box%] toggles} -@item{@scheme['choice] --- for @scheme[choice%] item selections} -@item{@scheme['list-box] --- for @scheme[list-box%] selections and deselections} -@item{@scheme['list-box-dclick] --- for @scheme[list-box%] double-clicks} -@item{@scheme['list-box-column] --- for @scheme[list-box%] column clicks in +@item{@racket['button] --- for @racket[button%] clicks} +@item{@racket['check-box] --- for @racket[check-box%] toggles} +@item{@racket['choice] --- for @racket[choice%] item selections} +@item{@racket['list-box] --- for @racket[list-box%] selections and deselections} +@item{@racket['list-box-dclick] --- for @racket[list-box%] double-clicks} +@item{@racket['list-box-column] --- for @racket[list-box%] column clicks in a @racket[column-control-event%] instance} -@item{@scheme['text-field] --- for @scheme[text-field%] changes} -@item{@scheme['text-field-enter] --- for single-line @scheme[text-field%] Enter event} -@item{@scheme['menu] --- for @scheme[selectable-menu-item<%>] callbacks} -@item{@scheme['slider] --- for @scheme[slider%] changes} -@item{@scheme['radio-box] --- for @scheme[radio-box%] selection changes} -@item{@scheme['tab-panel] --- for @scheme[tab-panel%] tab changes} -@item{@scheme['menu-popdown] --- for @scheme[popup-menu%] callbacks (item selected)} -@item{@scheme['menu-popdown-none] --- for @scheme[popup-menu%] callbacks (no item selected)} +@item{@racket['text-field] --- for @racket[text-field%] changes} +@item{@racket['text-field-enter] --- for single-line @racket[text-field%] Enter event} +@item{@racket['menu] --- for @racket[selectable-menu-item<%>] callbacks} +@item{@racket['slider] --- for @racket[slider%] changes} +@item{@racket['radio-box] --- for @racket[radio-box%] selection changes} +@item{@racket['tab-panel] --- for @racket[tab-panel%] tab changes} +@item{@racket['menu-popdown] --- for @racket[popup-menu%] callbacks (item selected)} +@item{@racket['menu-popdown-none] --- for @racket[popup-menu%] callbacks (no item selected)} ] -This value is extracted out of a @scheme[control-event%] object with +This value is extracted out of a @racket[control-event%] object with the @method[control-event% get-event-type] method. See @method[event% get-time-stamp] for information about -@scheme[time-stamp]. +@racket[time-stamp]. } @@ -48,7 +48,7 @@ See @method[event% get-time-stamp] for information about '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. +@racket[control-event%] for information about each event type symbol. } @@ -60,6 +60,6 @@ Returns the type of the control event. See void?]{ Sets the type of the event. See -@scheme[control-event%] for information about each event type symbol. +@racket[control-event%] for information about each event type symbol. }} diff --git a/collects/scribblings/gui/control-intf.scrbl b/collects/scribblings/gui/control-intf.scrbl index d270343d..a45e4827 100644 --- a/collects/scribblings/gui/control-intf.scrbl +++ b/collects/scribblings/gui/control-intf.scrbl @@ -3,18 +3,18 @@ @definterface/title[control<%> (subwindow<%>)]{ -The @scheme[control<%>] interface is implemented by the built-in +The @racket[control<%>] interface is implemented by the built-in control window classes: @itemize[ -@item{@scheme[message%]} -@item{@scheme[button%]} -@item{@scheme[check-box%]} -@item{@scheme[slider%]} -@item{@scheme[gauge%]} -@item{@scheme[text-field%]} -@item{@scheme[radio-box%]} -@item{@scheme[choice%]} -@item{@scheme[list-box%]} +@item{@racket[message%]} +@item{@racket[button%]} +@item{@racket[check-box%]} +@item{@racket[slider%]} +@item{@racket[gauge%]} +@item{@racket[text-field%]} +@item{@racket[radio-box%]} +@item{@racket[choice%]} +@item{@racket[list-box%]} ] @@ -23,7 +23,7 @@ The @scheme[control<%>] interface is implemented by the built-in void?]{ Calls the control's callback function, passing on the given - @scheme[control-event%] object. + @racket[control-event%] object. }} diff --git a/collects/scribblings/gui/cursor-class.scrbl b/collects/scribblings/gui/cursor-class.scrbl index 9a86e296..70785e12 100644 --- a/collects/scribblings/gui/cursor-class.scrbl +++ b/collects/scribblings/gui/cursor-class.scrbl @@ -23,7 +23,7 @@ A cursor is assigned to each window (or the window may use its The first case creates a cursor using an image bitmap and a mask bitmap. Both bitmaps must have depth 1 and size 16 by 16 -pixels. The @scheme[hot-spot-x] and @scheme[hot-spot-y] arguments +pixels. The @racket[hot-spot-x] and @racket[hot-spot-y] arguments determine the focus point of the cursor within the cursor image, relative to its top-left corner. @@ -32,38 +32,38 @@ as one of the following: @itemize[ - @item{@scheme['arrow] --- the default cursor} + @item{@racket['arrow] --- the default cursor} - @item{@scheme['bullseye] --- concentric circles} + @item{@racket['bullseye] --- concentric circles} - @item{@scheme['cross] --- a crosshair} + @item{@racket['cross] --- a crosshair} - @item{@scheme['hand] --- an open hand} + @item{@racket['hand] --- an open hand} - @item{@scheme['ibeam] --- a vertical line, indicating that clicks + @item{@racket['ibeam] --- a vertical line, indicating that clicks control a text-selection caret} - @item{@scheme['watch] --- a watch or hourglass, indicating that + @item{@racket['watch] --- a watch or hourglass, indicating that the user must wait for a computation to complete} - @item{@scheme['arrow+watch] --- the default cursor with a watch or + @item{@racket['arrow+watch] --- the default cursor with a watch or hourglass, indicating that some computation is in progress, but the cursor can still be used} - @item{@scheme['blank] --- invisible} + @item{@racket['blank] --- invisible} - @item{@scheme['size-e/w] --- arrows left and right} + @item{@racket['size-e/w] --- arrows left and right} - @item{@scheme['size-n/s] --- arrows up and down} + @item{@racket['size-n/s] --- arrows up and down} - @item{@scheme['size-ne/sw] --- arrows up-right and down-left} + @item{@racket['size-ne/sw] --- arrows up-right and down-left} - @item{@scheme['size-nw/se] --- arrows up-left and down-right} + @item{@racket['size-nw/se] --- arrows up-left and down-right} ] If the cursor is created successfully, @method[cursor% ok?] -returns @scheme[#t], otherwise the cursor object cannot be +returns @racket[#t], otherwise the cursor object cannot be assigned to a window. } @@ -71,8 +71,8 @@ assigned to a window. @defmethod[(ok?) boolean?]{ -Returns @scheme[#t] if the cursor is can be assigned to a window, - @scheme[#f] otherwise. +Returns @racket[#t] if the cursor is can be assigned to a window, + @racket[#f] otherwise. }} diff --git a/collects/scribblings/gui/dialog-class.scrbl b/collects/scribblings/gui/dialog-class.scrbl index 3e15c7a2..cd6c362b 100644 --- a/collects/scribblings/gui/dialog-class.scrbl +++ b/collects/scribblings/gui/dialog-class.scrbl @@ -27,47 +27,47 @@ A dialog is a top-level window that is @defterm{modal}: while the [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -The @scheme[label] string is used as the dialog's title in its +The @racket[label] string is used as the dialog's title in its title bar. If the dialog's label is changed (see @method[window<%> set-label]), the title bar is updated. -The @scheme[parent] argument can be @scheme[#f] or an existing - frame. On Windows, if @scheme[parent] is an existing frame, the +The @racket[parent] argument can be @racket[#f] or an existing + frame. On Windows, if @racket[parent] is an existing frame, the new dialog is always on top of its parent. On Windows and Unix, a dialog is iconized when its parent is iconized. -If @scheme[parent] is @scheme[#f], then the eventspace for the new +If @racket[parent] is @racket[#f], then the eventspace for the new dialog is the current eventspace, as determined by - @scheme[current-eventspace]. Otherwise, @scheme[parent]'s eventspace + @racket[current-eventspace]. Otherwise, @racket[parent]'s eventspace is the new dialog's eventspace. -If the @scheme[width] or @scheme[height] argument is not @scheme[#f], +If the @racket[width] or @racket[height] argument is not @racket[#f], it specifies an initial size for the dialog (in pixels) assuming that it is larger than the minimum size, otherwise the minimum size is used. On Windows and Mac OS X (and with some Unix window managers) dialogs are not resizeable. -If the @scheme[x] or @scheme[y] argument is not @scheme[#f], it +If the @racket[x] or @racket[y] argument is not @racket[#f], it specifies an initial location for the dialog. Otherwise, if no location is set before the dialog is shown, it is centered (with - respect @scheme[parent] if not @scheme[#f], the screen otherwise). + respect @racket[parent] if not @racket[#f], the screen otherwise). -The @scheme[style] flags adjust the appearance of the dialog on some +The @racket[style] flags adjust the appearance of the dialog on some platforms: @itemize[ - @item{@scheme['no-caption] --- omits the title bar for the dialog + @item{@racket['no-caption] --- omits the title bar for the dialog (Windows)} - @item{@scheme['resize-border] --- adds a resizeable border + @item{@racket['resize-border] --- adds a resizeable border around the window (Windows) or grow box in the bottom right corner (Mac OS X)} - @item{@scheme['no-sheet] --- uses a movable window for the dialog, + @item{@racket['no-sheet] --- uses a movable window for the dialog, even if a parent window is provided (Mac OS X)} - @item{@scheme['close-button] --- include a close button in the + @item{@racket['close-button] --- include a close button in the dialog's title bar, which would not normally be included (Mac OS X)} ] @@ -77,7 +77,7 @@ Even if the dialog is not shown, a few notification events may be resources (e.g., memory) cannot be reclaimed until some events are handled, or the dialog's eventspace is shut down. -@WindowKWs[@scheme[enabled]] @AreaContKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @AreaContKWs[] @AreaKWs[] } @defmethod[#:mode override @@ -87,7 +87,7 @@ Even if the dialog is not shown, a few notification events may be Returns the result of -@schemeblock[ +@racketblock[ (or (send this #,(:: top-level-window<%> on-system-menu-char) event) (send this #,(:: top-level-window<%> on-traverse-char) event)) ] @@ -98,16 +98,16 @@ Returns the result of (show [show? any/c]) void?]{ -If @scheme[show?] is true, the dialog is shown and all frames (and other +If @racket[show?] is true, the dialog is shown and all frames (and other dialogs) in the eventspace become disabled until the dialog is - closed. If @scheme[show?] is false, the dialog is hidden and other + closed. If @racket[show?] is false, the dialog is hidden and other frames and dialogs are re-enabled (unless a different, pre-existing dialog is still shown). -If @scheme[show?] is true, the method does not immediately return. Instead, - it loops with @scheme[yield] until the dialog is found to be hidden - between calls to @scheme[yield]. An internal semaphore is used with - @scheme[yield] to avoid a busy-wait, and to ensure that the @scheme[show] +If @racket[show?] is true, the method does not immediately return. Instead, + it loops with @racket[yield] until the dialog is found to be hidden + between calls to @racket[yield]. An internal semaphore is used with + @racket[yield] to avoid a busy-wait, and to ensure that the @racket[show] method returns as soon as possible after the dialog is hidden. } diff --git a/collects/scribblings/gui/dialog-funcs.scrbl b/collects/scribblings/gui/dialog-funcs.scrbl index 098efa1a..e3e761aa 100644 --- a/collects/scribblings/gui/dialog-funcs.scrbl +++ b/collects/scribblings/gui/dialog-funcs.scrbl @@ -19,42 +19,42 @@ These functions get input from the user and/or display (or/c path? #f)]{ Obtains a file pathname from the user via the platform-specific - standard (modal) dialog, using @scheme[parent] as the parent window if - it is specified, and using @scheme[message] as a message at the top of - the dialog if it is not @scheme[#f]. + standard (modal) dialog, using @racket[parent] as the parent window if + it is specified, and using @racket[message] as a message at the top of + the dialog if it is not @racket[#f]. -The result is @scheme[#f] if the user cancels the dialog, the selected +The result is @racket[#f] if the user cancels the dialog, the selected pathname otherwise. The returned pathname may or may not exist, although the style of the dialog is directed towards selecting existing files. -If @scheme[directory] is not @scheme[#f], it is used as the starting +If @racket[directory] is not @racket[#f], it is used as the starting directory for the file selector (otherwise the starting directory is chosen automatically in a platform-specific manner, usually based on the current directory and the user's interactions in previous calls - to @scheme[get-file], @scheme[put-file], etc.). If - @scheme[filename] is not @scheme[#f], it is used as the default filename + to @racket[get-file], @racket[put-file], etc.). If + @racket[filename] is not @racket[#f], it is used as the default filename when appropriate, and it should @italic{not} contain a directory path prefix. -Under Windows, if @scheme[extension] is not @scheme[#f], the returned path +Under Windows, if @racket[extension] is not @racket[#f], the returned path will use the extension if the user does not supply one; the - @scheme[extension] string should not contain a period. The extension is + @racket[extension] string should not contain a period. The extension is ignored on other platforms. -The @scheme[style] list can contain @scheme['common], a +The @racket[style] list can contain @racket['common], a platform-independent version of the dialog is used instead of a - native dialog. On Mac OS X, if the @scheme[style] list - contains @scheme['packages], a user is allowed to select a package + native dialog. On Mac OS X, if the @racket[style] list + contains @racket['packages], a user is allowed to select a package directory, which is a directory with a special suffix (e.g., ``.app'') that the Finder normally displays like a file. If the list - contains @scheme['enter-packages], a user is allowed to select a file + contains @racket['enter-packages], a user is allowed to select a file within a package directory. If the list contains both - @scheme['packages] and @scheme['enter-packages], the former is ignored. + @racket['packages] and @racket['enter-packages], the former is ignored. -On Windows and Unix, @scheme[filters] determines a set of filters from +On Windows and Unix, @racket[filters] determines a set of filters from which the user can choose in the dialog. Each element of the - @scheme[filters] list contains two strings: a description of the filter + @racket[filters] list contains two strings: a description of the filter as seen by the user, and a filter pattern matched against file names. Pattern strings can be a simple ``glob'' pattern, or a number of glob patterns separated by a @litchar[";"] character. @@ -65,7 +65,7 @@ On Windows and Unix, @scheme[filters] determines a set of filters from that have any of these suffixes in any filter are selectable; a @racket["*.*"] glob makes all files available for selection. -See also @scheme[path-dialog%]. +See also @racket[path-dialog%]. } @@ -79,8 +79,8 @@ See also @scheme[path-dialog%]. [filters (listof (list/c string? string?)) '(("Any" "*.*"))]) (or/c (listof path?) #f)]{ Like -@scheme[get-file], except that the user can select multiple files, and the - result is either a list of file paths of @scheme[#f]. +@racket[get-file], except that the user can select multiple files, and the + result is either a list of file paths of @racket[#f]. } @@ -94,62 +94,62 @@ Like (or/c path? #f)]{ Obtains a file pathname from the user via the platform-specific - standard (modal) dialog, using @scheme[parent] as the parent window if - it is specified, and using @scheme[message] as a message at the top of - the dialog if it is not @scheme[#f]. + standard (modal) dialog, using @racket[parent] as the parent window if + it is specified, and using @racket[message] as a message at the top of + the dialog if it is not @racket[#f]. -The result is @scheme[#f] if the user cancels the dialog, the selected +The result is @racket[#f] if the user cancels the dialog, the selected pathname otherwise. The returned pathname may or may not exist, although the style of the dialog is directed towards creating a new file. -If @scheme[directory] is not @scheme[#f], it is used as the starting +If @racket[directory] is not @racket[#f], it is used as the starting directory for the file selector (otherwise the starting directory is chosen automatically in a platform-specific manner, usually based on the current directory and the user's interactions in previous calls - to @scheme[get-file], @scheme[put-file], etc.). If - @scheme[filename] is not @scheme[#f], it is used as the default filename + to @racket[get-file], @racket[put-file], etc.). If + @racket[filename] is not @racket[#f], it is used as the default filename when appropriate, and it should @italic{not} contain a directory path prefix. -On Windows, if @scheme[extension] is not @scheme[#f], the returned path +On Windows, if @racket[extension] is not @racket[#f], the returned path will get a default extension if the user does not supply one. If - @scheme[extension] is the empty string, then the extension is derived - from the user's @scheme[filters] choice if the corresponding pattern is - of the form @scheme[(string-append "*." extension)]; if the pattern is - @scheme["*.*"], then no default extension is added. Finally, if - @scheme[extension] is any string other than the empty string, - @scheme[extension] is used as the default extension when the user's - @scheme[filters] choice has the pattern @scheme["*.*"]. Meanwhile, the - @scheme[filters] argument has the same format and auxiliary role as for - @scheme[get-file]. In particular, if the only pattern in @scheme[filters] - is @scheme[(string-append "*." extension)], then the result pathname is guaranteed - to have an extension mapping @scheme[extension]. + @racket[extension] is the empty string, then the extension is derived + from the user's @racket[filters] choice if the corresponding pattern is + of the form @racket[(string-append "*." extension)]; if the pattern is + @racket["*.*"], then no default extension is added. Finally, if + @racket[extension] is any string other than the empty string, + @racket[extension] is used as the default extension when the user's + @racket[filters] choice has the pattern @racket["*.*"]. Meanwhile, the + @racket[filters] argument has the same format and auxiliary role as for + @racket[get-file]. In particular, if the only pattern in @racket[filters] + is @racket[(string-append "*." extension)], then the result pathname is guaranteed + to have an extension mapping @racket[extension]. -On Mac OS X 10.5 and later, if @scheme[extension] is not - @scheme[#f] or @racket[""], the returned path will get a default extension if the - user does not supply one. If @scheme[filters] contains as - @scheme["*.*"] pattern, then the user can supply any extension that +On Mac OS X 10.5 and later, if @racket[extension] is not + @racket[#f] or @racket[""], the returned path will get a default extension if the + user does not supply one. If @racket[filters] contains as + @racket["*.*"] pattern, then the user can supply any extension that is recognized by the system; otherwise, the extension on the returned - path will be either @scheme[extension] or @scheme[_other-extension] - for any @scheme[(string-append "*." _other-extension)] pattern in - @scheme[filters]. In particular, if the only pattern in - @scheme[filters] is empty or contains only @scheme[(string-append + path will be either @racket[extension] or @racket[_other-extension] + for any @racket[(string-append "*." _other-extension)] pattern in + @racket[filters]. In particular, if the only pattern in + @racket[filters] is empty or contains only @racket[(string-append "*." extension)], then the result pathname is guaranteed to have an - extension mapping @scheme[extension]. + extension mapping @racket[extension]. On Mac OS X versions before 10.5, the returned path will get a - default extension only if @scheme[extension] is not @scheme[#f], - @scheme[extension] is not @racket[""], and - @scheme[filters] contains only @scheme[(string-append "*." + default extension only if @racket[extension] is not @racket[#f], + @racket[extension] is not @racket[""], and + @racket[filters] contains only @racket[(string-append "*." extension)]. On Unix, @racket[extension] is ignored, and @racket[filters] is used to filter the visible list of files as in @racket[get-file]. -The @scheme[style] list is treated as for @scheme[get-file]. +The @racket[style] list is treated as for @racket[get-file]. -See also @scheme[path-dialog%]. +See also @racket[path-dialog%]. } @@ -160,25 +160,25 @@ See also @scheme[path-dialog%]. (or/c path #f)]{ Obtains a directory pathname from the user via the platform-specific - standard (modal) dialog, using @scheme[parent] as the parent window if + standard (modal) dialog, using @racket[parent] as the parent window if it is specified. -If @scheme[directory] is not @scheme[#f], it is used on some platforms as +If @racket[directory] is not @racket[#f], it is used on some platforms as the starting directory for the directory selector (otherwise the starting directory is chosen automatically in a platform-specific manner, usually based on the current directory and the user's - interactions in previous calls to @scheme[get-file], - @scheme[put-file], etc.). + interactions in previous calls to @racket[get-file], + @racket[put-file], etc.). -The @scheme[style] argument is treated as for -@scheme[get-file], except that only @scheme['common] or @scheme['enter-packages] can be +The @racket[style] argument is treated as for +@racket[get-file], except that only @racket['common] or @racket['enter-packages] can be specified. The latter - matters only on Mac OS X, where @scheme['enter-packages] + matters only on Mac OS X, where @racket['enter-packages] enables the user to select package directory or a directory within a package. A package is a directory with a special suffix (e.g., ``.app'') that the Finder normally displays like a file. -See also @scheme[path-dialog%]. +See also @racket[path-dialog%]. } @defproc[(message-box [title label-string?] @@ -187,45 +187,45 @@ See also @scheme[path-dialog%]. [style (listof (or/c 'ok 'ok-cancel 'yes-no 'caution 'stop)) '(ok)]) (or/c 'ok 'cancel 'yes 'no)]{ -See also @scheme[message-box/custom]. +See also @racket[message-box/custom]. Displays a message to the user in a (modal) dialog, using - @scheme[parent] as the parent window if it is specified. The dialog's - title is @scheme[title]. The @scheme[message] string can be arbitrarily + @racket[parent] as the parent window if it is specified. The dialog's + title is @racket[title]. The @racket[message] string can be arbitrarily long, and can contain explicit linefeeds or carriage returns for breaking lines. The style must include exactly one of the following: @itemize[ - @item{@scheme['ok] --- the dialog only has an @onscreen{OK} button - and always returns @scheme['ok].} + @item{@racket['ok] --- the dialog only has an @onscreen{OK} button + and always returns @racket['ok].} - @item{@scheme['ok-cancel] --- the message dialog has + @item{@racket['ok-cancel] --- the message dialog has @onscreen{Cancel} and @onscreen{OK} buttons. If the user clicks - @onscreen{Cancel}, the result is @scheme['cancel], otherwise the - result is @scheme['ok].} + @onscreen{Cancel}, the result is @racket['cancel], otherwise the + result is @racket['ok].} - @item{@scheme['yes-no] --- the message dialog has @onscreen{Yes} and + @item{@racket['yes-no] --- the message dialog has @onscreen{Yes} and @onscreen{No} buttons. If the user clicks @onscreen{Yes}, the result - is @scheme['yes], otherwise the result is @scheme['no]. Note: instead + is @racket['yes], otherwise the result is @racket['no]. Note: instead of a @onscreen{Yes}/@onscreen{No} dialog, best-practice GUI design is - to use @scheme[message-box/custom] and give the buttons meaningful + to use @racket[message-box/custom] and give the buttons meaningful labels, so that the user does not have to read the message text carefully to make a selection.} ] -In addition, @scheme[style] can contain @scheme['caution] to make the +In addition, @racket[style] can contain @racket['caution] to make the dialog use a caution icon instead of the application (or generic - ``info'') icon. Alternately, it can contain @scheme['stop] to make the - dialog use a stop icon. If @scheme[style] contains both @scheme['caution] - and @scheme['stop], then @scheme['caution] is ignored. + ``info'') icon. Alternately, it can contain @racket['stop] to make the + dialog use a stop icon. If @racket[style] contains both @racket['caution] + and @racket['stop], then @racket['caution] is ignored. -The class that implements the dialog provides a @scheme[get-message] +The class that implements the dialog provides a @racket[get-message] method that takes no arguments and returns the text of the message as a string. (The dialog is accessible through the - @scheme[get-top-level-windows] function.) + @racket[get-top-level-windows] function.) The @racket[message-box] function can be called int a thread other than the handler thread of the relevant eventspace (i.e., the eventspace of @@ -246,26 +246,26 @@ The @racket[message-box] function can be called int a thread other (or/c 1 2 3 close-result)]{ Displays a message to the user in a (modal) dialog, using - @scheme[parent] as the parent window if it is specified. The dialog's - title is @scheme[title]. The @scheme[message] string can be arbitrarily + @racket[parent] as the parent window if it is specified. The dialog's + title is @racket[title]. The @racket[message] string can be arbitrarily long, and can contain explicit linefeeds or carriage returns for breaking lines. The dialog contains up to three buttons for the user to click. The - buttons have the labels @scheme[button1-label], - @scheme[button2-label], and @scheme[button3-label], where @scheme[#f] for a + buttons have the labels @racket[button1-label], + @racket[button2-label], and @racket[button3-label], where @racket[#f] for a label indicates that the button should be hidden. -If the user clicks the button labelled @scheme[button1-label], a @scheme[1] - is returned, and so on for @scheme[2] and @scheme[3]. If the user closes - the dialog some other way---which is only allowed when @scheme[style] - does not contain @scheme['disallow-close]---then the result is the - value of @scheme[close-result]. For example, the user can usually close - a dialog by typing an Escape. Often, @scheme[2] is an appropriate value - for @scheme[close-result], especially when Button 2 is a @onscreen{Cancel} +If the user clicks the button labelled @racket[button1-label], a @racket[1] + is returned, and so on for @racket[2] and @racket[3]. If the user closes + the dialog some other way---which is only allowed when @racket[style] + does not contain @racket['disallow-close]---then the result is the + value of @racket[close-result]. For example, the user can usually close + a dialog by typing an Escape. Often, @racket[2] is an appropriate value + for @racket[close-result], especially when Button 2 is a @onscreen{Cancel} button. -If @scheme[style] does not include @scheme['number-order], the order of +If @racket[style] does not include @racket['number-order], the order of the buttons is platform-specific, and labels should be assigned to the buttons based on their role: @itemize[ @@ -274,7 +274,7 @@ If @scheme[style] does not include @scheme['number-order], the order of button. For example, if the dialog has an @onscreen{OK} button, it is this one. On Windows, this button is leftmost; on Unix and Mac OS X, it is rightmost. (See also - @scheme[system-position-ok-before-cancel?].) Use this button for + @racket[system-position-ok-before-cancel?].) Use this button for dialogs that contain only one button.} @item{Button 2 is next to Button 1, and it often plays the role of @@ -289,28 +289,28 @@ If @scheme[style] does not include @scheme['number-order], the order of Despite the above guidelines, any combination of visible buttons is allowed in the dialog. -If @scheme[style] includes @scheme['number-order], then the buttons are +If @racket[style] includes @racket['number-order], then the buttons are displayed in the dialog left-to-right with equal spacing between all buttons, though aligned within the dialog (centered or right-aligned) - in a platform-specific manner. Use @scheme['number-order] sparingly. + in a platform-specific manner. Use @racket['number-order] sparingly. -The @scheme[style] list must contain exactly one of @scheme['default=1], - @scheme['default=2], @scheme['default=3], and @scheme['no-default] to +The @racket[style] list must contain exactly one of @racket['default=1], + @racket['default=2], @racket['default=3], and @racket['no-default] to determine which button (if any) is the default. The default button is - ``clicked'' when the user types Return. If @scheme['default=]@scheme[n] - is supplied but button @scheme[n] has no label, then it is equivalent to - @scheme['no-default]. + ``clicked'' when the user types Return. If @racket['default=]@racket[n] + is supplied but button @racket[n] has no label, then it is equivalent to + @racket['no-default]. -In addition, @scheme[style] can contain @scheme['caution] to make the +In addition, @racket[style] can contain @racket['caution] to make the dialog use a caution icon instead of the application (or generic - ``info'') icon. Alternately, it can contain @scheme['stop] to make the - dialog use a stop icon. If @scheme[style] contains both @scheme['caution] - and @scheme['stop], then @scheme['caution] is ignored. + ``info'') icon. Alternately, it can contain @racket['stop] to make the + dialog use a stop icon. If @racket[style] contains both @racket['caution] + and @racket['stop], then @racket['caution] is ignored. -The class that implements the dialog provides a @scheme[get-message] +The class that implements the dialog provides a @racket[get-message] method that takes no arguments and returns the text of the message as a string. (The dialog is accessible through the -@scheme[get-top-level-windows] function.) +@racket[get-top-level-windows] function.) The @racket[message-box/custom] function can be called int a thread other than the handler thread of the relevant eventspace (i.e., the eventspace of @@ -326,15 +326,15 @@ The @racket[message-box/custom] function can be called int a thread '(ok)]) (values (or/c 'ok 'cancel 'yes 'no) boolean?)]{ -See also @scheme[message+check-box/custom]. +See also @racket[message+check-box/custom]. -Like @scheme[message-box], except that +Like @racket[message-box], except that @itemize[ - @item{the dialog contains a check box whose label is @scheme[check-label];} - @item{the result is two values: the @scheme[message-box] result, and a + @item{the dialog contains a check box whose label is @racket[check-label];} + @item{the result is two values: the @racket[message-box] result, and a boolean indicating whether the box was checked; and} - @item{@scheme[style] can contain @scheme['checked] to indicate that the check box + @item{@racket[style] can contain @racket['checked] to indicate that the check box should be initially checked.} ]} @@ -352,12 +352,12 @@ Like @scheme[message-box], except that [close-result any/c #f]) (or/c 1 2 3 (λ (x) (eq? x close-result)))]{ -Like @scheme[message-box/custom], except that +Like @racket[message-box/custom], except that @itemize[ - @item{the dialog contains a check box whose label is @scheme[check-label];} - @item{the result is two values: the @scheme[message-box] result, and a + @item{the dialog contains a check box whose label is @racket[check-label];} + @item{the result is two values: the @racket[message-box] result, and a boolean indicating whether the box was checked; and} - @item{@scheme[style] can contain @scheme['checked] to indicate that the check box + @item{@racket[style] can contain @racket['checked] to indicate that the check box should be initially checked.} ] @@ -374,15 +374,15 @@ Like @scheme[message-box/custom], except that (or/c string? #f)]{ Gets a text string from the user via a modal dialog, using - @scheme[parent] as the parent window if it is specified. The dialog's - title is @scheme[title]. The dialog's text field is labelled with - @scheme[message] and initialized to @scheme[init-val] (but @scheme[init-val] + @racket[parent] as the parent window if it is specified. The dialog's + title is @racket[title]. The dialog's text field is labelled with + @racket[message] and initialized to @racket[init-val] (but @racket[init-val] does not determine the size of the dialog). -The result is @scheme[#f] if the user cancels the dialog, the +The result is @racket[#f] if the user cancels the dialog, the user-provided string otherwise. -If @scheme[style] includes @scheme['password], the dialog's text field +If @racket[style] includes @racket['password], the dialog's text field draws each character of its content using a generic symbol, instead of the actual character. @@ -399,18 +399,18 @@ If @scheme[style] includes @scheme['password], the dialog's text field (or/c (listof exact-nonnegative-integer?) #f)]{ Gets a list box selection from the user via a modal dialog, using - @scheme[parent] as the parent window if it is specified. The dialog's - title is @scheme[title]. The dialog's list box is labelled with - @scheme[message] and initialized by selecting the items in - @scheme[init-choices]. + @racket[parent] as the parent window if it is specified. The dialog's + title is @racket[title]. The dialog's list box is labelled with + @racket[message] and initialized by selecting the items in + @racket[init-choices]. -The style must contain exactly one of @indexed-scheme['single], - @indexed-scheme['multiple], or @indexed-scheme['extended]. The styles have - the same meaning as for creating a @scheme[list-box%] object. (For +The style must contain exactly one of @indexed-racket['single], + @indexed-racket['multiple], or @indexed-racket['extended]. The styles have + the same meaning as for creating a @racket[list-box%] object. (For the single-selection style, only the last selection in - @scheme[init-choices] matters.) + @racket[init-choices] matters.) -The result is @scheme[#f] if the user cancels the dialog, the +The result is @racket[#f] if the user cancels the dialog, the list of selections otherwise. @@ -424,14 +424,14 @@ The result is @scheme[#f] if the user cancels the dialog, the (or/c (is-a?/c color%) #f)]{ Lets the user select a color though the platform-specific - (modal) dialog, using @scheme[parent] as the parent window if it is - specified. The @scheme[message] string is displayed as a prompt in the - dialog if possible. If @scheme[init-color] is provided, the dialog is + (modal) dialog, using @racket[parent] as the parent window if it is + specified. The @racket[message] string is displayed as a prompt in the + dialog if possible. If @racket[init-color] is provided, the dialog is initialized to the given color. -@italicptyStyleNote[@scheme[style]] +@italicptyStyleNote[@racket[style]] -The result is @scheme[#f] if the user cancels the dialog, the selected +The result is @racket[#f] if the user cancels the dialog, the selected color otherwise. @@ -445,14 +445,14 @@ The result is @scheme[#f] if the user cancels the dialog, the selected (or/c (is-a?/c font%) #f)]{ Lets the user select a font though the platform-specific - (modal) dialog, using @scheme[parent] as the parent window if it is - specified. The @scheme[message] string is displayed as a prompt in the - dialog if possible. If @scheme[init-font] is provided, the dialog is + (modal) dialog, using @racket[parent] as the parent window if it is + specified. The @racket[message] string is displayed as a prompt in the + dialog if possible. If @racket[init-font] is provided, the dialog is initialized to the given font. -@italicptyStyleNote[@scheme[style]] +@italicptyStyleNote[@racket[style]] -The result is @scheme[#f] if the user cancels the dialog, the selected +The result is @racket[#f] if the user cancels the dialog, the selected font otherwise. @@ -466,16 +466,16 @@ The result is @scheme[#f] if the user cancels the dialog, the selected (or/c (is-a?/c ps-setup%) #f)]{ Lets the user select a PostScript configuration though a (modal) - dialog, using @scheme[parent] as the parent window if it is - specified. The @scheme[message] string is displayed as a prompt in the - dialog. If @scheme[init-setup] is provided, the dialog is initialized to + dialog, using @racket[parent] as the parent window if it is + specified. The @racket[message] string is displayed as a prompt in the + dialog. If @racket[init-setup] is provided, the dialog is initialized to the given configuration, otherwise the current configuration from -@scheme[current-ps-setup] is used. +@racket[current-ps-setup] is used. -@italicptyStyleNote[@scheme[style]] +@italicptyStyleNote[@racket[style]] -The result is @scheme[#f] if the user cancels the dialog, , a - @scheme[ps-setup%] object that encapsulates the selected PostScript +The result is @racket[#f] if the user cancels the dialog, , a + @racket[ps-setup%] object that encapsulates the selected PostScript configuration otherwise. @@ -489,22 +489,22 @@ The result is @scheme[#f] if the user cancels the dialog, , a (or/c (is-a?/c ps-setup%) #f)]{ Like -@scheme[get-ps-setup-from-user], but the dialog configures page layout for native printing - with @scheme[printer-dc%]. A dialog is shown only if -@scheme[can-get-page-setup-from-user?] returns @scheme[#t], otherwise no dialog is shown and the result - is @scheme[#f]. +@racket[get-ps-setup-from-user], but the dialog configures page layout for native printing + with @racket[printer-dc%]. A dialog is shown only if +@racket[can-get-page-setup-from-user?] returns @racket[#t], otherwise no dialog is shown and the result + is @racket[#f]. -The @scheme[parent] argument is used as the parent window for a dialog if - it is specified. The @scheme[message] string might be displayed as a - prompt in the dialog. If @scheme[init-setup] is provided, the dialog is +The @racket[parent] argument is used as the parent window for a dialog if + it is specified. The @racket[message] string might be displayed as a + prompt in the dialog. If @racket[init-setup] is provided, the dialog is initialized to the given configuration, otherwise the current configuration from -@scheme[current-ps-setup] is used. +@racket[current-ps-setup] is used. -@italicptyStyleNote[@scheme[style]] +@italicptyStyleNote[@racket[style]] -The result is @scheme[#f] if the user cancels the dialog, a - @scheme[ps-setup%] object that encapsulates the selected +The result is @racket[#f] if the user cancels the dialog, a + @racket[ps-setup%] object that encapsulates the selected configuration otherwise. @@ -513,11 +513,11 @@ The result is @scheme[#f] if the user cancels the dialog, a @defproc[(can-get-page-setup-from-user?) boolean?]{ -Returns @scheme[#t] if the current platform (Mac OS X) supports a - page-layout dialog for use with @scheme[printer-dc%] printing, and +Returns @racket[#t] if the current platform (Mac OS X) supports a + page-layout dialog for use with @racket[printer-dc%] printing, and if the page-layout dialog is different from the print-job dialog that - is automatically shown when a @scheme[printer-dc%] is - created. Returns @scheme[#f] if no separate page-layout dialog is + is automatically shown when a @racket[printer-dc%] is + created. Returns @racket[#f] if no separate page-layout dialog is needed (Windows and Unix). } diff --git a/collects/scribblings/gui/editor-admin-class.scrbl b/collects/scribblings/gui/editor-admin-class.scrbl index 8e1420be..14c6ee6f 100644 --- a/collects/scribblings/gui/editor-admin-class.scrbl +++ b/collects/scribblings/gui/editor-admin-class.scrbl @@ -4,20 +4,18 @@ @defclass/title[editor-admin% object% ()]{ See @|admindiscuss| for information about the role of administrators. - The @scheme[editor-admin%] class is never instantiated directly. It + The @racket[editor-admin%] class is never instantiated directly. It is not even instantiated through derived classes by most programmers; - each @scheme[editor-canvas%] and @scheme[editor-snip%] object + each @racket[editor-canvas%] and @racket[editor-snip%] object creates its own administrator. However, it may be useful to derive a new instance of this class to display editors in a new context. Also, it may be useful to call the methods of an existing administrator from an owned editor. -To create a new @scheme[editor-admin%] class, all methods described +To create a new @racket[editor-admin%] class, all methods described here must be overridden. They are all invoked by the administrator's editor. - - @defconstructor[()]{ Creates a (useless) editor administrator. @@ -34,7 +32,7 @@ Returns either the drawing context into which the editor is displayed, or the context into which it is currently being drawn. When the editor is not embedded, the returned context is always the drawing content into which the editor is displayed. If the editor is not - displayed, @scheme[#f] is returned. + displayed, @racket[#f] is returned. The origin of the drawing context is also returned, translated into the local coordinates of the editor. For an embedded editor, the @@ -50,11 +48,10 @@ See also @xmethod[editor<%> editor-location-to-dc-location] and } @methimpl{ -Fills all boxes with @scheme[0.0] and returns @scheme[#f]. +Fills all boxes with @racket[0.0] and returns @racket[#f]. }} - @defmethod[(get-max-view [x (or/c (box/c real?) false/c)] [y (or/c (box/c real?) false/c)] [w (or/c (box/c (and/c real? (not/c negative?))) false/c)] @@ -73,7 +70,7 @@ See @method[editor-admin% get-view]. } @methimpl{ -Fills all boxes with @scheme[0.0]. +Fills all boxes with @racket[0.0]. }} @@ -108,20 +105,20 @@ The calculation of the editor's visible region is based on the current @boxisfillnull[(scheme w) @elem{the width of the visible region, which may be larger than the editor itself}] @boxisfillnull[(scheme h) @elem{the height of the visible region, which may be larger than the editor itself}] -If an editor is fully visible and @scheme[full?] is @scheme[#f], then - @scheme[x] and @scheme[y] will both be filled with @scheme[0]. +If an editor is fully visible and @racket[full?] is @racket[#f], then + @racket[x] and @racket[y] will both be filled with @racket[0]. -If @scheme[full?] is a true value, then the returned area is the view +If @racket[full?] is a true value, then the returned area is the view area of the top-level @techlink{display} for the editor. This result is different only when the editor is embedded in another editor; in - that case, the @scheme[x] and @scheme[y] values may be meaningless, + that case, the @racket[x] and @racket[y] values may be meaningless, because they are in the coordinate system of the immediate editor within the top-level @techlink{display}. } @methimpl{ -Fills all boxes with @scheme[0.0]. +Fills all boxes with @racket[0.0]. }} @@ -134,7 +131,7 @@ Called by the editor to request the keyboard focus. If the request is method will be called. See @method[editor<%> set-caret-owner] for information about the - possible values of @scheme[domain]. + possible values of @racket[domain]. } @methimpl{ @@ -172,7 +169,7 @@ Called by the editor to request a refresh to its displayed should be refreshed, it calls the editor's @method[editor<%> refresh] method. -The @scheme[localx], @scheme[localy], @scheme[w], and @scheme[h] +The @racket[localx], @racket[localy], @racket[w], and @racket[h] arguments specify a region of the editor to be updated (in editor coordinates). @@ -192,16 +189,16 @@ Does nothing. @popupmenuinfo[@elem{administrator's @techlink{display}} @elem{top-level editor in this administrator's @techlink{display}} - @elem{The result is @scheme[#t] if the popup succeeds, - @scheme[#f] otherwise (independent of whether the + @elem{The result is @racket[#t] if the popup succeeds, + @racket[#f] otherwise (independent of whether the user selects an item in the popup menu).}] -The menu is displayed at @scheme[x] and @scheme[y] in editor coordinates. +The menu is displayed at @racket[x] and @racket[y] in editor coordinates. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -211,14 +208,14 @@ Returns @scheme[#f]. @methspec{ -Returns @scheme[#t] if updating on this administrator's +Returns @racket[#t] if updating on this administrator's @techlink{display} is currently delayed (usually by @xmethod[editor<%> begin-edit-sequence] in an enclosing editor). } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -232,7 +229,7 @@ Called by the editor to notify its @techlink{display} that the editor's size or scroll count has changed, so the scrollbars need to be adjusted to reflect the new size. The editor generally needs to be updated after a resize, but the editor decides whether the update - should occur immediately. If @scheme[refresh?] is not @scheme[#f], + should occur immediately. If @racket[refresh?] is not @racket[#f], then the editor is requesting to be updated immediately. } @@ -256,22 +253,22 @@ Called by the editor to request scrolling so that the given region is visible. The editor generally needs to be updated after a scroll, but the editor decides whether the update should occur immediately. -The @scheme[localx], @scheme[localy], @scheme[w], and @scheme[h] +The @racket[localx], @racket[localy], @racket[w], and @racket[h] arguments specify a region of the editor to be made visible by the scroll (in editor coordinates). -If @scheme[refresh?] is not @scheme[#f], then the editor is requesting +If @racket[refresh?] is not @racket[#f], then the editor is requesting to be updated immediately. -The @scheme[bias] argument is one of: +The @racket[bias] argument is one of: @itemize[ -@item{@scheme['start] --- if the range doesn't fit in the visible area, show the top-left region} -@item{@scheme['none] --- no special scrolling instructions} -@item{@scheme['end] --- if the range doesn't fit in the visible area, show the bottom-right region} +@item{@racket['start] --- if the range doesn't fit in the visible area, show the top-left region} +@item{@racket['none] --- no special scrolling instructions} +@item{@racket['end] --- if the range doesn't fit in the visible area, show the bottom-right region} ] -The return value is @scheme[#t] if the @techlink{display} is scrolled, - @scheme[#f] if not (either because the requested region is already +The return value is @racket[#t] if the @techlink{display} is scrolled, + @racket[#f] if not (either because the requested region is already visible, because the @techlink{display} has zero size, or because the editor is currently printing). @@ -283,7 +280,7 @@ If an editor has multiple @techlink{displays}, then if any display } @methimpl{ -Return @scheme[#f] +Return @racket[#f] }} diff --git a/collects/scribblings/gui/editor-canvas-class.scrbl b/collects/scribblings/gui/editor-canvas-class.scrbl index a90f2162..d1a420b8 100644 --- a/collects/scribblings/gui/editor-canvas-class.scrbl +++ b/collects/scribblings/gui/editor-canvas-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[editor-canvas% object% (canvas<%>)]{ -An @scheme[editor-canvas%] object manages and displays a - @scheme[text%] or @scheme[pasteboard%] object. +An @racket[editor-canvas%] object manages and displays a + @racket[text%] or @racket[pasteboard%] object. @defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) @@ -29,48 +29,48 @@ An @scheme[editor-canvas%] object manages and displays a [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -If a canvas is initialized with @scheme[#f] for @scheme[editor], +If a canvas is initialized with @racket[#f] for @racket[editor], install an editor later with @method[editor-canvas% set-editor]. -The @scheme[style] list can contain the following flags: +The @racket[style] list can contain the following flags: @itemize[ - @item{@scheme['no-border] --- omits a border around the canvas} + @item{@racket['no-border] --- omits a border around the canvas} - @item{@scheme['control-border] --- gives the canvas a border that is - like a @scheme[text-field%] control} + @item{@racket['control-border] --- gives the canvas a border that is + like a @racket[text-field%] control} - @item{@scheme['combo] --- gives the canvas a combo button that is like - a @scheme[combo-field%] control; this + @item{@racket['combo] --- gives the canvas a combo button that is like + a @racket[combo-field%] control; this style is intended for use with - @scheme['control-border], - @scheme['hide-hscroll], and - @scheme['hide-vscroll]} + @racket['control-border], + @racket['hide-hscroll], and + @racket['hide-vscroll]} - @item{@scheme['no-hscroll] --- disallows horizontal scrolling and hides the horizontal scrollbar} + @item{@racket['no-hscroll] --- disallows horizontal scrolling and hides the horizontal scrollbar} - @item{@scheme['no-vscroll] --- disallows vertical scrolling and hides the vertical scrollbar} + @item{@racket['no-vscroll] --- disallows vertical scrolling and hides the vertical scrollbar} - @item{@scheme['hide-hscroll] --- allows horizontal scrolling, but hides the horizontal scrollbar} + @item{@racket['hide-hscroll] --- allows horizontal scrolling, but hides the horizontal scrollbar} - @item{@scheme['hide-vscroll] --- allows vertical scrolling, but hides the vertical scrollbar} + @item{@racket['hide-vscroll] --- allows vertical scrolling, but hides the vertical scrollbar} - @item{@scheme['auto-hscroll] --- automatically hides the horizontal scrollbar when unneeded - (unless @scheme['no-hscroll] or @scheme['hide-hscroll] is specified)} + @item{@racket['auto-hscroll] --- automatically hides the horizontal scrollbar when unneeded + (unless @racket['no-hscroll] or @racket['hide-hscroll] is specified)} - @item{@scheme['auto-vscroll] --- automatically hides the vertical scrollbar when unneeded - (unless @scheme['no-vscroll] or @scheme['hide-vscroll] is specified)} + @item{@racket['auto-vscroll] --- automatically hides the vertical scrollbar when unneeded + (unless @racket['no-vscroll] or @racket['hide-vscroll] is specified)} - @item{@scheme['resize-corner] --- leaves room for a resize control at the canvas's + @item{@racket['resize-corner] --- leaves room for a resize control at the canvas's bottom right when only one scrollbar is visible} - @item{@scheme['deleted] --- creates the canvas as initially hidden and without affecting - @scheme[parent]'s geometry; the canvas can be made active - later by calling @scheme[parent]'s @method[area-container<%> add-child] + @item{@racket['deleted] --- creates the canvas as initially hidden and without affecting + @racket[parent]'s geometry; the canvas can be made active + later by calling @racket[parent]'s @method[area-container<%> add-child] method} - @item{@scheme['transparent] --- the canvas is ``erased'' before an + @item{@racket['transparent] --- the canvas is ``erased'' before an update using its parent window's background; see @racket[canvas<%>] for information on the interaction of @racket['transparent] and offscreen buffering} @@ -79,23 +79,23 @@ The @scheme[style] list can contain the following flags: While vertical scrolling of text editors is based on lines, horizontal scrolling and pasteboard vertical scrolling is based on a - fixed number of steps per horizontal page. The @scheme[scrolls-per-page] + fixed number of steps per horizontal page. The @racket[scrolls-per-page] argument sets this value. -@index["wheel on mouse"]{If} provided, the @scheme[wheel-step] +@index["wheel on mouse"]{If} provided, the @racket[wheel-step] argument is passed on to the @method[editor-canvas% wheel-step] method. The default wheel step can be overridden globally though the @ResourceFirst{wheelStep}; see @|mrprefsdiscuss|. -If @scheme[line-count] is not @scheme[#f], it is passed on to the +If @racket[line-count] is not @racket[#f], it is passed on to the @method[editor-canvas% set-line-count] method. -If @scheme[horizontal-inset] is not @scheme[5], it is passed on to the +If @racket[horizontal-inset] is not @racket[5], it is passed on to the @method[editor-canvas% horizontal-inset] method. Similarly, if - @scheme[vertical-inset] is not @scheme[5], it is passed on to the + @racket[vertical-inset] is not @racket[5], it is passed on to the @method[editor-canvas% vertical-inset] method. -@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -162,7 +162,7 @@ Enables or disables force-focus mode. In force-focus mode, the caret @defmethod[(get-editor) (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)]{ -Returns the editor currently displayed by this canvas, or @scheme[#f] +Returns the editor currently displayed by this canvas, or @racket[#f] if the canvas does not have an editor. } @@ -172,7 +172,7 @@ Returns the editor currently displayed by this canvas, or @scheme[#f] (or/c (integer-in 1 1000) false/c)]{ Returns a line count installed with @method[editor-canvas% - set-line-count], or @scheme[#f] if no minimum line count is set. + set-line-count], or @racket[#f] if no minimum line count is set. } @@ -182,7 +182,7 @@ Returns a line count installed with @method[editor-canvas% void?])]{ Gets or sets the number of pixels within the canvas reserved to - the left and right of editor content. The default is @scheme[5]. + the left and right of editor content. The default is @racket[5]. } @@ -196,7 +196,7 @@ Enables or disables lazy-refresh mode, or gets the current enable state. In lazy-refresh mode, the canvas's @method[window<%> refresh] method is called when the window needs to be updated, rather than @method[editor-canvas% on-paint]. By default, an - @scheme[editor-canvas%] object is @italic{not} in lazy-refresh mode. + @racket[editor-canvas%] object is @italic{not} in lazy-refresh mode. } @@ -205,7 +205,7 @@ Enables or disables lazy-refresh mode, or gets the current enable (on-char [event (is-a?/c key-event%)]) void?]{ -Handles @scheme['wheel-up] and @scheme['wheel-down] events by +Handles @racket['wheel-up] and @racket['wheel-down] events by scrolling vertically. Otherwise, passes the event to the canvas's editor, if any, by calling its @method[editor<%> on-char] method. @@ -242,10 +242,10 @@ Repaints the editor, or clears the canvas if no editor is being displayed. This method is called after clearing the margin around the editor, -unless the canvas is created with the @scheme['transparent] style, but +unless the canvas is created with the @racket['transparent] style, but the editor area is not automatically cleared. In other words, -@scheme[editor-canvas%] update by default is like @scheme[canvas%] -update with the @scheme['no-autoclear] style, except that the margin +@racket[editor-canvas%] update by default is like @racket[canvas%] +update with the @racket['no-autoclear] style, except that the margin around the editor area is always cleared. } @@ -271,27 +271,27 @@ on-display-size] method is called. Requests scrolling so that the given region in the currently displayed editor is made visible. -The @scheme[localx], @scheme[localy], @scheme[w], and @scheme[h] arguments specify +The @racket[localx], @racket[localy], @racket[w], and @racket[h] arguments specify a region of the editor to be made visible by the scroll (in editor coordinates). -If @scheme[refresh?] is not @scheme[#f], then the editor is updated +If @racket[refresh?] is not @racket[#f], then the editor is updated immediately after a successful scroll. -The @scheme[bias] argument is one of: +The @racket[bias] argument is one of: @itemize[ - @item{@scheme['start] --- if the range doesn't fit in the visible + @item{@racket['start] --- if the range doesn't fit in the visible area, show the top-left region} - @item{@scheme['none] --- no special scrolling instructions} + @item{@racket['none] --- no special scrolling instructions} - @item{@scheme['end] --- if the range doesn't fit in the visible area, + @item{@racket['end] --- if the range doesn't fit in the visible area, show the bottom-right region} ] -The return value is @scheme[#t] if the @techlink{display} is scrolled, @scheme[#f] +The return value is @racket[#t] if the @techlink{display} is scrolled, @racket[#f] if not (either because the requested region is already visible, because the @techlink{display} has zero size, or because the editor is currently printing). @@ -324,10 +324,10 @@ Enables or disables bottom-base scrolling, or gets the current enable Sets the editor that is displayed by the canvas, releasing the current editor (if any). If the new editor already has an administrator that - is not associated with an @scheme[editor-canvas%], then the new + is not associated with an @racket[editor-canvas%], then the new editor is @italic{not} installed into the canvas. -If @scheme[redraw?] is @scheme[#f], then the editor is not immediately +If @racket[redraw?] is @racket[#f], then the editor is not immediately drawn; in this case, something must force a redraw later (e.g., a call to the @method[editor-canvas% on-paint] method). @@ -347,7 +347,7 @@ Sets the canvas's graphical minimum height to display a particular an editor. When the canvas's editor is changed, the minimum height is recalculated. -If the line count is set to @scheme[#f], then the canvas's graphical +If the line count is set to @racket[#f], then the canvas's graphical minimum height is restored to its original value. } @@ -359,7 +359,7 @@ If the line count is set to @scheme[#f], then the canvas's graphical void?])]{ Gets or sets the number of pixels within the canvas reserved above - and below editor content. The default is @scheme[5]. + and below editor content. The default is @racket[5]. } @@ -370,8 +370,8 @@ Gets or sets the number of pixels within the canvas reserved above void?])]{ Gets or sets the number of vertical scroll steps taken for one click - of the mouse wheel via a @scheme['wheel-up] or @scheme['wheel-down] - @scheme[key-event%]. A @scheme[#f] value disables special handling + of the mouse wheel via a @racket['wheel-up] or @racket['wheel-down] + @racket[key-event%]. A @racket[#f] value disables special handling for wheel events (i.e., wheel events are passed on to the canvas's editor). diff --git a/collects/scribblings/gui/editor-data-class-class.scrbl b/collects/scribblings/gui/editor-data-class-class.scrbl index 293b7136..3f924d96 100644 --- a/collects/scribblings/gui/editor-data-class-class.scrbl +++ b/collects/scribblings/gui/editor-data-class-class.scrbl @@ -3,9 +3,8 @@ @defclass/title[editor-data-class% object% ()]{ -An @scheme[editor-data-class%] object defines a type for -@scheme[editor-data%] objects. See also @|editordatadiscuss|. - +An @racket[editor-data-class%] object defines a type for +@racket[editor-data%] objects. See also @|editordatadiscuss|. @defconstructor[()]{ @@ -25,7 +24,7 @@ internal use. @defmethod[(read [f (is-a?/c editor-stream-in%)]) (or/c (is-a?/c editor-data%) false/c)]{ -Reads a new data object from the given stream, returning @scheme[#f] if +Reads a new data object from the given stream, returning @racket[#f] if there is an error. } @@ -36,7 +35,7 @@ Reads a new data object from the given stream, returning @scheme[#f] if Sets the name of the class. Names starting with @litchar{wx} are reserved for internal use. -An editor data class name should usually have the form @scheme["(lib +An editor data class name should usually have the form @racket["(lib ...)"] to enable on-demand loading of the class; see @|editordatadiscuss| for details. diff --git a/collects/scribblings/gui/editor-data-class-list-intf.scrbl b/collects/scribblings/gui/editor-data-class-list-intf.scrbl index 98d02cba..98623eca 100644 --- a/collects/scribblings/gui/editor-data-class-list-intf.scrbl +++ b/collects/scribblings/gui/editor-data-class-list-intf.scrbl @@ -3,8 +3,8 @@ @definterface/title[editor-data-class-list<%> ()]{ -Each eventspace has an instance of @scheme[editor-data-class-list<%>], - obtained with @scheme[(get-the-editor-data-class-list)]. New +Each eventspace has an instance of @racket[editor-data-class-list<%>], + obtained with @racket[(get-the-editor-data-class-list)]. New instances cannot be created directly. This list keeps a list of editor data classes; this list is needed for loading snips from a file. See also @|editordatadiscuss|. @@ -20,7 +20,7 @@ exists in the list, this one will not be added. @defmethod[(find [name string?]) (or/c (is-a?/c snip-class%) false/c)]{ Finds a snip data class from the list with the given name, returning - @scheme[#f] if none can be found. + @racket[#f] if none can be found. } @@ -32,8 +32,8 @@ Returns an index into the list for the specified class. @defmethod[(nth [n exact-nonnegative-integer?]) (or/c (is-a?/c editor-data-class%) false/c)]{ -Returns the @scheme[n]th class in the list (counting from 0), returning - @scheme[#f] if the list has @scheme[n] or less classes. +Returns the @racket[n]th class in the list (counting from 0), returning + @racket[#f] if the list has @racket[n] or less classes. } diff --git a/collects/scribblings/gui/editor-data-class.scrbl b/collects/scribblings/gui/editor-data-class.scrbl index 7a85a8e9..76a882bd 100644 --- a/collects/scribblings/gui/editor-data-class.scrbl +++ b/collects/scribblings/gui/editor-data-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[editor-data% object% ()]{ -An @scheme[editor-data%] object contains extra data associated to a +An @racket[editor-data%] object contains extra data associated to a snip or region in an editor. See also @|editordatadiscuss|. @@ -11,7 +11,7 @@ snip or region in an editor. See also @|editordatadiscuss|. @defconstructor[()]{ The element returned by @method[editor-data% get-next] is initialized -to @scheme[#f]. +to @racket[#f]. } @@ -23,7 +23,7 @@ Gets the class for this data. @defmethod[(get-next) (or/c (is-a?/c editor-data%) false/c)]{ Gets the next editor data element in a list of editor data elements. -A @scheme[#f] terminates the list. +A @racket[#f] terminates the list. } @defmethod[(set-dataclass [v (is-a?/c editor-data-class%)]) @@ -32,20 +32,20 @@ A @scheme[#f] terminates the list. @defmethod[(set-next [v (or/c (is-a?/c editor-data%) false/c)]) void?]{Sets the next editor data element in a list of editor data elements. -A @scheme[#f] terminates the list. +A @racket[#f] terminates the list. } @defmethod[(write [f (is-a?/c editor-stream-out%)]) boolean?]{ @methspec{ -Writes the data to the specified stream, returning @scheme[#t] if data -is written successfully or @scheme[#f] otherwise. +Writes the data to the specified stream, returning @racket[#t] if data +is written successfully or @racket[#f] otherwise. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }}} diff --git a/collects/scribblings/gui/editor-intf.scrbl b/collects/scribblings/gui/editor-intf.scrbl index f629bfbd..9ea8ae6d 100644 --- a/collects/scribblings/gui/editor-intf.scrbl +++ b/collects/scribblings/gui/editor-intf.scrbl @@ -3,8 +3,8 @@ @definterface/title[editor<%> ()]{ -The @scheme[editor<%>] interface is implemented by @scheme[text%] and - @scheme[pasteboard%]. +The @racket[editor<%>] interface is implemented by @racket[text%] and + @racket[pasteboard%]. @defmethod[(add-canvas [canvas (is-a?/c editor-canvas%)]) void?]{ @@ -47,7 +47,7 @@ After an undoer returns, the undoer is popped off the editor's undo sequence. To extend the previous example, if a label change is paired with a move to realign the snip, then the label-change undoer should be added to the editor @italic{after} the call to @method[pasteboard% - move], and it should return @scheme[#t] when it is called. As a + move], and it should return @racket[#t] when it is called. As a result, the move will be undone immediately after the label change is undone. (If the opposite order is needed, use @method[editor<%> begin-edit-sequence] and @method[editor<%> end-edit-sequence] to @@ -64,7 +64,7 @@ The system adds undoers to an editor (in response to other method @methspec{ Gets a cursor to be used in the editor's @techlink{display}. If the - return value is @scheme[#f], a default cursor is used. + return value is @racket[#f], a default cursor is used. See also @method[editor<%> set-cursor]. @@ -125,7 +125,7 @@ Called just after the editor is loaded from a file. The argument to the method originally specified whether the save was successful, but failures now trigger exceptions such that the method is -not even called. Consequently, the argument is always @scheme[#t]. +not even called. Consequently, the argument is always @racket[#t]. See also @method[editor<%> can-load-file?] and @@ -150,7 +150,7 @@ Called just after the editor is saved to a file. The argument to the method originally specified whether the save was successful, but failures now trigger exceptions such that the method is -not even called. Consequently, the argument is always @scheme[#t]. +not even called. Consequently, the argument is always @racket[#t]. See also @method[editor<%> can-save-file?] and @@ -208,15 +208,15 @@ See also @method[editor<%> refresh-delayed?] and @method[editor<%> in-edit-sequence?], and see @secref["editorthreads"] for information about edit sequences and refresh requests. -If the @scheme[undoable?] flag is @scheme[#f], then the changes made +If the @racket[undoable?] flag is @racket[#f], then the changes made in the sequence cannot be reversed through the @method[editor<%> undo] method. This flag is only effective for the outermost @method[editor<%> begin-edit-sequence] when nested sequences are - used. Note that, for a @scheme[text%] object, the character-inserting + used. Note that, for a @racket[text%] object, the character-inserting version of @method[text% insert] interferes with sequence-based undo groupings. -If the @scheme[interrupt-streak?] flag is @scheme[#f] and the sequence is +If the @racket[interrupt-streak?] flag is @racket[#f] and the sequence is outermost, then special actions before and after the sequence count as consecutive actions. For example, kills just before and after the sequence are appended in the copy buffer. @@ -237,9 +237,9 @@ This method must be called before writing any special header data to a stream. See @|filediscuss| and @method[editor<%> write-headers-to-file] for more information. -The @scheme[name] string must be a unique name that can be used by a +The @racket[name] string must be a unique name that can be used by a header reader to recognize the data. This method will store a value - in @scheme[buffer] that should be passed on to @method[editor<%> + in @racket[buffer] that should be passed on to @method[editor<%> end-write-header-footer-to-file]. } @@ -270,7 +270,7 @@ Propagates the request to any snip with the editor-local focus. Checks whether a generic edit command would succeed for the editor. This check is especially useful for enabling and disabling menus on demand. See @method[editor<%> do-edit-operation] for information - about the @scheme[op] and @scheme[recursive?] arguments. + about the @racket[op] and @racket[recursive?] arguments. } @methimpl{ @@ -288,21 +288,21 @@ locked, etc. @methspec{ Called just before the editor is loaded from a file. If the return -value is @scheme[#f], the file is not loaded. See also +value is @racket[#f], the file is not loaded. See also @method[editor<%> on-load-file] and @method[editor<%> after-load-file]. -The @scheme[filename] argument is the name the file will be loaded +The @racket[filename] argument is the name the file will be loaded from. See @method[editor<%> load-file] for information about - @scheme[format]. + @racket[format]. -Note that the @scheme[filename] argument cannot be a string; it must +Note that the @racket[filename] argument cannot be a string; it must be a path value. - + } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -314,21 +314,21 @@ Returns @scheme[#t]. @methspec{ Called just before the editor is saved to a file. If the return value -is @scheme[#f], the file is not saved. See also @method[editor<%> +is @racket[#f], the file is not saved. See also @method[editor<%> on-save-file] and @method[editor<%> after-save-file]. -The @scheme[filename] argument is the name the file will be saved +The @racket[filename] argument is the name the file will be saved to. See @method[editor<%> load-file] for information about - @scheme[format]. + @racket[format]. -Note that the @scheme[filename] argument cannot be a string; it must +Note that the @racket[filename] argument cannot be a string; it must be a path value. } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -352,16 +352,16 @@ Destroys the undo history of the editor. [time exact-integer? 0]) void?]{ -Copies @techlink{item}s into the clipboard. If @scheme[extend?] is not - @scheme[#f], the old clipboard contents are appended. +Copies @techlink{item}s into the clipboard. If @racket[extend?] is not + @racket[#f], the old clipboard contents are appended. The system may execute a copy (in response to other method calls) without calling this method. To extend or re-implement copying, override the @xmethod[text% do-copy] or @xmethod[pasteboard% do-copy] method of an editor. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. @@ -371,7 +371,7 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If (or/c (is-a?/c text%) (is-a?/c pasteboard%))]{ Creates a new editor with the same properties as this one. After an - editor is created (either a @scheme[text%] or @scheme[pasteboard%] + editor is created (either a @racket[text%] or @racket[pasteboard%] instance, as appropriate), the new editor is passed to @method[editor<%> copy-self-to]. @@ -381,14 +381,14 @@ Creates a new editor with the same properties as this one. After an @defmethod[(copy-self-to [dest (or/c (is-a?/c text%) (is-a?/c pasteboard%))]) void?]{ -Copies the properties of @this-obj[] to @scheme[dest]. +Copies the properties of @this-obj[] to @racket[dest]. -Each snip in @this-obj[] is copied and inserted into @scheme[dest]. +Each snip in @this-obj[] is copied and inserted into @racket[dest]. In addition, @this-obj[]'s filename, maximum undo history setting, keymap, interactive caret threshold, and overwrite-styles-on-load -settings are installed into @scheme[dest]. Finally, @this-obj[]'s +settings are installed into @racket[dest]. Finally, @this-obj[]'s style list is copied and the copy is installed as the style list for -@scheme[dest]. +@racket[dest]. } @@ -397,7 +397,7 @@ style list is copied and the copy is installed as the style list for void?]{ Copies and then deletes the currently selected @techlink{item}s. If - @scheme[extend?] is not @scheme[#f], the old clipboard contents are + @racket[extend?] is not @racket[#f], the old clipboard contents are appended. The system may execute a cut (in response to other method calls) @@ -407,8 +407,8 @@ The system may execute a cut (in response to other method calls) deletions in an editor, override @xmethod[text% on-delete] or @xmethod[pasteboard% on-delete]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -432,7 +432,7 @@ See also @method[editor<%> editor-location-to-dc-location]. string?]{ Returns the name of a style to be used for newly inserted text, - etc. The default is @scheme["Standard"]. + etc. The default is @racket["Standard"]. } @@ -444,31 +444,31 @@ Returns the name of a style to be used for newly inserted text, [time exact-integer? 0]) void?]{ -Performs a generic edit command. The @scheme[op] argument must be a +Performs a generic edit command. The @racket[op] argument must be a valid edit command, one of: @itemize[ -@item{@scheme['undo] --- undoes the last operation} -@item{@scheme['redo] --- undoes the last undo} -@item{@scheme['clear] --- deletes the current selection} -@item{@scheme['cut] --- cuts} -@item{@scheme['copy] --- copies} -@item{@scheme['paste] --- pastes} -@item{@scheme['kill] --- cuts to the end of the current line, or cuts a newline if there is only whitespace between the selection and end of line} -@item{@scheme['select-all] --- selects everything in the editor} -@item{@scheme['insert-text-box] --- inserts a text editor as an @techlink{item} in this editor; see also +@item{@racket['undo] --- undoes the last operation} +@item{@racket['redo] --- undoes the last undo} +@item{@racket['clear] --- deletes the current selection} +@item{@racket['cut] --- cuts} +@item{@racket['copy] --- copies} +@item{@racket['paste] --- pastes} +@item{@racket['kill] --- cuts to the end of the current line, or cuts a newline if there is only whitespace between the selection and end of line} +@item{@racket['select-all] --- selects everything in the editor} +@item{@racket['insert-text-box] --- inserts a text editor as an @techlink{item} in this editor; see also @method[editor<%> on-new-box] .} -@item{@scheme['insert-pasteboard-box] --- inserts a pasteboard editor as an @techlink{item} in this editor; see also +@item{@racket['insert-pasteboard-box] --- inserts a pasteboard editor as an @techlink{item} in this editor; see also @method[editor<%> on-new-box] .} -@item{@scheme['insert-image] --- gets a filename from the user and inserts the image as an @techlink{item} in this editor; see also +@item{@racket['insert-image] --- gets a filename from the user and inserts the image as an @techlink{item} in this editor; see also @method[editor<%> on-new-image-snip] .} ] -If @scheme[recursive?] is not @scheme[#f], then the command is passed on to +If @racket[recursive?] is not @racket[#f], then the command is passed on to any active snips of this editor (i.e., snips which own the caret). -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -501,8 +501,8 @@ See @method[editor<%> begin-edit-sequence]. void?]{ This method must be called after writing any special header data to a -stream. The @scheme[buffer-value] argument must be the value put in -the @scheme[buffer] argument box by @method[editor<%> +stream. The @racket[buffer-value] argument must be the value put in +the @racket[buffer] argument box by @method[editor<%> begin-write-header-footer-to-file]. See @|filediscuss| and @method[editor<%> write-headers-to-file] for @@ -514,7 +514,7 @@ more information. @defmethod[(find-first-snip) (or/c (is-a?/c snip%) #f)]{ -Returns the first snip in the editor, or @scheme[#f] if the editor is +Returns the first snip in the editor, or @racket[#f] if the editor is empty. To get all of the snips in the editor, use the @xmethod[snip% next] on the resulting snip. @@ -530,7 +530,7 @@ The first snip in a text editor is the one at @techlink{position} Maps a vertical @techlink{location} within the editor to a vertical scroll position. -For @scheme[text%] objects: @|FCA| @|OVD| +For @racket[text%] objects: @|FCA| @|OVD| } @@ -539,15 +539,15 @@ For @scheme[text%] objects: @|FCA| @|OVD| If the editor is displayed in a canvas, this method returns the canvas that most recently had the keyboard focus (while the editor was - displayed). If no such canvas exists, @scheme[#f] is returned. + displayed). If no such canvas exists, @racket[#f] is returned. } @defmethod[(get-admin) (or/c (is-a?/c editor-admin%) #f)]{ -Returns the @scheme[editor-admin%] object currently managing this - editor or @scheme[#f] if the editor is not displayed. +Returns the @racket[editor-admin%] object currently managing this + editor or @racket[#f] if the editor is not displayed. } @@ -557,7 +557,7 @@ Returns the @scheme[editor-admin%] object currently managing this If @method[editor<%> get-active-canvas] returns a canvas, that canvas is also returned by this method. Otherwise, if @method[editor<%> get-canvases] returns a non-empty list, the first canvas in the list - is returned, otherwise @scheme[#f] is returned. + is returned, otherwise @racket[#f] is returned. } @@ -568,7 +568,7 @@ Returns a list of canvases displaying the editor. An editor may be displayed in multiple canvases and no other kind of @techlink{display}, or one instance of another kind of @techlink{display} and no canvases. If the editor is not displayed or the editor's current @techlink{display} is not a canvas, - @scheme[null] is returned. + @racket[null] is returned. } @@ -577,7 +577,7 @@ Returns a list of canvases displaying the editor. An editor may be Typically used (indirectly) by snip objects belonging to the editor. Returns a destination drawing context which is suitable for - determining display sizing information, or @scheme[#f] if the editor + determining display sizing information, or @racket[#f] if the editor is not displayed. } @@ -614,15 +614,15 @@ padding (see @method[text% set-padding]). Called when the user must be queried for a filename to load an editor. A starting-directory path is passed in, but is may be - @scheme[#f] to indicate that any directory is fine. + @racket[#f] to indicate that any directory is fine. -Note that the @scheme[directory] argument cannot be a string; it must - be a path value or @scheme[#f]. +Note that the @racket[directory] argument cannot be a string; it must + be a path value or @racket[#f]. } @methimpl{ -Calls the global @scheme[get-file] procedure. +Calls the global @racket[get-file] procedure. If the editor is displayed in a single canvas, then the canvas's top-level frame is used as the parent for the file dialog. Otherwise, @@ -634,10 +634,10 @@ If the editor is displayed in a single canvas, then the canvas's (or/c path-string? #f)]{ Returns the path name of the last file saved from or loaded into this - editor, @scheme[#f] if the editor has no filename. + editor, @racket[#f] if the editor has no filename. -@boxisfill[(scheme temp) @elem{@scheme[#t] if the filename is temporary or @scheme[#f] -otherwise}] +@boxisfill[(scheme temp) @elem{@racket[#t] if the filename is temporary or +@racket[#f] otherwise}] } @@ -655,12 +655,12 @@ a discussion of flattened vs. non-flattened text. @index['("keyboard focus" "snips")]{Returns} the snip within the editor that gets the keyboard focus when the editor has the focus, or - @scheme[#f] if the editor does not delegate the focus. + @racket[#f] if the editor does not delegate the focus. -The returned snip might be an @scheme[editor-snip%] object. In that +The returned snip might be an @racket[editor-snip%] object. In that case, the embedded editor might delegate the focus to one of its own snips. However, the @method[editor<%> get-focus-snip] method returns - only the @scheme[editor-snip%] object, because it is the focus-owning + only the @racket[editor-snip%] object, because it is the focus-owning snip within the immediate editor. See also @method[editor<%> set-caret-owner]. @@ -672,9 +672,9 @@ See also @method[editor<%> set-caret-owner]. (or/c 'no-caret 'show-inactive-caret 'show-caret)]{ Returns the threshold for painting an inactive selection. This - threshold is compared with the @scheme[draw-caret] argument to + threshold is compared with the @racket[draw-caret] argument to @method[editor<%> refresh] and if the argument is as least as large - as the threshold (but larger than @indexed-scheme['show-caret]), the + as the threshold (but larger than @indexed-racket['show-caret]), the selection is drawn as inactive. See also @method[editor<%> set-inactive-caret-threshold] and @@ -706,7 +706,7 @@ See also @method[editor<%> set-load-overwrites-styles]. (or/c (and/c real? (not/c negative?)) 'none)]{ Gets the maximum display height for the contents of the editor; zero or - @scheme['none] indicates that there is no maximum. + @racket['none] indicates that there is no maximum. } @@ -742,8 +742,8 @@ If the @techlink{display} is an editor canvas, see also (or/c (and/c real? (not/c negative?)) 'none)]{ Gets the maximum display width for the contents of the editor; zero or - @scheme['none] indicates that there is no maximum. In a text editor, - zero of @scheme['none] disables automatic line breaking. + @racket['none] indicates that there is no maximum. In a text editor, + zero of @racket['none] disables automatic line breaking. } @@ -751,7 +751,7 @@ Gets the maximum display width for the contents of the editor; zero or (or/c (and/c real? (not/c negative?)) 'none)]{ Gets the minimum display height for the contents of the editor; zero - or @scheme['none] indicates that there is no minimum. + or @racket['none] indicates that there is no minimum. } @@ -760,15 +760,15 @@ Gets the minimum display height for the contents of the editor; zero (or/c (and/c real? (not/c negative?)) 'none)]{ Gets the minimum display width for the contents of the editor; zero or - @scheme['none] indicates that there is no minimum. + @racket['none] indicates that there is no minimum. } @defmethod[(get-paste-text-only) boolean?]{ -If the result is @scheme[#t], then the editor accepts only plain-text - data from the clipboard. If the result is @scheme[#f], the editor +If the result is @racket[#t], then the editor accepts only plain-text + data from the clipboard. If the result is @racket[#f], the editor accepts both text and snip data from the clipboard. } @@ -779,13 +779,13 @@ If the result is @scheme[#t], then the editor accepts only plain-text @methspec{ Gets extra data associated with a snip (e.g., @techlink{location} - information in a pasteboard) or returns @scheme[#f] is there is no + information in a pasteboard) or returns @racket[#f] is there is no information. See @|editordatadiscuss| for more information. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -797,21 +797,21 @@ Returns @scheme[#f]. boolean?]{ Gets the @techlink{location} of the given snip. If the snip is found in - the editor, @scheme[#t] is returned; otherwise, @scheme[#f] is returned. + the editor, @racket[#t] is returned; otherwise, @racket[#f] is returned. @boxisfillnull[(scheme x) @elem{the x-coordinate of the snip's @techlink{location}}] @boxisfillnull[(scheme y) @elem{the y-coordinate of the snip's @techlink{location}}] -If @scheme[bottom-right?] is not @scheme[#f], the values in the - @scheme[x] and @scheme[y] boxes are for the snip's bottom right +If @racket[bottom-right?] is not @racket[#f], the values in the + @racket[x] and @racket[y] boxes are for the snip's bottom right corner instead of its top-left corner. Obtaining the @techlink{location} if the bottom-right corner may trigger delayed size calculations (including snips other than the one whose @techlink{location} was requested). -@|OVD| As a special case, however, a @scheme[pasteboard%] object - always reports valid answers when @scheme[bottom-right?] is @scheme[#f]. +@|OVD| As a special case, however, a @racket[pasteboard%] object + always reports valid answers when @racket[bottom-right?] is @racket[#f]. @FCAME[] } @@ -866,9 +866,9 @@ Converts the given coordinates from top-level @techlink{display} coordinates @method[editor<%> dc-location-to-editor-location]. @boxisfillnull[(scheme x) @elem{the translated x-coordinate of the value initially -in @scheme[x]}] +in @racket[x]}] @boxisfillnull[(scheme y) @elem{the translated x-coordinate of the value initially -in @scheme[y]}] +in @racket[y]}] @|OVD| @@ -879,7 +879,7 @@ See also @method[editor<%> local-to-global]. @defmethod[#:mode public-final (in-edit-sequence?) boolean?]{ -Returns @scheme[#t] if updating on this editor is currently delayed +Returns @racket[#t] if updating on this editor is currently delayed because @method[editor<%> begin-edit-sequence] has been called for this editor. @@ -903,7 +903,7 @@ Inserts data into the editor. A snip cannot be inserted into multiple void?]{ Inserts a box (a sub-editor) into the editor by calling -@method[editor<%> on-new-box], then passing along @scheme[type] and +@method[editor<%> on-new-box], then passing along @racket[type] and inserts the resulting snip into the editor. @|OnInsertNote| @@ -918,11 +918,11 @@ inserts the resulting snip into the editor. boolean?]{ Inserts the content of a file or port into the editor (at the current - selection @techlink{position} in @scheme[text%] editors). The result - is @scheme[#t]; if an error occurs, an exception is raised. + selection @techlink{position} in @racket[text%] editors). The result + is @racket[#t]; if an error occurs, an exception is raised. -For information on @scheme[format], see @method[editor<%> load-file]. -The @scheme[show-errors?] argument is no longer used. +For information on @racket[format], see @method[editor<%> load-file]. +The @racket[show-errors?] argument is no longer used. @|OnInsertNote| @@ -941,15 +941,15 @@ The @scheme[show-errors?] argument is no longer used. Inserts an image into the editor. -If @scheme[filename] is @scheme[#f], then the -user is queried for a filename. The @scheme[kind] must one of +If @racket[filename] is @racket[#f], then the +user is queried for a filename. The @racket[kind] must one of the symbols that can be passed to @method[bitmap% load-file]. After the filename has been determined, an image is created by calling @method[editor<%> on-new-image-snip]. See also -@scheme[image-snip%]. +@racket[image-snip%]. @|OnInsertNote| @@ -962,19 +962,19 @@ calling (or/c 'standard 'text 'text-force-cr)]{ Inserts the content of a port into the editor (at the current - selection @techlink{position} in @scheme[text%] editors) without wrapping + selection @techlink{position} in @racket[text%] editors) without wrapping the insert operations as an edit sequence. The result is the actual format of the loaded content (which is different from the given - format type if the given format is @scheme['guess], @scheme['same], or - @scheme['copy]). + format type if the given format is @racket['guess], @racket['same], or + @racket['copy]). -The @scheme[port] must support position setting with @scheme[file-position]. +The @racket[port] must support position setting with @racket[file-position]. -For information on @scheme[format], see +For information on @racket[format], see @method[editor<%> load-file]. -if @scheme[replace-styles?] is true, then styles in the current style - list are replaced by style specifications in @scheme[port]'s stream. +if @racket[replace-styles?] is true, then styles in the current style + list are replaced by style specifications in @racket[port]'s stream. See also @method[editor<%> insert-file]. } @@ -988,17 +988,17 @@ See also @method[editor<%> insert-file]. When @method[editor<%> on-paint] is overridden, call this method when the state of @method[editor<%> on-paint]'s drawing changes. -The @scheme[x], @scheme[y], @scheme[width], and @scheme[height] +The @racket[x], @racket[y], @racket[width], and @racket[height] arguments specify the area that needs repainting in editor - coordinates. If @scheme[width]/@scheme[height] is @scheme['end], then + coordinates. If @racket[width]/@racket[height] is @racket['end], then the total height/width of the editor (as reported by @method[editor<%> get-extent]) is used. Note that the editor's size can be smaller than the visible region of its @techlink{display}. If - @scheme[width]/@scheme[height] is @scheme['display-end], then the + @racket[width]/@racket[height] is @racket['display-end], then the largest height/width of the editor's views (as reported by @method[editor-admin% get-max-view]) is used. If - @scheme[width]/@scheme[height] is not @scheme['display-end], then - the given @scheme[width]/@scheme[height] is constrained to the + @racket[width]/@racket[height] is not @racket['display-end], then + the given @racket[width]/@racket[height] is constrained to the editor's size. The default implementation triggers a redraw of the editor, either @@ -1011,7 +1011,7 @@ See also @method[editor<%> size-cache-invalid].} @defmethod[(is-locked?) boolean?]{ -Returns @scheme[#t] if the editor is currently locked, @scheme[#f] +Returns @racket[#t] if the editor is currently locked, @racket[#f] otherwise. See @method[editor<%> lock] for more information. } @@ -1020,9 +1020,9 @@ Returns @scheme[#t] if the editor is currently locked, @scheme[#f] @defmethod[(is-modified?) boolean?]{ -Returns @scheme[#t] if the editor has been modified since the last +Returns @racket[#t] if the editor has been modified since the last save or load (or the last call to @method[editor<%> set-modified] - with @scheme[#f]), @scheme[#f] otherwise. + with @racket[#f]), @racket[#f] otherwise. } @@ -1030,8 +1030,8 @@ Returns @scheme[#t] if the editor has been modified since the last @defmethod[(is-printing?) boolean?]{ -Returns @scheme[#t] if the editor is currently being printed through -the @method[editor<%> print] method, @scheme[#f] otherwise.} +Returns @racket[#t] if the editor is currently being printed through +the @method[editor<%> print] method, @racket[#f] otherwise.} @defmethod[(kill [time exact-integer? 0]) @@ -1042,8 +1042,8 @@ In a text editor, cuts to the end of the current line, or cuts a line. Multiple consecutive kills are appended. In a pasteboard editor, cuts the current selection. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. See also @method[editor<%> cut]. @@ -1060,53 +1060,53 @@ See also @method[editor<%> cut]. boolean?]{ -Loads a file into the editor and returns @scheme[#t]. If an error +Loads a file into the editor and returns @racket[#t]. If an error occurs, an exception is raised. -If @scheme[filename] is @scheme[#f], then the -internally stored filename will be used; if @scheme[filename] is @scheme[""] or +If @racket[filename] is @racket[#f], then the +internally stored filename will be used; if @racket[filename] is @racket[""] or if the internal name is unset or temporary, then the user will be prompted for a name. -The possible values for @scheme[format] are listed below. A single set of -@scheme[format] values are used for loading and saving files: +The possible values for @racket[format] are listed below. A single set of +@racket[format] values are used for loading and saving files: @itemize[ -@item{@scheme['guess] --- guess the format based on +@item{@racket['guess] --- guess the format based on extension and/or contents; when saving a file, this is the same as -@scheme['standard]} +@racket['standard]} -@item{@scheme['same] --- read in whatever format was last loaded or saved} +@item{@racket['same] --- read in whatever format was last loaded or saved} -@item{@scheme['standard] --- read/write a standard file (binary format)} +@item{@racket['standard] --- read/write a standard file (binary format)} -@item{@scheme['copy] --- write using whatever format was last loaded +@item{@racket['copy] --- write using whatever format was last loaded or saved, but do not change the modification flag or remember - @scheme[filename] (saving only)} + @racket[filename] (saving only)} -@item{@scheme['text] --- read/write a text file (@scheme[text%] only); +@item{@racket['text] --- read/write a text file (@racket[text%] only); file writing uses the platform's text-mode conventions (e.g., newlines as return--linefeed combinations on Windows) when not specifically disabled via @method[editor<%> use-file-text-mode]} -@item{@scheme['text-force-cr] --- read/write a text file -(@scheme[text%] only); when writing, change automatic newlines (from +@item{@racket['text-force-cr] --- read/write a text file +(@racket[text%] only); when writing, change automatic newlines (from word-wrapping) into real carriage returns} ] -In a @scheme[text%] instance, the format returned from @method[text% - get-file-format] is always one of @scheme['standard], @scheme['text], - or @scheme['text-force-cr]. +In a @racket[text%] instance, the format returned from @method[text% + get-file-format] is always one of @racket['standard], @racket['text], + or @racket['text-force-cr]. -The @scheme[show-errors?] argument is no longer used. +The @racket[show-errors?] argument is no longer used. The filename used to load the file can be retrieved with - @method[editor<%> get-filename]. For a @scheme[text%] instance, the + @method[editor<%> get-filename]. For a @racket[text%] instance, the format can be retrieved with @method[text% get-file-format]. However, if an error occurs while loading the file, the filename is set to - @scheme[#f]. + @racket[#f]. See also @method[editor<%> on-load-file], @method[editor<%> after-load-file], @method[editor<%> can-load-file?], and @@ -1124,9 +1124,9 @@ Converts the given coordinates from editor @techlink{location} @method[editor<%> editor-location-to-dc-location]. @boxisfillnull[(scheme x) @elem{the translated x-coordinate of the value initially -in @scheme[x]}] +in @racket[x]}] @boxisfillnull[(scheme y) @elem{the translated x-coordinate of the value initially -in @scheme[y]}] +in @racket[y]}] @|OVD| @@ -1138,9 +1138,9 @@ See also @method[editor<%> global-to-local]. @defmethod[(locations-computed?) boolean?]{ -Returns @scheme[#t] if all @techlink{location} information has been +Returns @racket[#t] if all @techlink{location} information has been computed after recent changes to the editor's content or to its - snips, @scheme[#f] otherwise. + snips, @racket[#f] otherwise. Location information is often computed on demand, and @method[editor<%> begin-edit-sequence] tends to delay the @@ -1201,9 +1201,9 @@ Reports whether the editor is internally locked for writing. See Typically called (indirectly) by a snip within the editor to force the editor to be redrawn. -The @scheme[localx], @scheme[localy], @scheme[width], and @scheme[height] +The @racket[localx], @racket[localy], @racket[width], and @racket[height] arguments specify the area that needs repainting in the coordinate - system of @scheme[snip]. + system of @racket[snip]. @FCAME[] @@ -1215,7 +1215,7 @@ The @scheme[localx], @scheme[localy], @scheme[width], and @scheme[height] Reports the number of scroll positions available within the editor. -For @scheme[text%] objects: @|FCA| @|EVD| +For @racket[text%] objects: @|FCA| @|EVD| } @@ -1258,8 +1258,8 @@ Consider overriding @method[editor<%> on-local-char] or @methimpl{ Either passes this event on to a caret-owning snip or calls - @method[editor<%> on-local-char]. In the latter case, @scheme[text%] - first calls @scheme[hide-cursor-until-moved]. + @method[editor<%> on-local-char]. In the latter case, @racket[text%] + first calls @racket[hide-cursor-until-moved]. }} @@ -1392,9 +1392,9 @@ Consider overriding @method[editor<%> on-local-event] or @methimpl{ Either passes this event on to a caret-owning snip, selects a new - caret-owning snip (@scheme[text%] only) and passes the event on to + caret-owning snip (@racket[text%] only) and passes the event on to the selected snip, or calls @method[editor<%> on-local-event]. A new - caret-owning snip is selected in a @scheme[text%] object when the + caret-owning snip is selected in a @racket[text%] object when the click is on an event-handling snip, and not too close to the space between snips (see @method[text% get-between-threshold] ). @@ -1406,8 +1406,8 @@ Either passes this event on to a caret-owning snip, selects a new @index['("keyboard focus" "notification")]{Called} when the keyboard focus changes into or out of this editor (and not to/from a snip - within the editor) with @scheme[#t] if the focus is being turned on, - @scheme[#f] otherwise. + within the editor) with @racket[#t] if the focus is being turned on, + @racket[#f] otherwise. } @@ -1423,11 +1423,11 @@ Called just before the editor is loaded from a file, after calling @method[editor<%> can-load-file?] to verify that the load is allowed. See also @method[editor<%> after-load-file]. -The @scheme[filename] argument is the name the file will be loaded +The @racket[filename] argument is the name the file will be loaded from. See @method[editor<%> load-file] for information about - @scheme[format]. + @racket[format]. -Note that the @scheme[filename] argument cannot be a string; it must +Note that the @racket[filename] argument cannot be a string; it must be a path value. } @@ -1485,11 +1485,11 @@ Creates and returns a new snip for an embedded editor. This method is } @methimpl{ -Creates a @scheme[editor-snip%] with either a sub-editor from - @scheme[text%] or sub-pasteboard from @scheme[pasteboard%], depending - on whether @scheme[type] is @scheme['text] or - @scheme['pasteboard]. The keymap (see @scheme[keymap%]) and style - list (see @scheme[style-list%]) for of the new sub-editor are set to +Creates a @racket[editor-snip%] with either a sub-editor from + @racket[text%] or sub-pasteboard from @racket[pasteboard%], depending + on whether @racket[type] is @racket['text] or + @racket['pasteboard]. The keymap (see @racket[keymap%]) and style + list (see @racket[style-list%]) for of the new sub-editor are set to the keymap and style list of this editor. }} @@ -1505,16 +1505,16 @@ Creates a @scheme[editor-snip%] with either a sub-editor from (is-a?/c image-snip%)]{ @methspec{ -Creates and returns a new instance of @scheme[image-snip%] for +Creates and returns a new instance of @racket[image-snip%] for @method[editor<%> insert-image]. -Note that the @scheme[filename] argument cannot be a string; it must be a +Note that the @racket[filename] argument cannot be a string; it must be a path value. } @methimpl{ -Returns @scheme[(make-object image-snip% filename kind relative-path? inline?)]. +Returns @racket[(make-object image-snip% filename kind relative-path? inline?)]. }} @@ -1537,13 +1537,13 @@ Provides a way to add arbitrary graphics to an editor's @techlink{display}. Thi method is called just before and just after every painting of the editor. -The @scheme[before?] argument is @scheme[#t] when the method is called just - before a painting the contents of the editor or @scheme[#f] when it is - called after painting. The @scheme[left], @scheme[top], @scheme[right], and - @scheme[bottom] arguments specify which region of the editor is being +The @racket[before?] argument is @racket[#t] when the method is called just + before a painting the contents of the editor or @racket[#f] when it is + called after painting. The @racket[left], @racket[top], @racket[right], and + @racket[bottom] arguments specify which region of the editor is being repainted, in editor coordinates. To get the coordinates for - @scheme[dc], offset editor coordinates by adding (@scheme[dx], @scheme[dy]). - See @|drawcaretdiscuss| for information about @scheme[draw-caret]. + @racket[dc], offset editor coordinates by adding (@racket[dx], @racket[dy]). + See @|drawcaretdiscuss| for information about @racket[draw-caret]. The @method[editor<%> on-paint] method, together with the snips' @method[snip% draw] methods, must be able to draw the entire state of @@ -1588,11 +1588,11 @@ Called just before the editor is saved to a file, after calling @method[editor<%> can-save-file?] to verify that the save is allowed. See also @method[editor<%> after-save-file]. -The @scheme[filename] argument is the name the file will be saved +The @racket[filename] argument is the name the file will be saved to. See @method[editor<%> load-file] for information about -@scheme[format]. +@racket[format]. -Note that the @scheme[filename] argument cannot be a string; it must +Note that the @racket[filename] argument cannot be a string; it must be a path value. @@ -1621,16 +1621,16 @@ See also @method[editor<%> set-modified]. } @methimpl{ -If @scheme[modified?] is true and the editor was not already modified +If @racket[modified?] is true and the editor was not already modified (i.e., its @method[editor<%> is-modified?] method reports - @scheme[#f]), then the @method[editor<%> set-modified] method is - called with @scheme[#t]. If the editor was already modified, then the + @racket[#f]), then the @method[editor<%> set-modified] method is + called with @racket[#t]. If the editor was already modified, then the internal modify-counter is incremented. -If @scheme[modified?] is @scheme[#f], and if the modify-counter is - @scheme[1], then the @method[editor<%> set-modified] method is called - with @scheme[#f] (on the assumption that the modify-counter was set - to @scheme[1] by an earlier call to this method for the same snip). +If @racket[modified?] is @racket[#f], and if the modify-counter is + @racket[1], then the @method[editor<%> set-modified] method is called + with @racket[#f] (on the assumption that the modify-counter was set + to @racket[1] by an earlier call to this method for the same snip). }} @@ -1656,8 +1656,8 @@ Propagates the flag to any snip with the editor-local focus. If no Pastes the current contents of the clipboard into the editor. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. The system may execute a paste (in response to other method calls) @@ -1676,8 +1676,8 @@ See also @method[editor<%> get-paste-text-only]. Like @method[editor<%> paste], but on Unix, uses the X11 selection instead of the clipboard. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. To extend or re-implement copying, override the @xmethod[text% @@ -1697,18 +1697,18 @@ To extend or re-implement copying, override the @xmethod[text% Prints the editor. -If @scheme[interactive?] is true and a PostScript file is created, the +If @racket[interactive?] is true and a PostScript file is created, the is given a dialog for adjusting printing parameters; see also - @scheme[get-ps-setup-from-user]. Otherwise, if a PostScript file is - created, the settings returned by @scheme[current-ps-setup] are + @racket[get-ps-setup-from-user]. Otherwise, if a PostScript file is + created, the settings returned by @racket[current-ps-setup] are used. (The user may still get a dialog to select an output file name; - see @scheme[post-script-dc%] for more details.) + see @racket[post-script-dc%] for more details.) -If @scheme[fit-on-page?] is a true value, then during printing for a - @scheme[text%] editor, the editor's maximum width is set to the width +If @racket[fit-on-page?] is a true value, then during printing for a + @racket[text%] editor, the editor's maximum width is set to the width of the page (less margins) and the autowrapping bitmap is removed. -The @scheme[output-mode] setting +The @racket[output-mode] setting determines whether the output is generated directly as a PostScript file, generated directly as a PDF file, or generated using the platform-specific standard printing mechanism. The possible @@ -1716,39 +1716,39 @@ The @scheme[output-mode] setting @itemize[ - @item{@scheme['standard] --- print using the platform-standard - mechanism (via a @scheme[printer-dc%])} + @item{@racket['standard] --- print using the platform-standard + mechanism (via a @racket[printer-dc%])} - @item{@scheme['postscript] --- print to a PostScript file (via a - @scheme[post-script-dc%])} + @item{@racket['postscript] --- print to a PostScript file (via a + @racket[post-script-dc%])} - @item{@scheme['pdf] --- print to a PDF file (via a - @scheme[pdf-dc%])} + @item{@racket['pdf] --- print to a PDF file (via a + @racket[pdf-dc%])} ] -If @scheme[parent] is not @scheme[#f], it is used as the parent window +If @racket[parent] is not @racket[#f], it is used as the parent window for configuration dialogs (for either PostScript or platform-standard - printing). If @scheme[parent] is @scheme[#f] and if the editor is + printing). If @racket[parent] is @racket[#f] and if the editor is displayed in a single canvas, then the canvas's top-level frame is used as the parent for configuration dialogs. Otherwise, configuration dialogs will have no parent. -The @scheme[force-ps-page-bbox?] argument is used for PostScript +The @racket[force-ps-page-bbox?] argument is used for PostScript and PDF printing, and is used as the third initialization argument when - creating the @scheme[post-script-dc%] or @racket[pdf-dc%] instance. Unless it is - @scheme[#f], the bounding-box of the resulting PostScript/PDF file is set + creating the @racket[post-script-dc%] or @racket[pdf-dc%] instance. Unless it is + @racket[#f], the bounding-box of the resulting PostScript/PDF file is set to the current paper size. -The @scheme[as-eps?] argument is used for PostScript and PDF printing, and is +The @racket[as-eps?] argument is used for PostScript and PDF printing, and is used as the fourth initialization argument when creating the - @scheme[post-script-dc%] or @racket[pdf-dc%] instance. Unless it is @scheme[#f], a + @racket[post-script-dc%] or @racket[pdf-dc%] instance. Unless it is @racket[#f], a resulting PostScript file is identified as Encapsulated PostScript (EPS). The printing margins are determined by @method[ps-setup% - get-editor-margin] in the current @scheme[ps-setup%] object (as - determined by @scheme[current-ps-setup]), but they are ignored when + get-editor-margin] in the current @racket[ps-setup%] object (as + determined by @racket[current-ps-setup]), but they are ignored when @racket[as-eps?] is true. } @@ -1761,13 +1761,13 @@ The printing margins are determined by @method[ps-setup% Prints the editor into the given drawing context. See also @method[editor<%> print]. -If @scheme[page-number] is a positive integer, then just the +If @racket[page-number] is a positive integer, then just the indicated page is printed, where pages are numbered from -@scheme[1]. If @racket[page-number] is @scheme[0], then the +@racket[1]. If @racket[page-number] is @racket[0], then the entire content of the editor is printed on a single page. -When @scheme[page-number] is negative, then the editor content is +When @racket[page-number] is negative, then the editor content is split across pages as needed to fit, and the -@method[dc<%> start-page] and @method[dc<%> end-page] methods of @scheme[dc<%>] are +@method[dc<%> start-page] and @method[dc<%> end-page] methods of @racket[dc<%>] are called for each page. } @@ -1780,16 +1780,16 @@ called for each page. Called when the user must be queried for a filename to save an editor. Starting-directory and default-name paths are passed in, - but either may be @scheme[#f] to indicate that any directory is fine or + but either may be @racket[#f] to indicate that any directory is fine or there is no default name. -Note that the @scheme[directory] and @scheme[filename] arguments +Note that the @racket[directory] and @racket[filename] arguments cannot be strings; each must be a path value. } @methimpl{ -Calls the global @scheme[put-file] procedure. +Calls the global @racket[put-file] procedure. If the editor is displayed in a single canvas, then the canvas's top-level frame is used as the parent for the file dialog. Otherwise, @@ -1812,7 +1812,7 @@ See @method[editor<%> read-header-from-file]. boolean?]{ Reads new contents for the editor from a stream. The return value is - @scheme[#t] if there are no errors, @scheme[#f] otherwise. See also + @racket[#t] if there are no errors, @racket[#f] otherwise. See also @|filediscuss|. The stream provides either new mappings for names in the editor's @@ -1823,8 +1823,8 @@ The stream provides either new mappings for names in the editor's @itemize[ - @item{In the former case, if the @scheme[overwrite-styles?] argument - is @scheme[#f], then each style name in the loaded file that is already + @item{In the former case, if the @racket[overwrite-styles?] argument + is @racket[#f], then each style name in the loaded file that is already in the current style list keeps its current style. Otherwise, existing named styles are overwritten with specifications from the loaded file.} @@ -1841,8 +1841,8 @@ The stream provides either new mappings for names in the editor's boolean?]{ Called to handle a named header that is found when reading editor data - from a stream. The return value is @scheme[#t] if there are no errors, - @scheme[#f] otherwise. + from a stream. The return value is @racket[#t] if there are no errors, + @racket[#f] otherwise. Override this method only to embellish the file format with new header information. Always call the inherited method if the derived reader @@ -1880,19 +1880,19 @@ See also @method[editor<%> add-undo]. void?]{ Repaints a region of the editor, generally called by an editor - administrator. The @scheme[x], @scheme[y], @scheme[width], and - @scheme[height] arguments specify the area that needs repainting in + administrator. The @racket[x], @racket[y], @racket[width], and + @racket[height] arguments specify the area that needs repainting in editor coordinates. The @method[editor-admin% get-dc] method of the editor's administrator (as returned by @method[editor<%> get-admin]) - supplies the target @scheme[dc<%>] object and offset for drawing. + supplies the target @racket[dc<%>] object and offset for drawing. -See @|drawcaretdiscuss| for information about @scheme[draw-caret]. +See @|drawcaretdiscuss| for information about @racket[draw-caret]. -The @scheme[background] color corresponds to the background of the - @techlink{display}; if it is @scheme[#f], then the display is transparent. +The @racket[background] color corresponds to the background of the + @techlink{display}; if it is @racket[#f], then the display is transparent. An editor should use the given background color as its own - background (or not paint the background of @scheme[background] is - @scheme[#f]). + background (or not paint the background of @racket[background] is + @racket[#f]). See @secref["editorthreads"] for information about edit sequences and refresh requests. @@ -1903,12 +1903,12 @@ See @secref["editorthreads"] for information about edit sequences and @defmethod[(refresh-delayed?) boolean?]{ -Returns @scheme[#t] if updating on this editor is currently +Returns @racket[#t] if updating on this editor is currently delayed. Updating may be delayed because @method[editor<%> begin-edit-sequence] has been called for this editor, or because the editor has no administrator, or because the editor's administrator - returns @scheme[#t] from its @method[editor-admin% refresh-delayed?] - method. (The administrator might return @scheme[#t] because an + returns @racket[#t] from its @method[editor-admin% refresh-delayed?] + method. (The administrator might return @racket[#t] because an enclosing editor's refresh is delayed.) See also @method[editor<%> in-edit-sequence?]. @@ -1921,7 +1921,7 @@ See also @method[editor<%> in-edit-sequence?]. Requests that the specified snip be deleted and released from the editor. If this editor is not the snip's owner or if the snip cannot - be released, then @scheme[#f] is returned. Otherwise, @scheme[#t] is + be released, then @racket[#f] is returned. Otherwise, @racket[#t] is returned and the snip is no longer owned. See also @xmethod[snip-admin% release-snip] . @@ -1949,7 +1949,7 @@ Called (indirectly) by snips within the editor: it forces a recalculation of the display information in which the specified snip has changed its size. -If @scheme[redraw-now?] is @scheme[#f], the editor will require +If @racket[redraw-now?] is @racket[#f], the editor will require another message to repaint itself. (See also @method[editor<%> needs-update].) @@ -1962,27 +1962,27 @@ If @scheme[redraw-now?] is @scheme[#f], the editor will require [show-errors? any/c #t]) boolean?]{ -Saves the editor into a file and returns @scheme[#t]. If an error +Saves the editor into a file and returns @racket[#t]. If an error occurs, an exception is raised. -If @scheme[filename] is @scheme[#f], then the internally stored filename - will be used; if @scheme[filename] is @scheme[""] or if the internal name +If @racket[filename] is @racket[#f], then the internally stored filename + will be used; if @racket[filename] is @racket[""] or if the internal name is unset or temporary, then the user will be prompted for a name. - The possible values for @scheme[format] are described at -@method[editor<%> load-file]. + The possible values for @racket[format] are described at +@method[editor<%> load-file]. The filename and format used to save the file can be retrieved with - @method[editor<%> get-filename]. In a @scheme[text%] instance, the + @method[editor<%> get-filename]. In a @racket[text%] instance, the format can be retrieved with @method[text% get-file-format]. See also @method[editor<%> on-save-file], @method[editor<%> after-save-file], and @method[editor<%> can-save-file?]. -On Mac OS X, the file's type signature is set to @scheme["TEXT"] - for a text-format file or @scheme["WXME"] for a standard-format +On Mac OS X, the file's type signature is set to @racket["TEXT"] + for a text-format file or @racket["WXME"] for a standard-format (binary) file. -The @scheme[show-errors?] argument is no longer used. +The @racket[show-errors?] argument is no longer used. } @@ -1993,13 +1993,13 @@ The @scheme[show-errors?] argument is no longer used. [show-errors? any/c #t]) boolean?]{ -Saves the editor into a port and returns @scheme[#t]. If an error +Saves the editor into a port and returns @racket[#t]. If an error occurs, an exception is raised. -The possible values for @scheme[format] are described at +The possible values for @racket[format] are described at @method[editor<%> load-file]. -The @scheme[show-errors?] argument is no longer used. +The @racket[show-errors?] argument is no longer used. } @@ -2013,8 +2013,8 @@ The @scheme[show-errors?] argument is no longer used. boolean?]{ Causes the editor to be scrolled so that a given @techlink{location} - is visible. If the editor is scrolled, @scheme[#t] is returned, - otherwise @scheme[#f] is returned. + is visible. If the editor is scrolled, @racket[#t] is returned, + otherwise @racket[#f] is returned. This method is normally called indirectly by @method[editor<%> scroll-to] or @xmethod[text% scroll-to-position] to implement @@ -2025,7 +2025,7 @@ The default implementation forwards the request to the if any (see @method[editor<%> get-admin]). If a text editor has padding (see @method[text% set-padding]), then the padding is added to the given @techlink{location} before forwarding to the -administrator. If the editor has no administrator, @scheme[#f] is +administrator. If the editor has no administrator, @racket[#f] is returned. } @@ -2037,7 +2037,7 @@ returned. Maps a vertical scroll position to a vertical @techlink{location} within the editor. -For @scheme[text%] objects: @|FCA| @|EVD| +For @racket[text%] objects: @|FCA| @|EVD| } @@ -2054,23 +2054,23 @@ For @scheme[text%] objects: @|FCA| @|EVD| Called (indirectly) by snips within the editor: it causes the editor to be scrolled so that a given @techlink{location} range within a given snip is visible. If the editor is scrolled immediately, - @scheme[#t] is returned, otherwise @scheme[#f] is returned. + @racket[#t] is returned, otherwise @racket[#f] is returned. If refreshing is delayed (see @method[editor<%> refresh-delayed?]), then the scroll request is saved until the delay has ended. The scroll is performed (immediately or later) by calling @method[editor<%> scroll-editor-to]. -The @scheme[localx], @scheme[localy], @scheme[width], and @scheme[height] - arguments specify the area that needs to be visible in @scheme[snip]'s +The @racket[localx], @racket[localy], @racket[width], and @racket[height] + arguments specify the area that needs to be visible in @racket[snip]'s coordinate system. -When the specified region cannot fit in the visible area, @scheme[bias] - indicates which end of the region to display. When @scheme[bias] is - @scheme['start], then the top-left of the region is - displayed. When @scheme[bias] is @scheme['end], then the - bottom-right of the region is displayed. Otherwise, @scheme[bias] must - be @scheme['none]. +When the specified region cannot fit in the visible area, @racket[bias] + indicates which end of the region to display. When @racket[bias] is + @racket['start], then the top-left of the region is + displayed. When @racket[bias] is @racket['end], then the + bottom-right of the region is displayed. Otherwise, @racket[bias] must + be @racket['none]. } @@ -2110,15 +2110,15 @@ get-admin]}] [domain (or/c 'immediate 'display 'global) 'immediate]) void?]{ -Attempts to give the keyboard focus to @scheme[snip]. If @scheme[snip] is - @scheme[#f], then the caret is taken away from any snip in the editor +Attempts to give the keyboard focus to @racket[snip]. If @racket[snip] is + @racket[#f], then the caret is taken away from any snip in the editor that currently has the caret and restored to this editor. -If the keyboard focus is moved to @scheme[snip] and the editor has the +If the keyboard focus is moved to @racket[snip] and the editor has the real keyboard focus, the @method[snip% own-caret] method of the snip will be called. -If @scheme[#f] is provided as the new owner, then the local focus is +If @racket[#f] is provided as the new owner, then the local focus is moved to the editor itself. Otherwise, the local focus is moved to the specified snip. @@ -2126,14 +2126,14 @@ The domain of focus-setting is one of: @itemize[ - @item{@scheme['immediate] --- only set the focus owner within the + @item{@racket['immediate] --- only set the focus owner within the editor} - @item{@scheme['display] --- make this editor or the new focus + @item{@racket['display] --- make this editor or the new focus owner get the keyboard focus among the editors in this editor's @techlink{display} (if this is an embedded editor)} - @item{@scheme['global] --- make this editor or the new focus + @item{@racket['global] --- make this editor or the new focus owner get the keyboard focus among all elements in the editor's frame} ] @@ -2150,12 +2150,12 @@ See also @method[editor<%> get-focus-snip]. [override? any/c #t]) void?]{ -Sets the custom cursor for the editor to @scheme[cursor]. If - @scheme[override?] is a true value and @scheme[cursor] is not - @scheme[#f], then this cursor overrides cursor settings in embedded +Sets the custom cursor for the editor to @racket[cursor]. If + @racket[override?] is a true value and @racket[cursor] is not + @racket[#f], then this cursor overrides cursor settings in embedded editors. -If the custom cursor is @scheme[#f], the current cursor is removed, +If the custom cursor is @racket[#f], the current cursor is removed, and a cursor is selected automatically by the editor (depending on whether the cursor is pointing at a clickback). See @method[editor<%> adjust-cursor] for more information about the default selection. @@ -2171,8 +2171,8 @@ An embedding editor's custom cursor can override the cursor of an [temporary? any/c #f]) void?]{ -Sets the filename to @scheme[filename]. If @scheme[filename] is - @scheme[#f] or @scheme[temporary?] is a true value, then the user +Sets the filename to @racket[filename]. If @racket[filename] is + @racket[#f] or @racket[temporary?] is a true value, then the user will still be prompted for a name on future calls to @method[editor<%> save-file] and @method[editor<%> load-file]. @@ -2194,7 +2194,7 @@ Sets the threshold for painting an inactive selection. See @defmethod[(set-keymap [keymap (or/c (is-a?/c keymap%) #f) #f]) void?]{ -Sets the current keymap for the editor. A @scheme[#f] argument removes +Sets the current keymap for the editor. A @racket[#f] argument removes all key mapping. } @@ -2217,7 +2217,7 @@ See also @method[editor<%> get-load-overwrites-styles] and void?]{ Sets the maximum display height for the contents of the editor. A - value less or equal to @scheme[0] indicates that there is no maximum. + value less or equal to @racket[0] indicates that there is no maximum. Setting the height is disallowed when the editor is internally locked for reflowing (see also @|lockdiscuss|). @@ -2229,8 +2229,8 @@ Setting the height is disallowed when the editor is internally locked void?]{ Sets the maximum number of undoables that will be remembered by the - editor. The default is @scheme[0], which disables undo. The symbol - @indexed-scheme['forever] is accepted as a synonym for a very large + editor. The default is @racket[0], which disables undo. The symbol + @indexed-racket['forever] is accepted as a synonym for a very large number. } @@ -2240,7 +2240,7 @@ Sets the maximum number of undoables that will be remembered by the void?]{ Sets the maximum display width for the contents of the editor; zero or - @scheme['none] indicates that there is no maximum. In a text editor, + @racket['none] indicates that there is no maximum. In a text editor, having no maximum disables automatic line breaking, and the minimum (positive) maximum width depends on the width of the autowrap bitmap. The maximum width of a text editor includes its left and @@ -2256,7 +2256,7 @@ Setting the width is disallowed when the editor is internally locked void?]{ Sets the minimum display height for the contents of the editor; zero - or @scheme['none] indicates that there is no minimum. + or @racket['none] indicates that there is no minimum. Setting the height is disallowed when the editor is internally locked for reflowing (see also @|lockdiscuss|). @@ -2267,7 +2267,7 @@ Setting the height is disallowed when the editor is internally locked void?]{ Sets the minimum display width for the contents of the editor; zero or - @scheme['none] indicates that there is no minimum. + @racket['none] indicates that there is no minimum. Setting the width is disallowed when the editor is internally locked for reflowing (see also @|lockdiscuss|). @@ -2286,20 +2286,20 @@ Sets the modified state of the editor. Usually, the state is changed See also @method[editor<%> is-modified?] and @method[editor<%> on-snip-modified]. -When @scheme[modified?] is true, then an internal modify-counter is - set to @scheme[1]. +When @racket[modified?] is true, then an internal modify-counter is + set to @racket[1]. -When @scheme[modified?] is @scheme[#f] and the editor's undo or redo +When @racket[modified?] is @racket[#f] and the editor's undo or redo stack contains a system-created undoer that resets the modified state (because the preceding undo or redo action puts the editor back to a - state where the modification state was @scheme[#f]), the undoer is + state where the modification state was @racket[#f]), the undoer is disabled. -Regardless of the value of @scheme[modified?], the editor's +Regardless of the value of @racket[modified?], the editor's adminstrator's @method[editor-admin% modified] method is called. -Finally, if @scheme[modified?] is @scheme[#f] and the internal - modify-counter is set to @scheme[0], then the @method[snip% +Finally, if @racket[modified?] is @racket[#f] and the internal + modify-counter is set to @racket[0], then the @method[snip% set-unmodified] method is called on every snip within the editor. } @@ -2396,7 +2396,7 @@ See also @method[editor<%> add-undo] . [(use-file-text-mode [on? any/c]) void?])]{ Gets or sets whether the current platform's text mode is used for -writing files in @scheme['text] or @scheme['text-force-cr] mode, which +writing files in @racket['text] or @racket['text-force-cr] mode, which affects the way that newlines are written. The setting is consulted by @method[editor<%> save-file] after @method[editor<%> on-save-file] is called. See also @method[editor<%> load-file] for information on file @@ -2419,7 +2419,7 @@ See @method[editor<%> write-headers-to-file]. @methspec{ Called when the editor is being saved to a file. The return value is - @scheme[#t] if there are no errors, @scheme[#f] otherwise. Override + @racket[#t] if there are no errors, @racket[#f] otherwise. Override this method to add custom header data to a file, but always call the inherited method so that it can write its own extra headers. @@ -2441,7 +2441,7 @@ Does nothing. boolean?]{ Writes the current editor contents to the given stream. The return - value is @scheme[#t] if there are no errors, @scheme[#f] otherwise. See + value is @racket[#t] if there are no errors, @racket[#f] otherwise. See also @|filediscuss|. If the editor's style list has already been written to the stream, it diff --git a/collects/scribblings/gui/editor-overview.scrbl b/collects/scribblings/gui/editor-overview.scrbl index ee0622ec..c5ceca56 100644 --- a/collects/scribblings/gui/editor-overview.scrbl +++ b/collects/scribblings/gui/editor-overview.scrbl @@ -28,10 +28,10 @@ Both kinds of applications need an extensible editor that can handle @itemize[ - @item{@scheme[text%] --- in a @deftech{text editor}, items are + @item{@racket[text%] --- in a @deftech{text editor}, items are automatically positioned in a paragraph flow.} - @item{@scheme[pasteboard%] --- in a @deftech{pasteboard editor}, + @item{@racket[pasteboard%] --- in a @deftech{pasteboard editor}, items are explicitly positioned and dragable.} ] @@ -47,10 +47,10 @@ This editor architecture addresses the full range of real-world and the learning investment required to use it. A brief example illustrates how editors work. To start, an editor - needs an @scheme[editor-canvas%] to display its contents. Then, we + needs an @racket[editor-canvas%] to display its contents. Then, we can create a text editor and install it into the canvas: -@schemeblock[ +@racketblock[ (define f (new frame% [label "Simple Edit"] [width 200] [height 200])) @@ -65,7 +65,7 @@ At this point, the editor is fully functional: the user can type text can support all of the standard operations on an editor via the menu bar: -@schemeblock[ +@racketblock[ (define mb (new menu-bar% [parent f])) (define m-edit (new menu% [label "Edit"] [parent mb])) (define m-font (new menu% [label "Font"] [parent mb])) @@ -89,7 +89,7 @@ The content of an editor is made up of @defterm{@tech{snips}}. An on the same line. The @method[text% find-snip] method extracts a snip from a text editor: -@schemeblock[ +@racketblock[ (send t #,(:: text% find-snip) 0 'after) ] @@ -101,7 +101,7 @@ An editor is not permanently attached to any display. We can take the text editor out of our canvas and put a pasteboard editor in the canvas, instead: -@schemeblock[ +@racketblock[ (define pb (new pasteboard%)) (send c #,(:: editor-canvas% set-editor) pb) ] @@ -118,34 +118,34 @@ We can insert the old text editor (which we recently removed from the canvas) as an embedded editor in the pasteboard by explicitly creating an editor snip: -@schemeblock[ -(define s (make-object editor-snip% t)) (code:comment @#,t{@scheme[t] is the old text editor}) +@racketblock[ +(define s (make-object editor-snip% t)) (code:comment @#,t{@racket[t] is the old text editor}) (send pb #,(:: editor<%> insert) s) ] An individual snip cannot be inserted into different editors at the same time, or inserted multiple times in the same editor: -@schemeblock[ +@racketblock[ (send pb #,(:: editor<%> insert) s) (code:comment @#,t{no effect}) ] However, we can make a deep copy of the snip and insert the copy into the pasteboard: -@schemeblock[ +@racketblock[ (send pb #,(:: editor<%> insert) (send s #,(:: snip% copy))) ] Applications that use the editor classes typically derive new versions - of the @scheme[text%] and @scheme[pasteboard%] classes. For + of the @racket[text%] and @racket[pasteboard%] classes. For example, to implement an append-only editor (which allows insertions only at the end and never allows deletions), derive a new class from - @scheme[text%] and override the + @racket[text%] and override the @method[text% can-insert?] and @method[text% can-delete?] methods: -@schemeblock[ +@racketblock[ (define append-only-text% (class text% (inherit #,(:: text% last-position)) @@ -163,23 +163,23 @@ The editor toolbox supports extensible and nestable editors by @item{The @deftech{editor} itself stores the state of the text or pasteboard and handles most events and editing operations. The - @scheme[editor<%>] interface defines the core editor functionality, - but editors are created as instances of @scheme[text%] or - @scheme[pasteboard%].} + @racket[editor<%>] interface defines the core editor functionality, + but editors are created as instances of @racket[text%] or + @racket[pasteboard%].} @item{A @deftech{snip} is a segment of information within the editor. Each snip can contain a sequence of characters, a picture, or an interactive object (such as an embedded editor). In a text editor, snips are constrained to fit on a single line and generally - contain data of a single type. The @scheme[snip%] class implements a - basic snip. Other snip classes include @scheme[string-snip%] for - managing text, @scheme[image-snip%] for managing pictures, and - @scheme[editor-snip%] for managing embedded editors.} + contain data of a single type. The @racket[snip%] class implements a + basic snip. Other snip classes include @racket[string-snip%] for + managing text, @racket[image-snip%] for managing pictures, and + @racket[editor-snip%] for managing embedded editors.} @item{A @deftech{display} presents the editor on the screen. The display lets the user scroll around an editor or change editors. Most - displays are instances of the @scheme[editor-canvas%] class, but the - @scheme[editor-snip%] class also acts as a display for embedded + displays are instances of the @racket[editor-canvas%] class, but the + @racket[editor-snip%] class also acts as a display for embedded editors.} ] @@ -226,16 +226,16 @@ When an editor is drawn into a display, each snip and position has a Two extra layers of administration manage the @techlink{display}-editor and editor-snip connections. An editor never communicates directly with a @techlink{display}; instead, it always communicates with an @deftech{editor - administrator}, an instance of the @scheme[editor-admin%] class, + administrator}, an instance of the @racket[editor-admin%] class, which relays information to the @techlink{display}. Similarly, a snip communicates with a @deftech{snip administrator}, an instance of the - @scheme[snip-admin%] class. + @racket[snip-admin%] class. The administrative layers make the editor hierarchy flexible without forcing every part of an editor assembly to contain the functionality of several parts. For example, a text editor can be a single @techlink{item} within another editor; without administrators, the - @scheme[text%] class would also have to contain all the functionality + @racket[text%] class would also have to contain all the functionality of a @techlink{display} (for the containing editor) and a snip (for the embedded editor). Using administrators, an editor class can serve as both a containing and an embedded editor without directly @@ -246,9 +246,9 @@ A snip belongs to at most one editor via a single administrator. An administrator that connects the an editor to the standard @techlink{display} (i.e., an editor canvas) can work with other such administrators. In particular, the administrator of an - @scheme[editor-canvas%] (each one has its own administrator) can work - with other @scheme[editor-canvas%] administrators, allowing an editor - to be displayed in multiple @scheme[editor-canvas%] windows at the + @racket[editor-canvas%] (each one has its own administrator) can work + with other @racket[editor-canvas%] administrators, allowing an editor + to be displayed in multiple @racket[editor-canvas%] windows at the same time. When an editor is displayed by multiple canvases, one of the canvases' @@ -261,15 +261,15 @@ When an editor is displayed by multiple canvases, one of the canvases' @subsection[#:tag "editorstyles"]{Styles} -A @deftech{style}, an instance of the @scheme[style<%>] interface, +A @deftech{style}, an instance of the @racket[style<%>] interface, parameterizes high-level display information that is common to all snip classes. This includes the font, color, and alignment for drawing the item. A single style is attached to each snip. Styles are hierarchical: each style is defined in terms of another - style. @index*['("Basic style") (list @elem{@scheme["Basic"] + style. @index*['("Basic style") (list @elem{@racket["Basic"] style})]{There} is a single @deftech{root style}, named - @scheme["Basic"], from which all other styles in an editor are + @racket["Basic"], from which all other styles in an editor are derived. The difference between a base style and each of its derived style is encoded in a @deftech{style delta} (or simply @deftech{delta}). A delta encodes changes such as @@ -288,10 +288,10 @@ Styles are hierarchical: each style is defined in terms of another Style objects are never created separately; rather, they are always created through a @deftech{style list}, an instance of the - @scheme[style-list%] class. A style list manages the styles, + @racket[style-list%] class. A style list manages the styles, servicing external requests to find a particular style, and it manages the hierarchical relationship between styles. A global style - list is available, @indexed-scheme[the-style-list], but new style + list is available, @indexed-racket[the-style-list], but new style lists can be created for managing separate style hierarchies. For example, each editor will typically have its own style list. @@ -318,11 +318,11 @@ Each new style is defined in one of two ways: ] -@index*['("Standard style") (list @elem{@scheme["Standard"] +@index*['("Standard style") (list @elem{@racket["Standard"] style})]{Usually}, when text is inserted into a text editor, it inherits the style of the preceding snip. If text is inserted into an empty editor, the text is usually assigned a style called - @scheme["Standard"]. By default, the @scheme["Standard"] style is + @racket["Standard"]. By default, the @racket["Standard"] style is unmodified from the root style. The default style name can be changed by overriding @method[editor<%> default-style-name]. @@ -347,20 +347,20 @@ To allow editor content to be saved to a file, the editor classes define the format internally. The file format is the same for text and pasteboard editors. When a pasteboard saves its content to a file, it saves the snips from front to back, and also includes extra - location information. The @schememodname[wxme] library provides + location information. The @racketmodname[wxme] library provides utilities for manipulating WXME files. -Editor data is read and written using @scheme[editor-stream-in%] and -@scheme[editor-stream-out%] objects. Editor information can only be +Editor data is read and written using @racket[editor-stream-in%] and +@racket[editor-stream-out%] objects. Editor information can only be read from or written to one stream at a time. To write one or more editors to a stream, first call the function - @scheme[write-editor-global-header] to write initialization data into + @racket[write-editor-global-header] to write initialization data into an output stream. When all editors are written to the stream, call - @scheme[write-editor-global-footer]. Similarly, reading editors from - a stream is initialized with @scheme[read-editor-global-header] and - finalized with @scheme[read-editor-global-footer]. Optionally, to + @racket[write-editor-global-footer]. Similarly, reading editors from + a stream is initialized with @racket[read-editor-global-header] and + finalized with @racket[read-editor-global-footer]. Optionally, to support streams that span versions of Racket, use - @scheme[write-editor-version] and @scheme[read-editor-version] before + @racket[write-editor-version] and @racket[read-editor-version] before the header operations. The editor file data format can be embedded within another file, and @@ -390,7 +390,7 @@ Graceful and extensible encoding of snips requires that provided for each type of snip. Furthermore, a list of such decoders must be available to the high-level decoding process. This decoding mapping is defined by associating a @deftech{snip class} object to - every snip. A snip class is an instance of the @scheme[snip-class%] + every snip. A snip class is an instance of the @racket[snip-class%] class.} @item{Some editors may require additional information to be stored @@ -402,9 +402,9 @@ Graceful and extensible encoding of snips requires that @techlink{location}s needs to be maintained, but this information should not inhibit pasting into an editor. Extra data is associated with a snip through @deftech{editor data} objects, which are - instances of the @scheme[editor-data%] class; decoding requires that + instances of the @racket[editor-data%] class; decoding requires that each editor data object has an @deftech{editor data class}, which is - an instance of the @scheme[editor-data-class%] class.} + an instance of the @racket[editor-data-class%] class.} ] @@ -422,7 +422,7 @@ Each snip can be associated to a @tech{snip class}. This ``class'' Snip class objects can be added to the eventspace-specific @deftech{snip class list}, which is returned by - @scheme[get-the-snip-class-list]. When a snip is encoded, the snip's + @racket[get-the-snip-class-list]. When a snip is encoded, the snip's class name is associated with the encoding; when the snip needs to be decoded, then the snip class list is searched by name to find the snip's class. The snip class will then provide a decoding function @@ -430,24 +430,24 @@ Snip class objects can be added to the eventspace-specific If a snip class's name is of the form @;- -@scheme["((lib ...) (lib ...))"], +@racket["((lib ...) (lib ...))"], @;- then the snip class implementation can be loaded on - demand. The name is parsed using @scheme[read]; if the result has the - form @scheme[((lib _string ...) (lib _string ...))], then the first - element used with @scheme[dynamic-require] along with - @scheme['snip-class]. If the @scheme[dynamic-require] result is a - @scheme[snip-class%] object, then it is inserted into the current + demand. The name is parsed using @racket[read]; if the result has the + form @racket[((lib _string ...) (lib _string ...))], then the first + element used with @racket[dynamic-require] along with + @racket['snip-class]. If the @racket[dynamic-require] result is a + @racket[snip-class%] object, then it is inserted into the current eventspace's snip class list, and loading or saving continues using the new class. -The second @scheme[lib] form in @scheme["((lib ...) (lib ...))"] +The second @racket[lib] form in @racket["((lib ...) (lib ...))"] supplies a reader for a text-only version of the snip. See - @schememodname[wxme] for more information. + @racketmodname[wxme] for more information. -A snip class's name can also be just @scheme["(lib ...)"], which is - used like the first part of the two-@scheme[lib] form. However, this - form provides no information for the text-only @schememodname[wxme] +A snip class's name can also be just @racket["(lib ...)"], which is + used like the first part of the two-@racket[lib] form. However, this + form provides no information for the text-only @racketmodname[wxme] reader. @subsubsection[#:tag "editordata"]{Editor Data} @@ -463,21 +463,21 @@ Just as a snip must be associated with a snip class to be decoded (see @|snipclassdiscuss|), an editor data object needs an @tech{editor data class} for decoding. Every editor data class object can be added to the eventspace-specific @deftech{editor data class list}, returned - by @scheme[get-the-editor-data-class-list]. Alternatively, like snip + by @racket[get-the-editor-data-class-list]. Alternatively, like snip classes (see @secref["editorsnipclasses"]), editor data class names - can use the form @scheme["((lib ...) (lib ...))"] to enable + can use the form @racket["((lib ...) (lib ...))"] to enable on-demand loading. The corresponding module should export an - @scheme[editor-data-class%] object named @scheme['editor-data-class]. + @racket[editor-data-class%] object named @racket['editor-data-class]. To store and load information about a snip or region in an editor: @itemize[ - @item{derive new classes from @scheme[editor-data%] and - @scheme[editor-data-class%].} + @item{derive new classes from @racket[editor-data%] and + @racket[editor-data-class%].} -@item{derive a new class from the @scheme[text%] or - @scheme[pasteboard%] class, and override the @method[editor<%> +@item{derive a new class from the @racket[text%] or + @racket[pasteboard%] class, and override the @method[editor<%> get-snip-data] and @method[editor<%> set-snip-data] methods and/or the @method[text% get-region-data] and @method[text% set-region-data] methods. @@ -487,7 +487,7 @@ To store and load information about a snip or region in an editor: not for file-saving encoding; see @|globaleditordatadiscuss| for information on extending the file format.} -] +] @subsection[#:tag "globaleditordata"]{Global Data: Headers and Footers} @@ -505,8 +505,8 @@ The editor file format provides for adding extra global data in with a unique name, the file can be safely loaded in an installation that does not support the records.} - @item{Derive a new class from the @scheme[text%] or - @scheme[pasteboard%] class, and override the @method[editor<%> + @item{Derive a new class from the @racket[text%] or + @racket[pasteboard%] class, and override the @method[editor<%> write-headers-to-file], @method[editor<%> write-footers-to-file], @method[editor<%> read-header-from-file] and/or @method[editor<%> read-footer-from-file] methods.} @@ -515,8 +515,8 @@ The editor file format provides for adding extra global data in When an editor is saved, the methods @method[editor<%> write-headers-to-file] and @method[editor<%> write-footers-to-file] - are invoked; at this time, the derived @scheme[text%] or - @scheme[pasteboard%] object has a chance to save records. To write a + are invoked; at this time, the derived @racket[text%] or + @racket[pasteboard%] object has a chance to save records. To write a header/footer record, first invoke the @method[editor<%> begin-write-header-footer-to-file] method, at which point the record name is provided. Once the record is written, call @method[editor<%> @@ -548,16 +548,16 @@ For this reason, @techlink{position}-setting and the case of a @techlink{position}-setting method, the argument specifies whether the caret should be drawn at the left or right side of the page (in the event that the @techlink{location} is doubly - defined); @scheme[#t] means that the caret should be drawn on the + defined); @racket[#t] means that the caret should be drawn on the right side. Similarly, methods which calculate a @techlink{position} from a @techlink{location} will take an extra boxed boolean; the box - is filled with @scheme[#t] if the position is ambiguous and it came - from a right-side location, or @scheme[#f] otherwise. + is filled with @racket[#t] if the position is ambiguous and it came + from a right-side location, or @racket[#f] otherwise. @section[#:tag "editorflattened"]{Flattened Text} In plain text editors, there is a simple correlation between - @techlink{position}s and characters. In an @scheme[editor<%>] object, + @techlink{position}s and characters. In an @racket[editor<%>] object, this is not true much of the time, but it is still sometimes useful to just ``get the text'' of an editor. @@ -605,14 +605,14 @@ When an editor or snip is drawn, an argument to the drawing method @itemize[ - @item{@indexed-scheme['no-caret] --- The caret should not be drawn at + @item{@indexed-racket['no-caret] --- The caret should not be drawn at all.} - @item{@indexed-scheme['show-inactive-caret] --- The caret should be drawn + @item{@indexed-racket['show-inactive-caret] --- The caret should be drawn as inactive; items may be identified as the local current selection, but the keyboard focus is elsewhere.} - @item{@indexed-scheme['show-caret] --- The caret should be drawn to show + @item{@indexed-racket['show-caret] --- The caret should be drawn to show keyboard focus ownership.} @item{@racket[(cons _start _end)] --- The caret is owned by an @@ -622,24 +622,24 @@ When an editor or snip is drawn, an argument to the drawing method ] -The @scheme['show-inactive-caret] display mode is useful for showing +The @racket['show-inactive-caret] display mode is useful for showing selection ranges in text editors that do not have the focus. This - @scheme['show-inactive-caret] mode is distinct from @scheme['no-caret] + @racket['show-inactive-caret] mode is distinct from @racket['no-caret] mode; when editors are embedded, only the locally active editor shows its selection. @section[#:tag "editorcutandpastetime"]{Cut and Paste Time Stamps} -Methods of @scheme[editor<%>] that use the clipboard --- including +Methods of @racket[editor<%>] that use the clipboard --- including @method[editor<%> copy], @method[editor<%> cut], @method[editor<%> paste], and @method[editor<%> do-edit-operation] --- consume a time stamp argument. This time stamp is generally extracted from the - @scheme[mouse-event%] or @scheme[key-event%] object that triggered + @racket[mouse-event%] or @racket[key-event%] object that triggered the clipboard action. Unix uses the time stamp to synchronize clipboard operations among the clipboard clients. -All instances of @scheme[event%] include a time stamp, which can be +All instances of @racket[event%] include a time stamp, which can be obtained using @method[event% get-time-stamp]. If the time stamp is 0, it defaults to the current time. Using 0 as the @@ -649,7 +649,7 @@ If the time stamp is 0, it defaults to the current time. Using 0 as the @section[#:tag "editorclickback"]{Clickbacks} -@deftech{Clickbacks} in a @scheme[text%] editor facilitate the +@deftech{Clickbacks} in a @racket[text%] editor facilitate the creation of simple interactive objects, such as hypertext. A clickback is defined by associating a callback function with a range of @techlink{item}s in the editor. When a user clicks on the @@ -669,7 +669,7 @@ Note that there is no attempt to save clickback information when a @section[#:tag "lockinfo"]{Internal Editor Locks} -Instances of @scheme[editor<%>] have three levels of internal +Instances of @racket[editor<%>] have three levels of internal locking: @itemize[ @@ -754,7 +754,7 @@ An editor supports certain concurrent patterns ] -Thus, disabling an @scheme[editor-canvas%] object (using +Thus, disabling an @racket[editor-canvas%] object (using @method[window<%> enable]) is sufficient to ensure that a background thread can modify an editor displayed by the canvas, as long as all modifications are in edit sequences. The background diff --git a/collects/scribblings/gui/editor-snip-class.scrbl b/collects/scribblings/gui/editor-snip-class.scrbl index da98f029..bdcc552e 100644 --- a/collects/scribblings/gui/editor-snip-class.scrbl +++ b/collects/scribblings/gui/editor-snip-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[editor-snip% snip% ()]{ -An @scheme[editor-snip%] object is a @scheme[snip%] object that - contains and displays an @scheme[editor<%>] object. This snip class +An @racket[editor-snip%] object is a @racket[snip%] object that + contains and displays an @racket[editor<%>] object. This snip class is used to insert an editor as a single @techlink{item} within another editor. @@ -24,14 +24,14 @@ An @scheme[editor-snip%] object is a @scheme[snip%] object that [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 +If @racket[editor] is non-@racket[#f], then it will be used as the editor contained by the snip. See also @method[editor-snip% set-editor]. -If @scheme[with-border?] is not @scheme[#f], then a border will be drawn +If @racket[with-border?] is not @racket[#f], then a border will be drawn around the snip. The editor display will be inset in the snip area by - the amounts specified in the @scheme[-margin] arguments. The border - will be drawn with an inset specified by the @scheme[-inset] arguments. + the amounts specified in the @racket[-margin] arguments. The border + will be drawn with an inset specified by the @racket[-inset] arguments. See @method[editor-snip% get-inset] and @method[editor-snip% get-margin] for information about the inset and margin arguments. @@ -57,8 +57,8 @@ Gets a cursor from the embedded editor by calling its @defmethod[(border-visible?) boolean?]{ -Returns @scheme[#t] if the snip has a border draw around it, -@scheme[#f] otherwise. +Returns @racket[#t] if the snip has a border draw around it, +@racket[#f] otherwise. See also @method[editor-snip% show-border]. @@ -79,7 +79,7 @@ See also @method[editor-snip% set-align-top-line]. @defmethod[(get-editor) (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)]{ -Returns the editor contained by the snip, or @scheme[#f] is there is +Returns the editor contained by the snip, or @racket[#f] is there is no editor. } @@ -107,11 +107,11 @@ The top space always corresponds to the space of the editor's top the descent of the top line, plus the height rest of the editor's lines, plus the snip's bottom margin. -If the editor is a text editor, then @scheme[1] is normally subtracted +If the editor is a text editor, then @racket[1] is normally subtracted from the editor's width as returned by @method[editor<%> get-extent], because the result looks better for editing. If the snip is in tight-text-fit mode (see @method[editor-snip% set-tight-text-fit]) - then @scheme[2] is subtracted from a text editor's width, eliminating + then @racket[2] is subtracted from a text editor's width, eliminating the two pixels that the text editor reserves for the blinking caret. In addition, tight-text-fit mode subtracts an amount equal to the line spacing from the editor's height. By default, tight-text-fit @@ -158,7 +158,7 @@ snip. @defmethod[(get-max-height) (or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{ -Gets the maximum display height of the snip; zero or @scheme['none] +Gets the maximum display height of the snip; zero or @racket['none] indicates that there is no maximum. } @@ -167,7 +167,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/c 'none))]{ -Gets the maximum display width of the snip; zero or @scheme['none] +Gets the maximum display width of the snip; zero or @racket['none] indicates that there is no maximum. } @@ -175,7 +175,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/c 'none))]{ -Gets the minimum display height of the snip; zero or @scheme['none] +Gets the minimum display height of the snip; zero or @racket['none] indicates that there is no minimum. } @@ -183,7 +183,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/c 'none))]{ -Gets the minimum display width of the snip; zero or @scheme['none] +Gets the minimum display width of the snip; zero or @racket['none] indicates that there is no minimum. } @@ -233,14 +233,14 @@ Sets the editor contained by the snip, releasing the old editor in the snip (if any). If the new editor already has an administrator, then the new editor is @italic{not} installed into the snip. -When an @scheme[editor-snip%] object is not inserted in an editor, it +When an @racket[editor-snip%] object is not inserted in an editor, it does not have an administrator. During this time, it does not give its contained editor an administrator, either. The administratorless contained editor can therefore ``defect'' to some other @techlink{display} with an administrator. When a contained editor defects and the snip is eventually inserted into a different editor, the snip drops the traitor contained editor, setting its contained - editor to @scheme[#f]. + editor to @racket[#f]. } @@ -273,7 +273,7 @@ Sets the current margins for the snip. The margin sets how much space @edsnipmax[(scheme height)] -Zero or @scheme['none] disables the limit. +Zero or @racket['none] disables the limit. } @@ -283,7 +283,7 @@ Zero or @scheme['none] disables the limit. @edsnipmax[(scheme width)] The contained editor's width limits are not changed by this method. -Zero or @scheme['none] disables the limit. +Zero or @racket['none] disables the limit. } @@ -292,7 +292,7 @@ Zero or @scheme['none] disables the limit. @edsnipmin[(scheme height) @elem{top}] -Zero or @scheme['none] disables the limit. +Zero or @racket['none] disables the limit. } @@ -302,7 +302,7 @@ Zero or @scheme['none] disables the limit. @edsnipmin[(scheme width) @elem{left}] The contained editor's width limits are not changed by this method. -Zero or @scheme['none] disables the limit. +Zero or @racket['none] disables the limit. } @@ -327,8 +327,8 @@ Shows or hides the snip's border. @defmethod[(style-background-used?) boolean?]{ -Returns @scheme[#t] if the snip uses its style's background and - transparency information when drawing, @scheme[#f] otherwise. +Returns @racket[#t] if the snip uses its style's background and + transparency information when drawing, @racket[#f] otherwise. See also @method[editor-snip% use-style-background]. @@ -342,7 +342,7 @@ Causes the snip to use or not used (the default) its style's background and transparency information for drawing the background within the snip's border. -If @scheme[use?] is @scheme[#f], the style background and transparency +If @racket[use?] is @racket[#f], the style background and transparency information is ignored, otherwise is it used. }} diff --git a/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl b/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl index 91c44f2f..fae19d48 100644 --- a/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl +++ b/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl @@ -4,7 +4,7 @@ @definterface/title[editor-snip-editor-admin<%> ()]{ An instance of this administrator interface is created with each - @scheme[editor-snip%] object; new instances cannot be + @racket[editor-snip%] object; new instances cannot be created directly. diff --git a/collects/scribblings/gui/editor-stream-in-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-base-class.scrbl index e4bf359f..3cf829b1 100644 --- a/collects/scribblings/gui/editor-stream-in-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-base-class.scrbl @@ -3,12 +3,12 @@ @defclass/title[editor-stream-in-base% object% ()]{ -An @scheme[editor-stream-in-base%] object is used by an - @scheme[editor-stream-in%] object to perform low-level reading of +An @racket[editor-stream-in-base%] object is used by an + @racket[editor-stream-in%] object to perform low-level reading of data. -The @scheme[editor-stream-in-base%] class is never instantiated - directly, but the derived class @scheme[editor-stream-in-bytes-base%] +The @racket[editor-stream-in-base%] class is never instantiated + directly, but the derived class @racket[editor-stream-in-bytes-base%] can be instantiated. New derived classes must override all of the methods described in this section. @@ -16,8 +16,8 @@ The @scheme[editor-stream-in-base%] class is never instantiated @defmethod[(bad?) boolean?]{ -Returns @scheme[#t] if there has been an error reading from the - stream, @scheme[#f] otherwise. +Returns @racket[#t] if there has been an error reading from the + stream, @racket[#f] otherwise. } @@ -35,11 +35,11 @@ Reads bytes to fill the supplied byte string. The return value is the number of bytes read, which may be less than the number requested if the stream is emptied. If the stream is emptied, the next call to @method[editor-stream-in-base% bad?] must return - @scheme[#t].} + @racket[#t].} @defmethod[(read-byte) (or/c byte? #f)]{ -Reads a single byte and return it, or returns @scheme[#f] if no more +Reads a single byte and return it, or returns @racket[#f] if no more bytes are available. The default implementation of this method uses @method[editor-stream-in-base% read-bytes]. @@ -55,7 +55,7 @@ Moves to the specified absolute position in the stream. @defmethod[(skip [n exact-nonnegative-integer?]) void?]{ -Skips past the next @scheme[n] characters in the stream. +Skips past the next @racket[n] characters in the stream. } diff --git a/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl index ec14a027..1fe3da20 100644 --- a/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl @@ -3,12 +3,12 @@ @defclass/title[editor-stream-in-bytes-base% editor-stream-in-base% ()]{ -An @scheme[editor-stream-in-bytes-base%] object can be used to +An @racket[editor-stream-in-bytes-base%] object can be used to read editor data from a byte string. @defconstructor/make[([s bytes?])]{ -Creates a stream base that reads from @scheme[s]. +Creates a stream base that reads from @racket[s]. }} diff --git a/collects/scribblings/gui/editor-stream-in-class.scrbl b/collects/scribblings/gui/editor-stream-in-class.scrbl index 2ab89e5d..7ff9d2bc 100644 --- a/collects/scribblings/gui/editor-stream-in-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[editor-stream-in% object% ()]{ -An @scheme[editor-stream-in%] object is used to read editor +An @racket[editor-stream-in%] object is used to read editor information from a file or other input stream (such as the clipboard). @@ -11,8 +11,8 @@ An @scheme[editor-stream-in%] object is used to read editor @defconstructor/make[([base (is-a?/c editor-stream-in-base%)])]{ -An in-stream base---possibly an @scheme[editor-stream-in-bytes-base%] - object---must be supplied in @scheme[base]. +An in-stream base---possibly an @racket[editor-stream-in-bytes-base%] + object---must be supplied in @racket[base]. } @@ -23,7 +23,7 @@ An in-stream base---possibly an @scheme[editor-stream-in-bytes-base%] (is-a?/c editor-stream-in%)])]{ Reads data from the stream, returning itself. -Reading from a bad stream always gives @scheme[0]. +Reading from a bad stream always gives @racket[0]. @boxisfill[(scheme v) @elem{the next integer or floating-point value in the stream}] @@ -64,7 +64,7 @@ Returns the next integer value in the stream. Gets a fixed-sized integer from the stream. See @method[editor-stream-out% put-fixed] for more information. -Reading from a bad stream always gives @scheme[0]. +Reading from a bad stream always gives @racket[0]. } @@ -84,7 +84,7 @@ use @method[editor-stream-out% put] with two arguments (passing along the length of the bytes) to write out the bytes to match this method. -Reading from a bad stream returns @scheme[#f] or @scheme[#""]. +Reading from a bad stream returns @racket[#f] or @racket[#""]. Note that when @method[editor-stream-out% put] is not given a byte length, it includes an extra byte for a nul terminator; use @@ -104,8 +104,8 @@ Jumps to a given position in the stream. @defmethod[(ok?) boolean?]{ -Returns @scheme[#t] if the stream is ready for reading, @scheme[#f] otherwise. -Reading from a bad stream always returns @scheme[0] or @scheme[""]. +Returns @racket[#t] if the stream is ready for reading, @racket[#f] otherwise. +Reading from a bad stream always returns @racket[0] or @racket[""]. } @@ -119,7 +119,7 @@ See @method[editor-stream-in% set-boundary]. @defmethod[(set-boundary [n exact-nonnegative-integer?]) void?]{ -Sets a file-reading boundary at @scheme[n] bytes past the current +Sets a file-reading boundary at @racket[n] bytes past the current stream location. If there is an attempt to read past this boundary, an error is signaled. The boundary is removed with a call to @method[editor-stream-in% remove-boundary]. Every call to @@ -136,7 +136,7 @@ Boundaries help keep a subroutine from reading too much data leading @defmethod[(skip [n exact-nonnegative-integer?]) void?]{ -Skips past the next @scheme[n] bytes in the stream. +Skips past the next @racket[n] bytes in the stream. } diff --git a/collects/scribblings/gui/editor-stream-out-base-class.scrbl b/collects/scribblings/gui/editor-stream-out-base-class.scrbl index 58fe7ad8..41193d66 100644 --- a/collects/scribblings/gui/editor-stream-out-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-base-class.scrbl @@ -3,13 +3,13 @@ @defclass/title[editor-stream-out-base% object% ()]{ -An @scheme[editor-stream-out-base%] object is used by an - @scheme[editor-stream-out%] object to perform low-level writing of +An @racket[editor-stream-out-base%] object is used by an + @racket[editor-stream-out%] object to perform low-level writing of data. -The @scheme[editor-stream-out-base%] class is never instantiated +The @racket[editor-stream-out-base%] class is never instantiated directly, but the derived class - @scheme[editor-stream-out-bytes-base%] can be instantiated. New + @racket[editor-stream-out-bytes-base%] can be instantiated. New derived classes must override all of the methods described in this section. @@ -17,8 +17,8 @@ The @scheme[editor-stream-out-base%] class is never instantiated @defmethod[(bad?) boolean?]{ -Returns @scheme[#t] if there has been an error writing to the stream, - @scheme[#f] otherwise. +Returns @racket[#t] if there has been an error writing to the stream, + @racket[#f] otherwise. } diff --git a/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl b/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl index df5599db..bcd0867d 100644 --- a/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[editor-stream-out-bytes-base% editor-stream-out-base% ()]{ -An @scheme[editor-stream-out-bytes-base%] object can be used to write +An @racket[editor-stream-out-bytes-base%] object can be used to write editor data into a byte string. @defconstructor[()]{ diff --git a/collects/scribblings/gui/editor-stream-out-class.scrbl b/collects/scribblings/gui/editor-stream-out-class.scrbl index dcfccb7e..f15cd4be 100644 --- a/collects/scribblings/gui/editor-stream-out-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[editor-stream-out% object% ()]{ -An @scheme[editor-stream-out%] object is used to write editor +An @racket[editor-stream-out%] object is used to write editor information to a file or other output stream (such as the clipboard). @@ -12,9 +12,8 @@ An @scheme[editor-stream-out%] object is used to write editor @defconstructor/make[([base (is-a?/c editor-stream-out-base%)])]{ An out-stream base---possibly an -@scheme[editor-stream-out-bytes-base%] object---must be supplied in -@scheme[base]. - +@racket[editor-stream-out-bytes-base%] object---must be supplied in +@racket[base]. } @@ -26,7 +25,7 @@ Jumps to a given position in the stream. @defmethod[(ok?) boolean?]{ -Returns @scheme[#t] if the stream is ready for writing, @scheme[#f] otherwise. +Returns @racket[#t] if the stream is ready for writing, @racket[#f] otherwise. Writing to a bad stream has no effect. } @@ -36,7 +35,7 @@ Writing to a bad stream has no effect. Ensures that the stream ends with a newline. This method is called by -@scheme[write-editor-global-footer]. +@racket[write-editor-global-footer]. } @@ -45,7 +44,7 @@ This method is called by void?]{ Writes a ``comment'' into the stream that identifies the file format. -This method is called by @scheme[write-editor-global-header]. +This method is called by @racket[write-editor-global-header]. } @@ -60,17 +59,17 @@ This method is called by @scheme[write-editor-global-header]. (is-a?/c editor-stream-out%)])]{ -Writes @scheme[v], or @scheme[n] bytes of @scheme[v]. +Writes @racket[v], or @racket[n] bytes of @racket[v]. -When @scheme[n] is supplied with a byte-string @scheme[v], use +When @racket[n] is supplied with a byte-string @racket[v], use @method[editor-stream-in% get-unterminated-bytes] to read the bytes later. This is the recommended way to write out bytes to be easily read in later; use @method[editor-stream-in% get-unterminated-bytes] to read the bytes back in. -If @scheme[n] is not supplied and @scheme[v] is a byte string, then +If @racket[n] is not supplied and @racket[v] is a byte string, then for historical reasons, the actual number of bytes written includes a - @scheme[#\nul] terminator, so use @method[editor-stream-in% + @racket[#\nul] terminator, so use @method[editor-stream-in% get-bytes] instead of @method[editor-stream-in% get-unterminated-bytes] to read the bytes later. @@ -83,8 +82,8 @@ If @scheme[n] is not supplied and @scheme[v] is a byte string, then Puts a fixed-sized integer into the stream. This method is needed because numbers are usually written in a way that takes varying numbers of bytes. In some cases it is useful to temporary write a - @scheme[0] to a stream, write more data, and then go back and change - the @scheme[0] to another number; such a process requires a + @racket[0] to a stream, write more data, and then go back and change + the @racket[0] to another number; such a process requires a fixed-size number. Numbers written to a stream with @method[editor-stream-out% put-fixed] @@ -95,7 +94,7 @@ Numbers written to a stream with @method[editor-stream-out% put-fixed] @defmethod[(put-unterminated [v bytes?]) (is-a?/c editor-stream-out%)]{ The same as calling @method[editor-stream-out% put] with -@scheme[(bytes-length v)] and @scheme[v].} +@racket[(bytes-length v)] and @racket[v].} @defmethod[(tell) diff --git a/collects/scribblings/gui/editor-wordbreak-map-class.scrbl b/collects/scribblings/gui/editor-wordbreak-map-class.scrbl index 6bd2b67c..93078362 100644 --- a/collects/scribblings/gui/editor-wordbreak-map-class.scrbl +++ b/collects/scribblings/gui/editor-wordbreak-map-class.scrbl @@ -3,30 +3,30 @@ @defclass/title[editor-wordbreak-map% object% ()]{ -An @scheme[editor-wordbreak-map%] objects is used with a - @scheme[text%] objects to specify word-breaking criteria for the +An @racket[editor-wordbreak-map%] objects is used with a + @racket[text%] objects to specify word-breaking criteria for the default wordbreaking function. See also @method[text% set-wordbreak-map], @method[text% get-wordbreak-map], @method[text% find-wordbreak], and @method[text% set-wordbreak-func]. -A global object @scheme[the-editor-wordbreak-map] is created - automatically and used as the default map for all @scheme[text%] +A global object @racket[the-editor-wordbreak-map] is created + automatically and used as the default map for all @racket[text%] objects. A wordbreak objects implements a mapping from each character to a list of symbols. The following symbols are legal elements of the list: @itemize[ -@item{@indexed-scheme['caret]} -@item{@indexed-scheme['line]} -@item{@indexed-scheme['selection]} -@item{@indexed-scheme['user1]} -@item{@indexed-scheme['user2]} +@item{@indexed-racket['caret]} +@item{@indexed-racket['line]} +@item{@indexed-racket['selection]} +@item{@indexed-racket['user1]} +@item{@indexed-racket['user2]} ] The presence of a flag in a character's value indicates that the character does not break a word when searching for breaks using the - corresponding reason. For example, if @scheme['caret] is present, + corresponding reason. For example, if @racket['caret] is present, then the character is a non-breaking character for caret-movement words. (Each stream of non-breaking characters is a single word.) @@ -35,18 +35,18 @@ The presence of a flag in a character's value indicates that the @defconstructor[()]{ All ASCII alpha-numeric characters are initialized with - @scheme['(caret line selection)]. All other ASCII non-whitespace + @racket['(caret line selection)]. All other ASCII non-whitespace characters except @litchar{-} are initialized with - @scheme['(line)]. All ASCII whitespace characters and @litchar{-} are - initialized with @scheme[null]. + @racket['(line)]. All ASCII whitespace characters and @litchar{-} are + initialized with @racket[null]. } @defmethod[(get-map [char char?]) (listof (one-of/c 'caret 'line 'selection 'user1 'user2))]{ -Gets the mapping value for @scheme[char]. See -@scheme[editor-wordbreak-map%] for more information. +Gets the mapping value for @racket[char]. See +@racket[editor-wordbreak-map%] for more information. } @@ -55,8 +55,8 @@ Gets the mapping value for @scheme[char]. See void?]{ -Sets the mapping value for @scheme[char] to @scheme[value]. See -@scheme[editor-wordbreak-map%] for more information. +Sets the mapping value for @racket[char] to @racket[value]. See +@racket[editor-wordbreak-map%] for more information. }} diff --git a/collects/scribblings/gui/event-class.scrbl b/collects/scribblings/gui/event-class.scrbl index b21dfd72..822c9c53 100644 --- a/collects/scribblings/gui/event-class.scrbl +++ b/collects/scribblings/gui/event-class.scrbl @@ -3,18 +3,18 @@ @defclass/title[event% object% ()]{ -An @scheme[event%] object contains information about a control, +An @racket[event%] object contains information about a control, keyboard, mouse, or scroll event. See also -@scheme[control-event%], -@scheme[key-event%], -@scheme[mouse-event%], and -@scheme[scroll-event%]. +@racket[control-event%], +@racket[key-event%], +@racket[mouse-event%], and +@racket[scroll-event%]. @defconstructor[([time-stamp exact-integer? 0])]{ See @method[event% get-time-stamp] for information about - @scheme[time-stamp]. + @racket[time-stamp]. } @@ -23,7 +23,7 @@ See @method[event% get-time-stamp] for information about Returns the time, in milliseconds, when the event occurred. This time is compatible with times reported by Racket's - @scheme[current-milliseconds] procedure. + @racket[current-milliseconds] procedure. } @@ -31,7 +31,7 @@ Returns the time, in milliseconds, when the event occurred. This time void?]{ Set the time, in milliseconds, when the event occurred. See also - Racket's @scheme[current-milliseconds]. + Racket's @racket[current-milliseconds]. If the supplied value is outside the platform-specific range of time values, @|MismatchExn|. diff --git a/collects/scribblings/gui/eventspace-funcs.scrbl b/collects/scribblings/gui/eventspace-funcs.scrbl index d9ec9367..a5f04987 100644 --- a/collects/scribblings/gui/eventspace-funcs.scrbl +++ b/collects/scribblings/gui/eventspace-funcs.scrbl @@ -8,7 +8,7 @@ Creates and returns a new eventspace value. The new eventspace is created as a child of the current eventspace. The eventspace is used by making it the current eventspace with the - @scheme[current-eventspace] parameter. + @racket[current-eventspace] parameter. See @|eventspacediscuss| for more information about eventspaces. @@ -26,7 +26,7 @@ See @|eventspacediscuss| for more information about eventspaces. @defproc[(eventspace? [v any/c]) boolean?]{ -Returns @scheme[#t] if @scheme[v] is an eventspace value or @scheme[#f] +Returns @racket[#t] if @racket[v] is an eventspace value or @racket[#f] otherwise. See @|eventspacediscuss| for more information about eventspaces. @@ -64,8 +64,8 @@ result event is ready when @racket[(yield)] for the eventspace boolean?]{ Inspects the event queue of the current eventspace, searching for a Shift-Ctl-C (Unix, Windows) or Cmd-. (Mac OS X) key combination. Returns - @scheme[#t] if such an event was found (and the event is dequeued) or - @scheme[#f] otherwise. + @racket[#t] if such an event was found (and the event is dequeued) or + @racket[#f] otherwise. } @@ -80,7 +80,7 @@ Returns a list of visible top-level frames and dialogs in the current (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c)]{ Returns the top level window in the current eventspace that has the keyboard focus (or contains the window with the keyboard focus), or - @scheme[#f] if no window in the current eventspace has the focus. + @racket[#f] if no window in the current eventspace has the focus. } @@ -88,7 +88,7 @@ Returns the top level window in the current eventspace that has the (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c)]{ Returns the top level window in the current eventspace that is visible and most recently had the keyboard focus (or contains the window that - had the keyboard focus), or @scheme[#f] if there is no visible window + had the keyboard focus), or @racket[#f] if there is no visible window in the current eventspace. } @@ -104,12 +104,12 @@ Enables or disables special Control key handling (Mac OS X). When Control Control key presses must be seen by the system translation, so this mode should be turned off, but the default is on. -If @scheme[on?] is provided and @scheme[#f], Control is passed to the system +If @racket[on?] is provided and @racket[#f], Control is passed to the system translation as normal. This setting affects all windows and eventspaces. -If no argument is provided, the result is @scheme[#t] if Control is -currently treated specially, @scheme[#f] otherwise. +If no argument is provided, the result is @racket[#t] if Control is +currently treated specially, @racket[#f] otherwise. } @@ -122,12 +122,12 @@ Enables or disables special Option key handling (Mac OS X). When without Option for keyboard translations. By default, Option is not special. -If @scheme[on?] is provided @scheme[#f], Option is passed to the +If @racket[on?] is provided @racket[#f], Option is passed to the system translation as normal. This setting affects all windows and eventspaces. -If no argument is provided, the result is @scheme[#t] if Option is - currently treated specially, @scheme[#f] otherwise. +If no argument is provided, the result is @racket[#t] if Option is + currently treated specially, @racket[#f] otherwise. } @defproc[(queue-callback [callback (-> any)] @@ -152,20 +152,19 @@ Yields control to event dispatching. See @secref["eventspaceinfo"] for details. A handler procedure invoked by the system during a call to - @scheme[yield] can itself call @scheme[yield], creating + @racket[yield] can itself call @racket[yield], creating an additional level of nested (but single-threaded) event handling. -See also -@scheme[sleep/yield] . +See also @racket[sleep/yield]. -If no argument is provided, @scheme[yield] dispatches an unspecified +If no argument is provided, @racket[yield] dispatches an unspecified number of events, but only if the current thread is the current eventspace's handler thread (otherwise, there is no effect). The - result is @scheme[#t] if any events may have been handled, - @scheme[#f] otherwise. + result is @racket[#t] if any events may have been handled, + @racket[#f] otherwise. -If @scheme[v] is @indexed-scheme['wait], and @scheme[yield] is called - in the handler thread of an eventspace, then @scheme[yield] starts +If @racket[v] is @indexed-racket['wait], and @racket[yield] is called + in the handler thread of an eventspace, then @racket[yield] starts processing events in that eventspace until @itemize[ @@ -176,54 +175,54 @@ If @scheme[v] is @indexed-scheme['wait], and @scheme[yield] is called @item{no callbacks are queued in the eventspace; and} - @item{no @scheme[menu-bar%] has been created for the eventspace - with @scheme['root] (i.e., creating a @scheme['root] menu bar + @item{no @racket[menu-bar%] has been created for the eventspace + with @racket['root] (i.e., creating a @racket['root] menu bar prevents an eventspace from ever unblocking).} ] -When called in a non-handler thread, @scheme[yield] returns - immediately. In either case, the result is @scheme[#t]. +When called in a non-handler thread, @racket[yield] returns + immediately. In either case, the result is @racket[#t]. -Evaluating @scheme[(yield 'wait)] is thus similar to - @scheme[(yield (current-eventspace))], except that it is +Evaluating @racket[(yield 'wait)] is thus similar to + @racket[(yield (current-eventspace))], except that it is sensitive to whether the current thread is a handler thread, instead - of the value of the @scheme[current-eventspace] parameter. + of the value of the @racket[current-eventspace] parameter. -If @scheme[v] is an event in Racket's sense (not to be confused with - a GUI event), @scheme[yield] blocks on @scheme[v] in the same way as - @scheme[sync], except that it may start a @scheme[sync] on @scheme[v] - multiple times (but it will complete a @scheme[sync] on @scheme[v] at +If @racket[v] is an event in Racket's sense (not to be confused with + a GUI event), @racket[yield] blocks on @racket[v] in the same way as + @racket[sync], except that it may start a @racket[sync] on @racket[v] + multiple times (but it will complete a @racket[sync] on @racket[v] at most one time). If the current thread is the current eventspace's - handler thread, events are dispatched until a @scheme[v] sync + handler thread, events are dispatched until a @racket[v] sync succeeds on an event boundary. For other threads, calling - @scheme[yield] with a Racket event is equivalent to calling - @scheme[sync]. In either case, the result is the same that of - @scheme[sync]; however, if a wrapper procedure is associated with - @scheme[v] via @scheme[handle-evt], it is not called in tail position - with respect to the @scheme[yield]. + @racket[yield] with a Racket event is equivalent to calling + @racket[sync]. In either case, the result is the same that of + @racket[sync]; however, if a wrapper procedure is associated with + @racket[v] via @racket[handle-evt], it is not called in tail position + with respect to the @racket[yield]. -Always use @scheme[(yield v)] instead of a busy-wait loop. +Always use @racket[(yield v)] instead of a busy-wait loop. } @defproc[(sleep/yield [secs (and/c real? (not/c negative?))]) void?]{ Blocks for at least the specified number of seconds, handling events meanwhile if the current thread is the current eventspace's handler - thread (otherwise, @scheme[sleep/yield] is equivalent to - @scheme[sleep]). + thread (otherwise, @racket[sleep/yield] is equivalent to + @racket[sleep]). } @defproc[(eventspace-shutdown? [e eventspace?]) boolean?]{ -Returns @scheme[#t] if the given eventspace has been shut down by its - custodian, @scheme[#f] otherwise. Attempting to create a new window, +Returns @racket[#t] if the given eventspace has been shut down by its + custodian, @racket[#f] otherwise. Attempting to create a new window, timer, or explicitly queued event in a shut-down eventspace raises - the @scheme[exn:misc] exception. + the @racket[exn:misc] exception. Attempting to use certain methods of windows and timers in a shut-down - eventspace also raises the @scheme[exn:misc] exception, but the + eventspace also raises the @racket[exn:misc] exception, but the @xmethod[area<%> get-top-level-window] and @xmethod[top-level-window<%> get-eventspace] methods work even after the area's eventspace is shut down. @@ -233,11 +232,6 @@ Attempting to use certain methods of windows and timers in a shut-down (or/c thread? #f)]{ Returns the handler thread of the given eventspace. If the handler thread has terminated (e.g., because the eventspace was shut down), the - result is @scheme[#f]. - - - - - + result is @racket[#f]. } diff --git a/collects/scribblings/gui/font-funcs.scrbl b/collects/scribblings/gui/font-funcs.scrbl index cf77acb4..ee67771c 100644 --- a/collects/scribblings/gui/font-funcs.scrbl +++ b/collects/scribblings/gui/font-funcs.scrbl @@ -5,32 +5,31 @@ @defthing[menu-control-font (is-a?/c font%)]{ -This font is the default for @scheme[popup-menu%] objects. +This font is the default for @racket[popup-menu%] objects. On Mac OS X, this font is slightly larger than - @scheme[normal-control-font]. On Windows and Unix, it is the same - size as @scheme[normal-control-font]. + @racket[normal-control-font]. On Windows and Unix, it is the same + size as @racket[normal-control-font]. } @defthing[normal-control-font (is-a?/c font%)]{ This font is the default for most controls, except - @scheme[list-box%] and @scheme[group-box-panel%] objects. - + @racket[list-box%] and @racket[group-box-panel%] objects. } @defthing[small-control-font (is-a?/c font%)]{ -This font is the default for @scheme[group-box-panel%] objects, and it is +This font is the default for @racket[group-box-panel%] objects, and it is a suitable for controls in a floating window and other contexts that need smaller controls. On Windows, this font is the same size as - @scheme[normal-control-font], since the Windows control font is + @racket[normal-control-font], since the Windows control font is already relatively small. On Unix and Mac OS X, this font is slightly - smaller than @scheme[normal-control-font]. + smaller than @racket[normal-control-font]. } @@ -38,18 +37,18 @@ On Windows, this font is the same size as @defthing[tiny-control-font (is-a?/c font%)]{ This font is for tiny controls, and it is smaller than - @scheme[small-control-font] on all platforms. + @racket[small-control-font] on all platforms. } @defthing[view-control-font (is-a?/c font%)]{ -This font is the default for @scheme[list-box%] objects (but not - list box labels, which use @scheme[normal-control-font]). +This font is the default for @racket[list-box%] objects (but not + list box labels, which use @racket[normal-control-font]). On Mac OS X, this font is slightly smaller than - @scheme[normal-control-font], and slightly larger than - @scheme[small-control-font]. On Windows and Unix, it is the same size - as @scheme[normal-control-font]. + @racket[normal-control-font], and slightly larger than + @racket[small-control-font]. On Windows and Unix, it is the same size + as @racket[normal-control-font]. } diff --git a/collects/scribblings/gui/frame-class.scrbl b/collects/scribblings/gui/frame-class.scrbl index b54b88c6..b7f14107 100644 --- a/collects/scribblings/gui/frame-class.scrbl +++ b/collects/scribblings/gui/frame-class.scrbl @@ -31,83 +31,83 @@ On Windows, both Multiple Document Interface (MDI) and Single [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -The @scheme[label] string is displayed in the frame's title +The @racket[label] string is displayed in the frame's title bar. If the frame's label is changed (see @method[window<%> set-label]), the title bar is updated. -The @scheme[parent] argument can be @scheme[#f] or an existing -frame. On Windows, if @scheme[parent] is an existing frame, +The @racket[parent] argument can be @racket[#f] or an existing +frame. On Windows, if @racket[parent] is an existing frame, the new frame is always on top of its parent. Also, the -@scheme[parent] frame may be an MDI parent frame from a new MDI +@racket[parent] frame may be an MDI parent frame from a new MDI child frame. On Windows and Unix (for many window managers), a frame is iconized when its parent is iconized. -If @scheme[parent] is @scheme[#f], then the eventspace for the +If @racket[parent] is @racket[#f], then the eventspace for the new frame is the current eventspace, as determined by -@scheme[current-eventspace]. Otherwise, @scheme[parent]'s +@racket[current-eventspace]. Otherwise, @racket[parent]'s eventspace is the new frame's eventspace. -If the @scheme[width] or @scheme[height] argument is not -@scheme[#f], it specifies an initial size for the frame (in +If the @racket[width] or @racket[height] argument is not +@racket[#f], it specifies an initial size for the frame (in pixels) assuming that it is larger than the minimum size, otherwise the minimum size is used. -If the @scheme[x] or @scheme[y] argument is not @scheme[#f], it +If the @racket[x] or @racket[y] argument is not @racket[#f], it specifies an initial location for the frame. Otherwise, a location is selected automatically (tiling frames and dialogs as they are created). -The @scheme[style] flags adjust the appearance of the frame on +The @racket[style] flags adjust the appearance of the frame on some platforms: @itemize[ - @item{@scheme['no-resize-border] --- omits the resizeable border + @item{@racket['no-resize-border] --- omits the resizeable border around the window (Windows, Unix) or grow box in the bottom right corner (Mac OS X)} - @item{@scheme['no-caption] --- omits the title bar for the frame + @item{@racket['no-caption] --- omits the title bar for the frame (Windows, Mac OS X, Unix)} - @item{@scheme['no-system-menu] --- omits the system menu + @item{@racket['no-system-menu] --- omits the system menu (Windows)} - @item{@scheme['mdi-child] --- creates the frame as a MDI + @item{@racket['mdi-child] --- creates the frame as a MDI (multiple document interface) child frame, mutually exclusive with - @scheme['mdi-parent] (Windows)} + @racket['mdi-parent] (Windows)} - @item{@scheme['mdi-parent] --- creates the frame as a MDI + @item{@racket['mdi-parent] --- creates the frame as a MDI (multiple document interface) parent frame, mutually exclusive with - @scheme['mdi-child] (Windows)} + @racket['mdi-child] (Windows)} - @item{@scheme['toolbar-button] --- includes a toolbar button on the + @item{@racket['toolbar-button] --- includes a toolbar button on the frame's title bar (Mac OS X); a click on the toolbar button triggers a call to @method[frame% on-toolbar-button-click]} - @item{@scheme['hide-menu-bar] --- hides the menu bar and dock when + @item{@racket['hide-menu-bar] --- hides the menu bar and dock when the frame is active (Mac OS X) or asks the window manager to make the frame fullscreen (Unix)} - @item{@scheme['float] --- causes the frame to stay in front of all + @item{@racket['float] --- causes the frame to stay in front of all other non-floating windows (Windows, Mac OS X, Unix); on Mac OS X, a floating frame shares the focus with an active non-floating frame; when this style - is combined with @scheme['no-caption], then showing the frame does + is combined with @racket['no-caption], then showing the frame does not cause the keyboard focus to shift to the window, and on Unix, clicking the frame does not move the focus; on Windows, a floating frame has no taskbar button} - @item{@scheme['metal] --- ignored (formerly supported for Mac OS X)} + @item{@racket['metal] --- ignored (formerly supported for Mac OS X)} ] -If the @scheme['mdi-child] style is specified, the @scheme[parent] must be - a frame with the @scheme['mdi-parent] style, otherwise @|MismatchExn|. +If the @racket['mdi-child] style is specified, the @racket[parent] must be + a frame with the @racket['mdi-parent] style, otherwise @|MismatchExn|. Even if the frame is not shown, a few notification events may be queued for the frame on creation. Consequently, the new frame's resources (e.g., memory) cannot be reclaimed until some events are handled, or the frame's eventspace is shut down. -@WindowKWs[@scheme[enabled]] @AreaContKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @AreaContKWs[] @AreaKWs[] } @@ -126,7 +126,7 @@ See also @method[frame% set-status-text]. @defmethod[(get-menu-bar) (or/c (is-a?/c menu-bar%) false/c)]{ -Returns the frame's menu bar, or @scheme[#f] if none has been created +Returns the frame's menu bar, or @racket[#f] if none has been created for the frame. } @@ -134,8 +134,8 @@ Returns the frame's menu bar, or @scheme[#f] if none has been created @defmethod[(has-status-line?) boolean?]{ -Returns @scheme[#t] if the frame's status line has been created, - @scheme[#f] otherwise. See also @method[frame% create-status-line]. +Returns @racket[#t] if the frame's status line has been created, + @racket[#f] otherwise. See also @method[frame% create-status-line]. } @@ -153,7 +153,7 @@ frame has been iconized} @elem{@method[frame% is-iconized?]}] @defmethod[(is-iconized?) boolean?]{ -Returns @scheme[#t] if the frame is iconized (minimized), @scheme[#f] +Returns @racket[#t] if the frame is iconized (minimized), @racket[#f] otherwise. } @@ -161,9 +161,9 @@ otherwise. @defmethod[(is-maximized?) boolean?]{ -On Windows and Mac OS X, returns @scheme[#t] if the frame is -maximized, @scheme[#f] otherwise. On Unix, the result is always -@scheme[#f]. +On Windows and Mac OS X, returns @racket[#t] if the frame is +maximized, @racket[#f] otherwise. On Unix, the result is always +@racket[#f]. } @@ -180,7 +180,7 @@ Maximizes or restores the frame on Windows and Mac OS X; the } @methimpl{ -If @scheme[maximize?] is @scheme[#f], the window is restored, otherwise +If @racket[maximize?] is @racket[#f], the window is restored, otherwise it is maximized. @@ -203,9 +203,9 @@ Gets or sets the frame's modification state as reflected to the user. void?]{ Called on Windows when a MDI-child frame becomes the active frame - within its parent (in which case the argument is @scheme[#t]), or when + within its parent (in which case the argument is @racket[#t]), or when the child frame ceases to be the active frame (in which case the - argument is @scheme[#f]). + argument is @racket[#f]). MDI activation is different from keyboard-focus activation. If the @@ -221,8 +221,8 @@ MDI activation is different from keyboard-focus activation. If the If the frame has a menu bar with keyboard shortcuts, and if the key event includes a Control, Alt, Option, Meta, Command, Shift, or Function key, then @method[frame% on-menu-char] attempts to match the -given event to a menu item. If a match is found, @scheme[#t] is -returned, otherwise @scheme[#f] is returned. +given event to a menu item. If a match is found, @racket[#t] is +returned, otherwise @racket[#f] is returned. When the match corresponds to a complete shortcut combination, the menu item's callback is called (before @@ -233,7 +233,7 @@ If the event does not correspond to a complete shortcut combination, menu bar (i.e., an underlined letter in a menu's title, which is installed by including an ampersand in the menu's label). If a mnemonic match is found, the keyboard focus is moved to the menu bar - (selecting the menu with the mnemonic), and @scheme[#t] is returned. + (selecting the menu with the mnemonic), and @racket[#t] is returned. } @@ -244,7 +244,7 @@ If the event does not correspond to a complete shortcut combination, Returns the result of -@schemeblock[ +@racketblock[ (or (send this @#,method[frame% on-menu-char] event) (send this @#,method[top-level-window<%> on-system-menu-char] event) (send this @#,method[top-level-window<%> on-traverse-char] event)) @@ -255,7 +255,7 @@ Returns the result of void?]{ On Mac OS X, called when the user clicks the toolbar button on a - frame created with the @indexed-scheme['toolbar-button] style. + frame created with the @indexed-racket['toolbar-button] style. } diff --git a/collects/scribblings/gui/gauge-class.scrbl b/collects/scribblings/gui/gauge-class.scrbl index fd6cf36a..d014d489 100644 --- a/collects/scribblings/gui/gauge-class.scrbl +++ b/collects/scribblings/gui/gauge-class.scrbl @@ -27,19 +27,20 @@ of the gauge. [stretchable-width any/c (memq 'horizontal style)] [stretchable-height any/c (memq 'vertical style)])]{ -If @scheme[label] is a string, it is used as the gauge label; otherwise +If @racket[label] is a string, it is used as the gauge label; otherwise the gauge does not display a label. @labelsimplestripped[(scheme label) @elem{gauge}] -The @scheme[range] argument is an integer specifying the maximum value of - the gauge (inclusive). The minimum gauge value is always @scheme[0]. +The @racket[range] argument is an integer specifying the maximum value of + the gauge (inclusive). The minimum gauge value is always @racket[0]. -The @scheme[style] list must include either @scheme['horizontal], - specifying a horizontal gauge, or @scheme['vertical], specifying - a vertical gauge. @HVLabelNote[@scheme[style]]{gauge} @DeletedStyleNote[@scheme[style] @scheme[parent]]{gauge} +The @racket[style] list must include either @racket['horizontal], + specifying a horizontal gauge, or @racket['vertical], specifying a vertical + gauge. @HVLabelNote[@racket[style]]{gauge} @DeletedStyleNote[@racket[style] + @racket[parent]]{gauge} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] diff --git a/collects/scribblings/gui/global-draw-funcs.scrbl b/collects/scribblings/gui/global-draw-funcs.scrbl index 9234660b..7a168613 100644 --- a/collects/scribblings/gui/global-draw-funcs.scrbl +++ b/collects/scribblings/gui/global-draw-funcs.scrbl @@ -24,16 +24,16 @@ Returns the depth of the main display (a value of 1 denotes a monochrome display @defproc[(get-display-left-top-inset [avoid-bars? any/c #f]) (values exact-nonnegative-integer? exact-nonnegative-integer?)]{ -When the optional argument is @scheme[#f] (the default), this function +When the optional argument is @racket[#f] (the default), this function returns the offset of the main screen's origin from the top-left of the physical screen. On Unix and Windows, the result is - always @scheme[0] and @scheme[0]; on Mac OS X, the result is - @scheme[0] and the height of the menu bar. + always @racket[0] and @racket[0]; on Mac OS X, the result is + @racket[0] and the height of the menu bar. When the optional argument is true, this function returns the amount space at the left and top of the main screen that is occupied by the task bar (Windows) or menu bar and dock (Mac OS X). On Unix, the - result is always @scheme[0] and @scheme[0]. + result is always @racket[0] and @racket[0]. } @@ -55,7 +55,7 @@ Returns the screen's width and height. @defproc[(is-color-display?) boolean?]{ -Returns @scheme[#t] if the main display has color, @scheme[#f] +Returns @racket[#t] if the main display has color, @racket[#f] otherwise. } diff --git a/collects/scribblings/gui/group-box-panel-class.scrbl b/collects/scribblings/gui/group-box-panel-class.scrbl index e8d7d2ac..19e5cfce 100644 --- a/collects/scribblings/gui/group-box-panel-class.scrbl +++ b/collects/scribblings/gui/group-box-panel-class.scrbl @@ -8,7 +8,7 @@ A group-box panel arranges its subwindows in a single column, but also the panel content. Unlike most panel classes, a group-box panel's horizontal and vertical - margins default to @scheme[2]. + margins default to @racket[2]. @defconstructor[([label label-string?] @@ -29,11 +29,11 @@ Unlike most panel classes, a group-box panel's horizontal and vertical [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -Creates a group pane whose title is @scheme[label]. +Creates a group pane whose title is @racket[label]. -@DeletedStyleNote[@scheme[style] @scheme[parent]]{group panel} +@DeletedStyleNote[@racket[style] @racket[parent]]{group panel} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] }} diff --git a/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl b/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl index edaf6ab6..1fd49350 100644 --- a/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl +++ b/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl @@ -3,18 +3,18 @@ @defclass/title[grow-box-spacer-pane% pane% ()]{ -A @scheme[grow-box-spacer-pane%] object is intended for use as a +A @racket[grow-box-spacer-pane%] object is intended for use as a lightweight spacer in the bottom-right corner of a frame, rather than as a container. On Mac OS X, a - @scheme[grow-box-spacer-pane%] has the same width and height as the + @racket[grow-box-spacer-pane%] has the same width and height as the grow box that is inset into the bottom-right corner of a frame. On - Windows and Unix, a @scheme[grow-box-spacer-pane%] has zero width and + Windows and Unix, a @racket[grow-box-spacer-pane%] has zero width and height. Unlike all other container types, a - @scheme[grow-box-spacer-pane%] is unstretchable by default. + @racket[grow-box-spacer-pane%] is unstretchable by default. @defconstructor/auto-super[()]{ -See @scheme[pane%] for information on initialization arguments. +See @racket[pane%] for information on initialization arguments. }} diff --git a/collects/scribblings/gui/horizontal-pane-class.scrbl b/collects/scribblings/gui/horizontal-pane-class.scrbl index eabab456..1f604dba 100644 --- a/collects/scribblings/gui/horizontal-pane-class.scrbl +++ b/collects/scribblings/gui/horizontal-pane-class.scrbl @@ -4,8 +4,7 @@ @defclass/title[horizontal-pane% pane% ()]{ A horizontal pane arranges its subwindows in a single row. See also - @scheme[pane%]. - + @racket[pane%]. @defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) (is-a?/c panel%) (is-a?/c pane%))] diff --git a/collects/scribblings/gui/horizontal-panel-class.scrbl b/collects/scribblings/gui/horizontal-panel-class.scrbl index 3e58f878..644d36b4 100644 --- a/collects/scribblings/gui/horizontal-panel-class.scrbl +++ b/collects/scribblings/gui/horizontal-panel-class.scrbl @@ -4,7 +4,7 @@ @defclass/title[horizontal-panel% panel% ()]{ A horizontal panel arranges its subwindows in a single row. See also - @scheme[panel%]. + @racket[panel%]. @defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) (is-a?/c panel%) (is-a?/c pane%))] @@ -26,17 +26,17 @@ A horizontal panel arranges its subwindows in a single row. See also The @racket[style] flags are the same as for @racket[panel%]. -@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] } @defmethod[(set-orientation [horizontal? boolean?]) void?]{ Sets the orientation of the panel, switching it between - the behavior of the @scheme[vertical-panel%] and that of - the @scheme[horizontal-panel%]. + the behavior of the @racket[vertical-panel%] and that of + the @racket[horizontal-panel%]. } @defmethod[(get-orientation) boolean?]{ - Initially returns @scheme[#t], but if + Initially returns @racket[#t], but if @method[horizontal-panel% set-orientation] is called, this method returns whatever the last value passed to it was. } diff --git a/collects/scribblings/gui/key-event-class.scrbl b/collects/scribblings/gui/key-event-class.scrbl index cd4f964e..740854ba 100644 --- a/collects/scribblings/gui/key-event-class.scrbl +++ b/collects/scribblings/gui/key-event-class.scrbl @@ -3,14 +3,14 @@ @defclass/title[key-event% event% ()]{ -A @scheme[key-event%] object contains information about a key press +A @racket[key-event%] object contains information about a key press or release event. Key events are primarily processed by @xmethod[window<%> on-subwindow-char] and @xmethod[canvas<%> on-char]. For a key-press event, a virtual key code is provided by @method[key-event% get-key-code]. For a key-release event, -@method[key-event% get-key-code] reports @scheme['release], and a virtual key code is provided by +@method[key-event% get-key-code] reports @racket['release], and a virtual key code is provided by @method[key-event% get-key-release-code]. See also @|mousekeydiscuss|. @@ -26,19 +26,19 @@ See also @|mousekeydiscuss|. [time-stamp exact-integer? 0] [caps-down any/c #f])]{ -See the corresponding @schemeidfont{get-} and @schemeidfont{set-} - methods for information about @scheme[key-code], @scheme[shift-down], - @scheme[control-down], @scheme[meta-down], @scheme[alt-down], - @scheme[x], @scheme[y], @scheme[time-stamp], @scheme[caps-down]. +See the corresponding @racketidfont{get-} and @racketidfont{set-} + methods for information about @racket[key-code], @racket[shift-down], + @racket[control-down], @racket[meta-down], @racket[alt-down], + @racket[x], @racket[y], @racket[time-stamp], @racket[caps-down]. The release key code, as returned by @method[key-event% -get-key-release-code], is initialized to @scheme['press]. +get-key-release-code], is initialized to @racket['press]. } @defmethod[(get-alt-down) boolean?]{ -Returns @scheme[#t] if the Option (Mac OS X) key was down for +Returns @racket[#t] if the Option (Mac OS X) key was down for the event. When the Alt key is pressed in Windows, it is reported as a Meta press (see @method[key-event% get-meta-down]). @@ -47,17 +47,17 @@ Returns @scheme[#t] if the Option (Mac OS X) key was down for @defmethod[(get-caps-down) boolean?]{ -Returns @scheme[#t] if the Caps Lock key was on for the event. +Returns @racket[#t] if the Caps Lock key was on for the event. } @defmethod[(get-control-down) boolean?]{ -Returns @scheme[#t] if the Control key was down for the event. +Returns @racket[#t] if the Control key was down for the event. On Mac OS X, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and -@method[key-event% get-control-down] for the event reports @scheme[#f]. +@method[key-event% get-control-down] for the event reports @racket[#f]. } @@ -68,78 +68,78 @@ Gets the virtual key code for the key event. The virtual key code is either a character or a special key symbol, one of the following: @itemize[ -@item{@indexed-scheme['start]} -@item{@indexed-scheme['cancel]} -@item{@indexed-scheme['clear]} -@item{@indexed-scheme['shift]} -@item{@indexed-scheme['control]} -@item{@indexed-scheme['menu]} -@item{@indexed-scheme['pause]} -@item{@indexed-scheme['capital]} -@item{@indexed-scheme['prior]} -@item{@indexed-scheme['next]} -@item{@indexed-scheme['end]} -@item{@indexed-scheme['home]} -@item{@indexed-scheme['left]} -@item{@indexed-scheme['up]} -@item{@indexed-scheme['right]} -@item{@indexed-scheme['down]} -@item{@indexed-scheme['escape]} -@item{@indexed-scheme['select]} -@item{@indexed-scheme['print]} -@item{@indexed-scheme['execute]} -@item{@indexed-scheme['snapshot]} -@item{@indexed-scheme['insert]} -@item{@indexed-scheme['help]} -@item{@indexed-scheme['numpad0]} -@item{@indexed-scheme['numpad1]} -@item{@indexed-scheme['numpad2]} -@item{@indexed-scheme['numpad3]} -@item{@indexed-scheme['numpad4]} -@item{@indexed-scheme['numpad5]} -@item{@indexed-scheme['numpad6]} -@item{@indexed-scheme['numpad7]} -@item{@indexed-scheme['numpad8]} -@item{@indexed-scheme['numpad9]} -@item{@indexed-scheme['numpad-enter]} -@item{@indexed-scheme['multiply]} -@item{@indexed-scheme['add]} -@item{@indexed-scheme['separator]} -@item{@indexed-scheme['subtract]} -@item{@indexed-scheme['decimal]} -@item{@indexed-scheme['divide]} -@item{@indexed-scheme['f1]} -@item{@indexed-scheme['f2]} -@item{@indexed-scheme['f3]} -@item{@indexed-scheme['f4]} -@item{@indexed-scheme['f5]} -@item{@indexed-scheme['f6]} -@item{@indexed-scheme['f7]} -@item{@indexed-scheme['f8]} -@item{@indexed-scheme['f9]} -@item{@indexed-scheme['f10]} -@item{@indexed-scheme['f11]} -@item{@indexed-scheme['f12]} -@item{@indexed-scheme['f13]} -@item{@indexed-scheme['f14]} -@item{@indexed-scheme['f15]} -@item{@indexed-scheme['f16]} -@item{@indexed-scheme['f17]} -@item{@indexed-scheme['f18]} -@item{@indexed-scheme['f19]} -@item{@indexed-scheme['f20]} -@item{@indexed-scheme['f21]} -@item{@indexed-scheme['f22]} -@item{@indexed-scheme['f23]} -@item{@indexed-scheme['f24]} -@item{@indexed-scheme['numlock]} -@item{@indexed-scheme['scroll]} -@item{@indexed-scheme['wheel-up] --- @index["wheel on mouse"]{mouse} wheel up one notch} -@item{@indexed-scheme['wheel-down] --- mouse wheel down one notch} -@item{@indexed-scheme['wheel-left] --- mouse wheel left one notch} -@item{@indexed-scheme['wheel-right] --- mouse wheel right one notch} -@item{@indexed-scheme['release] --- indicates a key-release event} -@item{@indexed-scheme['press] --- indicates a key-press event; usually only from @scheme[get-key-release-code]} +@item{@indexed-racket['start]} +@item{@indexed-racket['cancel]} +@item{@indexed-racket['clear]} +@item{@indexed-racket['shift]} +@item{@indexed-racket['control]} +@item{@indexed-racket['menu]} +@item{@indexed-racket['pause]} +@item{@indexed-racket['capital]} +@item{@indexed-racket['prior]} +@item{@indexed-racket['next]} +@item{@indexed-racket['end]} +@item{@indexed-racket['home]} +@item{@indexed-racket['left]} +@item{@indexed-racket['up]} +@item{@indexed-racket['right]} +@item{@indexed-racket['down]} +@item{@indexed-racket['escape]} +@item{@indexed-racket['select]} +@item{@indexed-racket['print]} +@item{@indexed-racket['execute]} +@item{@indexed-racket['snapshot]} +@item{@indexed-racket['insert]} +@item{@indexed-racket['help]} +@item{@indexed-racket['numpad0]} +@item{@indexed-racket['numpad1]} +@item{@indexed-racket['numpad2]} +@item{@indexed-racket['numpad3]} +@item{@indexed-racket['numpad4]} +@item{@indexed-racket['numpad5]} +@item{@indexed-racket['numpad6]} +@item{@indexed-racket['numpad7]} +@item{@indexed-racket['numpad8]} +@item{@indexed-racket['numpad9]} +@item{@indexed-racket['numpad-enter]} +@item{@indexed-racket['multiply]} +@item{@indexed-racket['add]} +@item{@indexed-racket['separator]} +@item{@indexed-racket['subtract]} +@item{@indexed-racket['decimal]} +@item{@indexed-racket['divide]} +@item{@indexed-racket['f1]} +@item{@indexed-racket['f2]} +@item{@indexed-racket['f3]} +@item{@indexed-racket['f4]} +@item{@indexed-racket['f5]} +@item{@indexed-racket['f6]} +@item{@indexed-racket['f7]} +@item{@indexed-racket['f8]} +@item{@indexed-racket['f9]} +@item{@indexed-racket['f10]} +@item{@indexed-racket['f11]} +@item{@indexed-racket['f12]} +@item{@indexed-racket['f13]} +@item{@indexed-racket['f14]} +@item{@indexed-racket['f15]} +@item{@indexed-racket['f16]} +@item{@indexed-racket['f17]} +@item{@indexed-racket['f18]} +@item{@indexed-racket['f19]} +@item{@indexed-racket['f20]} +@item{@indexed-racket['f21]} +@item{@indexed-racket['f22]} +@item{@indexed-racket['f23]} +@item{@indexed-racket['f24]} +@item{@indexed-racket['numlock]} +@item{@indexed-racket['scroll]} +@item{@indexed-racket['wheel-up] --- @index["wheel on mouse"]{mouse} wheel up one notch} +@item{@indexed-racket['wheel-down] --- mouse wheel down one notch} +@item{@indexed-racket['wheel-left] --- mouse wheel left one notch} +@item{@indexed-racket['wheel-right] --- mouse wheel right one notch} +@item{@indexed-racket['release] --- indicates a key-release event} +@item{@indexed-racket['press] --- indicates a key-press event; usually only from @racket[get-key-release-code]} ] The special key symbols attempt to capture useful keys that have no @@ -148,26 +148,26 @@ The special key symbols attempt to capture useful keys that have no @itemize[ - @item{@scheme[#\space] --- the space bar} + @item{@racket[#\space] --- the space bar} - @item{@scheme[#\return] --- the Enter or Return key (on all + @item{@racket[#\return] --- the Enter or Return key (on all platforms), but not necessarily the Enter key near the numpad - (which is reported as @scheme['numpad-enter] if the platform + (which is reported as @racket['numpad-enter] if the platform distinguishes the two Enter keys)} - @item{@scheme[#\tab] --- the tab key} + @item{@racket[#\tab] --- the tab key} - @item{@scheme[#\backspace] --- the backspace key} + @item{@racket[#\backspace] --- the backspace key} - @item{@scheme[#\rubout] --- the delete key} + @item{@racket[#\rubout] --- the delete key} ] If a suitable special key symbol or ASCII representation is not - available, @scheme[#\nul] (the NUL character) is reported. + available, @racket[#\nul] (the NUL character) is reported. -A @scheme['wheel-up], @scheme['wheel-down], @scheme['wheel-left], or - @scheme['wheel-right] event may be sent to a window other than the +A @racket['wheel-up], @racket['wheel-down], @racket['wheel-left], or + @racket['wheel-right] event may be sent to a window other than the one with the keyboard focus, because some platforms generate wheel events based on the location of the mouse pointer instead of the keyboard focus. @@ -177,7 +177,7 @@ On Windows, when the Control key is pressed without Alt, the key of the Shift key. On Mac OS X, the key code is computed without Caps Lock effects when the Control or Command key is pressed; in the case of Control, Caps Lock is used normally if special handling is - disabled for the Control key via @scheme[special-control-key]. On + disabled for the Control key via @racket[special-control-key]. On Unix, the key code is computed with Caps Lock effects when the Control key is pressed without Alt. @@ -189,7 +189,7 @@ See also @method[key-event% get-other-shift-key-code]. (or/c char? key-code-symbol?)]{ Gets the virtual key code for a key-release event; the result is - @scheme['press] for a key-press event. See @method[key-event% + @racket['press] for a key-press event. See @method[key-event% get-key-code] for the list of virtual key codes. } @@ -197,7 +197,7 @@ Gets the virtual key code for a key-release event; the result is @defmethod[(get-meta-down) boolean?]{ -Returns @scheme[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS +Returns @racket[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS X) key was down for the event. } @@ -230,7 +230,7 @@ Since keyboard mappings vary, it is sometimes useful in key mappings for a program to know the result that the keyboard would have produced for an event if the Shift key had been toggled differently. The @method[key-event% get-other-shift-key-code] - produces that other mapping, returning @scheme[#f] if the alternate + produces that other mapping, returning @racket[#f] if the alternate mapping is unavailable, otherwise returning the same kind of result as @method[key-event% get-key-code]. @@ -263,7 +263,7 @@ Alternate mappings are not available for all events. On Windows, @defmethod[(get-shift-down) boolean?]{ -Returns @scheme[#t] if the Shift key was down for the event. +Returns @racket[#t] if the Shift key was down for the event. } @@ -307,7 +307,7 @@ Sets whether the Control key was down for the event. On Mac OS X, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and @method[key-event% get-control-down] for the event reports - @scheme[#f]. + @racket[#f]. } diff --git a/collects/scribblings/gui/keymap-class.scrbl b/collects/scribblings/gui/keymap-class.scrbl index 6e7ae369..6afd3117 100644 --- a/collects/scribblings/gui/keymap-class.scrbl +++ b/collects/scribblings/gui/keymap-class.scrbl @@ -3,10 +3,10 @@ @defclass/title[keymap% object% ()]{ -A @scheme[keymap%] object is used by @scheme[editor<%>] objects to +A @racket[keymap%] object is used by @racket[editor<%>] objects to map keyboard and mouse sequences to arbitrary functions in an extensible way. Keymaps can be used without editors, as well. A - @scheme[keymap%] object contains + @racket[keymap%] object contains @itemize[ @@ -16,13 +16,13 @@ A @scheme[keymap%] object is used by @scheme[editor<%>] objects to ] -A handler procedure in a keymap is invoked with a @scheme[key-event%] - object or a @scheme[mouse-event%] object. It is also given another +A handler procedure in a keymap is invoked with a @racket[key-event%] + object or a @racket[mouse-event%] object. It is also given another value that depends on the context in which the keymap is used (or, more specifically, the arguments to @method[keymap% handle-key-event] or @method[keymap% handle-mouse-event]). For keymaps associated with - @scheme[editor<%>] objects, the extra parameter is generally the - @scheme[editor<%>] object that received the keyboard or mouse event. + @racket[editor<%>] objects, the extra parameter is generally the + @racket[editor<%>] object that received the keyboard or mouse event. @defconstructor[()]{ @@ -72,16 +72,16 @@ A break callback function can be installed with @method[keymap% boolean?]{ Calls a named event handler directly. If the function cannot be found - or the found handler did not want to handle the event, @scheme[#f] is + or the found handler did not want to handle the event, @racket[#f] is returned. Otherwise, the return value is the boolean return value of the event handler. -The @scheme[in] and @scheme[event] arguments are passed on to the keymap +The @racket[in] and @racket[event] arguments are passed on to the keymap handler procedure if one is found. -If @scheme[try-chain?] is not @scheme[#f], keymaps chained to this one +If @racket[try-chain?] is not @racket[#f], keymaps chained to this one are searched for the function name. If the function is not found and - @scheme[try-chain?] is @scheme[#f]; an exception is also raised, but + @racket[try-chain?] is @racket[#f]; an exception is also raised, but the exception handler cannot escape (see @secref["evtcontjump"]). @@ -92,9 +92,9 @@ If @scheme[try-chain?] is not @scheme[#f], keymaps chained to this one [prefix? any/c]) void?]{ -Chains @scheme[next] off @this-obj[] The @scheme[next] keymap will be +Chains @racket[next] off @this-obj[] The @racket[next] keymap will be used to handle events which are not handled by @this-obj[]. If - @scheme[prefix?] is a true value, then @scheme[next] will take + @racket[prefix?] is a true value, then @racket[next] will take precedence over other keymaps already chained to @this-obj[]. Multiple keymaps can be chained off one keymap using @method[keymap% @@ -130,9 +130,9 @@ The default interval is determined in a platform-specific way, but it [event (is-a?/c key-event%)]) boolean?]{ -Attempts to handle a keyboard event, returning @scheme[#t] if the event +Attempts to handle a keyboard event, returning @racket[#t] if the event was handled (i.e., a handler was found and it returned a true value), - @scheme[#f] otherwise. + @racket[#f] otherwise. See also @method[keymap% call-function]. @@ -143,9 +143,9 @@ See also @method[keymap% call-function]. [event (is-a?/c mouse-event%)]) boolean?]{ -Attempts to handle a mouse event, returning @scheme[#t] if the event +Attempts to handle a mouse event, returning @racket[#t] if the event was handled (i.e., a handler was found and it returned a true value), - @scheme[#f] otherwise. + @racket[#f] otherwise. See also @method[keymap% call-function]. @@ -157,7 +157,7 @@ See also @method[keymap% call-function]. void?]{ Maps an input state sequence to a function name using a string-encoded - sequence in @scheme[keyname]. The format of @scheme[keyname] is a + sequence in @racket[keyname]. The format of @racket[keyname] is a sequence of semicolon-delimited input states; each state is made up of a sequence of modifier identifiers followed by a key identifier. @@ -172,7 +172,7 @@ The modifier identifiers are: @item{@litchar{a:} --- Mac OS X: Option} @item{@litchar{m:} --- Windows: Alt; Unix: Meta; Mac OS X: Command, when - @scheme[map-command-as-meta-key] produces @scheme[#t]} + @racket[map-command-as-meta-key] produces @racket[#t]} @item{@litchar{d:} --- Mac OS X: Command} @@ -300,27 +300,27 @@ A state can match multiple state strings mapped in a keymap (or keymap Examples: @itemize[ - - @item{@scheme["space"] --- matches whenever the space bar is pressed, + + @item{@racket["space"] --- matches whenever the space bar is pressed, regardless of the state of modifiers keys.} - @item{@scheme["~c:space"] --- matches whenever the space bar is pressed + @item{@racket["~c:space"] --- matches whenever the space bar is pressed and the Control key is not pressed.} - @item{@scheme["a"] --- matches whenever @litchar{a} is typed, regardless of + @item{@racket["a"] --- matches whenever @litchar{a} is typed, regardless of the state of modifiers keys (other than Shift).} - @item{@scheme[":a"] --- matches only when @litchar{a} is typed with no + @item{@racket[":a"] --- matches only when @litchar{a} is typed with no modifier keys pressed.} - @item{@scheme["~c:a"] --- matches whenever @litchar{a} is typed and neither + @item{@racket["~c:a"] --- matches whenever @litchar{a} is typed and neither the Shift key nor the Control key is pressed.} - @item{@scheme[":esc;:c:c"] --- matches an Escape key press (no + @item{@racket[":esc;:c:c"] --- matches an Escape key press (no modifiers) followed by a Control-C press (no modifiers other than Control).} - @item{@scheme["?:d:+"] --- matches when Command is pressed with key + @item{@racket["?:d:+"] --- matches when Command is pressed with key that produces @litchar{+}, even if producing @litchar{+} normally requires pressing Shift.} @@ -343,7 +343,7 @@ A function name does not have to be mapped to a handler before input @defmethod[(remove-chained-keymap [keymap (is-a?/c keymap%)]) void?]{ -If @scheme[keymap] was previously chained from this keymap (through +If @racket[keymap] was previously chained from this keymap (through @method[keymap% chain-to-keymap]), then it is removed from the chain-to list. @@ -406,18 +406,18 @@ If a grab callback returns a true value for a matching or non-matching true value for a matching callback, then the matching keymap function is not called by the keymap. -The callback procedure @scheme[f] will be invoked as: +The callback procedure @racket[f] will be invoked as: -@schemeblock[ +@racketblock[ (f _str _keymap _editor _event) ] -The @scheme[_str] argument is the name of a function for a matching - callback, or @scheme[#f] for a non-matching callback. The - @scheme[_keymap] argument is the keymap that matched (possibly a +The @racket[_str] argument is the name of a function for a matching + callback, or @racket[#f] for a non-matching callback. The + @racket[_keymap] argument is the keymap that matched (possibly a keymap chained to the one in which the callback was installed) or the - keymap in which the callback was installed. The @scheme[_editor] and - @scheme[_event] arguments are the same as passed on to the matching + keymap in which the callback was installed. The @racket[_editor] and + @racket[_event] arguments are the same as passed on to the matching keymap function. Key grab callback functions are de-installed with @method[keymap% diff --git a/collects/scribblings/gui/labelled-menu-item-intf.scrbl b/collects/scribblings/gui/labelled-menu-item-intf.scrbl index 22e72487..1145f0af 100644 --- a/collects/scribblings/gui/labelled-menu-item-intf.scrbl +++ b/collects/scribblings/gui/labelled-menu-item-intf.scrbl @@ -3,12 +3,11 @@ @definterface/title[labelled-menu-item<%> (menu-item<%>)]{ -A @scheme[labelled-menu-item<%>] object is a @scheme[menu-item<%>] with +A @racket[labelled-menu-item<%>] object is a @racket[menu-item<%>] with a string label (i.e., any menu item other than a separator). More - specifically, it is an instance of either @scheme[menu-item%] (a - plain menu item), @scheme[checkable-menu-item%] (a checkable menu - item), or @scheme[menu%] (a submenu). - + specifically, it is an instance of either @racket[menu-item%] (a + plain menu item), @racket[checkable-menu-item%] (a checkable menu + item), or @racket[menu%] (a submenu). @defmethod[(enable [enabled? any/c]) @@ -16,7 +15,7 @@ A @scheme[labelled-menu-item<%>] object is a @scheme[menu-item<%>] with Enables or disables the menu item. If the item is a submenu (or menu in a menu bar), the entire menu is disabled, but each submenu item's - @method[labelled-menu-item<%> is-enabled?] method returns @scheme[#f] + @method[labelled-menu-item<%> is-enabled?] method returns @racket[#f] only if the item is specifically disabled (in addition to the submenu). @@ -25,10 +24,10 @@ Enables or disables the menu item. If the item is a submenu (or menu @defmethod[(get-help-string) (or/c label-string? false/c)]{ -Returns the help string for the menu item, or @scheme[#f] if the item +Returns the help string for the menu item, or @racket[#f] if the item has no help string. -When an item has a @scheme[help], the string may be used to +When an item has a @racket[help], the string may be used to display help information to the user. } @@ -57,7 +56,7 @@ Like @method[labelled-menu-item<%> get-label], except that @defmethod[(is-enabled?) boolean?]{ -Returns @scheme[#t] if the menu item is enabled, @scheme[#f] +Returns @racket[#t] if the menu item is enabled, @racket[#f] otherwise. See also @@ -81,7 +80,7 @@ in such a way that the container does not call the } @methimpl{ -Calls the @scheme[demand-callback] procedure that was provided when the +Calls the @racket[demand-callback] procedure that was provided when the object was created. }} @@ -89,7 +88,7 @@ Calls the @scheme[demand-callback] procedure that was provided when the @defmethod[(set-help-string [help (or/c label-string? false/c)]) void?]{ -Sets the help string for the menu item. Use @scheme[#f] to remove the +Sets the help string for the menu item. Use @racket[#f] to remove the help string for an item. } @@ -111,7 +110,7 @@ If the label contains @litchar{&} and the window is a control, the @litchar{&}. On Mac OS X, @litchar{&}s in the label are parsed in the same way as for Unix and Windows, but no mnemonic underline is displayed. - + A @litchar{&} is always preserved in the label returned by @method[labelled-menu-item<%> get-label], but never preserved in the label returned by @method[labelled-menu-item<%> get-plain-label]. diff --git a/collects/scribblings/gui/list-box-class.scrbl b/collects/scribblings/gui/list-box-class.scrbl index 8a73c5a3..d21ff448 100644 --- a/collects/scribblings/gui/list-box-class.scrbl +++ b/collects/scribblings/gui/list-box-class.scrbl @@ -1,8 +1,8 @@ #lang scribble/doc @(require "common.rkt") -@(define lbnumnote @elem{List box rows are indexed from @scheme[0].}) -@(define lbcnumnote @elem{List box rows and columns are indexed from @scheme[0].}) +@(define lbnumnote @elem{List box rows are indexed from @racket[0].}) +@(define lbcnumnote @elem{List box rows and columns are indexed from @racket[0].}) @defclass/title[list-box% object% (list-control<%>)]{ @@ -26,8 +26,7 @@ A list box can have multiple columns with optional column headers. An @|lbcnumnote| -See also @scheme[choice%]. - +See also @racket[choice%]. @defconstructor[([label (or/c label-string? false/c)] @@ -56,21 +55,21 @@ See also @scheme[choice%]. '("Column")] [column-order (or/c #f (listof exact-nonnegative-integer?)) #f])]{ -If @scheme[label] is not @scheme[#f], it is used as the list box +If @racket[label] is not @racket[#f], it is used as the list box label. Otherwise, the list box will not display its label. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the list box}] -The @scheme[choices] list specifies the initial list of items +The @racket[choices] list specifies the initial list of items to appear in the list box. If the list box has multiple columns, @racket[choices] determines the content of the first column, and other columns are initialized to the empty string. -The @scheme[callback] procedure is called when the user changes the list +The @racket[callback] procedure is called when the user changes the list box selection, by either selecting, re-selecting, deselecting, or double-clicking an item. The type of the event provided to the - callback is @indexed-scheme['list-box-dclick] when the user double-clicks - on an item, or @indexed-scheme['list-box] otherwise. + callback is @indexed-racket['list-box-dclick] when the user double-clicks + on an item, or @indexed-racket['list-box] otherwise. The @racket[columns] list determines the number of columns in the list box. The column titles in @racket[columns] are shown only if @@ -78,45 +77,45 @@ The @racket[columns] list determines the number of columns in the list also includes @racket['clickable-headers], then a click on a header triggers a call to @racket[callback] with a @racket[column-control-event%] argument whose event type is - @indexed-scheme['list-box-column]. + @indexed-racket['list-box-column]. -The @scheme[style] specification must include exactly one of the +The @racket[style] specification must include exactly one of the following: @itemize[ - @item{@scheme['single] --- Creates a single-selection list.} + @item{@racket['single] --- Creates a single-selection list.} - @item{@scheme['multiple] --- Creates a multiple-selection list + @item{@racket['multiple] --- Creates a multiple-selection list where a single click deselects other items and selects a new item. Use this style for a list when single-selection is common, but multiple selections are allowed.} - @item{@scheme['extended] --- Creates a multiple-selection list where a + @item{@racket['extended] --- Creates a multiple-selection list where a single click extends or contracts the selection by toggling the clicked item. Use this style for a list when multiple selections are the rule rather than the exception.} ] -The @scheme['multiple] and @scheme['extended] styles determine a +The @racket['multiple] and @racket['extended] styles determine a platform-independent interpretation of unmodified mouse clicks, but dragging, shift-clicking, control-clicking, etc. have platform-standard interpretations. Whatever the platform-specific interface, the user can always select disjoint sets of items or deselect items (and leave no items selected). On some platforms, the - user can deselect the (sole) selected item in a @scheme['single] list + user can deselect the (sole) selected item in a @racket['single] list box. -@HVLabelNote[@scheme[style]]{list box} @DeletedStyleNote[@scheme[style] @scheme[parent]]{list box} +@HVLabelNote[@racket[style]]{list box} @DeletedStyleNote[@racket[style] @racket[parent]]{list box} If @racket[style] includes @racket['variable-columns], then the number of columns in the list box can be changed via @method[list-box% append-column] and @method[list-box% delete-column]. -If @scheme[selection] is an integer, it is passed to -@method[list-control<%> set-selection] to set the initial selection. The @scheme[selection] must be less than - the length of @scheme[choices]. +If @racket[selection] is an integer, it is passed to +@method[list-control<%> set-selection] to set the initial selection. The @racket[selection] must be less than + the length of @racket[choices]. -@FontLabelKWs[@scheme[font] @scheme[label-font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontLabelKWs[@racket[font] @racket[label-font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] It the @racket[column-order] argument is not @racket[#f], it determines the order in which logical columns are initially displayed. See @@ -135,7 +134,7 @@ the columns). void?]{ Adds a new item to the list box with an associated ``data'' object. - The @scheme[data] object is not displayed in the list box; it is + The @racket[data] object is not displayed in the list box; it is provided merely as a convenience for use with @method[list-box% get-data], possibly allowing a programmer to avoid managing a separate item-to-data mapping in addition to the list box control. @@ -157,7 +156,7 @@ displayed as the last column.} @defmethod[(delete [n exact-nonnegative-integer?]) void?]{ -Deletes the item indexed by @scheme[n]. @|lbnumnote| If @scheme[n] is equal +Deletes the item indexed by @racket[n]. @|lbnumnote| If @racket[n] is equal to or larger than the number of items in the control, @|MismatchExn|. Selected items that are not deleted remain selected, and no other @@ -206,9 +205,9 @@ See also @method[list-box set-column-width].} @defmethod[(get-data [n exact-nonnegative-integer?]) any/c]{ -Returns the data for the item indexed by @scheme[n], or @scheme[#f] +Returns the data for the item indexed by @racket[n], or @racket[#f] if there is no associated data. @|lbnumnote| If - @scheme[n] is equal to or larger than the number of choices, + @racket[n] is equal to or larger than the number of choices, @|MismatchExn|. See also @method[list-box% append] and @method[list-box% set-data]. @@ -238,7 +237,7 @@ Returns the font used for the control's label, which is optionally Returns a list of indices for all currently selected items. @|lbnumnote| -For single-selection lists, the result is always either @scheme[null] or +For single-selection lists, the result is always either @racket[null] or a list containing one number. } @@ -247,8 +246,8 @@ For single-selection lists, the result is always either @scheme[null] or @defmethod[(is-selected? [n exact-nonnegative-integer?]) boolean?]{ -Returns @scheme[#t] if the items indexed by @scheme[n] is selected, - @scheme[#f] otherwise. @|lbnumnote| If @scheme[n] is equal to or +Returns @racket[#t] if the items indexed by @racket[n] is selected, + @racket[#f] otherwise. @|lbnumnote| If @racket[n] is equal to or larger than the number of choices, @|MismatchExn|. @@ -261,7 +260,7 @@ Returns @scheme[#t] if the items indexed by @scheme[n] is selected, Returns the maximum number of items in the list box that are visible to the user with the control's current size (rounding down if the - exact answer is fractional, but returning at least @scheme[1]). + exact answer is fractional, but returning at least @racket[1]). } @@ -275,8 +274,8 @@ Selects or deselects an item. For selection in a single-selection list selections are preserved, unlike @method[list-control<%> set-selection]. -If @scheme[select?] is @scheme[#f], the item indexed by @scheme[n] is - deselected; otherwise it is selected. @|lbnumnote| If @scheme[n] is +If @racket[select?] is @racket[#f], the item indexed by @racket[n] is + deselected; otherwise it is selected. @|lbnumnote| If @racket[n] is equal to or larger than the number of choices, @|MismatchExn|. @MonitorCallback[@elem{A list box's selection} @elem{the user clicking the control} @elem{selection}] @@ -341,8 +340,8 @@ See also @method[list-box% get-column-width].} [data any/c]) void?]{ -Sets the associated data for item indexed by @scheme[n]. @|lbnumnote| If - @scheme[n] is equal to or larger than the number of choices, +Sets the associated data for item indexed by @racket[n]. @|lbnumnote| If + @racket[n] is equal to or larger than the number of choices, @|MismatchExn|. See also @method[list-box% append]. @@ -353,8 +352,8 @@ See also @method[list-box% append]. @defmethod[(set-first-visible-item [n exact-nonnegative-integer?]) void?]{ -Scrolls the list box so that the item indexed by @scheme[n] is at the - top of the list box display. @|lbnumnote| If @scheme[n] is equal to +Scrolls the list box so that the item indexed by @racket[n] is at the + top of the list box display. @|lbnumnote| If @racket[n] is equal to or larger than the number of choices, @|MismatchExn|. @Unmonitored[@elem{A list box's scroll position} @elem{the user clicking the control} @elem{the scroll position @@ -368,8 +367,8 @@ Scrolls the list box so that the item indexed by @scheme[n] is at the [column exact-nonnegative-integer? 0]) void?]{ -Sets the item indexed by @scheme[n] in logical column @racket[column]. -@|lbcnumnote| If @scheme[n] is +Sets the item indexed by @racket[n] in logical column @racket[column]. +@|lbcnumnote| If @racket[n] is equal to or larger than the number of choices, or if @racket[column] is equal to or larger than the number of columns, @|MismatchExn|. diff --git a/collects/scribblings/gui/list-control-intf.scrbl b/collects/scribblings/gui/list-control-intf.scrbl index 9b602175..47dd3f92 100644 --- a/collects/scribblings/gui/list-control-intf.scrbl +++ b/collects/scribblings/gui/list-control-intf.scrbl @@ -5,15 +5,15 @@ A list control gives the user a list of string items to choose from. There are two built-in classes that implement - @scheme[list-control<%>]: + @racket[list-control<%>]: @itemize[ - @item{@scheme[choice%] --- presents the list in a popup menu (so + @item{@racket[choice%] --- presents the list in a popup menu (so the user can choose only one item at a time)} - @item{@scheme[list-box%] --- presents the list in a scrolling box, + @item{@racket[list-box%] --- presents the list in a scrolling box, allowing the use to choose one item (if the style includes - @scheme['single]) or any number of items} + @racket['single]) or any number of items} ] In either case, the set of user-selectable items can be changed @@ -39,8 +39,8 @@ Removes all user-selectable items from the control. @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 - matching choice is returned (items are indexed from @scheme[0]). + choice is found, @racket[#f] is returned, otherwise the index of the + matching choice is returned (items are indexed from @racket[0]). } @@ -54,8 +54,8 @@ Returns the number of user-selectable items in the control (which is @defmethod[(get-selection) (or/c exact-nonnegative-integer? false/c)]{ Returns the index of the currently selected item (items are indexed - from @scheme[0]). If the choice item currently contains no choices or no - selections, @scheme[#f] is returned. If multiple selections are + from @racket[0]). If the choice item currently contains no choices or no + selections, @racket[#f] is returned. If multiple selections are allowed and multiple items are selected, the index of the first selection is returned. @@ -65,7 +65,7 @@ Returns the index of the currently selected item (items are indexed (and/c immutable? label-string?)]{ Returns the item for the given index (items are indexed from - @scheme[0]). If the provided index is larger than the greatest index in + @racket[0]). If the provided index is larger than the greatest index in the list control, @|MismatchExn|. } @@ -73,7 +73,7 @@ Returns the item for the given index (items are indexed from @defmethod[(get-string-selection) (or/c (and/c immutable? label-string?) false/c)]{ Returns the currently selected item. If the control currently - contains no choices, @scheme[#f] is returned. If multiple selections + contains no choices, @racket[#f] is returned. If multiple selections are allowed and multiple items are selected, the first selection is returned. @@ -82,7 +82,7 @@ Returns the currently selected item. If the control currently @defmethod[(set-selection [n exact-nonnegative-integer?]) void?]{ Selects the item specified by the given index (items are indexed from - @scheme[0]). If the given index larger than the greatest index in the + @racket[0]). If the given index larger than the greatest index in the list control, @|MismatchExn|. In a list box control, all other items are deselected, even if multiple diff --git a/collects/scribblings/gui/menu-bar-class.scrbl b/collects/scribblings/gui/menu-bar-class.scrbl index 0e99e0af..9f4d24d8 100644 --- a/collects/scribblings/gui/menu-bar-class.scrbl +++ b/collects/scribblings/gui/menu-bar-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[menu-bar% object% (menu-item-container<%>)]{ -A @scheme[menu-bar%] object is created for a particular - @scheme[frame%] object. A frame can have at most one menu bar; +A @racket[menu-bar%] object is created for a particular + @racket[frame%] object. A frame can have at most one menu bar; @|MismatchExn| when a new menu bar is created for a frame that already has a menu bar. @@ -14,14 +14,14 @@ A @scheme[menu-bar%] object is created for a particular [demand-callback ((is-a?/c menu-bar%) . -> . any) (lambda (m) (void))])]{ Creates a menu bar in the specified frame. The menu bar is initially - empty. If @indexed-scheme['root] is supplied as @scheme[parent], the + empty. If @indexed-racket['root] is supplied as @racket[parent], the menu bar becomes active only when no other frames are shown. A - @scheme['root] @scheme[parent] is allowed only when - @scheme[current-eventspace-has-menu-root?] returns @scheme[#t], and + @racket['root] @racket[parent] is allowed only when + @racket[current-eventspace-has-menu-root?] returns @racket[#t], and only if no such menu bar has been created before, otherwise @|MismatchExn|. -The @scheme[demand-callback] procedure is called by the default +The @racket[demand-callback] procedure is called by the default @method[menu-item-container<%> on-demand] method with the object itself. } @@ -32,7 +32,7 @@ The @scheme[demand-callback] procedure is called by the default Enables or disables the menu bar (i.e., all of its menus). Each menu's @method[labelled-menu-item<%> is-enabled?] method returns - @scheme[#f] only if the menu is specifically disabled (in addition to + @racket[#f] only if the menu is specifically disabled (in addition to the menu bar). } @@ -49,6 +49,6 @@ Returns the menu bar's frame. @defmethod[(is-enabled?) boolean?]{ -Returns @scheme[#t] if the menu bar is enabled, @scheme[#f] otherwise. +Returns @racket[#t] if the menu bar is enabled, @racket[#f] otherwise. }} diff --git a/collects/scribblings/gui/menu-class.scrbl b/collects/scribblings/gui/menu-class.scrbl index e71e9ef7..1d8b7ce9 100644 --- a/collects/scribblings/gui/menu-class.scrbl +++ b/collects/scribblings/gui/menu-class.scrbl @@ -3,9 +3,9 @@ @defclass/title[menu% object% (menu-item-container<%> labelled-menu-item<%>)]{ -A @scheme[menu%] object is a submenu within a @scheme[menu%] or - @scheme[popup-menu%], or as a top-level menu in a - @scheme[menu-bar%]. +A @racket[menu%] object is a submenu within a @racket[menu%] or + @racket[popup-menu%], or as a top-level menu in a + @racket[menu-bar%]. @defconstructor[([label label-string?] @@ -16,22 +16,22 @@ A @scheme[menu%] object is a submenu within a @scheme[menu%] or Creates a new menu with the given label. -If @scheme[label] contains a @litchar{&}, it is handled specially; +If @racket[label] contains a @litchar{&}, it is handled specially; on Windows, the character following a @litchar{&} is underlined in the displayed menu title to indicate a keyboard mnemonic. Pressing and releasing the Alt key switches to menu-selection mode in the menu bar where mnemonic characters are used for navigation. An Alt combination might select a specific menu via @method[frame% - on-menu-char]. A @litchar{&&} in @scheme[label] is replaced by a + on-menu-char]. A @litchar{&&} in @racket[label] is replaced by a literal (non-navigation) @litchar{&}ampersand. On Unix and Mac OS X, @litchar{&}s in the label are parsed in the same way as for Windows, but no mnemonic underline is displayed. -If @scheme[help-string] is not @scheme[#f], the menu has a help +If @racket[help-string] is not @racket[#f], the menu has a help string. See @method[labelled-menu-item<%> get-help-string] for more information. -The @scheme[demand-callback] procedure is called by the default +The @racket[demand-callback] procedure is called by the default @method[menu-item-container<%> on-demand] method with the object itself. }} diff --git a/collects/scribblings/gui/menu-item-class.scrbl b/collects/scribblings/gui/menu-item-class.scrbl index 4f500e0b..05176db5 100644 --- a/collects/scribblings/gui/menu-item-class.scrbl +++ b/collects/scribblings/gui/menu-item-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[menu-item% object% (selectable-menu-item<%>)]{ -A @scheme[menu-item%] is a plain string-labelled menu item. Its - parent must be a @scheme[menu%] or @scheme[popup-menu%]. When the +A @racket[menu-item%] is a plain string-labelled menu item. Its + parent must be a @racket[menu%] or @racket[popup-menu%]. When the user selects the menu item, its callback procedure is called. @@ -20,26 +20,26 @@ A @scheme[menu-item%] is a plain string-labelled menu item. Its 'shift 'option)) (get-default-shortcut-prefix)])]{ -Creates a new menu item in @scheme[parent]. The item is initially - shown, appended to the end of its parent. The @scheme[callback] - procedure is called (with the event type @indexed-scheme['menu]) when +Creates a new menu item in @racket[parent]. The item is initially + shown, appended to the end of its parent. The @racket[callback] + procedure is called (with the event type @indexed-racket['menu]) when the user selects the menu item (either via a menu bar, @xmethod[window<%> popup-menu], or @xmethod[editor-admin% popup-menu]). See @method[labelled-menu-item<%> set-label] for information about -mnemonic @litchar{&}s in @scheme[label]. +mnemonic @litchar{&}s in @racket[label]. -If @scheme[shortcut] is not @scheme[#f], the item has a shortcut. See +If @racket[shortcut] is not @racket[#f], the item has a shortcut. See @method[selectable-menu-item<%> get-shortcut] for more information. -The @scheme[shortcut-prefix] argument determines the set of modifier +The @racket[shortcut-prefix] argument determines the set of modifier keys for the shortcut; see @method[selectable-menu-item<%> get-shortcut-prefix]. -If @scheme[help] is not @scheme[#f], the item has a help string. See +If @racket[help] is not @racket[#f], the item has a help string. See @method[labelled-menu-item<%> get-help-string] for more information. -The @scheme[demand-callback] procedure is called by the default +The @racket[demand-callback] procedure is called by the default @method[menu-item-container<%> on-demand] method with the object itself. }} diff --git a/collects/scribblings/gui/menu-item-container-intf.scrbl b/collects/scribblings/gui/menu-item-container-intf.scrbl index 49b59fe2..f8284a6e 100644 --- a/collects/scribblings/gui/menu-item-container-intf.scrbl +++ b/collects/scribblings/gui/menu-item-container-intf.scrbl @@ -3,8 +3,8 @@ @definterface/title[menu-item-container<%> ()]{ -A @scheme[menu-item-container<%>] object is a @scheme[menu%], - @scheme[popup-menu%], or @scheme[menu-bar%]. +A @racket[menu-item-container<%>] object is a @racket[menu%], + @racket[popup-menu%], or @racket[menu-bar%]. @defmethod[(get-items) @@ -37,7 +37,7 @@ If the container is not a menu bar or a popup menu, this method is } @methimpl{ -Calls the @scheme[demand-callback] procedure that was provided when +Calls the @racket[demand-callback] procedure that was provided when the object was created, then calls the @method[labelled-menu-item<%> on-demand] method of the contained items. diff --git a/collects/scribblings/gui/menu-item-intf.scrbl b/collects/scribblings/gui/menu-item-intf.scrbl index a2bc52c1..68256560 100644 --- a/collects/scribblings/gui/menu-item-intf.scrbl +++ b/collects/scribblings/gui/menu-item-intf.scrbl @@ -3,17 +3,17 @@ @definterface/title[menu-item<%> ()]{ -A @scheme[menu-item<%>] object is an element within a @scheme[menu%], - @scheme[popup-menu%], or @scheme[menu-bar%]. Operations that affect +A @racket[menu-item<%>] object is an element within a @racket[menu%], + @racket[popup-menu%], or @racket[menu-bar%]. Operations that affect the parent --- such as renaming the item, deleting the item, or adding a check beside the item --- are accomplished via the - @scheme[menu-item<%>] object. + @racket[menu-item<%>] object. -A menu item is either a @scheme[separator-menu-item%] object (merely - a separator), of a @scheme[labelled-menu-item<%>] object; the latter - is more specifically an instance of either @scheme[menu-item%] (a - plain menu item), @scheme[checkable-menu-item%] (a checkable menu - item), or @scheme[menu%] (a submenu). +A menu item is either a @racket[separator-menu-item%] object (merely + a separator), of a @racket[labelled-menu-item<%>] object; the latter + is more specifically an instance of either @racket[menu-item%] (a + plain menu item), @racket[checkable-menu-item%] (a checkable menu + item), or @racket[menu%] (a submenu). @defmethod[(delete) @@ -39,8 +39,8 @@ Returns the menu, popup menu, or menu bar containing the item. The @defmethod[(is-deleted?) boolean?]{ -Returns @scheme[#t] if the menu item is deleted from its parent, - @scheme[#f] otherwise. +Returns @racket[#t] if the menu item is deleted from its parent, + @racket[#f] otherwise. } diff --git a/collects/scribblings/gui/message-class.scrbl b/collects/scribblings/gui/message-class.scrbl index c1c71c97..345ff6ce 100644 --- a/collects/scribblings/gui/message-class.scrbl +++ b/collects/scribblings/gui/message-class.scrbl @@ -23,23 +23,23 @@ A message control is a static line of text or a static bitmap. The [stretchable-height any/c #f] [auto-resize any/c #f])]{ -Creates a string or bitmap message initially showing @scheme[label]. - @bitmaplabeluse[label] An @indexed-scheme['app], - @indexed-scheme['caution], or @indexed-scheme['stop] symbol for - @scheme[label] indicates an icon; @scheme['app] is the application +Creates a string or bitmap message initially showing @racket[label]. + @bitmaplabeluse[label] An @indexed-racket['app], + @indexed-racket['caution], or @indexed-racket['stop] symbol for + @racket[label] indicates an icon; @racket['app] is the application icon (Windows and Mac OS X) or a generic ``info'' icon (X), - @scheme['caution] is a caution-sign icon, and @scheme['stop] is a + @racket['caution] is a caution-sign icon, and @racket['stop] is a stop-sign icon. @labelsimplestripped[(scheme label) @elem{message}] -@DeletedStyleNote[@scheme[style] @scheme[parent]]{message} +@DeletedStyleNote[@racket[style] @racket[parent]]{message} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] -If @scheme[auto-resize] is not @scheme[#f], then automatic resizing is +If @racket[auto-resize] is not @racket[#f], then automatic resizing is initially enanbled (see @method[message% auto-resize]), and the -@scheme[message%] object's @tech{graphical minimum size} is as small as +@racket[message%] object's @tech{graphical minimum size} is as small as possible. } @@ -47,7 +47,7 @@ possible. @defmethod*[([(auto-resize) boolean?] [(auto-resize [on? any/c]) void?])]{ -Reports or sets whether the @scheme[message%]'s @method[area<%> min-width] and +Reports or sets whether the @racket[message%]'s @method[area<%> min-width] and @method[area<%> min-height] are automatically set when the label is changed via @method[message% set-label]. @@ -57,7 +57,7 @@ via @method[message% set-label]. (set-label [label (or/c label-string? (is-a?/c bitmap%))]) void?]{ -The same as @xmethod[window<%> set-label] when @scheme[label] is a +The same as @xmethod[window<%> set-label] when @racket[label] is a string. Otherwise, sets the bitmap label for a bitmap message. diff --git a/collects/scribblings/gui/miscwin-funcs.scrbl b/collects/scribblings/gui/miscwin-funcs.scrbl index 06cddb18..38577952 100644 --- a/collects/scribblings/gui/miscwin-funcs.scrbl +++ b/collects/scribblings/gui/miscwin-funcs.scrbl @@ -16,14 +16,12 @@ @defproc[(begin-busy-cursor) void?]{ Changes the cursor to a watch cursor for all windows in the current eventspace. -Use -@racket[end-busy-cursor] to revert the cursor back to its previous state. Calls to -@racket[begin-busy-cursor] and -@racket[end-busy-cursor] can be nested arbitrarily. +Use @racket[end-busy-cursor] to revert the cursor back to its previous +state. Calls to @racket[begin-busy-cursor] and @racket[end-busy-cursor] can be +nested arbitrarily. -The cursor installed by -@racket[begin-busy-cursor] overrides any window-specific cursors installed with -@method[window<%> set-cursor]. +The cursor installed by @racket[begin-busy-cursor] overrides any +window-specific cursors installed with @method[window<%> set-cursor]. See also @racket[is-busy?]. } @@ -86,8 +84,6 @@ The result depends on @racket[what], and a @racket[#f] result is only ] - - } @@ -318,18 +314,18 @@ The background behind @racket[on] is unspecified, so @racket[on] that is used for drawing, and @racket[off-x] and @racket[off-y] similarly specify an offset within @racket[off]. -The blit is automatically unregistered if @scheme[canvas] becomes +The blit is automatically unregistered if @racket[canvas] becomes invisible and inaccessible. Multiple registrations can be installed - for the same @scheme[canvas]. + for the same @racket[canvas]. -See also @scheme[unregister-collecting-blit].} +See also @racket[unregister-collecting-blit].} @defproc[(unregister-collecting-blit [canvas (is-a?/c canvas%)]) void?]{ Unregisters all blit requests installed for @racket[canvas] with - @scheme[register-collecting-blit].} + @racket[register-collecting-blit].} @defproc[(send-message-to-window [x (integer-in -10000 10000)] @@ -372,7 +368,7 @@ See @racket[clipboard<%>]. @defproc[(label-string? [v any/c]) boolean?]{ Returns @racket[#t] if @racket[v] is a string whose length is less than or equal to @racket[200]. - + This predicate is typically used as the contract for strings that appear in GUI objects. In some cases, such as the label in a @racket[button%] or @racket[menu-item%] object, the character @litchar{&} is treated specially diff --git a/collects/scribblings/gui/mouse-event-class.scrbl b/collects/scribblings/gui/mouse-event-class.scrbl index c37d3b98..dea4779e 100644 --- a/collects/scribblings/gui/mouse-event-class.scrbl +++ b/collects/scribblings/gui/mouse-event-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[mouse-event% event% ()]{ -A @scheme[mouse-event%] object encapsulates a mouse event. +A @racket[mouse-event%] object encapsulates a mouse event. Mouse events are primarily processed by @xmethod[window<%> on-subwindow-event] and @xmethod[canvas<%> on-event]. @@ -32,34 +32,34 @@ Creates a mouse event for a particular type of event. The event types are: @itemize[ -@item{@scheme['enter] --- mouse pointer entered the window} -@item{@scheme['leave] --- mouse pointer left the window} -@item{@scheme['left-down] --- left mouse button pressed} -@item{@scheme['left-up] --- left mouse button released} -@item{@scheme['middle-down] --- middle mouse button pressed} -@item{@scheme['middle-up] --- middle mouse button released} -@item{@scheme['right-down] --- right mouse button pressed (Mac OS X: click with control key pressed)} -@item{@scheme['right-up] --- right mouse button released (Mac OS X: release with control key pressed)} -@item{@scheme['motion] --- mouse moved, with or without button(s) pressed} +@item{@racket['enter] --- mouse pointer entered the window} +@item{@racket['leave] --- mouse pointer left the window} +@item{@racket['left-down] --- left mouse button pressed} +@item{@racket['left-up] --- left mouse button released} +@item{@racket['middle-down] --- middle mouse button pressed} +@item{@racket['middle-up] --- middle mouse button released} +@item{@racket['right-down] --- right mouse button pressed (Mac OS X: click with control key pressed)} +@item{@racket['right-up] --- right mouse button released (Mac OS X: release with control key pressed)} +@item{@racket['motion] --- mouse moved, with or without button(s) pressed} ] -See the corresponding @schemeidfont{get-} and @schemeidfont{set-} - methods for information about @scheme[left-down], - @scheme[middle-down], @scheme[right-down], @scheme[x], @scheme[y], - @scheme[shift-down], @scheme[control-down], @scheme[meta-down], - @scheme[alt-down], @scheme[time-stamp], and @scheme[caps-down]. +See the corresponding @racketidfont{get-} and @racketidfont{set-} + methods for information about @racket[left-down], + @racket[middle-down], @racket[right-down], @racket[x], @racket[y], + @racket[shift-down], @racket[control-down], @racket[meta-down], + @racket[alt-down], @racket[time-stamp], and @racket[caps-down]. } @defmethod[(button-changed? [button (or/c 'left 'middle 'right 'any) 'any]) boolean?]{ -Returns @scheme[#t] if this was a mouse button press or release event, - @scheme[#f] otherwise. See also +Returns @racket[#t] if this was a mouse button press or release event, + @racket[#f] otherwise. See also @method[mouse-event% button-up?] and @method[mouse-event% button-down?]. -If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned +If @racket[button] is not @racket['any], then @racket[#t] is only returned if it is a release event for a specific button. } @@ -67,10 +67,10 @@ If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned @defmethod[(button-down? [button (or/c 'left 'middle 'right 'any) 'any]) boolean?]{ -Returns @scheme[#t] if the event is for a button press, @scheme[#f] +Returns @racket[#t] if the event is for a button press, @racket[#f] otherwise. -If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned +If @racket[button] is not @racket['any], then @racket[#t] is only returned if it is a press event for a specific button. } @@ -78,11 +78,11 @@ If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned @defmethod[(button-up? [button (or/c 'left 'middle 'right 'any) 'any]) boolean?]{ -Returns @scheme[#t] if the event is for a button release, @scheme[#f] +Returns @racket[#t] if the event is for a button release, @racket[#f] otherwise. (As noted in @|mousekeydiscuss|, button release events are sometimes dropped.) -If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned +If @racket[button] is not @racket['any], then @racket[#t] is only returned if it is a release event for a specific button. } @@ -90,16 +90,16 @@ If @scheme[button] is not @scheme['any], then @scheme[#t] is only returned @defmethod[(dragging?) boolean?]{ -Returns @scheme[#t] if this was a dragging event (motion while a button - is pressed), @scheme[#f] otherwise. +Returns @racket[#t] if this was a dragging event (motion while a button + is pressed), @racket[#f] otherwise. } @defmethod[(entering?) boolean?]{ -Returns @scheme[#t] if this event is for the mouse entering a window, - @scheme[#f] otherwise. +Returns @racket[#t] if this event is for the mouse entering a window, + @racket[#f] otherwise. When the mouse button is up, an enter/leave event notifies a window that it will start/stop receiving mouse events. When the mouse button @@ -116,7 +116,7 @@ When the mouse button is up, an enter/leave event notifies a window @defmethod[(get-alt-down) boolean?]{ -Returns @scheme[#t] if the Option (Mac OS X) key was down for the +Returns @racket[#t] if the Option (Mac OS X) key was down for the event. When the Alt key is pressed in Windows, it is reported as a Meta press (see @method[mouse-event% get-meta-down]). @@ -125,19 +125,19 @@ Returns @scheme[#t] if the Option (Mac OS X) key was down for the @defmethod[(get-caps-down) boolean?]{ -Returns @scheme[#t] if the Caps Lock key was on for the event. +Returns @racket[#t] if the Caps Lock key was on for the event. } @defmethod[(get-control-down) boolean?]{ -Returns @scheme[#t] if the Control key was down for the event. +Returns @racket[#t] if the Control key was down for the event. On Mac OS X, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and @method[mouse-event% get-control-down] for the event reports - @scheme[#f]. + @racket[#f]. } @@ -146,7 +146,7 @@ On Mac OS X, if a control-key press is combined with a mouse button 'middle-down 'middle-up 'right-down 'right-up 'motion)]{ -Returns the type of the event; see @scheme[mouse-event%] for +Returns the type of the event; see @racket[mouse-event%] for information about each event type. See also @method[mouse-event% set-event-type]. @@ -154,14 +154,14 @@ set-event-type]. @defmethod[(get-left-down) boolean?]{ -Returns @scheme[#t] if the left mouse button was down (but not pressed) during the event. +Returns @racket[#t] if the left mouse button was down (but not pressed) during the event. } @defmethod[(get-meta-down) boolean?]{ -Returns @scheme[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS +Returns @racket[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS X) key was down for the event. } @@ -169,7 +169,7 @@ Returns @scheme[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS @defmethod[(get-middle-down) boolean?]{ -Returns @scheme[#t] if the middle mouse button was down (but not +Returns @racket[#t] if the middle mouse button was down (but not pressed) for the event. On Mac OS X, a middle-button click is impossible. @@ -178,7 +178,7 @@ Returns @scheme[#t] if the middle mouse button was down (but not @defmethod[(get-right-down) boolean?]{ -Returns @scheme[#t] if the right mouse button was down (but not +Returns @racket[#t] if the right mouse button was down (but not pressed) for the event. On Mac OS X, a control-click combination is treated as a right-button click. @@ -187,7 +187,7 @@ Returns @scheme[#t] if the right mouse button was down (but not @defmethod[(get-shift-down) boolean?]{ -Returns @scheme[#t] if the Shift key was down for the event. +Returns @racket[#t] if the Shift key was down for the event. } @@ -210,8 +210,8 @@ Returns the y-position of the mouse at the time of the event in the @defmethod[(leaving?) boolean?]{ -Returns @scheme[#t] if this event is for the mouse leaving a window, - @scheme[#f] otherwise. +Returns @racket[#t] if this event is for the mouse leaving a window, + @racket[#f] otherwise. See @method[mouse-event% entering?] for information about enter and leave events while the mouse button is clicked. @@ -221,8 +221,8 @@ leave events while the mouse button is clicked. @defmethod[(moving?) boolean?]{ -Returns @scheme[#t] if this was a moving event (whether a button is - pressed is not), @scheme[#f] otherwise. +Returns @racket[#t] if this was a moving event (whether a button is + pressed is not), @racket[#f] otherwise. } @@ -250,7 +250,7 @@ Sets whether the Control key was down for the event. On Mac OS X, if a control-key press is combined with a mouse button click, the event is reported as a right-button click and @method[mouse-event% get-control-down] for the event reports - @scheme[#f]. + @racket[#f]. } @@ -259,7 +259,7 @@ On Mac OS X, if a control-key press is combined with a mouse button 'right-down 'right-up 'motion)]) void?]{ -Sets the type of the event; see @scheme[mouse-event%] for information +Sets the type of the event; see @racket[mouse-event%] for information about each event type. See also @method[mouse-event% get-event-type]. } diff --git a/collects/scribblings/gui/mult-color-intf.scrbl b/collects/scribblings/gui/mult-color-intf.scrbl index a8831b95..94a8fc3b 100644 --- a/collects/scribblings/gui/mult-color-intf.scrbl +++ b/collects/scribblings/gui/mult-color-intf.scrbl @@ -3,9 +3,9 @@ @definterface/title[mult-color<%> ()]{ -A @scheme[mult-color<%>] object is used to scale the RGB values of a - @scheme[color%] object. A @scheme[mult-color<%>] object exist only - within a @scheme[style-delta%] object. +A @racket[mult-color<%>] object is used to scale the RGB values of a + @racket[color%] object. A @racket[mult-color<%>] object exist only + within a @racket[style-delta%] object. See also @method[style-delta% get-foreground-mult] and @method[style-delta% get-background-mult]. diff --git a/collects/scribblings/gui/pane-class.scrbl b/collects/scribblings/gui/pane-class.scrbl index 6434c8d7..5741bfaa 100644 --- a/collects/scribblings/gui/pane-class.scrbl +++ b/collects/scribblings/gui/pane-class.scrbl @@ -4,15 +4,15 @@ @defclass/title[pane% object% (area-container<%> subarea<%>)]{ A pane is a both a container and a containee area. It serves only - as a geometry management device. A @scheme[pane%] - cannot be hidden or disabled like a @scheme[panel%] object. + as a geometry management device. A @racket[pane%] + cannot be hidden or disabled like a @racket[panel%] object. -A @scheme[pane%] object has a degenerate placement strategy for +A @racket[pane%] object has a degenerate placement strategy for managing its children; it places them all in the upper left corner - and does not stretch any of them. The @scheme[horizontal-pane%] and - @scheme[vertical-pane%] classes provide useful geometry management. + and does not stretch any of them. The @racket[horizontal-pane%] and + @racket[vertical-pane%] classes provide useful geometry management. -See also @scheme[grow-box-spacer-pane%]. +See also @racket[grow-box-spacer-pane%]. @defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) diff --git a/collects/scribblings/gui/panel-class.scrbl b/collects/scribblings/gui/panel-class.scrbl index ad817e6e..5c1e457c 100644 --- a/collects/scribblings/gui/panel-class.scrbl +++ b/collects/scribblings/gui/panel-class.scrbl @@ -4,14 +4,14 @@ @defclass/title[panel% object% (area-container-window<%> subwindow<%>)]{ A panel is a both a container and a containee window. It serves mainly - as a geometry management device, but the @scheme['border] creates a - container with a border. Unlike a @scheme[pane%] object, a @scheme[panel%] + as a geometry management device, but the @racket['border] creates a + container with a border. Unlike a @racket[pane%] object, a @racket[panel%] object can be hidden or disabled. -A @scheme[panel%] object has a degenerate placement strategy for +A @racket[panel%] object has a degenerate placement strategy for managing its children; it places them all in the upper left corner - and does not stretch any of them. The @scheme[horizontal-panel%] - and @scheme[vertical-panel%] classes provide useful geometry + and does not stretch any of them. The @racket[horizontal-panel%] + and @racket[vertical-panel%] classes provide useful geometry management. @@ -33,9 +33,9 @@ A @scheme[panel%] object has a degenerate placement strategy for [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -If the @scheme['border] style is specified, the window is created with +If the @racket['border] style is specified, the window is created with a thin border (in which case the client size of the panel may be - less than its total size). @DeletedStyleNote[@scheme[style] @scheme[parent]]{panel} + less than its total size). @DeletedStyleNote[@racket[style] @racket[parent]]{panel} If the @racket['hscroll] or @racket['vscroll] style is specified, then the panel includes a scrollbar in the corresponding direction, and @@ -48,7 +48,7 @@ If the @racket['hscroll] or @racket['vscroll] style is specified, then children subareas are placed using the default algorithm for a @racket[panel%], @racket[vertical-panel%], or @racket[horizontal-panel%]. -@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] }} diff --git a/collects/scribblings/gui/pasteboard-class.scrbl b/collects/scribblings/gui/pasteboard-class.scrbl index 103b928f..7921552b 100644 --- a/collects/scribblings/gui/pasteboard-class.scrbl +++ b/collects/scribblings/gui/pasteboard-class.scrbl @@ -3,18 +3,18 @@ @defclass/title[pasteboard% object% (editor<%>)]{ -A @scheme[pasteboard%] object is an editor for displaying snips with +A @racket[pasteboard%] object is an editor for displaying snips with arbitrary @techlink{location}s. @defconstructor[()]{ The editor will not be displayed until it is attached to an - @scheme[editor-canvas%] object or some other @techlink{display}. + @racket[editor-canvas%] object or some other @techlink{display}. -A new @scheme[keymap%] object is created for the new editor. See also +A new @racket[keymap%] object is created for the new editor. See also @method[editor<%> get-keymap] and @method[editor<%> set-keymap]. -A new @scheme[style-list%] object is created for the new editor. See +A new @racket[style-list%] object is created for the new editor. See also @method[editor<%> get-style-list] and @method[editor<%> set-style-list]. @@ -115,7 +115,7 @@ Does nothing. Called after the user stops interactively resizing a snip (the one that is currently selected; see @method[pasteboard% - find-next-selected-snip]). The @scheme[snip] argument is the snip + find-next-selected-snip]). The @racket[snip] argument is the snip that was resized. See also @method[pasteboard% can-interactive-resize?] and @@ -142,7 +142,7 @@ Called after a given snip is moved within the editor (and after the and @method[editor<%> begin-edit-sequence] to avoid extra refreshes when @method[pasteboard% after-move-to] modifies the editor). -If @scheme[dragging?] is not @scheme[#f], then this move was a temporary +If @racket[dragging?] is not @racket[#f], then this move was a temporary move for dragging. See also @@ -172,8 +172,8 @@ Called before a snip is moved in the pasteboard's front-to-back snip begin-edit-sequence] to avoid extra refreshes when @method[pasteboard% after-reorder] modifies the editor). -If @scheme[before?] is @scheme[#t], then @scheme[snip] was moved before - @scheme[to-snip], otherwise @scheme[snip] was moved after @scheme[to-snip]. +If @racket[before?] is @racket[#t], then @racket[snip] was moved before + @racket[to-snip], otherwise @racket[snip] was moved after @racket[to-snip]. See also @method[pasteboard% can-reorder?] and @method[editor<%> on-edit-sequence]. @@ -202,7 +202,7 @@ Called after a given snip is resized (and after the @techlink{display} @method[pasteboard% after-resize] modifies the editor), or after an unsuccessful resize attempt was made. -If @scheme[resized?] is not @scheme[#f], the snip was successfully +If @racket[resized?] is not @racket[#f], the snip was successfully resized. See also @method[pasteboard% can-resize?] and @method[editor<%> @@ -230,8 +230,8 @@ Called after a snip in the pasteboard is selected or deselected. See selected snip is deleted (and thus de-selected indirectly); see also @method[pasteboard% after-delete]. -If @scheme[on?] is @scheme[#t], then @scheme[snip] was just selected, - otherwise @scheme[snip] was just deselected. +If @racket[on?] is @racket[#t], then @racket[snip] was just selected, + otherwise @racket[snip] was just deselected. See also @method[pasteboard% can-select?] and @method[editor<%> on-edit-sequence]. @@ -253,7 +253,7 @@ Does nothing. @methspec{ Called before a snip is deleted from the editor. - If the return value is @scheme[#f], then the + If the return value is @racket[#f], then the delete will be aborted. See also @method[pasteboard% on-delete] and @method[pasteboard% @@ -265,7 +265,7 @@ The editor is internally locked for writing when this method is called (see } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. } } @@ -280,7 +280,7 @@ Returns @scheme[#t]. @methspec{ Called before a snip is inserted from the editor. If the return value - is @scheme[#f], then the insert will be aborted. + is @racket[#f], then the insert will be aborted. See also @method[pasteboard% on-insert] and @method[pasteboard% after-insert]. @@ -291,7 +291,7 @@ The editor is internally locked for writing when this method is called (see } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. } } @@ -306,7 +306,7 @@ Returns @scheme[#t]. Called when the user starts interactively dragging snips (the ones that are selected; see @method[pasteboard% find-next-selected-snip]). All of the selected snips will be - moved. If @scheme[#f] is returned, the interactive move is + moved. If @racket[#f] is returned, the interactive move is disallowed. The mouse event that started the move (usually a button-down event) is provided. @@ -317,7 +317,7 @@ See also @method[pasteboard% on-interactive-move], @method[pasteboard% } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -329,10 +329,10 @@ Returns @scheme[#t]. Called when the user starts interactively resizing a snip (the one that is selected; see @method[pasteboard% - find-next-selected-snip]). If @scheme[#f] is returned, the + find-next-selected-snip]). If @racket[#f] is returned, the interactive resize is disallowed. -The @scheme[snip] argument is the snip that will be resized. +The @racket[snip] argument is the snip that will be resized. See also @method[pasteboard% after-interactive-resize], @method[pasteboard% after-interactive-resize], and @@ -341,7 +341,7 @@ See also @method[pasteboard% after-interactive-resize], } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -355,9 +355,9 @@ Returns @scheme[#t]. @methspec{ Called before a snip is moved in the editor. If the return value is - @scheme[#f], then the move will be aborted. + @racket[#f], then the move will be aborted. -If @scheme[dragging?] is not @scheme[#f], then this move is a +If @racket[dragging?] is not @racket[#f], then this move is a temporary move for dragging. See also @method[pasteboard% on-move-to] and @method[pasteboard% @@ -369,7 +369,7 @@ The editor is internally locked for writing when this method is called } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -382,12 +382,12 @@ Returns @scheme[#t]. @methspec{ Called before a snip is moved in the pasteboard's front-to-back snip - order. If the return value is @scheme[#f], then the reordering will + order. If the return value is @racket[#f], then the reordering will be aborted. -If @scheme[before?] is @scheme[#t], then @scheme[snip] is to be moved before - @scheme[to-snip], otherwise @scheme[snip] is to be moved after - @scheme[to-snip]. +If @racket[before?] is @racket[#t], then @racket[snip] is to be moved before + @racket[to-snip], otherwise @racket[snip] is to be moved after + @racket[to-snip]. See also @method[pasteboard% on-reorder] and @method[pasteboard% after-reorder]. @@ -398,7 +398,7 @@ The editor is internally locked for writing when this method is called (see } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -412,7 +412,7 @@ Returns @scheme[#t]. @methspec{ Called before a snip is resized in the editor. If the return value is - @scheme[#f], then the resize will be aborted. + @racket[#f], then the resize will be aborted. See also @method[pasteboard% on-resize] and @method[pasteboard% after-resize]. @@ -423,7 +423,7 @@ The editor is internally locked for writing when this method is called (see } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -434,13 +434,13 @@ Returns @scheme[#t]. @methspec{ This method is called before a snip in the pasteboard is selected or - deselected. If @scheme[#f] is returned, the selection change is + deselected. If @racket[#f] is returned, the selection change is disallowed. This method is not called when a selected snip is to be deleted (and thus de-selected indirectly); see also @method[pasteboard% can-delete?]. -If @scheme[on?] is @scheme[#t], then @scheme[snip] will be selected, -otherwise @scheme[snip] will be deselected. +If @racket[on?] is @racket[#t], then @racket[snip] will be selected, +otherwise @racket[snip] will be deselected. See also @method[pasteboard% on-select] and @method[pasteboard% after-select]. @@ -451,7 +451,7 @@ The editor is internally locked for writing when this method is called (see } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -460,19 +460,19 @@ Returns @scheme[#t]. [snip (or/c (is-a?/c snip%) #f) #f]) void?])]{ -Changes the style of @scheme[snip] to a specific style or by applying - a style delta. If @scheme[snip] is @scheme[#f], then all currently - selected snips are changed. If @scheme[style] is @scheme[#f], then +Changes the style of @racket[snip] to a specific style or by applying + a style delta. If @racket[snip] is @racket[#f], then all currently + selected snips are changed. If @racket[style] is @racket[#f], then the default style is used, according to @method[editor<%> default-style-name]. 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 + consider providing a @racket[style<%>] instance rather than a + @racket[style-delta%] instance. Otherwise, @method[pasteboard% + change-style] must convert the @racket[style-delta%] instance to the + @racket[style<%>] instance for every snip; this conversion consumes both time and (temporary) memory. -When a @scheme[style] is provided: @InStyleListNote[@scheme[style]] +When a @racket[style] is provided: @InStyleListNote[@racket[style]] } @@ -483,7 +483,7 @@ When a @scheme[style] is provided: @InStyleListNote[@scheme[style]] In addition to the default @xmethod[editor<%> copy-self-to] work, the dragability, selection visibility state, and scroll step of - @this-obj[] are installed into @scheme[dest]. + @this-obj[] are installed into @racket[dest]. } @@ -493,8 +493,8 @@ In addition to the default @xmethod[editor<%> copy-self-to] work, the [(delete [snip (is-a?/c snip%)]) void?])]{ -Deletes @scheme[snip] when provided, or deletes the currently selected - snips from the editor when @scheme[snip] is not provided. +Deletes @racket[snip] when provided, or deletes the currently selected + snips from the editor when @racket[snip] is not provided. @MonitorMethod[@elem{The content of an editor} @elem{the system in response to other method @@ -514,15 +514,15 @@ Called to copy the editor's current selection into the clipboard. Do not call this method directly; instead, call @method[editor<%> copy]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @methimpl{ Copies the current selection, extending the current clipboard contexts - if @scheme[extend?] is true. + if @racket[extend?] is true. }} @@ -536,8 +536,8 @@ Called to paste the current contents of the clipboard into the editor. Do not call this method directly; instead, call @method[editor<%> paste]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -558,8 +558,8 @@ Called to paste the current contents of the X11 selection on Unix (or not call this method directly; instead, call @method[editor<%> paste-x-selection]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -584,11 +584,11 @@ See also @method[pasteboard% delete]. (or/c (is-a?/c snip%) false/c)]{ Returns the next selected snip in the editor, starting the search - after @scheme[start]. (@|seesniporderdiscuss|) If @scheme[start] is @scheme[#f], + after @racket[start]. (@|seesniporderdiscuss|) If @racket[start] is @racket[#f], then the search starts with the first snip in the editor (and thus returns the first selected snip, if any are selected). If no more - selected snips are available, or if @scheme[start] is not in the - pasteboard, @scheme[#f] is returned. + selected snips are available, or if @racket[start] is not in the + pasteboard, @racket[#f] is returned. } @@ -601,11 +601,11 @@ Returns the next selected snip in the editor, starting the search Finds the frontmost snip (after a given snip) that intersects a given @techlink{location}. @|seesniporderdiscuss| -The @scheme[x] and @scheme[y] arguments are in editor coordinates. If - @scheme[after] is not supplied, the frontmost snip at @scheme[x] and - @scheme[y] is returned, otherwise the frontmost snip behind @scheme[after] - is returned. If @scheme[after] is a snip that is not in the pasteboard, - @scheme[#f] is returned. +The @racket[x] and @racket[y] arguments are in editor coordinates. If + @racket[after] is not supplied, the frontmost snip at @racket[x] and + @racket[y] is returned, otherwise the frontmost snip behind @racket[after] + is returned. If @racket[after] is a snip that is not in the pasteboard, + @racket[#f] is returned. @|OVD| @@ -626,8 +626,8 @@ the second result is the y-coordinate of the center. boolean?]{ Returns whether snips in the editor can be interactively dragged by - event handling in @method[pasteboard% on-default-event]: @scheme[#t] - if dragging is allowed, @scheme[#f] otherwise. By default, dragging + event handling in @method[pasteboard% on-default-event]: @racket[#t] + if dragging is allowed, @racket[#f] otherwise. By default, dragging is allowed. See also @method[pasteboard% set-dragable]. } @@ -667,11 +667,11 @@ Returns whether selection dots are drawn around the edge of selected [before (or/c (is-a?/c snip%) false/c)]) void?])]{ -Inserts @scheme[snip] at @techlink{location} @math{(@scheme[x], - @scheme[y])} just in front of - @scheme[before]. (@|seesniporderdiscuss|) If @scheme[before] is not - provided or is @scheme[#f], then @scheme[snip] is inserted behind all - other snips. If @scheme[x] and @scheme[y] are not provided, the snip +Inserts @racket[snip] at @techlink{location} @math{(@racket[x], + @racket[y])} just in front of + @racket[before]. (@|seesniporderdiscuss|) If @racket[before] is not + provided or is @racket[#f], then @racket[snip] is inserted behind all + other snips. If @racket[x] and @racket[y] are not provided, the snip is added at @math{(0, 0)}. } @@ -696,8 +696,8 @@ See also } @methimpl{ -A negative value for either @scheme[x] or @scheme[y] is replaced with - @scheme[0]. +A negative value for either @racket[x] or @racket[y] is replaced with + @racket[0]. }} @@ -752,8 +752,8 @@ Does nothing. @defmethod[(is-selected? [snip (is-a?/c snip%)]) boolean?]{ -Returns @scheme[#t] if a specified snip is currently selected or - @scheme[#f] otherwise. +Returns @racket[#t] if a specified snip is currently selected or + @racket[#f] otherwise. } @@ -777,8 +777,8 @@ See also @method[pasteboard% raise], @method[pasteboard% set-before], [y real?]) void?])]{ -Moves @scheme[snip] right @scheme[x] pixels and down @scheme[y] - pixels. If @scheme[snip] is not provided, then all selected snips +Moves @racket[snip] right @racket[x] pixels and down @racket[y] + pixels. If @racket[snip] is not provided, then all selected snips are moved. @|OnMoveNote| @@ -791,7 +791,7 @@ Moves @scheme[snip] right @scheme[x] pixels and down @scheme[y] [y real?]) void?]{ -Moves @scheme[snip] to a given @techlink{location} in the editor. +Moves @racket[snip] to a given @techlink{location} in the editor. @|OnMoveNote| @@ -865,7 +865,7 @@ This method is called when the user double-clicks on a snip in the } @methimpl{ -If @scheme[snip] accepts events, it is designated as the caret owner +If @racket[snip] accepts events, it is designated as the caret owner and all snips in the editor are unselected. }} @@ -926,7 +926,7 @@ Called when the user starts interactively resizing a snip (the one after-interactive-resize] method is guaranteed to be called after the resize has completed. -The @scheme[snip] argument is the snip that will be resized. +The @racket[snip] argument is the snip that will be resized. } @methimpl{ @@ -949,7 +949,7 @@ Called before a snip is moved in the editor, after @method[pasteboard% @method[pasteboard% after-move-to] method is guaranteed to be called after the move has completed. -If @scheme[dragging?] is not @scheme[#f], then this move is a +If @racket[dragging?] is not @racket[#f], then this move is a temporary move for dragging. The editor is internally locked for writing when this method is called @@ -978,9 +978,9 @@ Called before a snip is moved in the pasteboard's front-to-back snip that the reorder is allowed. The @method[pasteboard% after-reorder] method is guaranteed to be called after the reorder has completed. -If @scheme[before?] is @scheme[#t], then @scheme[snip] is to be moved - before @scheme[to-snip], otherwise @scheme[snip] is to be moved after - @scheme[to-snip]. +If @racket[before?] is @racket[#t], then @racket[snip] is to be moved + before @racket[to-snip], otherwise @racket[snip] is to be moved after + @racket[to-snip]. The editor is internally locked for writing when this method is called (see also @|lockdiscuss|). Use @method[pasteboard% after-reorder] to @@ -1035,8 +1035,8 @@ Called before a snip in the pasteboard is selected or deselected, method is not called when a selected snip is to be deleted (and thus de-selected indirectly); see also @method[pasteboard% on-delete] . -If @scheme[on?] is @scheme[#t], then @scheme[snip] will be selected, - otherwise @scheme[snip] will be deselected. +If @racket[on?] is @racket[#t], then @racket[snip] will be selected, + otherwise @racket[snip] will be deselected. The editor is internally locked for writing when this method is called (see also @|lockdiscuss|). Use @method[pasteboard% after-select] to @@ -1077,7 +1077,7 @@ See also @method[pasteboard% delete]. @defmethod[(remove-selected [snip (is-a?/c snip%)]) void?]{ -Deselects @scheme[snip] (if it is currently selected) without +Deselects @racket[snip] (if it is currently selected) without deselecting any other snips. @|OnSelectNote| @@ -1091,7 +1091,7 @@ Deselects @scheme[snip] (if it is currently selected) without boolean?]{ Attempts to resize a given snip. If the snip allows resizing, - @scheme[#t] is returned, otherwise @scheme[#f] is returned. Using + @racket[#t] is returned, otherwise @racket[#f] is returned. Using this method instead of calling the snip's @method[snip% resize] method directly will make the resize undo-able. @@ -1102,8 +1102,8 @@ Attempts to resize a given snip. If the snip allows resizing, [after (or/c (is-a?/c snip%) false/c)]) void?]{ -Changes the depth of @scheme[snip] moving it just behind - @scheme[after]. If @scheme[after] is @scheme[#f], @scheme[snip] is +Changes the depth of @racket[snip] moving it just behind + @racket[after]. If @racket[after] is @racket[#f], @racket[snip] is moved to the back. @|seesniporderdiscuss| See also @method[pasteboard% raise], @method[pasteboard% lower], and @@ -1116,8 +1116,8 @@ See also @method[pasteboard% raise], @method[pasteboard% lower], and [before (or/c (is-a?/c snip%) false/c)]) void?]{ -Changes the depth of @scheme[snip] moving it just in front of - @scheme[before]. If @scheme[before] is @scheme[#f], @scheme[snip] is +Changes the depth of @racket[snip] moving it just in front of + @racket[before]. If @racket[before] is @racket[#f], @racket[snip] is moved to the front. @|seesniporderdiscuss| See also @method[pasteboard% raise], @method[pasteboard% lower], and @@ -1131,7 +1131,7 @@ See also @method[pasteboard% raise], @method[pasteboard% lower], and Sets whether snips in the editor can be interactively dragged by event handling in @method[pasteboard% on-default-event]: a true value - allows dragging, @scheme[#f] disallows dragging. See also + allows dragging, @racket[#f] disallows dragging. See also @method[pasteboard% get-dragable]. } diff --git a/collects/scribblings/gui/popup-menu-class.scrbl b/collects/scribblings/gui/popup-menu-class.scrbl index 9c8a7c0b..57d23290 100644 --- a/collects/scribblings/gui/popup-menu-class.scrbl +++ b/collects/scribblings/gui/popup-menu-class.scrbl @@ -3,13 +3,13 @@ @defclass/title[popup-menu% object% (menu-item-container<%>)]{ -A @scheme[popup-menu%] object is created without a parent. Dynamically - display a @scheme[popup-menu%] with @xmethod[window<%> popup-menu] +A @racket[popup-menu%] object is created without a parent. Dynamically + display a @racket[popup-menu%] with @xmethod[window<%> popup-menu] or @xmethod[editor-admin% popup-menu]. -A popup menu is @italic{not} a control. A @scheme[choice%] control, +A popup menu is @italic{not} a control. A @racket[choice%] control, however, displays a single value that the user selects from a popup - menu. A @scheme[choice%] control's popup menu is built into the + menu. A @racket[choice%] control's popup menu is built into the control, and it is not accessible to the programmer. @@ -21,26 +21,26 @@ however, displays a single value that the user selects from a popup (lambda (p) (void))] [font (is-a?/c font%) normal-control-font])]{ -If @scheme[title] is not @scheme[#f], it is used as a displayed title +If @racket[title] is not @racket[#f], it is used as a displayed title at the top of the popup menu. -If @scheme[title] contains @litchar{&}, it is handled specially, the - same as for @scheme[menu%] titles. A popup menu mnemonic is not +If @racket[title] contains @litchar{&}, it is handled specially, the + same as for @racket[menu%] titles. A popup menu mnemonic is not useful, but it is supported for consistency with other menu labels. -The @scheme[popdown-callback] procedure is invoked when a popup menu is +The @racket[popdown-callback] procedure is invoked when a popup menu is dismissed. If the popup menu is dismissed without an item being - selected, @scheme[popdown-callback] is given a @scheme[control-event%] - object with the event type @indexed-scheme['menu-popdown-none]. If the + selected, @racket[popdown-callback] is given a @racket[control-event%] + object with the event type @indexed-racket['menu-popdown-none]. If the popup menu is dismissed via an item selection, the item's callback is - invoked first, and then @scheme[popdown-callback] is given a - @scheme[control-event%] object with the event type - @indexed-scheme['menu-popdown]. + invoked first, and then @racket[popdown-callback] is given a + @racket[control-event%] object with the event type + @indexed-racket['menu-popdown]. -The @scheme[demand-callback] procedure is called by the default +The @racket[demand-callback] procedure is called by the default @method[menu-item-container<%> on-demand] method with the object itself. -The @scheme[font] argument determines the font for the popup menu's +The @racket[font] argument determines the font for the popup menu's items. } @@ -58,7 +58,7 @@ Returns the font used for the popup menu's items, which is optionally (or/c (is-a?/c window<%>) (is-a?/c editor<%>) false/c)]{ Returns the context in which the popup menu is currently displayed, or - @scheme[#f] if it is not popped up in any window. + @racket[#f] if it is not popped up in any window. The context is set before the @method[menu-item-container<%> on-demand] method is called, and it is not removed until after the diff --git a/collects/scribblings/gui/prefs.scrbl b/collects/scribblings/gui/prefs.scrbl index dfe2ee40..689689ae 100644 --- a/collects/scribblings/gui/prefs.scrbl +++ b/collects/scribblings/gui/prefs.scrbl @@ -5,9 +5,9 @@ The @racketmodname[racket/gui/base] library supports a number of preferences for global configuration. The preferences are stored in the common file reported by - @scheme[find-system-path] for @indexed-scheme['pref-file], and + @racket[find-system-path] for @indexed-racket['pref-file], and preference values can be retrieved and changed through - @scheme[get-preference] and @scheme[put-preferences]. Except for the except the + @racket[get-preference] and @racket[put-preferences]. Except for the except the @Resource{playcmd} preference, the @racketmodname[racket/gui/base] library reads each of the preferences below once at startup. @@ -24,10 +24,10 @@ The following are the preference names used by GRacket: an editor.} @item{@ResourceFirst{defaultMenuPrefix} --- sets the prefix used by - default for menu item shortcuts on Unix, one of @scheme['ctl], - @scheme['meta], or @scheme['alt]. The default is - @scheme['ctl]. When this preference is set to @scheme['meta] or - @scheme['alt], underlined mnemonics (introduced by @litchar{&} in menu + default for menu item shortcuts on Unix, one of @racket['ctl], + @racket['meta], or @racket['alt]. The default is + @racket['ctl]. When this preference is set to @racket['meta] or + @racket['alt], underlined mnemonics (introduced by @litchar{&} in menu labels) are suppressed.} @item{@ResourceFirst{emacs-undo} --- a true value makes undo in @@ -35,14 +35,14 @@ The following are the preference names used by GRacket: in the undo stack).} @item{@ResourceFirst{wheelStep} --- sets the default mouse-wheel step - size of @scheme[editor-canvas%] objects.} + size of @racket[editor-canvas%] objects.} @item{@ResourceFirst{outline-inactive-selection} --- a true value causes selections in text editors to be shown with an outline of the selected region when the editor does no have the keyboard focus.} @item{@ResourceFirst{playcmd} --- used to format a sound-playing - command; see @scheme[play-sound] for details.} + command; see @racket[play-sound] for details.} @item{@ResourceFirst{doubleClickTime} --- overrides the platform-specific default interval (in milliseconds) for double-click @@ -51,6 +51,5 @@ The following are the preference names used by GRacket: ] In each of the above cases, if no preference value is found using the -@schemeidfont{GRacket}-prefixed name, a @schemeidfont{MrEd}-prefixed +@racketidfont{GRacket}-prefixed name, a @racketidfont{MrEd}-prefixed name is tried for backward compatibility. - diff --git a/collects/scribblings/gui/printer-dc-class.scrbl b/collects/scribblings/gui/printer-dc-class.scrbl index 0a7a4fa7..12fd6a15 100644 --- a/collects/scribblings/gui/printer-dc-class.scrbl +++ b/collects/scribblings/gui/printer-dc-class.scrbl @@ -3,26 +3,26 @@ @defclass/title[printer-dc% object% (dc<%>)]{ -A @scheme[printer-dc%] object is a printer device context. A newly - created @scheme[printer-dc%] object obtains orientation (portrait +A @racket[printer-dc%] object is a printer device context. A newly + created @racket[printer-dc%] object obtains orientation (portrait versus landscape) and scaling information from the current - @scheme[ps-setup%] object, as determined by the - @scheme[current-ps-setup] parameter. This information can be + @racket[ps-setup%] object, as determined by the + @racket[current-ps-setup] parameter. This information can be configured by the user through a dialog shown by - @scheme[get-page-setup-from-user]. + @racket[get-page-setup-from-user]. @|PrintNote| -See also @scheme[post-script-dc%]. +See also @racket[post-script-dc%]. -When a @scheme[printer-dc%] object is created, the user gets +When a @racket[printer-dc%] object is created, the user gets platform-specific modal dialogs for configuring the output. If the user cancels the dialog, the @method[dc<%> ok?] method - of the object returns @scheme[#f]. + of the object returns @racket[#f]. @defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c) #f])]{ -If @scheme[parent] is not @scheme[#f], it is used as the parent window +If @racket[parent] is not @racket[#f], it is used as the parent window of the configuration dialog. diff --git a/collects/scribblings/gui/radio-box-class.scrbl b/collects/scribblings/gui/radio-box-class.scrbl index 138567d0..081522d8 100644 --- a/collects/scribblings/gui/radio-box-class.scrbl +++ b/collects/scribblings/gui/radio-box-class.scrbl @@ -4,11 +4,11 @@ @defclass/title[radio-box% object% (control<%>)]{ -A @scheme[radio-box%] control allows the user to select one of +A @racket[radio-box%] control allows the user to select one of number of mutually exclusive items. The items are displayed as a vertical column or horizontal row of labelled @defterm{radio - buttons}. Unlike a @scheme[list-control<%>], the set of items in a - @scheme[radio-box%] cannot be changed dynamically. + buttons}. Unlike a @racket[list-control<%>], the set of items in a + @racket[radio-box%] cannot be changed dynamically. Whenever the user changes the selected radio button, the radio box's callback procedure is invoked. A callback procedure is provided as an @@ -39,36 +39,36 @@ Whenever the user changes the selected radio button, the radio box's [stretchable-height any/c #f])]{ Creates a radio button set with string or bitmap labels. The - @scheme[choices] list specifies the radio button labels; the list of + @racket[choices] list specifies the radio button labels; the list of choices must be homogeneous, either all strings or all bitmaps. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the radio box}] -Each string in @scheme[choices] can also contain a @litchar{&}, which +Each string in @racket[choices] can also contain a @litchar{&}, which creates a mnemonic for clicking the corresponding radio button. As - for @scheme[label], a @litchar{&&} is converted to a @litchar{&}. + for @racket[label], a @litchar{&&} is converted to a @litchar{&}. @bitmaplabelusearray[choices] -If @scheme[label] is a string, it is used as the label for the radio +If @racket[label] is a string, it is used as the label for the radio box. Otherwise, the radio box does not display its label. -The @scheme[callback] procedure is called (with the event type - @indexed-scheme['radio-box]) when the user changes the radio button +The @racket[callback] procedure is called (with the event type + @indexed-racket['radio-box]) when the user changes the radio button selection. -The @scheme[style] argument must include either @scheme['vertical] for a +The @racket[style] argument must include either @racket['vertical] for a collection of radio buttons vertically arranged, or - @scheme['horizontal] for a horizontal arrangement. - @HVLabelNote[@scheme[style]]{radio box} @DeletedStyleNote[@scheme[style] @scheme[parent]]{radio box} + @racket['horizontal] for a horizontal arrangement. + @HVLabelNote[@racket[style]]{radio box} @DeletedStyleNote[@racket[style] @racket[parent]]{radio box} By default, the first radio button is initially selected. If - @scheme[selection] is positive or @scheme[#f], it is passed to + @racket[selection] is positive or @racket[#f], it is passed to @method[radio-box% set-selection] to set the initial radio button selection. -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -82,10 +82,10 @@ By default, the first radio button is initially selected. If If a single argument is provided, the entire radio box is enabled or disabled. -If two arguments are provided, then if @scheme[enable?] is - @scheme[#f], the @scheme[n]th radio button is disabled, otherwise it +If two arguments are provided, then if @racket[enable?] is + @racket[#f], the @racket[n]th radio button is disabled, otherwise it is enabled (assuming the entire radio box is enabled). Radio buttons - are numbered from @scheme[0]. If @scheme[n] is equal to or larger + are numbered from @racket[0]. If @racket[n] is equal to or larger than the number of radio buttons in the radio box, @|MismatchExn|. } @@ -95,7 +95,7 @@ If two arguments are provided, then if @scheme[enable?] is string?]{ Gets the label of a radio button by position. Radio buttons are - numbered from @scheme[0]. If @scheme[n] is equal to or larger than + numbered from @racket[0]. If @racket[n] is equal to or larger than the number of radio buttons in the radio box, @|MismatchExn|. } @@ -118,8 +118,8 @@ Returns the number of radio buttons in the radio box. @defmethod[(get-selection) (or/c exact-nonnegative-integer? #f)]{ -Gets the position of the selected radio button, returning @scheme[#f] -if no button is selected. Radio buttons are numbered from @scheme[0]. +Gets the position of the selected radio button, returning @racket[#f] +if no button is selected. Radio buttons are numbered from @racket[0]. } @@ -132,9 +132,9 @@ if no button is selected. Radio buttons are numbered from @scheme[0]. If no arguments are provided, the enable state of the entire radio box is reported. -Otherwise, returns @scheme[#f] if @scheme[n]th radio button is -disabled (independent of disabling the entire radio box), @scheme[#t] -otherwise. Radio buttons are numbered from @scheme[0]. If @scheme[n] +Otherwise, returns @racket[#f] if @racket[n]th radio button is +disabled (independent of disabling the entire radio box), @racket[#t] +otherwise. Radio buttons are numbered from @racket[0]. If @racket[n] is equal to or larger than the number of radio buttons in the radio box, @|MismatchExn|. @@ -144,9 +144,9 @@ box, @|MismatchExn|. void?]{ Sets the selected radio button by position, or deselects all radio - buttons if @scheme[n] is @scheme[#f]. (The control's callback + buttons if @racket[n] is @racket[#f]. (The control's callback procedure is @italic{not} invoked.) Radio buttons are numbered from - @scheme[0]. If @scheme[n] is equal to or larger than the number of + @racket[0]. If @racket[n] is equal to or larger than the number of radio buttons in the radio box, @|MismatchExn|. @MonitorCallback[@elem{A radio box's selection} @elem{the user clicking the control} @elem{selection}] diff --git a/collects/scribblings/gui/readable-snip-intf.scrbl b/collects/scribblings/gui/readable-snip-intf.scrbl index 663afcb6..1b09b2e3 100644 --- a/collects/scribblings/gui/readable-snip-intf.scrbl +++ b/collects/scribblings/gui/readable-snip-intf.scrbl @@ -3,18 +3,18 @@ @definterface/title[readable-snip<%> ()]{ -A @scheme[readable-snip<%>] object is treated specially by the port - generated by @scheme[open-input-text-editor]: When a - @scheme[readable-snip<%>] object is encountered for the input stream, +A @racket[readable-snip<%>] object is treated specially by the port + generated by @racket[open-input-text-editor]: When a + @racket[readable-snip<%>] object is encountered for the input stream, its @method[readable-snip<%> read-special] method is called to generate the read result for the snip, which is returned from the port as a ``special'' value in the sense of - @scheme[read-char-or-special]. + @racket[read-char-or-special]. -Since @scheme[read] and @scheme[read-syntax] build on - @scheme[read-char-or-special], a snip can implement - @scheme[readable-snip<%>] so that it produces a whole S-expression or - some other kind of value when @scheme[read] is used on a stream +Since @racket[read] and @racket[read-syntax] build on + @racket[read-char-or-special], a snip can implement + @racket[readable-snip<%>] so that it produces a whole S-expression or + some other kind of value when @racket[read] is used on a stream containing the snip. @defmethod[(read-special [source any/c] @@ -24,10 +24,10 @@ Since @scheme[read] and @scheme[read-syntax] build on any/c]{ The arguments are the same as the arguments to a procedure returned by - a custom input port's @scheme[_read-in]; see @secref[#:doc '(lib + a custom input port's @racket[_read-in]; see @secref[#:doc '(lib "scribblings/reference/reference.scrbl") "customport"] for details. The result is also the same as the result from a - @scheme[_read-in]-produced procedure. + @racket[_read-in]-produced procedure. }} diff --git a/collects/scribblings/gui/scroll-event-class.scrbl b/collects/scribblings/gui/scroll-event-class.scrbl index 6ec2e282..f541dce7 100644 --- a/collects/scribblings/gui/scroll-event-class.scrbl +++ b/collects/scribblings/gui/scroll-event-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[scroll-event% event% ()]{ -A @scheme[scroll-event%] object contains information about a scroll - event. An instance of @scheme[scroll-event%] is always provided to +A @racket[scroll-event%] object contains information about a scroll + event. An instance of @racket[scroll-event%] is always provided to @method[canvas% on-scroll]. See @@ -20,9 +20,9 @@ See [position (integer-in 0 10000) 0] [time-stamp exact-integer? 0])]{ -See the corresponding @scheme[get-] and @scheme[set-] methods for - information about @scheme[event-type], @scheme[direction], @scheme[position], - and @scheme[time-stamp]. +See the corresponding @racket[get-] and @racket[set-] methods for + information about @racket[event-type], @racket[direction], @racket[position], + and @racket[time-stamp]. } @@ -31,7 +31,7 @@ See the corresponding @scheme[get-] and @scheme[set-] methods for Gets the identity of the scrollbar that was modified by the event, either the horizontal scrollbar or the vertical scrollbar, as - @scheme['horizontal] or @scheme['vertical], respectively. See also + @racket['horizontal] or @racket['vertical], respectively. See also @method[scroll-event% set-direction]. } @@ -42,13 +42,13 @@ Gets the identity of the scrollbar that was modified by the event, Returns the type of the event, one of the following: @itemize[ -@item{@scheme['top] --- user clicked a scroll-to-top button} -@item{@scheme['bottom] --- user clicked a scroll-to-bottom button} -@item{@scheme['line-up] --- user clicked an arrow to scroll up or left one step} -@item{@scheme['line-down] --- user clicked an arrow to scroll down or right one step} -@item{@scheme['page-up] --- user clicked an arrow to scroll up or left one page} -@item{@scheme['page-down] --- user clicked an arrow to scroll down or right one page} -@item{@scheme['thumb] --- user dragged the scroll position indicator} +@item{@racket['top] --- user clicked a scroll-to-top button} +@item{@racket['bottom] --- user clicked a scroll-to-bottom button} +@item{@racket['line-up] --- user clicked an arrow to scroll up or left one step} +@item{@racket['line-down] --- user clicked an arrow to scroll down or right one step} +@item{@racket['page-up] --- user clicked an arrow to scroll up or left one page} +@item{@racket['page-down] --- user clicked an arrow to scroll down or right one page} +@item{@racket['thumb] --- user dragged the scroll position indicator} ] } @@ -66,7 +66,7 @@ Returns the position of the scrollbar after the action triggering the Sets the identity of the scrollbar that was modified by the event, either the horizontal scrollbar or the vertical scrollbar, as - @scheme['horizontal] or @scheme['vertical], respectively. See also + @racket['horizontal] or @racket['vertical], respectively. See also @method[scroll-event% get-direction]. } diff --git a/collects/scribblings/gui/selectable-menu-item-intf.scrbl b/collects/scribblings/gui/selectable-menu-item-intf.scrbl index 057a9314..5d41f0b1 100644 --- a/collects/scribblings/gui/selectable-menu-item-intf.scrbl +++ b/collects/scribblings/gui/selectable-menu-item-intf.scrbl @@ -3,8 +3,8 @@ @definterface/title[selectable-menu-item<%> (labelled-menu-item<%>)]{ -A @scheme[selectable-menu-item<%>] object is a - @scheme[labelled-menu-item<%>] that the user can select. It may also +A @racket[selectable-menu-item<%>] object is a + @racket[labelled-menu-item<%>] that the user can select. It may also have a keyboard shortcut; the shortcut is displayed in the menu, and the default @method[frame% on-subwindow-char] method in the menu's frame dispatches to the menu item when the shortcut key combination @@ -16,8 +16,8 @@ A @scheme[selectable-menu-item<%>] object is a Invokes the menu item's callback procedure, which is supplied when an instance of -@scheme[menu-item%] or -@scheme[checkable-menu-item%] is created. +@racket[menu-item%] or +@racket[checkable-menu-item%] is created. } @@ -29,16 +29,16 @@ Gets the keyboard shortcut character or virtual key for the menu which is reported by @method[selectable-menu-item<%> get-shortcut-prefix]. -If the menu item has no shortcut, @scheme[#f] is returned. +If the menu item has no shortcut, @racket[#f] is returned. The shortcut part of a menu item name is not included in the label returned by @method[labelled-menu-item<%> get-label]. For a list of allowed key symbols, see @xmethod[key-event% get-key-code], except that the following are disallowed: - @scheme['shift], @scheme['control], @scheme['numlock], - @scheme['scroll], @scheme['wheel-up], @scheme['wheel-down], - @scheme['release], and @scheme['press]. + @racket['shift], @racket['control], @racket['numlock], + @racket['scroll], @racket['wheel-up], @racket['wheel-down], + @racket['release], and @racket['press]. } @@ -49,20 +49,20 @@ Returns a list of symbols that indicates the keyboard prefix used for the menu item's keyboard shortcut. The allowed symbols for the list are the following: @itemize[ -@item{@scheme['alt] --- Meta (Windows and X only)} -@item{@scheme['cmd] --- Command (Mac OS X only)} -@item{@scheme['meta] --- Meta (Unix only)} -@item{@scheme['ctl] --- Control} -@item{@scheme['shift] --- Shift} -@item{@scheme['option] --- Option (Mac OS X only)} +@item{@racket['alt] --- Meta (Windows and X only)} +@item{@racket['cmd] --- Command (Mac OS X only)} +@item{@racket['meta] --- Meta (Unix only)} +@item{@racket['ctl] --- Control} +@item{@racket['shift] --- Shift} +@item{@racket['option] --- Option (Mac OS X only)} ] -On Unix, at most one of @scheme['alt] and @scheme['meta] can be - supplied; the only difference between @scheme['alt] and - @scheme['meta] is the key combination's display in a menu. +On Unix, at most one of @racket['alt] and @racket['meta] can be + supplied; the only difference between @racket['alt] and + @racket['meta] is the key combination's display in a menu. The default shortcut prefix is available from - @scheme[get-default-shortcut-prefix]. + @racket[get-default-shortcut-prefix]. The shortcut key, as determined by @method[selectable-menu-item<%> get-shortcut], matches a key event using either the normally reported @@ -94,7 +94,7 @@ An empty list can be used for a shortcut prefix. However, the default Sets the keyboard shortcut character for the menu item. See @method[selectable-menu-item<%> get-shortcut] for more information. -If the shortcut character is set to @scheme[#f], then menu item has no +If the shortcut character is set to @racket[#f], then menu item has no keyboard shortcut. } diff --git a/collects/scribblings/gui/separator-menu-item-class.scrbl b/collects/scribblings/gui/separator-menu-item-class.scrbl index 9f061c45..f85b07d7 100644 --- a/collects/scribblings/gui/separator-menu-item-class.scrbl +++ b/collects/scribblings/gui/separator-menu-item-class.scrbl @@ -4,7 +4,7 @@ @defclass/title[separator-menu-item% object% (menu-item<%>)]{ A separator is an unselectable line in a menu. Its parent must be a - @scheme[menu%] or @scheme[popup-menu%]. + @racket[menu%] or @racket[popup-menu%]. @defconstructor[([parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))])]{ diff --git a/collects/scribblings/gui/slider-class.scrbl b/collects/scribblings/gui/slider-class.scrbl index 2ac0e368..06385539 100644 --- a/collects/scribblings/gui/slider-class.scrbl +++ b/collects/scribblings/gui/slider-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[slider% object% (control<%>)]{ -A @scheme[slider] object is a panel item with a handle that the user can +A @racket[slider] object is a panel item with a handle that the user can drag to change the control's value. Each slider has a fixed minimum and maximum value. @@ -34,27 +34,27 @@ Whenever the user changes the value of a slider, its callback [stretchable-width any/c (memq 'horizontal style)] [stretchable-height any/c (memq 'vertical style)])]{ -If @scheme[label] is a string, it is used as the label for the slider. +If @racket[label] is a string, it is used as the label for the slider. Otherwise, the slider does not display its label. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the slider}] -The @scheme[min-value] and @scheme[max-value] arguments specify the - range of the slider, inclusive. The @scheme[init-value] argument +The @racket[min-value] and @racket[max-value] arguments specify the + range of the slider, inclusive. The @racket[init-value] argument optionally specifies the slider's initial value. If the sequence - [@scheme[min-value], @scheme[initial-value], @scheme[maximum-value]] + [@racket[min-value], @racket[initial-value], @racket[maximum-value]] is not increasing, @|MismatchExn|. -The @scheme[callback] procedure is called (with the event type - @indexed-scheme['slider]) when the user changes the slider's value. +The @racket[callback] procedure is called (with the event type + @indexed-racket['slider]) when the user changes the slider's value. -The @scheme[style] argument must include either @scheme['vertical] for - a vertical slider, or @scheme['horizontal] for a horizontal - slider. If @scheme[style] includes @scheme['plain], the slider does +The @racket[style] argument must include either @racket['vertical] for + a vertical slider, or @racket['horizontal] for a horizontal + slider. If @racket[style] includes @racket['plain], the slider does not display numbers for its range and current value to the user. - @HVLabelNote[@scheme[style]]{slider} @DeletedStyleNote[@scheme[style] @scheme[parent]]{slider} + @HVLabelNote[@racket[style]]{slider} @DeletedStyleNote[@racket[style] @racket[parent]]{slider} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -70,7 +70,7 @@ Gets the current slider value. void?]{ Sets the value (and displayed position) of the slider. (The control's - callback procedure is @italic{not} invoked.) If @scheme[value] is + callback procedure is @italic{not} invoked.) If @racket[value] is outside the slider's minimum and maximum range, @|MismatchExn|. @MonitorCallback[@elem{A slider's value} @elem{the user clicking the control} @elem{value}] diff --git a/collects/scribblings/gui/snip-admin-class.scrbl b/collects/scribblings/gui/snip-admin-class.scrbl index cbb65a7e..e992e4a5 100644 --- a/collects/scribblings/gui/snip-admin-class.scrbl +++ b/collects/scribblings/gui/snip-admin-class.scrbl @@ -4,19 +4,19 @@ @defclass/title[snip-admin% object% ()]{ See @|admindiscuss| for information about the role of administrators. - The @scheme[snip-admin%] class is never instantiated directly. It + The @racket[snip-admin%] class is never instantiated directly. It is not even instantiated through derived classes by most programmers; - each @scheme[text%] or @scheme[pasteboard%] object + each @racket[text%] or @racket[pasteboard%] object creates its own administrator. However, it may be useful to derive a new instance of this class to display snips in a new context. Also, it may be useful to call the methods of an existing administrator from an owned snip. -To create a new @scheme[snip-admin%] class, all methods described here +To create a new @racket[snip-admin%] class, all methods described here must be overridden. They are all invoked by the administrator's snip. -Because a @scheme[snip-admin%] object typically owns more than one - snip, many methods require a @scheme[snip%] object as an argument. +Because a @racket[snip-admin%] object typically owns more than one + snip, many methods require a @racket[snip%] object as an argument. @@ -30,7 +30,7 @@ Creates a (useless) editor administrator. (or/c (is-a?/c dc<%>) false/c)]{ Gets a drawing context suitable for determining display size - information. If the snip is not displayed, @scheme[#f] is returned. + information. If the snip is not displayed, @racket[#f] is returned. } @@ -54,16 +54,16 @@ Gets the @techlink{location} and size of the visible region of a snip in snip coordinates. The result is undefined if the given snip is not managed by this administrator. -If @scheme[snip] is not @scheme[#f], the current visible region of the - snip is installed in the boxes @scheme[x], @scheme[y], @scheme[w], - and @scheme[h]. The @scheme[x] and @scheme[y] values are relative to - the snip's top-left corner. The @scheme[w] and @scheme[h] values may +If @racket[snip] is not @racket[#f], the current visible region of the + snip is installed in the boxes @racket[x], @racket[y], @racket[w], + and @racket[h]. The @racket[x] and @racket[y] values are relative to + the snip's top-left corner. The @racket[w] and @racket[h] values may be larger than the snip itself. -If @scheme[snip] is @scheme[#f], the total visible region of the +If @racket[snip] is @racket[#f], the total visible region of the snip's top-level @techlink{display} is returned in editor - coordinates. Using @scheme[#f] for @scheme[snip] is analogous to - using @scheme[#t] for @scheme[full?] in @xmethod[editor-admin% + coordinates. Using @racket[#f] for @racket[snip] is analogous to + using @racket[#t] for @racket[full?] in @xmethod[editor-admin% get-view]. If no snip is specified, then the @techlink{location} and size of the snip's @@ -74,7 +74,7 @@ See also @xmethod[editor-admin% get-view]. } @methimpl{ -Fills all boxes with @scheme[0.0]. +Fills all boxes with @racket[0.0]. }} @@ -92,7 +92,7 @@ If the @techlink{display} is an editor canvas, see also } @methimpl{ -Fills all boxes with @scheme[0.0]. +Fills all boxes with @racket[0.0]. } } @@ -124,7 +124,7 @@ Called by the snip to request that the snip's display needs to be updated. The administrator determines when to actually update the snip; the snip's @method[snip% draw] method is eventually called. -The @scheme[localx], @scheme[localy], @scheme[w], and @scheme[h] +The @racket[localx], @racket[localy], @racket[w], and @racket[h] arguments specify a region of the snip to be refreshed (in snip coordinates). @@ -146,10 +146,10 @@ Does nothing. @methspec{ Opens a popup menu in the @techlink{display} for this snip's editor. The result - is @scheme[#t] if the popup succeeds, @scheme[#f] otherwise (independent + is @racket[#t] if the popup succeeds, @racket[#f] otherwise (independent of whether the user selects an item in the popup menu). -The menu is placed at @scheme[x] and @scheme[y] in @scheme[snip] +The menu is placed at @racket[x] and @racket[y] in @racket[snip] coordinates. While the menu is popped up, its target is set to the top-level editor @@ -159,7 +159,7 @@ While the menu is popped up, its target is set to the top-level editor } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -173,7 +173,7 @@ Called by a snip to notify the administrator that the specified snip changing its @techlink{count}, but the snip decides whether the update should occur immediately. -If @scheme[refresh?] is not @scheme[#f], then the snip is requesting +If @racket[refresh?] is not @racket[#f], then the snip is requesting to be updated immediately. Otherwise, @method[snip-admin% needs-update] must eventually be called as well. @@ -194,18 +194,18 @@ Does nothing. Requests that the specified snip be released. If this administrator is not the snip's owner or if the snip cannot be released, then - @scheme[#f] is returned. Otherwise, @scheme[#t] is returned and the + @racket[#f] is returned. Otherwise, @racket[#t] is returned and the snip is no longer owned. See also @xmethod[editor<%> release-snip] . -The result is @scheme[#f] if the given snip is not managed by this +The result is @racket[#f] if the given snip is not managed by this administrator. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -220,7 +220,7 @@ Called by a snip to notify the administrator that the specified snip after a resize, but the snip decides whether the update should occur immediately. -If @scheme[refresh?] is not @scheme[#f], then the snip is requesting +If @racket[refresh?] is not @racket[#f], then the snip is requesting to be updated immediately, as if calling @method[snip-admin% needs-update]. Otherwise, @method[snip-admin% needs-update] must eventually be called as well. @@ -251,34 +251,34 @@ Called by the snip to request scrolling so that the given region is visible. The snip generally needs to be updated after a scroll, but the snip decides whether the update should occur immediately. -The @scheme[localx], @scheme[localy], @scheme[w], and @scheme[h] arguments specify +The @racket[localx], @racket[localy], @racket[w], and @racket[h] arguments specify a region of the snip to be made visible by the scroll (in snip coordinates). -If @scheme[refresh?] is not @scheme[#f], then the editor is requesting to +If @racket[refresh?] is not @racket[#f], then the editor is requesting to be updated immediately. -The @scheme[bias] argument is one of: +The @racket[bias] argument is one of: @itemize[ - @item{@scheme['start] --- if the range doesn't fit in the visible area, show the top-left region} + @item{@racket['start] --- if the range doesn't fit in the visible area, show the top-left region} - @item{@scheme['none] --- no special scrolling instructions} + @item{@racket['none] --- no special scrolling instructions} - @item{@scheme['end] --- if the range doesn't fit in the visible area, show the bottom-right region} + @item{@racket['end] --- if the range doesn't fit in the visible area, show the bottom-right region} ] -The result is @scheme[#t] if the editor is scrolled, @scheme[#f] +The result is @racket[#t] if the editor is scrolled, @racket[#f] otherwise. -The method call is ignored (and the result is @scheme[#f]) if the given +The method call is ignored (and the result is @racket[#f]) if the given snip is not managed by this administrator. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -292,7 +292,7 @@ Requests that the keyboard focus is assigned to the specified snip. snip is called. See @method[editor<%> set-caret-owner] for information about the - possible values of @scheme[domain]. + possible values of @racket[domain]. The method call is ignored if the given snip is not managed by this @@ -333,7 +333,7 @@ line. } @methimpl{ -Returns @scheme[0.0] +Returns @racket[0.0] }} @@ -342,12 +342,12 @@ Returns @scheme[0.0] @methspec{ -Returns the color that is used to draw selected text or @scheme[#f] if +Returns the color that is used to draw selected text or @racket[#f] if selected text is drawn with its usual color. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -356,7 +356,7 @@ Returns @scheme[#f]. @methspec{ -Calls @scheme[thunk] while changing the cursor to a watch cursor for +Calls @racket[thunk] while changing the cursor to a watch cursor for all windows in the current eventspace. } @@ -378,12 +378,12 @@ Returns the current tab-position array as a list. list)}] @boxisfillnull[(scheme tab-width) @elem{the width used for tabs past the end of the tab array}] -@boxisfillnull[(scheme in-units) @elem{@scheme[#t] if the tabs are specified in -canvas units or @scheme[#f] if they are specified in space-widths}] +@boxisfillnull[(scheme in-units) @elem{@racket[#t] if the tabs are specified in +canvas units or @racket[#f] if they are specified in space-widths}] } @methimpl{ -Returns @scheme[null]. +Returns @racket[null]. } } } diff --git a/collects/scribblings/gui/snip-class-class.scrbl b/collects/scribblings/gui/snip-class-class.scrbl index 787464c4..5659e384 100644 --- a/collects/scribblings/gui/snip-class-class.scrbl +++ b/collects/scribblings/gui/snip-class-class.scrbl @@ -4,11 +4,11 @@ @defclass/title[snip-class% object% ()]{ Useful snip classes are defined by instantiating derived subclasses of - @scheme[snip-class%]. A class derived from @scheme[snip-class%] + @racket[snip-class%]. A class derived from @racket[snip-class%] serves as a kind of ``meta-class'' for snips; each snip is associated - with an instance of @scheme[snip-class%] as its snip class. + with an instance of @racket[snip-class%] as its snip class. -In deriving a new @scheme[snip-class%] class, override the +In deriving a new @racket[snip-class%] class, override the @method[snip-class% read] method. Then, for each instance of the derived class (where each instance corresponds to a single snip class): @@ -21,7 +21,7 @@ In deriving a new @scheme[snip-class%] class, override the @method[snip-class% set-version].} @item{Install the class into the list returned by - @scheme[get-the-snip-class-list] using the + @racket[get-the-snip-class-list] using the @method[snip-class-list<%> add] method. Note that if the same name is inserted into the same class list multiple times, all but the first insertion is ignored.} @@ -42,9 +42,9 @@ Creates a (useless) snip class. Returns the class's name, a string uniquely designating this snip class. For example, the standard text snip classname is - @scheme["wxtext"]. Names beginning with @litchar{wx} are reserved. + @racket["wxtext"]. Names beginning with @litchar{wx} are reserved. -A snip class name should usually have the form @scheme["((lib ...) +A snip class name should usually have the form @racket["((lib ...) (lib ...))"] to enable on-demand loading of the class. See @|snipclassdiscuss| for details. @@ -65,12 +65,12 @@ Returns the version of this snip class. When attempting to load a file @methspec{ Reads a snip from a given stream, returning a newly created snip as - the result or @scheme[#f] if there is an error. + the result or @racket[#f] if there is an error. } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -84,7 +84,7 @@ Called to read header information that may be useful for every snip session, and only if the stream contains header information for this class. -The return value is @scheme[#f] if a read error occurs or anything else +The return value is @racket[#f] if a read error occurs or anything else otherwise. See also @method[snip-class% write-header]. @@ -92,7 +92,7 @@ See also @method[snip-class% write-header]. } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -134,13 +134,13 @@ When reading the snips back in, @method[snip-class% read-header] will only be called if @method[snip-class% write-header] writes some data to the stream. -The return value is @scheme[#f] if a write error occurs or anything else +The return value is @racket[#f] if a write error occurs or anything else otherwise. } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} } diff --git a/collects/scribblings/gui/snip-class-list-intf.scrbl b/collects/scribblings/gui/snip-class-list-intf.scrbl index e6763572..b56bc961 100644 --- a/collects/scribblings/gui/snip-class-list-intf.scrbl +++ b/collects/scribblings/gui/snip-class-list-intf.scrbl @@ -3,8 +3,8 @@ @definterface/title[snip-class-list<%> ()]{ -Each eventspace has its own instance of @scheme[snip-class-list<%>], - obtained with @scheme[(get-the-snip-class-list)]. New instances +Each eventspace has its own instance of @racket[snip-class-list<%>], + obtained with @racket[(get-the-snip-class-list)]. New instances cannot be created directly. Each instance keeps a list of snip classes. This list is needed for loading snips from a file. See also @|snipclassdiscuss|. @@ -22,7 +22,7 @@ Adds a snip class to the list. If a class with the same name already (or/c (is-a?/c snip-class%) false/c)]{ Finds a snip class from the list with the given name, returning - @scheme[#f] if none is found. + @racket[#f] if none is found. } @@ -36,8 +36,8 @@ Returns an index into the list for the specified class. @defmethod[(nth [n exact-nonnegative-integer?]) (or/c (is-a?/c snip-class%) false/c)]{ -Returns the @scheme[n]th class in the list, or @scheme[#f] if - the list has @scheme[n] classes or less. +Returns the @racket[n]th class in the list, or @racket[#f] if + the list has @racket[n] classes or less. } diff --git a/collects/scribblings/gui/string-snip-class.scrbl b/collects/scribblings/gui/string-snip-class.scrbl index 2e0d5c46..42c19151 100644 --- a/collects/scribblings/gui/string-snip-class.scrbl +++ b/collects/scribblings/gui/string-snip-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[string-snip% snip% ()]{ -An instance of @scheme[string-snip%] is created automatically when +An instance of @racket[string-snip%] is created automatically when text is inserted into a text editor. See also @xmethod[text% on-new-string-snip]. @@ -11,9 +11,9 @@ An instance of @scheme[string-snip%] is created automatically when @defconstructor*/make[(([allocsize exact-nonnegative-integer? 0]) ([s string?]))]{ -Creates a string snip whose initial content is @scheme[s], if +Creates a string snip whose initial content is @racket[s], if supplied, empty otherwise. In the latter case, the optional - @scheme[allocsize] argument is a hint about how much storage space + @racket[allocsize] argument is a hint about how much storage space for text should be initially allocated by the snip. } @@ -24,8 +24,8 @@ Creates a string snip whose initial content is @scheme[s], if [pos exact-nonnegative-integer? 0]) void?]{ -Inserts @scheme[s] (with length @scheme[len]) into the snip at relative - @techlink{position} @scheme[pos] within the snip. +Inserts @racket[s] (with length @racket[len]) into the snip at relative + @techlink{position} @racket[pos] within the snip. } @@ -36,7 +36,7 @@ Inserts @scheme[s] (with length @scheme[len]) into the snip at relative Reads the snip's data from the given stream. -The @scheme[len] argument specifies the maximum length of the text to +The @racket[len] argument specifies the maximum length of the text to be read. (When a text snip is written to a file, the very first field is the length of the text contained in the snip.) This method is usually invoked by the text snip class's @method[snip-class% read] diff --git a/collects/scribblings/gui/style-delta-class.scrbl b/collects/scribblings/gui/style-delta-class.scrbl index 1e6229e0..766a9280 100644 --- a/collects/scribblings/gui/style-delta-class.scrbl +++ b/collects/scribblings/gui/style-delta-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[style-delta% object% ()]{ -A @scheme[style-delta%] object encapsulates a style change. The changes expressible +A @racket[style-delta%] object encapsulates a style change. The changes expressible by a delta include: @itemize[ @item{changing the font family} @@ -30,98 +30,98 @@ sets the internal delta information. To take full advantage of a style delta, it is necessary to understand the internal on/off settings that can be manipulated through methods such as @method[style-delta% set-weight-on]. For example, the font -weight change is specified through the @scheme[weight-on] and -@scheme[weight-off] internal settings. Roughly, @scheme[weight-on] +weight change is specified through the @racket[weight-on] and +@racket[weight-off] internal settings. Roughly, @racket[weight-on] turns on a weight setting when it is not present and -@scheme[weight-off] turns off a weight setting when it is +@racket[weight-off] turns off a weight setting when it is present. These two interact precisely in the following way: @itemize[ -@item{If both @scheme[weight-on] and @scheme[weight-off] are set to @scheme['base], +@item{If both @racket[weight-on] and @racket[weight-off] are set to @racket['base], then the font weight is not changed.} -@item{If @scheme[weight-on] is not @scheme['base], then the weight is set to -@scheme[weight-on].} -@item{If @scheme[weight-off] is not @scheme['base], then the weight will be set back -to @scheme['normal] when the base style has the weight @scheme[weight-off].} -@item{If both @scheme[weight-on] and @scheme[weight-off] are set to the same +@item{If @racket[weight-on] is not @racket['base], then the weight is set to +@racket[weight-on].} +@item{If @racket[weight-off] is not @racket['base], then the weight will be set back +to @racket['normal] when the base style has the weight @racket[weight-off].} +@item{If both @racket[weight-on] and @racket[weight-off] are set to the same value, then the weight is toggled with respect to that value: if -the base style has the weight @scheme[weight-on], then weight is changed to -@scheme['normal]; if the base style has a different weight, it is changed to -@scheme[weight-on].} -@item{If both @scheme[weight-on] and @scheme[weight-off] are set, but to -different values, then the weight is changed to @scheme[weight-on] -only when the base style has the weight @scheme[weight-off].} +the base style has the weight @racket[weight-on], then weight is changed to +@racket['normal]; if the base style has a different weight, it is changed to +@racket[weight-on].} +@item{If both @racket[weight-on] and @racket[weight-off] are set, but to +different values, then the weight is changed to @racket[weight-on] +only when the base style has the weight @racket[weight-off].} ] Font styles, smoothing, underlining, and alignment work in an analogous manner. -The possible values for @scheme[alignment-on] and @scheme[alignment-off] are: +The possible values for @racket[alignment-on] and @racket[alignment-off] are: @itemize[ -@item{@indexed-scheme['base]} -@item{@indexed-scheme['top]} -@item{@indexed-scheme['center]} -@item{@indexed-scheme['bottom]} +@item{@indexed-racket['base]} +@item{@indexed-racket['top]} +@item{@indexed-racket['center]} +@item{@indexed-racket['bottom]} ] -The possible values for @scheme[style-on] and @scheme[style-off] are: +The possible values for @racket[style-on] and @racket[style-off] are: @itemize[ -@item{@indexed-scheme['base]} -@item{@indexed-scheme['normal]} -@item{@indexed-scheme['italic]} -@item{@indexed-scheme['slant]} +@item{@indexed-racket['base]} +@item{@indexed-racket['normal]} +@item{@indexed-racket['italic]} +@item{@indexed-racket['slant]} ] -The possible values for @scheme[smoothing-on] and @scheme[smoothing-off] are: +The possible values for @racket[smoothing-on] and @racket[smoothing-off] are: @itemize[ -@item{@indexed-scheme['base]} -@item{@indexed-scheme['default]} -@item{@indexed-scheme['partly-smoothed]} -@item{@indexed-scheme['smoothed]} -@item{@indexed-scheme['unsmoothed]} +@item{@indexed-racket['base]} +@item{@indexed-racket['default]} +@item{@indexed-racket['partly-smoothed]} +@item{@indexed-racket['smoothed]} +@item{@indexed-racket['unsmoothed]} ] -The possible values for @scheme[underlined-on] and @scheme[underlined-off] are: +The possible values for @racket[underlined-on] and @racket[underlined-off] are: @itemize[ -@item{@scheme[#f] (acts like @scheme['base])} -@item{@scheme[#t]} +@item{@racket[#f] (acts like @racket['base])} +@item{@racket[#t]} ] -The possible values for @scheme[size-in-pixels-on] and @scheme[size-in-pixels-off] are: +The possible values for @racket[size-in-pixels-on] and @racket[size-in-pixels-off] are: @itemize[ -@item{@scheme[#f] (acts like @scheme['base])} -@item{@scheme[#t]} +@item{@racket[#f] (acts like @racket['base])} +@item{@racket[#t]} ] -The possible values for @scheme[transparent-text-backing-on] and -@scheme[transparent-text-backing-off] are: +The possible values for @racket[transparent-text-backing-on] and +@racket[transparent-text-backing-off] are: @itemize[ -@item{@scheme[#f] (acts like @scheme['base])} -@item{@scheme[#t]} +@item{@racket[#f] (acts like @racket['base])} +@item{@racket[#t]} ] -The possible values for @scheme[weight-on] and @scheme[weight-off] are: +The possible values for @racket[weight-on] and @racket[weight-off] are: @itemize[ -@item{@indexed-scheme['base]} -@item{@indexed-scheme['normal]} -@item{@indexed-scheme['bold]} -@item{@indexed-scheme['light]} +@item{@indexed-racket['base]} +@item{@indexed-racket['normal]} +@item{@indexed-racket['bold]} +@item{@indexed-racket['light]} ] The family and face settings in a style delta are interdependent: @itemize[ - @item{When a delta's face is @scheme[#f] and its family is - @scheme['base], then neither the face nor family are modified by + @item{When a delta's face is @racket[#f] and its family is + @racket['base], then neither the face nor family are modified by the delta.} @item{When a delta's face is a string and its family is - @scheme['base], then only face is modified by the delta.} + @racket['base], then only face is modified by the delta.} - @item{When a delta's family is not @scheme['base], then both the face + @item{When a delta's family is not @racket['base], then both the face and family are modified by the delta. If the delta's face is - @scheme[#f], then applying the delta sets a style's face to - @scheme[#f], so that the family setting prevails in choosing a + @racket[#f], then applying the delta sets a style's face to + @racket[#f], so that the family setting prevails in choosing a font.} ] @@ -164,8 +164,8 @@ The initialization arguments are passed on to Tries to collapse into a single delta the changes that would be made by applying this delta after a given delta. If the return value is - @scheme[#f], then it is impossible to perform the - collapse. Otherwise, the return value is @scheme[#t] and this delta + @racket[#f], then it is impossible to perform the + collapse. Otherwise, the return value is @racket[#t] and this delta will contain the collapsed change specification. } @@ -180,22 +180,22 @@ Copies the given style delta's settings into this one. @defmethod[(equal? [delta (is-a?/c style-delta%)]) boolean?]{ -Returns @scheme[#t] if the given delta is equivalent to this one in - all contexts or @scheme[#f] otherwise. +Returns @racket[#t] if the given delta is equivalent to this one in + all contexts or @racket[#f] otherwise. } @defmethod[(get-alignment-off) (or/c 'base 'top 'center 'bottom)]{ -See @scheme[style-delta%]. +See @racket[style-delta%]. } @defmethod[(get-alignment-on) (or/c 'base 'top 'center 'bottom)]{ -See @scheme[style-delta%]. +See @racket[style-delta%]. } @@ -203,7 +203,7 @@ See @scheme[style-delta%]. (is-a?/c add-color<%>)]{ Gets the object additive color shift for the background (applied after - the multiplicative factor). Call this @scheme[add-color<%>] object's + the multiplicative factor). Call this @racket[add-color<%>] object's methods to change the style delta's additive background color shift. } @@ -212,7 +212,7 @@ Gets the object additive color shift for the background (applied after (is-a?/c mult-color<%>)]{ Gets the multiplicative color shift for the background (applied before - the additive factor). Call this @scheme[mult-color<%>] object's + the additive factor). Call this @racket[mult-color<%>] object's methods to change the style delta's multiplicative background color shift. @@ -221,11 +221,11 @@ Gets the multiplicative color shift for the background (applied before @defmethod[(get-face) (or/c string? false/c)]{ -Gets the delta's font face string. If this string is @scheme[#f] and the - family is @indexed-scheme['base] when the delta is applied to a style, +Gets the delta's font face string. If this string is @racket[#f] and the + family is @indexed-racket['base] when the delta is applied to a style, the style's face and family are not changed. However, if the face - string is @scheme[#f] and the family is not @indexed-scheme['base], then - the style's face is changed to @scheme[#f]. + string is @racket[#f] and the family is not @indexed-racket['base], then + the style's face is changed to @racket[#f]. See also @method[style-delta% get-family]. @@ -237,15 +237,15 @@ See also @method[style-delta% get-family]. Returns the delta's font family. The possible values are @itemize[ -@item{@indexed-scheme['base] --- no change to family} -@item{@indexed-scheme['default]} -@item{@indexed-scheme['decorative]} -@item{@indexed-scheme['roman]} -@item{@indexed-scheme['script]} -@item{@indexed-scheme['swiss]} -@item{@indexed-scheme['modern] (fixed width)} -@item{@indexed-scheme['symbol] (Greek letters)} -@item{@indexed-scheme['system] (used to draw control labels)} +@item{@indexed-racket['base] --- no change to family} +@item{@indexed-racket['default]} +@item{@indexed-racket['decorative]} +@item{@indexed-racket['roman]} +@item{@indexed-racket['script]} +@item{@indexed-racket['swiss]} +@item{@indexed-racket['modern] (fixed width)} +@item{@indexed-racket['symbol] (Greek letters)} +@item{@indexed-racket['system] (used to draw control labels)} ] See also @@ -257,7 +257,7 @@ See also (is-a?/c add-color<%>)]{ Gets the additive color shift for the foreground (applied after the - multiplicative factor). Call this @scheme[add-color<%>] object's + multiplicative factor). Call this @racket[add-color<%>] object's methods to change the style delta's additive foreground color shift. } @@ -266,7 +266,7 @@ Gets the additive color shift for the foreground (applied after the (is-a?/c mult-color<%>)]{ Gets the multiplicative color shift for the foreground (applied before - the additive factor). Call this @scheme[mult-color<%>] object's + the additive factor). Call this @racket[mult-color<%>] object's methods to change the style delta's multiplicative foreground color shift. @@ -282,14 +282,14 @@ Gets the additive font size shift (applied after the multiplicative factor). @defmethod[(get-size-in-pixels-off) boolean?]{ -See @scheme[style-delta%]. +See @racket[style-delta%]. } @defmethod[(get-size-in-pixels-on) boolean?]{ -See @scheme[style-delta%]. +See @racket[style-delta%]. } @@ -303,63 +303,63 @@ Gets the multiplicative font size shift (applied before the additive factor). @defmethod[(get-smoothing-off) (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{ -See @scheme[style-delta%]. +See @racket[style-delta%]. } @defmethod[(get-smoothing-on) (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-style-off) (or/c 'base 'normal 'italic 'slant)]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-style-on) (or/c 'base 'normal 'italic 'slant)]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-transparent-text-backing-off) boolean?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-transparent-text-backing-on) boolean?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-underlined-off) boolean?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-underlined-on) boolean?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-weight-off) (or/c 'base 'normal 'bold 'light)]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(get-weight-on) (or/c 'base 'normal 'bold 'light)]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-alignment-off [v (or/c 'base 'top 'center 'bottom)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-alignment-on [v (or/c 'base 'top 'center 'bottom)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod*[([(set-delta [change-command (or/c 'change-nothing @@ -393,43 +393,43 @@ See @scheme[style-delta%]. Configures the delta with high-level specifications. The return value is the delta itself. -Except for @scheme['change-nothing] and - @scheme['change-normal], the command only changes part of the - delta. Thus, applying @scheme['change-bold] and then - @scheme['change-italic] sets the delta for both the style and +Except for @racket['change-nothing] and + @racket['change-normal], the command only changes part of the + delta. Thus, applying @racket['change-bold] and then + @racket['change-italic] sets the delta for both the style and weight change. -The @scheme[change-command] argument specifies how the delta is changed; +The @racket[change-command] argument specifies how the delta is changed; the possible values are: @itemize[ -@item{@scheme['change-nothing] --- reset all changes} -@item{@scheme['change-normal] --- turn off all styles and resizings} -@item{@scheme['change-toggle-underline] --- underline regions that are currently not underlined, and vice versa} -@item{@scheme['change-toggle-size-in-pixels] --- interpret sizes in pixels for regions that are currently interpreted in points, and vice versa} -@item{@scheme['change-normal-color] --- change the foreground and background to black and white, respectively} -@item{@scheme['change-italic] --- change the style of the font to @italic{italic}} -@item{@scheme['change-bold] --- change the weight of the font to @bold{bold}} -@item{@scheme['change-family] --- change the font family (@scheme[param] is a family; see -@scheme[font%]); see also -@method[style-delta% get-family]} @item{@scheme['change-style] --- change the style of the font (@scheme[param] is a style; see -@scheme[font%])} -@item{@scheme['change-toggle-style] --- toggle the style of the font (@scheme[param] is a style; see -@scheme[font%])} -@item{@scheme['change-weight] --- change the weight of the font (@scheme[param] is a weight; see -@scheme[font%])} -@item{@scheme['change-toggle-weight] --- toggle the weight of the font (@scheme[param] is a weight; see -@scheme[font%])} -@item{@scheme['change-smoothing] --- change the smoothing of the font (@scheme[param] is a smoothing; see -@scheme[font%])} -@item{@scheme['change-toggle-smoothing] --- toggle the smoothing of the font (@scheme[param] is a smoothing; see -@scheme[font%])} -@item{@scheme['change-alignment] --- change the alignment (@scheme[param] is an alignment; see -@scheme[style-delta%])} -@item{@scheme['change-size] --- change the size to an absolute value (@scheme[param] is a size)} -@item{@scheme['change-bigger] --- make the text larger (@scheme[param] is an additive amount)} -@item{@scheme['change-smaller] --- make the text smaller (@scheme[param] is an additive amount)} -@item{@scheme['change-underline] --- set the underline status to either underlined or plain} -@item{@scheme['change-size-in-pixels] --- set the size interpretation to pixels or points} +@item{@racket['change-nothing] --- reset all changes} +@item{@racket['change-normal] --- turn off all styles and resizings} +@item{@racket['change-toggle-underline] --- underline regions that are currently not underlined, and vice versa} +@item{@racket['change-toggle-size-in-pixels] --- interpret sizes in pixels for regions that are currently interpreted in points, and vice versa} +@item{@racket['change-normal-color] --- change the foreground and background to black and white, respectively} +@item{@racket['change-italic] --- change the style of the font to @italic{italic}} +@item{@racket['change-bold] --- change the weight of the font to @bold{bold}} +@item{@racket['change-family] --- change the font family (@racket[param] is a family; see +@racket[font%]); see also +@method[style-delta% get-family]} @item{@racket['change-style] --- change the style of the font (@racket[param] is a style; see +@racket[font%])} +@item{@racket['change-toggle-style] --- toggle the style of the font (@racket[param] is a style; see +@racket[font%])} +@item{@racket['change-weight] --- change the weight of the font (@racket[param] is a weight; see +@racket[font%])} +@item{@racket['change-toggle-weight] --- toggle the weight of the font (@racket[param] is a weight; see +@racket[font%])} +@item{@racket['change-smoothing] --- change the smoothing of the font (@racket[param] is a smoothing; see +@racket[font%])} +@item{@racket['change-toggle-smoothing] --- toggle the smoothing of the font (@racket[param] is a smoothing; see +@racket[font%])} +@item{@racket['change-alignment] --- change the alignment (@racket[param] is an alignment; see +@racket[style-delta%])} +@item{@racket['change-size] --- change the size to an absolute value (@racket[param] is a size)} +@item{@racket['change-bigger] --- make the text larger (@racket[param] is an additive amount)} +@item{@racket['change-smaller] --- make the text smaller (@racket[param] is an additive amount)} +@item{@racket['change-underline] --- set the underline status to either underlined or plain} +@item{@racket['change-size-in-pixels] --- set the size interpretation to pixels or points} ] } @@ -441,16 +441,16 @@ the possible values are: Makes the delta encode a background color change to match the absolute color given; that is, it sets the multiplicative factors to - @scheme[0.0] in the result of @method[style-delta% + @racket[0.0] in the result of @method[style-delta% get-background-mult], and it sets the additive values in the result of @method[style-delta% get-background-add] to the specified color's values. In addition, it also disables transparent text backing by - setting @scheme[transparent-text-backing-on] to @scheme[#f] and - @scheme[transparent-text-backing-off] to @scheme[#t]. + setting @racket[transparent-text-backing-on] to @racket[#f] and + @racket[transparent-text-backing-off] to @racket[#t]. The return value of the method is the delta itself. For the case that a string color name is supplied, see - @scheme[color-database<%>]. + @racket[color-database<%>]. } @@ -475,13 +475,13 @@ The return value is @this-obj[]. Makes the delta encode a foreground color change to match the absolute color given; that is, it sets the multiplicative factors to - @scheme[0.0] in the result of @method[style-delta% + @racket[0.0] in the result of @method[style-delta% get-foreground-mult], and it sets the additive values in the result of @method[style-delta% get-foreground-add] to the specified color's values. The return value of the method is the delta itself. For the case that a string color name is supplied, see - @scheme[color-database<%>]. + @racket[color-database<%>]. } @@ -508,12 +508,12 @@ after the multiplicative factor). @defmethod[(set-size-in-pixels-off [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-size-in-pixels-on [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-size-mult [v real?]) @@ -523,50 +523,50 @@ before the additive factor). @defmethod[(set-smoothing-off [v (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-smoothing-on [v (or/c 'base 'default 'partly-smoothed 'smoothed 'unsmoothed)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-style-off [v (or/c 'base 'normal 'italic 'slant)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-style-on [v (or/c 'base 'normal 'italic 'slant)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-transparent-text-backing-off [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-transparent-text-backing-on [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-underlined-off [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-underlined-on [v any/c]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-weight-off [v (or/c 'base 'normal 'bold 'light)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. } @defmethod[(set-weight-on [v (or/c 'base 'normal 'bold 'light)]) void?]{See -@scheme[style-delta%]. +@racket[style-delta%]. }} diff --git a/collects/scribblings/gui/style-intf.scrbl b/collects/scribblings/gui/style-intf.scrbl index 561b37ce..cada230c 100644 --- a/collects/scribblings/gui/style-intf.scrbl +++ b/collects/scribblings/gui/style-intf.scrbl @@ -3,10 +3,10 @@ @definterface/title[style<%> ()]{ -A @scheme[style<%>] object encapsulates drawing information (font, - color, alignment, etc.) in a hierarchical manner. A @scheme[style<%>] - object always exists within the context of a @scheme[style-list%] - object and is never created except by a @scheme[style-list%] object. +A @racket[style<%>] object encapsulates drawing information (font, + color, alignment, etc.) in a hierarchical manner. A @racket[style<%>] + object always exists within the context of a @racket[style-list%] + object and is never created except by a @racket[style-list%] object. See also @|stylediscuss|. @@ -14,8 +14,8 @@ See also @|stylediscuss|. @defmethod[(get-alignment) (one-of/c 'top 'center 'bottom)]{ -Returns the style's alignment: @scheme['top], @scheme['center], or - @scheme['bottom]. +Returns the style's alignment: @racket['top], @racket['center], or + @racket['bottom]. } @@ -32,7 +32,7 @@ Returns the style's background color. (or/c (is-a?/c style<%>) false/c)]{ Returns the style's base style. See @|stylediscuss| for more - information. The return value is @scheme[#f] only for the basic style + information. The return value is @racket[#f] only for the basic style in the list. } @@ -48,7 +48,7 @@ Mutates @racket[delta], changing it to match the style's delta, if the style is @defmethod[(get-face) (or/c string? false/c)]{ -Returns the style's face name. See @scheme[font%]. +Returns the style's face name. See @racket[font%]. } @@ -57,7 +57,7 @@ Returns the style's face name. See @scheme[font%]. (one-of/c 'default 'decorative 'roman 'script 'swiss 'modern 'symbol 'system)]{ -Returns the style's font family. See @scheme[font%]. +Returns the style's font family. See @racket[font%]. } @@ -78,8 +78,8 @@ Returns the style's foreground color. @defmethod[(get-name) (or/c string? false/c)]{ -Returns the style's name, or @scheme[#f] if it is unnamed. Style names - are only set through the style's @scheme[style-list%] object. +Returns the style's name, or @racket[#f] if it is unnamed. Style names + are only set through the style's @racket[style-list%] object. } @@ -101,22 +101,22 @@ Returns the style's font size. @defmethod[(get-size-in-pixels) boolean?]{ -Returns @scheme[#t] if the style size is in pixels, instead of points, - or @scheme[#f] otherwise. +Returns @racket[#t] if the style size is in pixels, instead of points, + or @racket[#f] otherwise. } @defmethod[(get-smoothing) (one-of/c 'default 'partly-smoothed 'smoothed 'unsmoothed)]{ -Returns the style's font smoothing. See @scheme[font%]. +Returns the style's font smoothing. See @racket[font%]. } @defmethod[(get-style) (one-of/c 'normal 'italic 'slant)]{ -Returns the style's font style. See @scheme[font%]. +Returns the style's font style. See @racket[font%]. } @@ -152,15 +152,15 @@ DC. @defmethod[(get-transparent-text-backing) boolean?]{ -Returns @scheme[#t] if text is drawn without erasing the - text background or @scheme[#f] otherwise. +Returns @racket[#t] if text is drawn without erasing the + text background or @racket[#f] otherwise. } @defmethod[(get-underlined) boolean?]{ -Returns @scheme[#t] if the style is underlined or @scheme[#f] +Returns @racket[#t] if the style is underlined or @racket[#f] otherwise. } @@ -168,14 +168,14 @@ Returns @scheme[#t] if the style is underlined or @scheme[#f] @defmethod[(get-weight) (one-of/c 'normal 'bold 'light)]{ -Returns the style's font weight. See @scheme[font%]. +Returns the style's font weight. See @racket[font%]. } @defmethod[(is-join?) boolean?]{ -Returns @scheme[#t] if the style is a join style or @scheme[#f] +Returns @racket[#t] if the style is a join style or @racket[#f] otherwise. See @|stylediscuss| for more information. } @@ -209,7 +209,7 @@ the style's font, etc. See @|stylediscuss| for more information. void?]{ Sets the font, pen color, etc. of the given drawing context. If - @scheme[oldstyle] is not @scheme[#f], only differences between the + @racket[oldstyle] is not @racket[#f], only differences between the given style and this one are applied to the drawing context. }} diff --git a/collects/scribblings/gui/style-list-class.scrbl b/collects/scribblings/gui/style-list-class.scrbl index d0f750fe..346a04f1 100644 --- a/collects/scribblings/gui/style-list-class.scrbl +++ b/collects/scribblings/gui/style-list-class.scrbl @@ -3,11 +3,11 @@ @defclass/title[style-list% object% ()]{ -A @scheme[style-list%] object contains a set of @scheme[style<%>] +A @racket[style-list%] object contains a set of @racket[style<%>] objects and maintains the hierarchical relationships between them. A - @scheme[style<%>] object can only be created through the methods of a - @scheme[style-list%] object. There is a global style list object, - @indexed-scheme[the-style-list], but any number of independent lists can be + @racket[style<%>] object can only be created through the methods of a + @racket[style-list%] object. There is a global style list object, + @indexed-racket[the-style-list], but any number of independent lists can be created for separate style hierarchies. Each editor creates its own private style list. @@ -17,7 +17,7 @@ See @|stylediscuss| for more information. @defconstructor[()]{ -The root style, named @scheme["Basic"], is automatically created. +The root style, named @racket["Basic"], is automatically created. } @@ -36,12 +36,12 @@ See also @|mrprefsdiscuss| for information about the @defmethod[(convert [style (is-a?/c style<%>)]) (is-a?/c style<%>)]{ -Converts @scheme[style], which can be from another style list, to a style -in this list. If @scheme[style] is already in this list, then @scheme[ style] -is returned. If @scheme[style] is named and a style by that name is +Converts @racket[style], which can be from another style list, to a style +in this list. If @racket[style] is already in this list, then @racket[ style] +is returned. If @racket[style] is named and a style by that name is already in this list, then the existing named style is returned. Otherwise, the style is converted by converting its base style -(and shift style if @scheme[style] is a join style) and then creating +(and shift style if @racket[style] is a join style) and then creating a new style in this list. } @@ -49,7 +49,7 @@ a new style in this list. @defmethod[(find-named-style [name string?]) (or/c (is-a?/c style<%>) false/c)]{ -Finds a style by name. If no such style can be found, @scheme[#f] is +Finds a style by name. If no such style can be found, @racket[#f] is returned. } @@ -62,7 +62,7 @@ Creates a new join style, or finds an appropriate existing one. The returned style is always unnamed. See @|stylediscuss| for more information. -The @scheme[base-style] argument must be a style within this style +The @racket[base-style] argument must be a style within this style list. } @@ -76,12 +76,12 @@ Creates a new derived style, or finds an appropriate existing one. The returned style is always unnamed. See @|stylediscuss| for more information. -The @scheme[base-style] argument must be a style within this style -list. If @scheme[base-style] is not a join style, if it has no name, -and if its delta can be collapsed with @scheme[delta] (see +The @racket[base-style] argument must be a style within this style +list. If @racket[base-style] is not a join style, if it has no name, +and if its delta can be collapsed with @racket[delta] (see @xmethod[style-delta% collapse]), then the collapsed delta is used in -place of @scheme[delta], and the base style of @scheme[base-style] is -used in place of @scheme[base-style]; this collapsing and substitution +place of @racket[delta], and the base style of @racket[base-style] is +used in place of @racket[base-style]; this collapsing and substitution of base styles is performed recursively.} @@ -90,7 +90,7 @@ of base styles is performed recursively.} See @method[style-list% notify-on-change]. -The @scheme[key] argument is the value returned by @method[style-list% +The @racket[key] argument is the value returned by @method[style-list% notify-on-change]. } @@ -99,7 +99,7 @@ notify-on-change]. @defmethod[(index-to-style [i exact-nonnegative-integer?]) (or/c (is-a?/c style<%>) false/c)]{ -Returns the style associated with the given index, or @scheme[#f] for +Returns the style associated with the given index, or @racket[#f] for a bad index. See also @method[style-list% style-to-index]. } @@ -111,13 +111,13 @@ Returns the style associated with the given index, or @scheme[#f] for Creates a new named style, unless the name is already being used. -If @scheme[name] is already being used, then @scheme[like-style] is +If @racket[name] is already being used, then @racket[like-style] is ignored and the old style associated to the name is - returned. Otherwise, a new style is created for @scheme[name] with + returned. Otherwise, a new style is created for @racket[name] with the same characteristics (i.e., the same base style and same style - delta or shift style) as @scheme[like-style]. + delta or shift style) as @racket[like-style]. -The @scheme[like-style] style must be in this style list, otherwise +The @racket[like-style] style must be in this style list, otherwise the named style is derived from the basic style with an empty style delta. @@ -132,7 +132,7 @@ Attaches a callback to the style list, retaining the callback only weakly (in Often, a change in one style will trigger a change in several other derived styles; to allow clients to handle all the changes in a - batch, @scheme[#f] is passed in as the changing style after a set of + batch, @racket[#f] is passed in as the changing style after a set of styles has been processed. The return value from @method[style-list% notify-on-change] is an @@ -163,11 +163,11 @@ Like @method[style-list% new-named-style], except that if the name is Returns the index for a particular style. The index for a style's base style (and shift style, if it is a join style) is guaranteed to be lower than the style's own index. (As a result, the root style's - index is always @scheme[0].) A style's index can change whenever a new + index is always @racket[0].) A style's index can change whenever a new style is added to the list, or the base style or shift style of another style is changed. -If the given style is not in this list, @scheme[#f] is returned. +If the given style is not in this list, @racket[#f] is returned. }} diff --git a/collects/scribblings/gui/subarea-intf.scrbl b/collects/scribblings/gui/subarea-intf.scrbl index a9e1b6ab..57ca0ea7 100644 --- a/collects/scribblings/gui/subarea-intf.scrbl +++ b/collects/scribblings/gui/subarea-intf.scrbl @@ -3,25 +3,23 @@ @definterface/title[subarea<%> (area<%>)]{ -A @scheme[subarea<%>] is a containee @scheme[area<%>]. +A @racket[subarea<%>] is a containee @racket[area<%>]. -All @scheme[subarea<%>] classes accept the following named +All @racket[subarea<%>] classes accept the following named instantiation arguments: @itemize[ - @item{@indexed-scheme[horiz-margin] --- default is @scheme[2] for - @scheme[control<%>] classes and @scheme[group-box-panel%], - @scheme[0] for others; passed to + @item{@indexed-racket[horiz-margin] --- default is @racket[2] for + @racket[control<%>] classes and @racket[group-box-panel%], + @racket[0] for others; passed to @method[subarea<%> horiz-margin]} - @item{@indexed-scheme[vert-margin] --- default is @scheme[2] for - @scheme[control<%>] classes and @scheme[group-box-panel%], - @scheme[0] for others; passed to + @item{@indexed-racket[vert-margin] --- default is @racket[2] for + @racket[control<%>] classes and @racket[group-box-panel%], + @racket[0] for others; passed to @method[subarea<%> vert-margin]} ] - - @defmethod*[([(horiz-margin) (integer-in 0 1000)] [(horiz-margin [margin (integer-in 0 1000)]) diff --git a/collects/scribblings/gui/subwindow-intf.scrbl b/collects/scribblings/gui/subwindow-intf.scrbl index 71ecd566..4a19c81d 100644 --- a/collects/scribblings/gui/subwindow-intf.scrbl +++ b/collects/scribblings/gui/subwindow-intf.scrbl @@ -3,7 +3,7 @@ @definterface/title[subwindow<%> (subarea<%> window<%>)]{ -A @scheme[subwindow<%>] is a containee window. +A @racket[subwindow<%>] is a containee window. @defmethod[(reparent [new-parent (or/c (is-a?/c frame%) (is-a?/c dialog%) (is-a?/c panel%) (is-a?/c pane%))]) diff --git a/collects/scribblings/gui/system-menu-funcs.scrbl b/collects/scribblings/gui/system-menu-funcs.scrbl index d331f140..7f19bd9d 100644 --- a/collects/scribblings/gui/system-menu-funcs.scrbl +++ b/collects/scribblings/gui/system-menu-funcs.scrbl @@ -6,31 +6,31 @@ @defproc[(current-eventspace-has-standard-menus?) boolean?]{ -Returns @scheme[#t] for Mac OS X when the current eventspace is the +Returns @racket[#t] for Mac OS X when the current eventspace is the initial one, since that eventspace is the target for the standard application menus. For any other system or eventspace, the result is - @scheme[#f]. + @racket[#f]. This procedure is intended for use in deciding whether to include a @onscreen{Quit}, @onscreen{About}, and @onscreen{Preferences} menu item in a frame's menu. On Mac OS X, the application @onscreen{Quit} menu triggers a call to a frame's @method[top-level-window<%> on-exit] method, the @onscreen{About} menu item is controlled by - @scheme[application-about-handler], and the + @racket[application-about-handler], and the @onscreen{Preferences} menu item is controlled by - @scheme[application-preferences-handler]. + @racket[application-preferences-handler]. } @defproc[(current-eventspace-has-menu-root?) boolean?]{ -Returns @scheme[#t] for Mac OS X when the current eventspace is the +Returns @racket[#t] for Mac OS X when the current eventspace is the initial one, since that eventspace can supply a menu bar to be active when no frame is visible. For any other system or eventspace, the - result is @scheme[#f]. + result is @racket[#f]. This procedure is intended for use in deciding whether to create a - @scheme[menu-bar%] instance with @scheme['root] as its parent. + @racket[menu-bar%] instance with @racket['root] as its parent. } @@ -48,7 +48,7 @@ handler thread (as a callback). The default handler displays a generic Racket dialog. If the current eventspace is not the initial eventspace, this -procedure returns @scheme[void] (when called with zero arguments) +procedure returns @racket[void] (when called with zero arguments) or has no effect (when called with a handler). } @@ -61,13 +61,13 @@ When the current eventspace is the initial eventspace, this procedure retrieves or installs a thunk that is called when the user selects the application @onscreen{Preferences} menu item on Mac OS X. The thunk is always called in the initial eventspace's handler thread (as - a callback). If the handler is set to @scheme[#f], the + a callback). If the handler is set to @racket[#f], the @onscreen{Preferences} item is disabled. -The default handler is @scheme[#f]. +The default handler is @racket[#f]. If the current eventspace is not the initial eventspace, this -procedure returns @scheme[void] (when called with zero arguments) +procedure returns @racket[void] (when called with zero arguments) or has no effect (when called with a handler). } @@ -80,7 +80,7 @@ When the current eventspace is the initial eventspace, this procedure that the application quit (e.g., through the @onscreen{Quit} menu item on Mac OS X, or when shutting down the machine in Windows). The thunk is always called in the initial eventspace's handler thread (as - a callback). If the result of the thunk is @scheme[#f], then the + a callback). If the result of the thunk is @racket[#f], then the operating system is explicitly notified that the application does not intend to quit (on Windows). @@ -88,14 +88,14 @@ The default handler queues a call to the @method[top-level-window<%> can-exit?] method of the most recently active frame in the initial eventspace (and then calls the frame's @method[top-level-window<%> on-exit] method if the - result is true). The result is @scheme[#t] if the eventspace is + result is true). The result is @racket[#t] if the eventspace is left with no open frames after - @method[top-level-window<%> on-exit] returns, @scheme[#f] + @method[top-level-window<%> on-exit] returns, @racket[#f] otherwise. If the current eventspace is not the initial eventspace, this -procedure returns @scheme[void] (when called with zero arguments) +procedure returns @racket[void] (when called with zero arguments) or has no effect (when called with a handler). } @@ -112,7 +112,7 @@ When the current eventspace is the initial eventspace, this procedure The default handler queues a callback to the @method[window<%> on-drop-file] method of the most-recently activated frame in the main eventspace (see -@scheme[get-top-level-edit-target-window]), if +@racket[get-top-level-edit-target-window]), if drag-and-drop is enabled for that frame. Otherwise, it saves the filename and re-queues the handler event when the application file handler is later changed. @@ -123,6 +123,6 @@ When the application is @italic{not} running and user double-clicks an application. If the current eventspace is not the initial eventspace, this -procedure returns @scheme[void] (when called with zero arguments) +procedure returns @racket[void] (when called with zero arguments) or has no effect (when called with a handler). } diff --git a/collects/scribblings/gui/tab-panel-class.scrbl b/collects/scribblings/gui/tab-panel-class.scrbl index 538e1fbf..cdac2829 100644 --- a/collects/scribblings/gui/tab-panel-class.scrbl +++ b/collects/scribblings/gui/tab-panel-class.scrbl @@ -5,9 +5,9 @@ A tab panel arranges its subwindows in a single column, but also includes a horizontal row of tabs at the top of the panel. See - also @scheme[panel%]. + also @racket[panel%]. -The @scheme[tab-panel%] class does not implement the virtual +The @racket[tab-panel%] class does not implement the virtual swapping of the panel content when a new tab is selected. Instead, it merely invokes a callback procedure to indicate that a user changed the tab selection. @@ -36,20 +36,20 @@ The @scheme[tab-panel%] class does not implement the virtual [stretchable-width any/c #t] [stretchable-height any/c #t])]{ -Creates a tab pane, where the @scheme[choices] list specifies the tab +Creates a tab pane, where the @racket[choices] list specifies the tab labels. -Each string in @scheme[choices] can contain an ampersand, which (in the +Each string in @racket[choices] can contain an ampersand, which (in the future) may create a mnemonic for clicking the corresponding tab. A double ampersand is converted to a single ampersand. -The @scheme[callback] procedure is called (with the event type - @indexed-scheme['tab-panel]) when the user changes the tab selection. +The @racket[callback] procedure is called (with the event type + @indexed-racket['tab-panel]) when the user changes the tab selection. -If the @scheme[style] list includes @scheme['no-border], no border is - drawn around the panel content. @DeletedStyleNote[@scheme[style] @scheme[parent]]{tab panel} +If the @racket[style] list includes @racket['no-border], no border is + drawn around the panel content. @DeletedStyleNote[@racket[style] @racket[parent]]{tab panel} -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] @@ -60,7 +60,7 @@ If the @scheme[style] list includes @scheme['no-border], no border is Adds a tab to the right end of panel's top row of tabs. -The label string @scheme[choice] can contain @litchar{&}, which (in +The label string @racket[choice] can contain @litchar{&}, which (in the future) may create a mnemonic for clicking the new tab. A @litchar{&&} is converted to @litchar{&}. @@ -69,7 +69,7 @@ The label string @scheme[choice] can contain @litchar{&}, which (in @defmethod[(delete [n exact-nonnegative-integer?]) void?]{ -Deletes an existing tab. If @scheme[n] is equal to or larger than the +Deletes an existing tab. If @racket[n] is equal to or larger than the number of tabs on the panel, @|MismatchExn|. } @@ -77,8 +77,8 @@ Deletes an existing tab. If @scheme[n] is equal to or larger than the @defmethod[(get-item-label [n exact-nonnegative-integer?]) string?]{ -Gets the label of a tab by position. Tabs are numbered from @scheme[0]. -If @scheme[n] is equal to or larger than the number of tabs in the panel, +Gets the label of a tab by position. Tabs are numbered from @racket[0]. +If @racket[n] is equal to or larger than the number of tabs in the panel, @|MismatchExn|. } @@ -94,7 +94,7 @@ Returns the number of tabs on the panel. (or/c exact-nonnegative-integer? false/c)]{ Returns the index (counting from 0) of the currently selected tab. If - the panel has no tabs, the result is @scheme[#f]. + the panel has no tabs, the result is @racket[#f]. } @@ -110,7 +110,7 @@ Removes all tabs from the panel and installs tabs with the given [label label-string?]) void?]{ -Set the label for tab @scheme[n] to @scheme[label]. If @scheme[n] is equal to +Set the label for tab @racket[n] to @racket[label]. If @racket[n] is equal to or larger than the number of tabs in the panel, @|MismatchExn|. } @@ -119,7 +119,7 @@ Set the label for tab @scheme[n] to @scheme[label]. If @scheme[n] is equal to void?]{ Sets the currently selected tab by index (counting from 0). -If @scheme[n] is equal to or larger than the number of tabs in the panel, +If @racket[n] is equal to or larger than the number of tabs in the panel, @|MismatchExn|. }} diff --git a/collects/scribblings/gui/tab-snip-class.scrbl b/collects/scribblings/gui/tab-snip-class.scrbl index 1fc9efd1..4eecd723 100644 --- a/collects/scribblings/gui/tab-snip-class.scrbl +++ b/collects/scribblings/gui/tab-snip-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[tab-snip% string-snip% ()]{ -An instance of @scheme[tab-snip%] is created automatically when a +An instance of @racket[tab-snip%] is created automatically when a tab is inserted into an editor. @@ -11,7 +11,7 @@ An instance of @scheme[tab-snip%] is created automatically when a Creates a snip for a single tab, though the tab is initially empty. -Normally, a single tab is inserted into a @scheme[tab-snip%] object +Normally, a single tab is inserted into a @racket[tab-snip%] object using the @method[string-snip% insert] method. The tab's content is not drawn, through it is used when determining diff --git a/collects/scribblings/gui/text-class.scrbl b/collects/scribblings/gui/text-class.scrbl index 9e0210b4..d2319d17 100644 --- a/collects/scribblings/gui/text-class.scrbl +++ b/collects/scribblings/gui/text-class.scrbl @@ -3,8 +3,8 @@ @defclass/title[text% object% (editor<%>)]{ -A @scheme[text%] object is a standard text editor. A text editor is - displayed on the screen through an @scheme[editor-canvas%] object or +A @racket[text%] object is a standard text editor. A text editor is + displayed on the screen through an @racket[editor-canvas%] object or some other @techlink{display}. @@ -12,20 +12,20 @@ A @scheme[text%] object is a standard text editor. A text editor is [tab-stops (listof real?) null] [auto-wrap any/c #f])]{ -The @scheme[line-spacing] argument sets the additional amount of space +The @racket[line-spacing] argument sets the additional amount of space (in DC units) inserted between each line in the editor when the editor is displayed. This spacing is included in the reported height of each line. -See @method[text% set-tabs] for information about @scheme[tabstops]. +See @method[text% set-tabs] for information about @racket[tabstops]. -If @scheme[auto-wrap] is true, then auto-wrapping is enabled via +If @racket[auto-wrap] is true, then auto-wrapping is enabled via @method[editor<%> auto-wrap]. -A new @scheme[keymap%] object is created for the new editor. See also +A new @racket[keymap%] object is created for the new editor. See also @method[editor<%> get-keymap] and @method[editor<%> set-keymap]. -A new @scheme[style-list%] object is created for the new editor. See +A new @racket[style-list%] object is created for the new editor. See also @method[editor<%> get-style-list] and @method[editor<%> set-style-list]. @@ -66,9 +66,9 @@ Called after a given range is deleted from the editor (and after the @method[editor<%> begin-edit-sequence] to avoid extra refreshes when @method[text% after-delete] modifies the editor). -The @scheme[start] argument specifies the starting @techlink{position} - of the deleted range. The @scheme[len] argument specifies number of - deleted @techlink{item}s (so @math{@scheme[start]+@scheme[len]} is +The @racket[start] argument specifies the starting @techlink{position} + of the deleted range. The @racket[len] argument specifies number of + deleted @techlink{item}s (so @math{@racket[start]+@racket[len]} is the ending @techlink{position} of the deleted range). See also @method[text% can-delete?] and @method[editor<%> @@ -94,8 +94,8 @@ Called after @techlink{item}s are inserted into the editor (and after @method[editor<%> begin-edit-sequence] to avoid extra refreshes when @method[text% after-insert] modifies the editor). -The @scheme[start] argument specifies the @techlink{position} of the insert. The - @scheme[len] argument specifies the total length (in @techlink{position}s) of +The @racket[start] argument specifies the @techlink{position} of the insert. The + @racket[len] argument specifies the total length (in @techlink{position}s) of the inserted @techlink{item}s. See also @method[text% can-insert?] and @method[editor<%> @@ -117,10 +117,10 @@ Does nothing. Called after adjacent snips in the editor are combined into one. -The @scheme[pos] argument specifies the @techlink{position} within the editor +The @racket[pos] argument specifies the @techlink{position} within the editor where the snips were merged (i.e., one old snip was just before - @scheme[pos], one old was just after @scheme[pos], and the new snip spans - @scheme[pos]). + @racket[pos], one old was just after @racket[pos], and the new snip spans + @racket[pos]). See also @method[snip% merge-with]. @@ -185,7 +185,7 @@ Called after a snip in the editor is split into two, either through a call to @method[text% split-snip] or during some other action, such as inserting. -The @scheme[pos] argument specifies the @techlink{position} within the editor +The @racket[pos] argument specifies the @techlink{position} within the editor where a snip was split. } @@ -213,7 +213,7 @@ Simulates a user click that invokes a clickback, if the given range of @methspec{ Called before the style is changed in a given range of the editor. If - the return value is @scheme[#f], then the style change will be + the return value is @racket[#f], then the style change will be aborted. The editor is internally locked for writing during a call to this @@ -226,7 +226,7 @@ See also @method[text% on-change-style], @method[text% } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. } } @@ -238,12 +238,12 @@ Returns @scheme[#t]. @methspec{ Called before a range is deleted from the editor. -If the return value is @scheme[#f], then the +If the return value is @racket[#f], then the delete will be aborted. -The @scheme[start] argument specifies the starting @techlink{position} - of the range to delete. The @scheme[len] argument specifies number of - @techlink{item}s to delete (so @math{@scheme[start]+@scheme[len]} is +The @racket[start] argument specifies the starting @techlink{position} + of the range to delete. The @racket[len] argument specifies number of + @techlink{item}s to delete (so @math{@racket[start]+@racket[len]} is the ending @techlink{position} of the range to delete). The editor is internally locked for writing during a call to this method @@ -256,7 +256,7 @@ See also @method[text% on-delete], @method[text% after-delete], and } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -267,10 +267,10 @@ Returns @scheme[#t]. @methspec{ Called before @techlink{item}s are inserted into the editor. If the - return value is @scheme[#f], then the insert will be aborted. + return value is @racket[#f], then the insert will be aborted. -The @scheme[start] argument specifies the @techlink{position} of the potential - insert. The @scheme[len] argument specifies the total length (in +The @racket[start] argument specifies the @techlink{position} of the potential + insert. The @racket[len] argument specifies the total length (in @techlink{position}s) of the @techlink{item}s to be inserted. The editor is internally locked for writing during a call to this @@ -283,7 +283,7 @@ See also @method[text% on-insert], @method[text% after-insert], and } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -295,7 +295,7 @@ Returns @scheme[#t]. @methspec{ Called before the editor's maximum or minimum height or width -is changed. If the return value is @scheme[#f], then the +is changed. If the return value is @racket[#f], then the change will be aborted. (This callback method is provided because setting an editor's maximum @@ -307,7 +307,7 @@ See also @method[text% on-set-size-constraint], @method[text% } @methimpl{ -Returns @scheme[#t]. +Returns @racket[#t]. }} @@ -315,7 +315,7 @@ Returns @scheme[#t]. @defmethod[(caret-hidden?) boolean?]{ -Returns @scheme[#t] if the caret is hidden for this editor or @scheme[#f] +Returns @racket[#t] if the caret is hidden for this editor or @racket[#f] otherwise. See also @method[text% hide-caret]. @@ -335,22 +335,22 @@ See also @method[text% hide-caret]. void?])]{ Changes the style for a region in the editor by applying a style delta - or installing a specific style. If @scheme[start] is @scheme['start] - and @scheme[end] is @scheme['end], then the currently selected - @techlink{item}s are changed. Otherwise, if @scheme[end] is - @scheme['end], then the style is changed from @scheme[start] until - the end of the selection. If @scheme[counts-as-mod?] is @scheme[#f], + or installing a specific style. If @racket[start] is @racket['start] + and @racket[end] is @racket['end], then the currently selected + @techlink{item}s are changed. Otherwise, if @racket[end] is + @racket['end], then the style is changed from @racket[start] until + the end of the selection. If @racket[counts-as-mod?] is @racket[#f], 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 + consider providing a @racket[style<%>] instance rather than a + @racket[style-delta%] instance. Otherwise, @method[text% + change-style] must convert the @racket[style-delta%] instance to the + @racket[style<%>] instance for every snip; this conversion consumes both time and (temporary) memory. -When @scheme[style] is provided: @InStyleListNote[@scheme[style]] +When @racket[style] is provided: @InStyleListNote[@racket[style]] } @@ -362,13 +362,13 @@ When @scheme[style] is provided: @InStyleListNote[@scheme[style]] [end (or/c exact-nonnegative-integer? 'end) 'end]) void?]{ -Copies specified range of text into the clipboard. If @scheme[extend?] is - not @scheme[#f], the old clipboard contents are appended. If - @scheme[start] is @scheme['start] or @scheme[end] is @scheme['end], then the +Copies specified range of text into the clipboard. If @racket[extend?] is + not @racket[#f], the old clipboard contents are appended. If + @racket[start] is @racket['start] or @racket[end] is @racket['end], then the current selection start/end is used. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -381,7 +381,7 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If In addition to the default @xmethod[editor<%> copy-self-to] work, this editor's file format, wordbreak function, wordbreak map, click-between-threshold, caret visibility state, overwrite mode - state, and autowrap bitmap are installed into @scheme[dest]. + state, and autowrap bitmap are installed into @racket[dest]. } @@ -393,13 +393,13 @@ In addition to the default @xmethod[editor<%> copy-self-to] work, [end (or/c exact-nonnegative-integer? 'end) 'end]) void?]{ -Copies and then deletes the specified range. If @scheme[extend?] is not - @scheme[#f], the old clipboard contents are appended. If @scheme[start] is - @scheme['start] or @scheme[end] is @scheme['end], then the current +Copies and then deletes the specified range. If @racket[extend?] is not + @racket[#f], the old clipboard contents are appended. If @racket[start] is + @racket['start] or @racket[end] is @racket['end], then the current selection start/end is used. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -413,11 +413,11 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If void?])]{ Deletes the specified range or the currently selected text (when no - range is provided) in the editor. If @scheme[start] is - @scheme['start], then the starting selection @techlink{position} is - used; if @scheme[end] is @scheme['back], then only the character - preceding @scheme[start] is deleted. If @scheme[scroll-ok?] is not - @scheme[#f] and @scheme[start] is the same as the current caret + range is provided) in the editor. If @racket[start] is + @racket['start], then the starting selection @techlink{position} is + used; if @racket[end] is @racket['back], then only the character + preceding @racket[start] is deleted. If @racket[scroll-ok?] is not + @racket[#f] and @racket[start] is the same as the current caret @techlink{position}, then the editor's @techlink{display} may be scrolled to show the new selection @techlink{position}. @@ -439,15 +439,15 @@ Called to copy a region of the editor into the clipboard. This method is provided so that it can be overridden by subclasses. Do not call this method directly; instead, call @method[text% copy]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @methimpl{ -Copy the data from @scheme[start] to @scheme[end], extending the current - clipboard contexts if @scheme[extend?] is not @scheme[#f]. +Copy the data from @racket[start] to @racket[end], extending the current + clipboard contexts if @racket[extend?] is not @racket[#f]. }} @@ -461,14 +461,14 @@ Called to paste the current contents of the clipboard into the editor. This method is provided so that it can be overridden by subclasses. Do not call this method directly; instead, call @method[text% paste]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @methimpl{ -Pastes into the @techlink{position} @scheme[start]. +Pastes into the @techlink{position} @racket[start]. }} @@ -483,14 +483,14 @@ Called to paste the current contents of the X11 selection on Unix (or the provided so that it can be overridden by subclasses. Do not call this method directly; instead, call @method[text% paste-x-selection]. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @methimpl{ -Pastes into the @techlink{position} @scheme[start]. +Pastes into the @techlink{position} @racket[start]. }} @@ -525,10 +525,10 @@ See also @method[text% delete]. Given a @techlink{location} in the editor, returns the line at the @techlink{location}. @|LineNumbering| -@boxisfillnull[(scheme on-it?) @elem{@scheme[#t] if the line actually - touches this @techlink{position}, or @scheme[#f] otherwise}] (A large - enough @scheme[y] will always return the last line number, but will - set @scheme[on-it?] to @scheme[#f].) +@boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually + touches this @techlink{position}, or @racket[#f] otherwise}] (A large + enough @racket[y] will always return the last line number, but will + set @racket[on-it?] to @racket[#f].) @|OVD| @|FCA| @@ -548,10 +548,10 @@ break (possibly more efficiently than searching text).} (or/c (is-a?/c snip%) #f)]{ Given a snip, returns the next snip in the editor (after the given - one) that is not an instance of @scheme[string-snip%]. If - @scheme[#f] is given as the snip, the result is the first non-string + one) that is not an instance of @racket[string-snip%]. If + @racket[#f] is given as the snip, the result is the first non-string snip in the editor (if any). If no non-string snip is found after the - given snip, the result is @scheme[#f]. + given snip, the result is @racket[#f]. } @@ -566,9 +566,9 @@ Given a snip, returns the next snip in the editor (after the given Given a @techlink{location} in the editor, returns the @techlink{position} at the @techlink{location}. -See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument. - @boxisfillnull[(scheme on-it?) @elem{@scheme[#t] if the line actually touches this - @techlink{position}, or @scheme[#f] otherwise}] +See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument. + @boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually touches this + @techlink{position}, or @racket[#f] otherwise}] @boxisfillnull[(scheme edge-close?) @elem{it will be filled in with a value indicating how close the point is to the vertical edges of the @techlink{item} @@ -593,12 +593,12 @@ See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument. Given a @techlink{location} within a line of the editor, returns the @techlink{position} at the @techlink{location}. @|LineNumbering| -See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument. - @boxisfillnull[(scheme on-it?) @elem{@scheme[#t] if the line actually - touches this @techlink{position}, or @scheme[#f] otherwise}] +See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument. + @boxisfillnull[(scheme on-it?) @elem{@racket[#t] if the line actually + touches this @techlink{position}, or @racket[#f] otherwise}] See @method[text% find-position] for a discussion of - @scheme[edge-close?]. + @racket[edge-close?]. @|OVD| @|FCA| @@ -610,25 +610,25 @@ See @method[text% find-position] for a discussion of [s-pos (or/c (box/c exact-nonnegative-integer?) #f) #f]) (or/c (is-a?/c snip%) #f)]{ -Returns the snip at a given @techlink{position}, or @scheme[#f] if an appropriate +Returns the snip at a given @techlink{position}, or @racket[#f] if an appropriate snip cannot be found. -If the @techlink{position} @scheme[pos] is between -two snips, @scheme[direction] specifies which snip to return; @scheme[direction] +If the @techlink{position} @racket[pos] is between +two snips, @racket[direction] specifies which snip to return; @racket[direction] can be any of the following: @itemize[ - @item{@scheme['before-or-none] --- returns the snip before the - @techlink{position}, or @scheme[#f] if @scheme[pos] is @scheme[0]} + @item{@racket['before-or-none] --- returns the snip before the + @techlink{position}, or @racket[#f] if @racket[pos] is @racket[0]} - @item{@scheme['before] --- returns the snip before the @techlink{position}, - or the first snip if @scheme[pos] is @scheme[0]} + @item{@racket['before] --- returns the snip before the @techlink{position}, + or the first snip if @racket[pos] is @racket[0]} - @item{@scheme['after] --- returns the snip after the @techlink{position}, or - the last snip if @scheme[pos] is the last @techlink{position}} + @item{@racket['after] --- returns the snip after the @techlink{position}, or + the last snip if @racket[pos] is the last @techlink{position}} - @item{@scheme['after-or-none] -- returns the snip after the - @techlink{position}, or @scheme[#f] if @scheme[pos] is the last @techlink{position} or larger} + @item{@racket['after-or-none] -- returns the snip after the + @techlink{position}, or @racket[#f] if @racket[pos] is the last @techlink{position} or larger} ] @@ -646,24 +646,24 @@ can be any of the following: (or/c exact-nonnegative-integer? #f)]{ Finds an exact-match string in the editor and returns its @techlink{position}. - If the string is not found, @scheme[#f] is returned. + If the string is not found, @racket[#f] is returned. -The @scheme[direction] argument can be @scheme['forward] or - @scheme['backward], indicating a forward search or backward +The @racket[direction] argument can be @racket['forward] or + @racket['backward], indicating a forward search or backward search respectively. In the case of a forward search, the return value is the starting @techlink{position} of the string; for a backward search, - the ending @techlink{position} is returned. However, if @scheme[get-start?] is - @scheme[#f], then the other end of the string @techlink{position} will be + the ending @techlink{position} is returned. However, if @racket[get-start?] is + @racket[#f], then the other end of the string @techlink{position} will be returned. -The @scheme[start] and @scheme[end] arguments set the starting and ending - @techlink{position}s of a forward search (use @scheme[start] > @scheme[end] for a - backward search). If @scheme[start] is @scheme['start], then the search - starts at the start of the selection. If @scheme[end] is @scheme['eof], +The @racket[start] and @racket[end] arguments set the starting and ending + @techlink{position}s of a forward search (use @racket[start] > @racket[end] for a + backward search). If @racket[start] is @racket['start], then the search + starts at the start of the selection. If @racket[end] is @racket['eof], then the search continues to the end (for a forward search) or start (for a backward search) of the editor. -If @scheme[case-sensitive?] is @scheme[#f], then an uppercase and lowercase +If @racket[case-sensitive?] is @racket[#f], then an uppercase and lowercase of each alphabetic character are treated as equivalent. } @@ -692,34 +692,34 @@ Finds all occurrences of a string using @method[text% find-string]. If Finds wordbreaks in the editor using the current wordbreak procedure. See also @method[text% set-wordbreak-func]. -The contents of the @scheme[start] argument specifies an @techlink{position} to start +The contents of the @racket[start] argument specifies an @techlink{position} to start searching backwards to the next word start; its will be filled with - the starting @techlink{position} of the word that is found. If @scheme[start] is - @scheme[#f], no backward search is performed. + the starting @techlink{position} of the word that is found. If @racket[start] is + @racket[#f], no backward search is performed. -The contents of the @scheme[end] argument specifies an @techlink{position} to start +The contents of the @racket[end] argument specifies an @techlink{position} to start searching forwards to the next word end; its will be filled with the - ending @techlink{position} of the word that is found. If @scheme[end] is - @scheme[#f], no forward search is performed. + ending @techlink{position} of the word that is found. If @racket[end] is + @racket[#f], no forward search is performed. -The @scheme[reason] argument specifies more information about what the +The @racket[reason] argument specifies more information about what the wordbreak is used for. For example, the wordbreaks used to move the caret may be different from the wordbreaks used to break lines. The - possible values of @scheme[reason] are: + possible values of @racket[reason] are: @itemize[ -@item{@scheme['caret] --- find a wordbreak suitable for moving the caret} -@item{@scheme['line] --- find a wordbreak suitable for breaking lines} -@item{@scheme['selection] --- find a wordbreak suitable for selecting the closest word} -@item{@scheme['user1] --- for other (not built-in) uses} -@item{@scheme['user2] --- for other (not built-in) uses} +@item{@racket['caret] --- find a wordbreak suitable for moving the caret} +@item{@racket['line] --- find a wordbreak suitable for breaking lines} +@item{@racket['selection] --- find a wordbreak suitable for selecting the closest word} +@item{@racket['user1] --- for other (not built-in) uses} +@item{@racket['user2] --- for other (not built-in) uses} ] -The actual handling of @scheme[reason] is controlled by the current +The actual handling of @racket[reason] is controlled by the current wordbreak procedure; see @method[text% set-wordbreak-func]for details. The default handler and default wordbreak map treats - alphanumeric characters the same for @scheme['caret], @scheme['line], - and @scheme['selection]. Non-alphanumeric, non-space, non-hyphen + alphanumeric characters the same for @racket['caret], @racket['line], + and @racket['selection]. Non-alphanumeric, non-space, non-hyphen characters do not break lines, but do break caret and selection words. For example a comma should not be counted as part of the preceding word for moving the caret past the word or double-clicking @@ -749,9 +749,9 @@ Turns off the hiliting and shows the normal selection range again; see Temporarily hilites a region in the editor without changing the current selection. -See @|ateoldiscuss| for a discussion of the @scheme[at-eol?] argument. If - @scheme[scroll?] is not @scheme[#f], the editor's @techlink{display} will be scrolled - if necessary to show the hilited region. If @scheme[timeout] is greater +See @|ateoldiscuss| for a discussion of the @racket[at-eol?] argument. If + @racket[scroll?] is not @racket[#f], the editor's @techlink{display} will be scrolled + if necessary to show the hilited region. If @racket[timeout] is greater than 0, then the hiliting will be automatically turned off after the given number of milliseconds. @@ -763,7 +763,7 @@ See also @method[text% flash-off]. @defmethod[(get-anchor) boolean?]{ -Returns @scheme[#t] if the selection is currently auto-extending. See +Returns @racket[#t] if the selection is currently auto-extending. See also @method[text% set-anchor]. } @@ -785,11 +785,11 @@ See also @method[text% set-between-threshold]. char?]{ Returns the character following the @techlink{position} - @scheme[start]. The character corresponds to getting non-flattened + @racket[start]. The character corresponds to getting non-flattened text from the editor. -If @scheme[start] is greater than or equal to the last - @techlink{position}, @scheme[#\nul] is returned. +If @racket[start] is greater than or equal to the last + @techlink{position}, @racket[#\nul] is returned. } @@ -834,7 +834,7 @@ Returns the spacing inserted by the editor between each line. This @defmethod[(get-overwrite-mode) boolean?]{ -Returns @scheme[#t] if the editor is in overwrite mode, @scheme[#f] +Returns @racket[#t] if the editor is in overwrite mode, @racket[#f] otherwise. Overwrite mode only affects the way that @method[editor<%> on-default-char] handles keyboard input for insertion characters. See also @method[text% set-overwrite-mode]. @@ -858,7 +858,7 @@ See also @method[text% set-padding].} void?]{ Returns the current selection range in @techlink{position}s. If -nothing is selected, the @scheme[start] and @scheme[end] will be +nothing is selected, the @racket[start] and @racket[end] will be the same number and that number will be where the insertion point is. See also @method[text% get-start-position] @@ -906,7 +906,7 @@ Returns an inexact number that increments every time the editor is (or/c exact-nonnegative-integer? #f)]{ Returns the starting @techlink{position} of a given snip or - @scheme[#f] if the snip is not in this editor. + @racket[#f] if the snip is not in this editor. } @@ -918,12 +918,12 @@ Returns the starting @techlink{position} of a given snip or boolean?]{ Gets a snip's @techlink{position} and top left @techlink{location} in editor - coordinates. The return value is @scheme[#t] if the snip is found, - @scheme[#f] otherwise. + coordinates. The return value is @racket[#t] if the snip is found, + @racket[#f] otherwise. -@boxisfillnull[(scheme pos) @elem{starting @techlink{position} of @scheme[snip]}] -@boxisfillnull[(scheme x) @elem{left @techlink{location} of @scheme[snip] in editor coordinates}] -@boxisfillnull[(scheme y) @elem{top @techlink{location} of @scheme[snip] in editor coordinates}] +@boxisfillnull[(scheme pos) @elem{starting @techlink{position} of @racket[snip]}] +@boxisfillnull[(scheme x) @elem{left @techlink{location} of @racket[snip] in editor coordinates}] +@boxisfillnull[(scheme y) @elem{top @techlink{location} of @racket[snip] in editor coordinates}] When @techlink{location} information is requested: @|OVD| @|FCA| @@ -972,8 +972,8 @@ Returns the current tab-position array as a list. list)}] @boxisfillnull[(scheme tab-width) @elem{the width used for tabs past the end of the tab array}] -@boxisfillnull[(scheme in-units) @elem{@scheme[#t] if the tabs are specified in -canvas units or @scheme[#f] if they are specified in space-widths}] +@boxisfillnull[(scheme in-units) @elem{@racket[#t] if the tabs are specified in +canvas units or @racket[#f] if they are specified in space-widths}] See also @method[text% set-tabs]. @@ -987,16 +987,16 @@ See also [force-cr? any/c #f]) string?]{ -Gets the text from @scheme[start] to @scheme[end]. If @scheme[end] is - @scheme['eof], then the contents are returned from @scheme[start] until the +Gets the text from @racket[start] to @racket[end]. If @racket[end] is + @racket['eof], then the contents are returned from @racket[start] until the end of the editor. -If @scheme[flattened?] is not @scheme[#f], then flattened text is returned. +If @racket[flattened?] is not @racket[#f], then flattened text is returned. See @|textdiscuss| for a discussion of flattened vs. non-flattened text. -If @scheme[force-cr?] is not @scheme[#f] and @scheme[flattened?] is not - @scheme[#f], then automatic carriage returns (from word-wrapping) are +If @racket[force-cr?] is not @racket[#f] and @racket[flattened?] is not + @racket[#f], then automatic carriage returns (from word-wrapping) are written into the return string as real carriage returns. } @@ -1027,8 +1027,8 @@ Returns the range of lines which are currently visible (or partially @boxisfillnull[(scheme start) @elem{first line visible to the user}] @boxisfillnull[(scheme end) @elem{last line visible to the user}] -If the editor is displayed by multiple canvases and @scheme[all?] is - @scheme[#t], then the computed range includes all visible lines in all +If the editor is displayed by multiple canvases and @racket[all?] is + @racket[#t], then the computed range includes all visible lines in all @techlink{display}s. Otherwise, the range includes only the visible lines in the current @techlink{display}. @@ -1048,8 +1048,8 @@ Returns the range of @techlink{position}s that are currently visible (or @boxisfillnull[(scheme start) @elem{first @techlink{position} visible to the user}] @boxisfillnull[(scheme end) @elem{last @techlink{position} visible to the user}] -If the editor is displayed by multiple canvases and @scheme[all?] is - @scheme[#t], then the computed range includes all visible @techlink{position}s in +If the editor is displayed by multiple canvases and @racket[all?] is + @racket[#t], then the computed range includes all visible @techlink{position}s in all @techlink{display}s. Otherwise, the range includes only the visible @techlink{position}s in the current @techlink{display}. @@ -1063,7 +1063,7 @@ If the editor is displayed by multiple canvases and @scheme[all?] is Returns the wordbreaking map that is used by the standard wordbreaking function. See @method[text% set-wordbreak-map] and - @scheme[editor-wordbreak-map%] for more information. + @racket[editor-wordbreak-map%] for more information. } @@ -1074,7 +1074,7 @@ Returns the wordbreaking map that is used by the standard wordbreaking Determines whether the caret is shown when the editor has the keyboard focus. -If @scheme[hide?] is not @scheme[#f], then the caret or selection hiliting +If @racket[hide?] is not @racket[#f], then the caret or selection hiliting will not be drawn for the editor. The editor can still own the keyboard focus, but no caret will be drawn to indicate the focus. @@ -1117,32 +1117,32 @@ See also @method[text% caret-hidden?] and @method[editor<%> lock]. void?])]{ Inserts text or a snip into @this-obj[] at @techlink{position} - @scheme[start]. If @scheme[n] is provided, the only the first - @scheme[n] characters of @scheme[str] are inserted. + @racket[start]. If @racket[n] is provided, the only the first + @racket[n] characters of @racket[str] are inserted. -When a @scheme[snip] is provided: The snip cannot be inserted into +When a @racket[snip] is provided: The snip cannot be inserted into multiple editors or multiple times within a single editor. As the snip is inserted, its current style is converted to one in the editor's style list; see also @method[style-list% convert]. -When a @scheme[char] is provided: @|insertcharundos| +When a @racket[char] is provided: @|insertcharundos| -When @scheme[start] is not provided, the current selection start is +When @racket[start] is not provided, the current selection start is used. If the current selection covers a range of @techlink{item}s, - then @scheme[char] replaces the selected text. The selection's start + then @racket[char] replaces the selected text. The selection's start and end @techlink{position}s are moved to the end of the inserted character. -For a case where @scheme[end] is not provided and has no default, the - current selection end is used. Otherwise, if @scheme[end] is not - @scheme['same], then the inserted value replaces the region from - @scheme[start] to @scheme[end], and the selection is left at the end +For a case where @racket[end] is not provided and has no default, the + current selection end is used. Otherwise, if @racket[end] is not + @racket['same], then the inserted value replaces the region from + @racket[start] to @racket[end], and the selection is left at the end of the inserted text. Otherwise, if the insertion @techlink{position} is before or equal to the selection's start/end @techlink{position}, then the selection's start/end @techlink{position} is incremented by - the length of @scheme[str]. + the length of @racket[str]. -If @scheme[scroll-ok?] is not @scheme[#f] and @scheme[start] is the +If @racket[scroll-ok?] is not @racket[#f] and @racket[start] is the same as the current selection's start @techlink{position}, then the editor's @techlink{display} is scrolled to show the new selection @techlink{position}. @@ -1160,13 +1160,13 @@ See also @method[text% get-styles-sticky]. [end exact-nonnegative-integer?]) void?])]{ -Cuts the text in the given region. If @scheme[start] and @scheme[end] +Cuts the text in the given region. If @racket[start] and @racket[end] are not supplied, then the selected region plus all whitespace to the end of line is cut; the newline is also cut if only whitespace exists between the selection and the end of line. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -1176,7 +1176,7 @@ See @|timediscuss| for a discussion of the @scheme[time] argument. If exact-nonnegative-integer?]{ Returns the number of the last line in the editor. Lines are numbered - starting with @scheme[0], so this is one less than the number of lines + starting with @racket[0], so this is one less than the number of lines in the editor. @LineToPara[(scheme last-paragraph)] @@ -1189,7 +1189,7 @@ Returns the number of the last line in the editor. Lines are numbered exact-nonnegative-integer?]{ Returns the number of the last paragraph in the editor. Paragraphs are - numbered starting with @scheme[0], so this is one less than the + numbered starting with @racket[0], so this is one less than the number of paragraphs in the editor. @|FCAMW| @@ -1210,12 +1210,12 @@ Returns the last selection @techlink{position} in the editor. This is Returns the last @techlink{position} of a given line. @|LineNumbering| -If there are fewer than @math{@scheme[line]-1} lines, the end of the - last line is returned. If @scheme[line] is less than 0, then the end +If there are fewer than @math{@racket[line]-1} lines, the end of the + last line is returned. If @racket[line] is less than 0, then the end of the first line is returned. If the line ends with invisible @techlink{item}s (such as a carriage - return) and @scheme[visible?] is not @scheme[#f], the first + return) and @racket[visible?] is not @racket[#f], the first @techlink{position} before the invisible @techlink{item}s is returned. @@ -1243,7 +1243,7 @@ line. @|LineNumbering| Given a line number, returns the @techlink{location} of the line. @|LineNumbering| -If @scheme[top?] is not @scheme[#f], the @techlink{location} for the +If @racket[top?] is not @racket[#f], the @techlink{location} for the top of the line is returned; otherwise, the @techlink{location} for the bottom of the line is returned. @@ -1269,12 +1269,12 @@ Returns the paragraph number of the paragraph containing the line. Returns the first @techlink{position} of the given line. @|LineNumbering| -If there are fewer than @math{@scheme[line]-1} lines, the start of the -last line is returned. If @scheme[line] is less than 0, then +If there are fewer than @math{@racket[line]-1} lines, the start of the +last line is returned. If @racket[line] is less than 0, then the start of the first line is returned. -If the line starts with invisible @techlink{item}s and @scheme[visible?] is not - @scheme[#f], the first @techlink{position} past the invisible @techlink{item}s is +If the line starts with invisible @techlink{item}s and @racket[visible?] is not + @racket[#f], the first @techlink{position} past the invisible @techlink{item}s is returned. @LineToPara[(scheme paragraph-start-position)] @@ -1309,30 +1309,30 @@ then this method ignores the editor's maximum width and any automatic Moves the current selection. -The possible values for @scheme[code] are: +The possible values for @racket[code] are: @itemize[ -@item{@scheme['home] --- go to start of file} -@item{@scheme['end] --- go to end of file} -@item{@scheme['right] --- move right} -@item{@scheme['left] --- move left} -@item{@scheme['up] --- move up} -@item{@scheme['down] --- move down} +@item{@racket['home] --- go to start of file} +@item{@racket['end] --- go to end of file} +@item{@racket['right] --- move right} +@item{@racket['left] --- move left} +@item{@racket['up] --- move up} +@item{@racket['down] --- move down} ] -If @scheme[extend?] is not @scheme[#f], the selection range is +If @racket[extend?] is not @racket[#f], the selection range is extended instead of moved. If anchoring is on (see @method[text% - get-anchor] and @method[text% set-anchor]), then @scheme[extend?] is - effectively forced to @scheme[#t]. See also @method[text% get-extend-start-position] + get-anchor] and @method[text% set-anchor]), then @racket[extend?] is + effectively forced to @racket[#t]. See also @method[text% get-extend-start-position] and @method[text% get-extend-end-position]. -The possible values for @scheme[kind] are: +The possible values for @racket[kind] are: @itemize[ -@item{@scheme['simple] --- move one item or line} -@item{@scheme['word] --- works with @scheme['right] or @scheme['left]} -@item{@scheme['page] --- works with @scheme['up] or @scheme['down]} -@item{@scheme['line] --- works with @scheme['right] or @scheme['left]; moves to the start or end of the line} +@item{@racket['simple] --- move one item or line} +@item{@racket['word] --- works with @racket['right] or @racket['left]} +@item{@racket['page] --- works with @racket['up] or @racket['down]} +@item{@racket['line] --- works with @racket['right] or @racket['left]; moves to the start or end of the line} ] See also @method[text% set-position]. @@ -1381,13 +1381,13 @@ Handles the following: shifted versions) --- moves the selection @techlink{position} with @method[text% move-position].} - @item{Any other character in the range @scheme[(integer->char 32)] to - @scheme[(integer->char 255)] --- inserts the character into the + @item{Any other character in the range @racket[(integer->char 32)] to + @racket[(integer->char 255)] --- inserts the character into the editor.} ] -Note that an editor's @scheme[editor-canvas%] normally handles mouse +Note that an editor's @racket[editor-canvas%] normally handles mouse wheel events (see also @method[editor-canvas% on-char] ). } @@ -1429,9 +1429,9 @@ Called before a range is deleted from the editor, after @method[text% @method[text% after-delete] method is guaranteed to be called after the delete has completed. -The @scheme[start] argument specifies the starting @techlink{position} - of the range to delete. The @scheme[len] argument specifies number of - @techlink{item}s to delete (so @math{@scheme[start]+@scheme[len]} is +The @racket[start] argument specifies the starting @techlink{position} + of the range to delete. The @racket[len] argument specifies number of + @techlink{item}s to delete (so @math{@racket[start]+@racket[len]} is the ending @techlink{position} of the range to delete). The editor is internally locked for writing during a call to this @@ -1460,8 +1460,8 @@ Called before @techlink{item}s are inserted into the editor, after ok. The @method[text% after-insert] method is guaranteed to be called after the insert has completed. -The @scheme[start] argument specifies the @techlink{position} of the insert. The - @scheme[len] argument specifies the total length (in @techlink{position}s) of the +The @racket[start] argument specifies the @techlink{position} of the insert. The + @racket[len] argument specifies the total length (in @techlink{position}s) of the @techlink{item}s to be inserted. The editor is internally locked for writing during a call to this @@ -1485,13 +1485,13 @@ Does nothing. Called by @method[text% insert] when a string or character is inserted into the editor, this method creates and returns a new instance of -@scheme[string-snip%] to store inserted text. The returned string snip +@racket[string-snip%] to store inserted text. The returned string snip is empty (i.e., its @techlink{count} is zero). } @methimpl{ -Returns a @scheme[string-snip%] instance. +Returns a @racket[string-snip%] instance. }} @@ -1500,14 +1500,14 @@ Returns a @scheme[string-snip%] instance. @methspec{ -Creates and returns a new instance of @scheme[tab-snip%] to store an +Creates and returns a new instance of @racket[tab-snip%] to store an inserted tab. The returned tab snip is empty (i.e., its @techlink{count} is zero). } @methimpl{ -Returns a @scheme[tab-snip%] instance. +Returns a @racket[tab-snip%] instance. }} @@ -1565,12 +1565,12 @@ Returns the ending line of a given paragraph. @|ParagraphNumbering| @|LineNumber Returns the ending @techlink{position} of a given paragraph. @|ParagraphNumbering| -If there are fewer than @math{@scheme[paragraph]-1} paragraphs, the - end of the last paragraph is returned. If @scheme[paragraph] is less +If there are fewer than @math{@racket[paragraph]-1} paragraphs, the + end of the last paragraph is returned. If @racket[paragraph] is less than 0, then the end of the first paragraph is returned. If the paragraph ends with invisible @techlink{item}s (such as a carriage - return) and @scheme[visible?] is not @scheme[#f], the first @techlink{position} + return) and @racket[visible?] is not @racket[#f], the first @techlink{position} before the invisible @techlink{item}s is returned. } @@ -1579,7 +1579,7 @@ If the paragraph ends with invisible @techlink{item}s (such as a carriage @defmethod[(paragraph-start-line [paragraph exact-nonnegative-integer?]) exact-nonnegative-integer?]{ -Returns the starting line of a given paragraph. If @scheme[paragraph] +Returns the starting line of a given paragraph. If @racket[paragraph] is greater than the highest-numbered paragraph, then the editor's end @tech{position} is returned. @|ParagraphNumbering| @|LineNumbering| @@ -1594,11 +1594,11 @@ is greater than the highest-numbered paragraph, then the editor's end Returns the starting @techlink{position} of a given paragraph. @|ParagraphNumbering| -If there are fewer than @math{@scheme[paragraph]-1} paragraphs, the +If there are fewer than @math{@racket[paragraph]-1} paragraphs, the start of the last paragraph is returned. -If the paragraph starts with invisible @techlink{item}s and @scheme[visible?] is - not @scheme[#f], the first @techlink{position} past the invisible @techlink{item}s is +If the paragraph starts with invisible @techlink{item}s and @racket[visible?] is + not @racket[#f], the first @techlink{position} past the invisible @techlink{item}s is returned. } @@ -1610,16 +1610,16 @@ If the paragraph starts with invisible @techlink{item}s and @scheme[visible?] is [end (or/c exact-nonnegative-integer? 'same) 'same]) void?]{ -Pastes into the specified range. If @scheme[start] is @scheme['start], +Pastes into the specified range. If @racket[start] is @racket['start], then the current selection start @techlink{position} is used. If - @scheme[start] is @scheme['end], then the current selection end - @techlink{position} is used. If @scheme[end] is @scheme['same], then - @scheme[start] is used for @scheme[end], unless @scheme[start] is - @scheme['start], in which case the current selection end + @racket[start] is @racket['end], then the current selection end + @techlink{position} is used. If @racket[end] is @racket['same], then + @racket[start] is used for @racket[end], unless @racket[start] is + @racket['start], in which case the current selection end @techlink{position} is used. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -1652,16 +1652,16 @@ If the previous operation on the editor was not a paste, calling [end (or/c exact-nonnegative-integer? 'same) 'same]) void?]{ -Pastes into the specified range. If @scheme[start] is @scheme['start], +Pastes into the specified range. If @racket[start] is @racket['start], then the current selection start @techlink{position} is used. If - @scheme[start] is @scheme['end], then the current selection end - @techlink{position} is used. If @scheme[end] is @scheme['same], then - @scheme[start] is used for @scheme[end], unless @scheme[start] is - @scheme['start], in which case the current selection end + @racket[start] is @racket['end], then the current selection end + @techlink{position} is used. If @racket[end] is @racket['same], then + @racket[start] is used for @racket[end], unless @racket[start] is + @racket['start], in which case the current selection end @techlink{position} is used. -See @|timediscuss| for a discussion of the @scheme[time] argument. If - @scheme[time] is outside the platform-specific range of times, +See @|timediscuss| for a discussion of the @racket[time] argument. If + @racket[time] is outside the platform-specific range of times, @|MismatchExn|. } @@ -1674,7 +1674,7 @@ Returns the line number of the line containing a given @techlink{position}. @|Li @LineToPara[(scheme position-paragraph)] -See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. +See @|ateoldiscuss| for a discussion of @racket[at-eol?]. @|FCAMW| @|EVD| @@ -1691,21 +1691,21 @@ See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. Returns the @techlink{location} of a given @techlink{position}. See also @method[text% position-locations]. -@boxisfillnull[(scheme x) @elem{the x-@techlink{location} of the @techlink{position} @scheme[start] in editor +@boxisfillnull[(scheme x) @elem{the x-@techlink{location} of the @techlink{position} @racket[start] in editor coordinates} ] @boxisfillnull[(scheme y) @elem{the y-@techlink{location} (top or bottom; see below) of the -@techlink{position} @scheme[start] in editor coordinates}] +@techlink{position} @racket[start] in editor coordinates}] -See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. +See @|ateoldiscuss| for a discussion of @racket[at-eol?]. -If @scheme[top?] is not @scheme[#f], the top coordinate of the @techlink{location} +If @racket[top?] is not @racket[#f], the top coordinate of the @techlink{location} is returned, otherwise the bottom coordinate of the @techlink{location} is returned. -The top @scheme[y] @techlink{location} may be different for different @techlink{position}s +The top @racket[y] @techlink{location} may be different for different @techlink{position}s within a line when different-sized graphic objects are used. If -@scheme[whole-line?] is not @scheme[#f], the minimum top @techlink{location} or -maximum bottom @techlink{location} for the whole line is returned in @scheme[y]. +@racket[whole-line?] is not @racket[#f], the minimum top @techlink{location} or +maximum bottom @techlink{location} for the whole line is returned in @racket[y]. @|OVD| @|FCA| @@ -1732,7 +1732,7 @@ and ``bottom'' results at once. [at-eol? any/c #f]) exact-nonnegative-integer?]{ -See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. +See @|ateoldiscuss| for a discussion of @racket[at-eol?]. Returns the paragraph number of the paragraph containing a given @techlink{position}. @@ -1745,8 +1745,8 @@ Returns the paragraph number of the paragraph containing a given @techlink{posit [overwrite-styles? any/c #f]) boolean?]{ -New data is inserted at the @techlink{position} indicated by @scheme[start], or at - the current @techlink{position} if @scheme[start] is @scheme['start]. +New data is inserted at the @techlink{position} indicated by @racket[start], or at + the current @techlink{position} if @racket[start] is @racket['start]. } @@ -1755,8 +1755,8 @@ New data is inserted at the @techlink{position} indicated by @scheme[start], or [end exact-nonnegative-integer?]) void?]{ -Removes all clickbacks installed for exactly the range @scheme[start] - to @scheme[end]. See also @|clickbackdiscuss|. +Removes all clickbacks installed for exactly the range @racket[start] + to @racket[end]. See also @|clickbackdiscuss|. } @@ -1769,22 +1769,22 @@ Removes all clickbacks installed for exactly the range @scheme[start] Scrolls the editor so that a given @techlink{position} is visible. -If @scheme[end] is @scheme['same] or equal to @scheme[start], then @techlink{position} - @scheme[start] is made visible. See @|ateoldiscuss| for a discussion of - @scheme[at-eol?]. +If @racket[end] is @racket['same] or equal to @racket[start], then @techlink{position} + @racket[start] is made visible. See @|ateoldiscuss| for a discussion of + @racket[at-eol?]. -If @scheme[end] is not @scheme['same] and not the same as @scheme[start], - then the range @scheme[start] to @scheme[end] is made visible and - @scheme[at-eol?] is ignored. +If @racket[end] is not @racket['same] and not the same as @racket[start], + then the range @racket[start] to @racket[end] is made visible and + @racket[at-eol?] is ignored. -When the specified range cannot fit in the visible area, @scheme[bias] - indicates which end of the range to display. When @scheme[bias] is - @scheme['start], then the start of the range is displayed. When - @scheme[bias] is @scheme['end], then the end of the range is - displayed. Otherwise, @scheme[bias] must be @scheme['none]. +When the specified range cannot fit in the visible area, @racket[bias] + indicates which end of the range to display. When @racket[bias] is + @racket['start], then the start of the range is displayed. When + @racket[bias] is @racket['end], then the end of the range is + displayed. Otherwise, @racket[bias] must be @racket['none]. If the editor is scrolled, then the editor is redrawn and the return - value is @scheme[#t]; otherwise, the return value is @scheme[#f]. If + value is @racket[#t]; otherwise, the return value is @racket[#f]. If refreshing is delayed (see @method[editor<%> refresh-delayed?]), then the scroll request is saved until the delay has ended. The scroll is performed (immediately or later) by calling @method[editor<%> @@ -1807,7 +1807,7 @@ Turns anchoring on or off. This method can be overridden to affect or detect changes in the anchor state. See also @method[text% get-anchor]. -If @scheme[on?] is not @scheme[#f], then the selection will be +If @racket[on?] is not @racket[#f], then the selection will be automatically extended when cursor keys are used (or, more generally, when @method[text% move-position] is used to move the selection or the @racket[_keep-anchor?] argument to @method[text% set-position] is a true value), @@ -1823,9 +1823,9 @@ If @scheme[on?] is not @scheme[#f], then the selection will be Sets the bitmap that is drawn at the end of a line when it is automatically line-wrapped. -If @scheme[bitmap] is @scheme[#f], no autowrap indicator is drawn +If @racket[bitmap] is @racket[#f], no autowrap indicator is drawn (this is the default). The previously used bitmap (possibly - @scheme[#f]) is returned. + @racket[#f]) is returned. Setting the bitmap is disallowed when the editor is internally locked for reflowing (see also @|lockdiscuss|). @@ -1837,7 +1837,7 @@ Setting the bitmap is disallowed when the editor is internally locked void?]{ Sets the graphical distance used to determine the meaning of a user - click. If a click falls within @scheme[threshold] of a position + click. If a click falls within @racket[threshold] of a position between two @techlink{item}s, then the click registers on the space between the @techlink{item}s rather than on either @techlink{item}. @@ -1860,18 +1860,18 @@ See also Installs a clickback for a given region. If a clickback is already installed for an overlapping region, this clickback takes precedence. -The callback procedure @scheme[f] is called when the user selects the - clickback. The arguments to @scheme[f] are this editor and the starting +The callback procedure @racket[f] is called when the user selects the + clickback. The arguments to @racket[f] are this editor and the starting and ending range of the clickback. -The @scheme[hilite-delta] style delta is applied to the clickback text +The @racket[hilite-delta] style delta is applied to the clickback text when the user has clicked and is still holding the mouse over the - clickback. If @scheme[hilite-delta] is @scheme[#f], then the clickback + clickback. If @racket[hilite-delta] is @racket[#f], then the clickback region's style is not changed when it is being selected. -If @scheme[call-on-down?] is not @scheme[#f], the clickback is called +If @racket[call-on-down?] is not @racket[#f], the clickback is called immediately when the user clicks the mouse button down, instead of - after a mouse-up event. The @scheme[hilite-delta] argument is not used + after a mouse-up event. The @racket[hilite-delta] argument is not used in this case. See also @|clickbackdiscuss|. @@ -1885,9 +1885,9 @@ Set the format of the file saved from this editor. The legal formats are: @itemize[ -@item{@scheme['standard] --- a standard editor file} -@item{@scheme['text] --- a text file} -@item{@scheme['text-force-cr] --- a text file; when writing, change automatic newlines (from word-wrapping) into real carriage returns} +@item{@racket['standard] --- a standard editor file} +@item{@racket['text] --- a text file} +@item{@racket['text-force-cr] --- a text file; when writing, change automatic newlines (from word-wrapping) into real carriage returns} ] @MonitorMethod[@elem{The file format of an editor} @elem{the @@ -1958,11 +1958,11 @@ Sets a paragraph-specific horizontal alignment. The alignment is only Sets a paragraph-specific margin. @|ParagraphNumbering| -The first line of the paragraph is indented by @scheme[first-left] points +The first line of the paragraph is indented by @racket[first-left] points within the editor. If the paragraph is line-wrapped (when the editor - has a maximum width), subsequent lines are indented by @scheme[left] + has a maximum width), subsequent lines are indented by @racket[left] points. If the editor has a maximum width, the paragraph's maximum - width for line-wrapping is @scheme[right] points smaller than the + width for line-wrapping is @racket[right] points smaller than the editor's maximum width. @italic{This method is experimental.} See @method[text% @@ -1980,25 +1980,25 @@ The first line of the paragraph is indented by @scheme[first-left] points Sets the current selection in the editor. -If @scheme[end] is @scheme['same] or less than or equal to @scheme[start], +If @racket[end] is @racket['same] or less than or equal to @racket[start], the current start and end @techlink{position}s are both set to - @scheme[start]. Otherwise the given range is selected. + @racket[start]. Otherwise the given range is selected. -See @|ateoldiscuss| for a discussion of @scheme[at-eol?]. If - @scheme[scroll?] is not @scheme[#f], then the @techlink{display} is +See @|ateoldiscuss| for a discussion of @racket[at-eol?]. If + @racket[scroll?] is not @racket[#f], then the @techlink{display} is scrolled to show the selection if necessary. -The @scheme[seltype] argument is only used when the X Window System +The @racket[seltype] argument is only used when the X Window System selection mechanism is enabled. The possible values are: @itemize[ - @item{@scheme['default] --- if this window has the keyboard focus + @item{@racket['default] --- if this window has the keyboard focus and given selection is non-empty, make it the current X selection} - @item{@scheme['x] --- if the given selection is non-empty, make + @item{@racket['x] --- if the given selection is non-empty, make it the current X selection} - @item{@scheme['local] --- do not change the + @item{@racket['local] --- do not change the current X selection} ] @@ -2009,7 +2009,7 @@ Setting the @techlink{position} is disallowed when the editor is internally The system may change the selection in an editor without calling this method (or any visible method). -See also @scheme[editor-set-x-selection-mode]. +See also @racket[editor-set-x-selection-mode]. } @@ -2023,13 +2023,13 @@ See also @scheme[editor-set-x-selection-mode]. Like @method[text% set-position], but a scrolling bias can be specified. -The possible values for @scheme[bias] are: +The possible values for @racket[bias] are: @itemize[ -@item{@scheme['start-only] --- only insure that the starting @techlink{position} is visible} -@item{@scheme['start] --- if the range doesn't fit in the visible area, show the starting @techlink{position}} -@item{@scheme['none] --- no special scrolling instructions} -@item{@scheme['end] --- if the range doesn't fit in the visible area, show the ending @techlink{position}} -@item{@scheme['end-only] --- only insure that the ending @techlink{position} is visible} +@item{@racket['start-only] --- only insure that the starting @techlink{position} is visible} +@item{@racket['start] --- if the range doesn't fit in the visible area, show the starting @techlink{position}} +@item{@racket['none] --- no special scrolling instructions} +@item{@racket['end] --- if the range doesn't fit in the visible area, show the ending @techlink{position}} +@item{@racket['end-only] --- only insure that the ending @techlink{position} is visible} ] See also @method[text% scroll-to-position]. @@ -2075,10 +2075,10 @@ See @method[text% get-styles-sticky] for information about sticky Sets the tabbing array for the editor. -The @scheme[tabs] list determines the tabbing array. The tabbing array +The @racket[tabs] list determines the tabbing array. The tabbing array specifies the x-@techlink{location}s where each tab occurs. Tabs beyond the last - specified tab are separated by a fixed amount @scheme[tab-width]. If - @scheme[in-units?] is not @scheme[#f], then tabs are specified in canvas + specified tab are separated by a fixed amount @racket[tab-width]. If + @racket[in-units?] is not @racket[#f], then tabs are specified in canvas units; otherwise, they are specified as a number of spaces. (If tabs are specified in spaces, then the graphic tab positions will change with the font used for the tab.) @@ -2100,13 +2100,13 @@ Sets the word-breaking function for the editor. For information about find-wordbreak]. The standard wordbreaking function uses the editor's - @scheme[editor-wordbreak-map%] object to determine which characters - break a word. See also @scheme[editor-wordbreak-map%] and + @racket[editor-wordbreak-map%] object to determine which characters + break a word. See also @racket[editor-wordbreak-map%] and @method[text% set-wordbreak-map]. Since the wordbreak function will be called when line breaks are being determined (in an editor that has a maximum width), there is a - constrained set of @scheme[text%] methods that the wordbreak + constrained set of @racket[text%] methods that the wordbreak function is allowed to invoke. It cannot invoke a member function that uses information about @techlink{location}s or lines (which are identified in this manual with ``@|OVD|''), but it can still invoke @@ -2119,10 +2119,10 @@ Since the wordbreak function will be called when line breaks are being void?]{ Sets the wordbreaking map that is used by the standard wordbreaking - function. See @scheme[editor-wordbreak-map%] for more information. + function. See @racket[editor-wordbreak-map%] for more information. -If @scheme[map] is @scheme[#f], then the standard map - (@scheme[the-editor-wordbreak-map]) is used. +If @racket[map] is @racket[#f], then the standard map + (@racket[the-editor-wordbreak-map]) is used. } @@ -2147,9 +2147,9 @@ Splitting a snip is disallowed when the editor is internally locked [end (or/c exact-nonnegative-integer? 'eof) 'eof]) boolean?]{ -If @scheme[start] is 0 and @scheme[end] is @scheme['eof] negative, - then the entire contents are written to the stream. If @scheme[end] - is @scheme['eof], then the contents are written from @scheme[start] +If @racket[start] is 0 and @racket[end] is @racket['eof] negative, + then the entire contents are written to the stream. If @racket[end] + is @racket['eof], then the contents are written from @racket[start] until the end of the editor. Otherwise, the contents of the given range are written. diff --git a/collects/scribblings/gui/text-field-class.scrbl b/collects/scribblings/gui/text-field-class.scrbl index 397f0fce..128b8cea 100644 --- a/collects/scribblings/gui/text-field-class.scrbl +++ b/collects/scribblings/gui/text-field-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[text-field% object% (control<%>)]{ -A @scheme[text-field%] object is an editable text field with an +A @racket[text-field%] object is an editable text field with an optional label displayed in front of it. There are two text field styles: @@ -23,8 +23,8 @@ Whenever the user changes the content of a text field, its callback procedure is invoked. A callback procedure is provided as an initialization argument when each text field is created. -The text field is implemented using a @scheme[text%] editor (with an - inaccessible display). Thus, whereas @scheme[text-field%] provides +The text field is implemented using a @racket[text%] editor (with an + inaccessible display). Thus, whereas @racket[text-field%] provides only @method[text-field% get-value] and @method[text-field% set-value] to manipulate the text in a text field, the @method[text-field% get-editor] returns the field's editor, which @@ -33,7 +33,7 @@ The text field is implemented using a @scheme[text%] editor (with an The keymap for the text field's editor is initialized by calling the current keymap initializer procedure, which is determined by the - @scheme[current-text-keymap-initializer] parameter. + @racket[current-text-keymap-initializer] parameter. @defconstructor[([label (or/c label-string? false/c)] @@ -56,40 +56,40 @@ The keymap for the text field's editor is initialized by calling the [stretchable-width any/c #t] [stretchable-height any/c (memq 'multiple style)])]{ -If @scheme[label] is not @scheme[#f], it is used as the text field +If @racket[label] is not @racket[#f], it is used as the text field label. Otherwise, the text field does not display its label. @labelstripped[(scheme label) @elem{} @elem{move the keyboard focus to the text field}] -The @scheme[callback] procedure is called when the user changes the +The @racket[callback] procedure is called when the user changes the text in the text field or presses the Enter key (and Enter is not handled by the text field's frame or dialog; see @xmethod[top-level-window<%> on-traverse-char]). If the user presses Enter, the type of event passed to the callback is - @indexed-scheme['text-field-enter], otherwise it is - @indexed-scheme['text-field]. + @indexed-racket['text-field-enter], otherwise it is + @indexed-racket['text-field]. -If @scheme[init-value] is not @scheme[""], the minimum width of the - text item is made wide enough to show @scheme[init-value]. Otherwise, +If @racket[init-value] is not @racket[""], the minimum width of the + text item is made wide enough to show @racket[init-value]. Otherwise, a built-in default width is selected. For a text field in single-line mode, the minimum height is set to show one line and only the control's width is stretchable. For a multiple-line text field, the minimum height shows three lines of text and is stretchable in both directions. -The style must contain exactly one of @scheme['single] or - @scheme['multiple]; the former specifies a single-line field and the - latter specifies a multiple-line field. The @scheme['hscroll] style - applies only to multiple-line fields; when @scheme['hscroll] is +The style must contain exactly one of @racket['single] or + @racket['multiple]; the former specifies a single-line field and the + latter specifies a multiple-line field. The @racket['hscroll] style + applies only to multiple-line fields; when @racket['hscroll] is specified, the field has a horizontal scrollbar and autowrapping is disabled; otherwise, the field has no horizontal scrollbar and autowrapping is enabled. A multiple-line text field always has a - vertical scrollbar. The @scheme['password] style indicates that the + vertical scrollbar. The @racket['password] style indicates that the field should draw each character of its content using a generic - symbol instead of the actual character. @HVLabelNote[@scheme[style]]{text field} - @DeletedStyleNote[@scheme[style] @scheme[parent]]{text field}. + symbol instead of the actual character. @HVLabelNote[@racket[style]]{text field} + @DeletedStyleNote[@racket[style] @racket[parent]]{text field}. -@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[] +@FontKWs[@racket[font]] @WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaKWs[] } @@ -99,18 +99,18 @@ The style must contain exactly one of @scheme['single] or Returns the editor used to implement the text field. -For a text field, the most useful methods of a @scheme[text%] object +For a text field, the most useful methods of a @racket[text%] object are the following: @itemize[ - @item{@scheme[(send a-text @#,method[text% get-text])] returns + @item{@racket[(send a-text @#,method[text% get-text])] returns the current text of the editor.} - @item{@scheme[(send a-text @#,method[text% erase])] deletes all text from + @item{@racket[(send a-text @#,method[text% erase])] deletes all text from the editor.} - @item{@scheme[(send a-text @#,method[text% insert] _str)] inserts - @scheme[_str] into the editor at the current caret position.} + @item{@racket[(send a-text @#,method[text% insert] _str)] inserts + @racket[_str] into the editor at the current caret position.} ] } diff --git a/collects/scribblings/gui/timer-class.scrbl b/collects/scribblings/gui/timer-class.scrbl index 154daef5..cf8428b9 100644 --- a/collects/scribblings/gui/timer-class.scrbl +++ b/collects/scribblings/gui/timer-class.scrbl @@ -3,18 +3,18 @@ @defclass/title[timer% object% ()]{ -A @scheme[timer%] object encapsulates an event-based alarm. To use a - timer, either instantiate it with a @scheme[timer-callback] thunk to +A @racket[timer%] object encapsulates an event-based alarm. To use a + timer, either instantiate it with a @racket[timer-callback] thunk to perform the alarm-based action, to derive a new class and override the @method[timer% notify] method to perform the alarm-based action. Start a timer with @method[timer% start] and stop it with - @method[timer% stop]. Supplying an initial @scheme[interval] (in + @method[timer% stop]. Supplying an initial @racket[interval] (in milliseconds) when creating a timer also starts the timer. Timers have a relatively high priority in the event queue. Thus, if the timer delay is set low enough, repeated notification for a timer can preempt user activities (which might be directed at stopping the - timer). For timers with relatively short delays, call @scheme[yield] + timer). For timers with relatively short delays, call @racket[yield] within the @method[timer% notify] procedure to allow guaranteed event processing. @@ -26,14 +26,14 @@ See @secref["eventspaceinfo"] for more information about event [interval (or/c (integer-in 0 1000000000) false/c) #f] [just-once? any/c #f])]{ -The @scheme[notify-callback] thunk is called by the default +The @racket[notify-callback] thunk is called by the default @method[timer% notify] method when the timer expires. -If @scheme[interval] is @scheme[#f] (the default), the timer is not +If @racket[interval] is @racket[#f] (the default), the timer is not started; in that case, @method[timer% start] must be called - explicitly. If @scheme[interval] is a number (in milliseconds), then - @method[timer% start] is called with @scheme[interval] and - @scheme[just-once?]. + explicitly. If @racket[interval] is a number (in milliseconds), then + @method[timer% start] is called with @racket[interval] and + @racket[just-once?]. } @@ -56,7 +56,7 @@ Called (on an event boundary) when the timer's alarm expires. } @methimpl{ -Calls the @scheme[notify-callback] procedure that was provided when the +Calls the @racket[notify-callback] procedure that was provided when the object was created. }} @@ -68,11 +68,11 @@ Calls the @scheme[notify-callback] procedure that was provided when the Starts (or restarts) the timer. If the timer is already running, its alarm time is not changed. -The timer's alarm expires after @scheme[msec] milliseconds, at which +The timer's alarm expires after @racket[msec] milliseconds, at which point @method[timer% notify] is called (on an event boundary). If -@scheme[just-once?] is @scheme[#f], the timer expires @italic{every} -@scheme[msec] milliseconds until the timer is explicitly -stopped. (More precisely, the timer expires @scheme[msec] +@racket[just-once?] is @racket[#f], the timer expires @italic{every} +@racket[msec] milliseconds until the timer is explicitly +stopped. (More precisely, the timer expires @racket[msec] milliseconds after @method[timer% notify] returns each time.) Otherwise, the timer expires only once. diff --git a/collects/scribblings/gui/top-level-window-intf.scrbl b/collects/scribblings/gui/top-level-window-intf.scrbl index 881c8f3c..8825ced0 100644 --- a/collects/scribblings/gui/top-level-window-intf.scrbl +++ b/collects/scribblings/gui/top-level-window-intf.scrbl @@ -3,7 +3,7 @@ @definterface/title[top-level-window<%> (area-container-window<%>)]{ -A top-level window is either a @scheme[frame%] or @scheme[dialog%] +A top-level window is either a @racket[frame%] or @racket[dialog%] object. @defmethod[#:mode pubment @@ -11,10 +11,10 @@ A top-level window is either a @scheme[frame%] or @scheme[dialog%] boolean?]{ Called just before the window might be closed (e.g., by the window - manager). If @scheme[#f] is returned, the window is not closed, + manager). If @racket[#f] is returned, the window is not closed, otherwise @method[top-level-window<%> on-close] is called and the window is closed (i.e., the window is hidden, like calling - @method[window<%> show] with @scheme[#f]). + @method[window<%> show] with @racket[#f]). This method is @italic{not} called by @method[window<%> show]. } @@ -40,10 +40,10 @@ Calls @method[top-level-window<%> can-close?] and returns the result. Centers the window on the screen if it has no parent. If it has a parent, the window is centered with respect to its parent's location. -If @scheme[direction] is @scheme['horizontal], the window is centered - horizontally. If @scheme[direction] is @scheme['vertical], the - window is centered vertically. If @scheme[direction] is - @scheme['both], the window is centered in both directions. +If @racket[direction] is @racket['horizontal], the window is centered + horizontally. If @racket[direction] is @racket['vertical], the + window is centered vertically. If @racket[direction] is + @racket['both], the window is centered in both directions. } @@ -67,7 +67,7 @@ See also @method[top-level-window<%> get-focus-object]. most recently had the keyboard focus, either the top-level window or one of its currently-shown children. If neither the window nor any of its currently-shown children has even owned the keyboard focus, -@scheme[#f] is returned. +@racket[#f] is returned. See also @method[top-level-window<%> get-focus-window] and @method[top-level-window<%> get-edit-target-object]. @@ -98,7 +98,7 @@ See also @method[top-level-window<%> get-edit-target-object]. @index["keyboard focus"]{Returns} the window that has the keyboard focus, either the top-level window or one of its children. If neither - the window nor any of its children has the focus, @scheme[#f] is + the window nor any of its children has the focus, @racket[#f] is returned. See also @method[top-level-window<%> get-edit-target-window] and @@ -130,8 +130,8 @@ Called when a window is @defterm{activated} or words, floating frames act as an extension of the active non-frame for keyboard focus. -The method's argument is @scheme[#t] when the window is activated, - @scheme[#f] when it is deactivated. +The method's argument is @racket[#t] when the window is activated, + @racket[#f] when it is deactivated. } @@ -153,7 +153,7 @@ See also @methspec{ Called by the default application quit handler (as determined by the - @scheme[application-quit-handler] parameter) when the operating + @racket[application-quit-handler] parameter) when the operating system requests that the application shut down (e.g., when the @onscreen{Quit} menu item is selected in the main application menu on Mac OS X). In that case, this method is called for the most @@ -177,10 +177,10 @@ Calls @methspec{ @index["drag-and-drop"]{A} generic message method, usually called by -@scheme[send-message-to-window]. +@racket[send-message-to-window]. -If the method is invoked by @scheme[send-message-to-window], then it -is invoked in the thread where @scheme[send-message-to-window] was +If the method is invoked by @racket[send-message-to-window], then it +is invoked in the thread where @racket[send-message-to-window] was called (which is possibly @italic{not} the handler thread of the window's eventspace). @@ -199,94 +199,94 @@ Returns @|void-const|. @index['("keyboard focus" "navigation")]{Attempts} to handle the given keyboard event as a navigation event, such as a Tab key event that - moves the keyboard focus. If the event is handled, @scheme[#t] is - returned, otherwise @scheme[#f] is returned. + moves the keyboard focus. If the event is handled, @racket[#t] is + returned, otherwise @racket[#f] is returned. } @methimpl{ -The following rules determine, in order, whether and how @scheme[event] +The following rules determine, in order, whether and how @racket[event] is handled: @itemize[ @item{ If the window that currently owns the focus specifically handles the - event, then @scheme[#f] is returned. The following describes window + event, then @racket[#f] is returned. The following describes window types and the keyboard events they specifically handle: @itemize[ - @item{@scheme[editor-canvas%] --- tab-exit is disabled (see + @item{@racket[editor-canvas%] --- tab-exit is disabled (see @method[editor-canvas% allow-tab-exit]): all keyboard events, except alphanumeric key events when the Meta (Unix) or Alt (Windows) key is pressed; when tab-exit is enabled: all keyboard events except Tab, Enter, Escape, and alphanumeric Meta/Alt events.} - @item{@scheme[canvas%] --- when tab-focus is disabled (see + @item{@racket[canvas%] --- when tab-focus is disabled (see @method[canvas<%> accept-tab-focus]): all keyboard events, except alphanumeric key events when the Meta (Unix) or Alt (Windows) key is pressed; when tab-focus is enabled: no key events} - @item{@scheme[text-field%], @scheme['single] style --- arrow key + @item{@racket[text-field%], @racket['single] style --- arrow key events and alphanumeric key events when the Meta (Unix) or Alt (Windows) key is not pressed (and all alphanumeric events on Mac OS X)} - @item{@scheme[text-field%], @scheme['multiple] style --- all + @item{@racket[text-field%], @racket['multiple] style --- all keyboard events, except alphanumeric key events when the Meta (Unix) or Alt (Windows) key is pressed} - @item{@scheme[choice%] --- arrow key events and alphanumeric key + @item{@racket[choice%] --- arrow key events and alphanumeric key events when the Meta (Unix) or Alt (Windows) key is not pressed} - @item{@scheme[list-box%] --- arrow key events and alphanumeric key + @item{@racket[list-box%] --- arrow key events and alphanumeric key events when the Meta (Unix) or Alt (Windows) key is not pressed} ]} @item{ -If @scheme[event] is a Tab or arrow key event, the keyboard focus is - moved within the window and @scheme[#t] is returned. Across platforms, +If @racket[event] is a Tab or arrow key event, the keyboard focus is + moved within the window and @racket[#t] is returned. Across platforms, the types of windows that accept the keyboard focus via navigation - may vary, but @scheme[text-field%] windows always accept the focus, - and @scheme[message%], @scheme[gauge%], and @scheme[panel%] + may vary, but @racket[text-field%] windows always accept the focus, + and @racket[message%], @racket[gauge%], and @racket[panel%] windows never accept the focus.} @item{ -If @scheme[event] is a Space key event and the window that currently - owns the focus is a @scheme[button%], @scheme[check-box%], or - @scheme[radio-box%] object, the event is handled in the same way as - a click on the control and @scheme[#t] is returned.} +If @racket[event] is a Space key event and the window that currently + owns the focus is a @racket[button%], @racket[check-box%], or + @racket[radio-box%] object, the event is handled in the same way as + a click on the control and @racket[#t] is returned.} @item{ -If @scheme[event] is an Enter key event and the current top-level window +If @racket[event] is an Enter key event and the current top-level window contains a border button, the button's callback is invoked and - @scheme[#t] is returned. (The @scheme['border] style for a - @scheme[button%] object indicates to the user that pressing Enter + @racket[#t] is returned. (The @racket['border] style for a + @racket[button%] object indicates to the user that pressing Enter is the same as clicking the button.) If the window does not contain a - border button, @scheme[#t] is returned if the window with the current + border button, @racket[#t] is returned if the window with the current focus is not a text field or editor canvas.} @item{ -In a dialog, if @scheme[event] is an Escape key event, the event is +In a dialog, if @racket[event] is an Escape key event, the event is handled the same as a click on the dialog's close box (i.e., the dialog's @method[top-level-window<%> can-close?] and -@method[top-level-window<%> on-close] methods are called, and the dialog is hidden) and @scheme[#t] is +@method[top-level-window<%> on-close] methods are called, and the dialog is hidden) and @racket[#t] is returned.} @item{ -If @scheme[event] is an alphanumeric key event and the current top-level +If @racket[event] is an alphanumeric key event and the current top-level window contains a control with a mnemonic matching the key (which is installed via a label that contains @litchar{&}; see @method[window<%> get-label] for more information), then the keyboard focus is moved to the matching control. Furthermore, if the - matching control is a @scheme[button%], @scheme[check-box%], or - @scheme[radio-box%] button, the keyboard event is handled in the + matching control is a @racket[button%], @racket[check-box%], or + @racket[radio-box%] button, the keyboard event is handled in the same way as a click on the control.} @item{ -Otherwise, @scheme[#f] is returned.} +Otherwise, @racket[#f] is returned.} ] }} @@ -296,7 +296,7 @@ Otherwise, @scheme[#f] is returned.} Checks whether the given event pops open the system menu in the top-left corner of the window (Windows only). If the window's system - menu is opened, @scheme[#t] is returned, otherwise @scheme[#f] is + menu is opened, @racket[#t] is returned, otherwise @racket[#f] is returned. } diff --git a/collects/scribblings/gui/vertical-pane-class.scrbl b/collects/scribblings/gui/vertical-pane-class.scrbl index 54ccb1e6..b91a5350 100644 --- a/collects/scribblings/gui/vertical-pane-class.scrbl +++ b/collects/scribblings/gui/vertical-pane-class.scrbl @@ -3,7 +3,7 @@ @defclass/title[vertical-pane% pane% ()]{ -A vertical pane arranges its subwindows in a single column. See also @scheme[pane%]. +A vertical pane arranges its subwindows in a single column. See also @racket[pane%]. diff --git a/collects/scribblings/gui/vertical-panel-class.scrbl b/collects/scribblings/gui/vertical-panel-class.scrbl index 714ccff7..ab0a2d3e 100644 --- a/collects/scribblings/gui/vertical-panel-class.scrbl +++ b/collects/scribblings/gui/vertical-panel-class.scrbl @@ -4,7 +4,7 @@ @defclass/title[vertical-panel% panel% ()]{ A vertical panel arranges its subwindows in a single column. See - also @scheme[panel%]. + also @racket[panel%]. @@ -29,17 +29,17 @@ A vertical panel arranges its subwindows in a single column. See The @racket[style] flags are the same as for @racket[panel%]. -@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] +@WindowKWs[@racket[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[] } @defmethod[(set-orientation [horizontal? boolean?]) void?]{ Sets the orientation of the panel, switching it between - the behavior of the @scheme[vertical-panel%] and that of - the @scheme[horizontal-panel%]. + the behavior of the @racket[vertical-panel%] and that of + the @racket[horizontal-panel%]. } @defmethod[(get-orientation) boolean?]{ - Initially returns @scheme[#f], but if + Initially returns @racket[#f], but if @method[vertical-panel% set-orientation] is called, this method returns whatever the last value passed to it was. } diff --git a/collects/scribblings/gui/win-overview.scrbl b/collects/scribblings/gui/win-overview.scrbl index 52a74edb..edcaf4e6 100644 --- a/collects/scribblings/gui/win-overview.scrbl +++ b/collects/scribblings/gui/win-overview.scrbl @@ -14,11 +14,11 @@ interfaces in Racket.} @section{Creating Windows} -To create a new top-level window, instantiate the @scheme[frame%] +To create a new top-level window, instantiate the @racket[frame%] class: -@schemeblock[ -(code:comment @#,t{Make a frame by instantiating the @scheme[frame%] class}) +@racketblock[ +(code:comment @#,t{Make a frame by instantiating the @racket[frame%] class}) (define frame (new frame% [label "Example"])) (code:comment @#,t{Show the frame by calling its @method[top-level-window<%> show] method}) @@ -26,14 +26,14 @@ To create a new top-level window, instantiate the @scheme[frame%] ] The built-in classes provide various mechanisms for handling GUI - events. For example, when instantiating the @scheme[button%] class, + events. For example, when instantiating the @racket[button%] class, supply an event callback procedure to be invoked when the user clicks the button. The following example program creates a frame with a text message and a button; when the user clicks the button, the message changes: -@schemeblock[ -(code:comment @#,t{Make a frame by instantiating the @scheme[frame%] class}) +@racketblock[ +(code:comment @#,t{Make a frame by instantiating the @racket[frame%] class}) (define frame (new frame% [label "Example"])) (code:comment @#,t{Make a static text message in the frame}) @@ -47,7 +47,7 @@ The built-in classes provide various mechanisms for handling GUI (callback (lambda (button event) (send msg #,(method message% set-label) "Button click")))) -(code:comment @#,t{Show the frame by calling its @scheme[show] method}) +(code:comment @#,t{Show the frame by calling its @racket[show] method}) (send frame #,(:: top-level-window<%> show) #t) ] @@ -64,14 +64,14 @@ If a window receives multiple kinds of events, the events are procedure. For example, a drawing canvas receives update events, mouse events, keyboard events, and sizing events; to handle them, derive a new class from the built-in - @scheme[canvas%] class and override the event-handling methods. The + @racket[canvas%] class and override the event-handling methods. The following expression extends the frame created above with a canvas that handles mouse and keyboard events: -@schemeblock[ +@racketblock[ (code:comment @#,t{Derive a new canvas (a drawing window) class to handle events}) (define my-canvas% - (class canvas% (code:comment @#,t{The base class is @scheme[canvas%]}) + (class canvas% (code:comment @#,t{The base class is @racket[canvas%]}) (code:comment @#,t{Define overriding method to handle mouse events}) (define/override (#,(:: canvas<%> on-event) event) (send msg #,(:: message% set-label) "Canvas mouse")) @@ -98,7 +98,7 @@ The windowing system dispatches GUI events sequentially; that is, after invoking sequential nature of events, extend the frame again, adding a @onscreen{Pause} button: -@schemeblock[ +@racketblock[ (new button% [parent frame] [label "Pause"] [callback (lambda (button event) (sleep 5))]) @@ -106,7 +106,7 @@ The windowing system dispatches GUI events sequentially; that is, after invoking After the user clicks @onscreen{Pause}, the entire frame becomes unresponsive for five seconds; the windowing system cannot dispatch more events - until the call to @scheme[sleep] returns. For more information about + until the call to @racket[sleep] returns. For more information about event dispatching, see @secref["eventspaceinfo"]. In addition to dispatching events, the GUI classes also handle the @@ -119,7 +119,7 @@ In addition to dispatching events, the GUI classes also handle the of another container; for example, to place two buttons side-by-side in our frame, create a horizontal panel for the new buttons: -@schemeblock[ +@racketblock[ (define panel (new horizontal-panel% [parent frame])) (new button% [parent panel] [label "Left"] @@ -151,7 +151,7 @@ reflected in the content of the canvas onscreen. For example, the following program creates a canvas that displays large, friendly letters: -@schemeblock[ +@racketblock[ (define frame (new frame% [label "Example"] [width 300] @@ -190,23 +190,23 @@ The fundamental graphical element in the windowing toolbox is an @itemize[ - @item{@scheme[frame%] --- a @deftech{frame} is a top-level window + @item{@racket[frame%] --- a @deftech{frame} is a top-level window that the user can move and resize.} - @item{@scheme[dialog%] --- a @deftech{dialog} is a modal top-level + @item{@racket[dialog%] --- a @deftech{dialog} is a modal top-level window; when a dialog is shown, other top-level windows are disabled until the dialog is dismissed.} - @item{@scheme[panel%] --- a @deftech{panel} is a subcontainer + @item{@racket[panel%] --- a @deftech{panel} is a subcontainer within a container. The toolbox provides three subclasses of - @scheme[panel%]: @scheme[vertical-panel%], - @scheme[horizontal-panel%], and @scheme[tab-panel%].} + @racket[panel%]: @racket[vertical-panel%], + @racket[horizontal-panel%], and @racket[tab-panel%].} - @item{@scheme[pane%] --- a @deftech{pane} is a lightweight panel. + @item{@racket[pane%] --- a @deftech{pane} is a lightweight panel. It has no graphical representation or event-handling capabilities. - The @scheme[pane%] class has three subclasses: - @scheme[vertical-pane%], @scheme[horizontal-pane%], and - @scheme[grow-box-spacer-pane%].} + The @racket[pane%] class has three subclasses: + @racket[vertical-pane%], @racket[horizontal-pane%], and + @racket[grow-box-spacer-pane%].} ]} @@ -215,56 +215,56 @@ The fundamental graphical element in the windowing toolbox is an @itemize[ - @item{@scheme[panel%] --- a panel is a containee as well as + @item{@racket[panel%] --- a panel is a containee as well as a container.} - @item{@scheme[pane%] --- a pane is a containee as well as a + @item{@racket[pane%] --- a pane is a containee as well as a container.} - @item{@scheme[canvas%] --- a @deftech{canvas} is a subwindow for + @item{@racket[canvas%] --- a @deftech{canvas} is a subwindow for drawing on the screen.} - @item{@scheme[editor-canvas%] --- an @deftech{editor canvas} is a + @item{@racket[editor-canvas%] --- an @deftech{editor canvas} is a subwindow for displaying a text editor or pasteboard editor. The - @scheme[editor-canvas%] class is documented with the editor classes + @racket[editor-canvas%] class is documented with the editor classes in @secref["editor-overview"].} @item{@deftech{Controls} --- containees that the user can manipulate: @itemize[ - @item{@scheme[message%] --- a @deftech{message} is a static + @item{@racket[message%] --- a @deftech{message} is a static text field or bitmap with no user interaction.} - @item{@scheme[button%] --- a @deftech{button} is a clickable + @item{@racket[button%] --- a @deftech{button} is a clickable control.} - @item{@scheme[check-box%] --- a @deftech{check box} is a + @item{@racket[check-box%] --- a @deftech{check box} is a clickable control; the user clicks the control to set or remove its check mark.} - @item{@scheme[radio-box%] --- a @deftech{radio box} is a + @item{@racket[radio-box%] --- a @deftech{radio box} is a collection of mutually exclusive @deftech{radio buttons}; when the user clicks a radio button, it is selected and the radio box's previously selected radio button is deselected.} - @item{@scheme[choice%] --- a @deftech{choice item} is a pop-up + @item{@racket[choice%] --- a @deftech{choice item} is a pop-up menu of text choices; the user selects one item in the control.} - @item{@scheme[list-box%] --- a @deftech{list box} is a + @item{@racket[list-box%] --- a @deftech{list box} is a scrollable lists of text choices; the user selects one or more items in the list (depending on the style of the list box).} - @item{@scheme[text-field%] --- a @deftech{text field} is a box + @item{@racket[text-field%] --- a @deftech{text field} is a box for simple text entry.} - @item{@scheme[combo-field%] --- a @deftech{combo field} combines + @item{@racket[combo-field%] --- a @deftech{combo field} combines a text field with a pop-up menu of choices.} - @item{@scheme[slider%] --- a @deftech{slider} is a dragable + @item{@racket[slider%] --- a @deftech{slider} is a dragable control that selects an integer value within a fixed range.} - @item{@scheme[gauge%] --- a @deftech{gauge} is an output-only + @item{@racket[gauge%] --- a @deftech{gauge} is an output-only control (the user cannot change the value) for reporting an integer value within a fixed range.} @@ -287,27 +287,27 @@ Most areas are @deftech{windows}, but some are @tech{non-window} does not receive mouse events, and it cannot be disabled or hidden. -Every @tech{area} is an instance of the @scheme[area<%>] +Every @tech{area} is an instance of the @racket[area<%>] interface. Each @tech{container} is also an instance of the - @scheme[area-container<%>] interface, whereas each @tech{containee} - is an instance of @scheme[subarea<%>]. @tech{Windows} are instances - of @scheme[window<%>]. The @scheme[area-container<%>], - @scheme[subarea<%>], and @scheme[window<%>] interfaces are - subinterfaces of @scheme[area<%>]. + @racket[area-container<%>] interface, whereas each @tech{containee} + is an instance of @racket[subarea<%>]. @tech{Windows} are instances + of @racket[window<%>]. The @racket[area-container<%>], + @racket[subarea<%>], and @racket[window<%>] interfaces are + subinterfaces of @racket[area<%>]. The following diagram shows more of the type hierarchy under - @scheme[area<%>]: + @racket[area<%>]: @diagram->table[short-windowing-diagram] The diagram below extends the one above to show the complete type - hierarchy under @scheme[area<%>]. (Some of the types are represented + hierarchy under @racket[area<%>]. (Some of the types are represented by interfaces, and some types are represented by classes. In principle, every area type should be represented by an interface, but whenever the windowing toolbox provides a concrete implementation, the corresponding interface is omitted from the toolbox.) To avoid intersecting lines, the hierarchy is drawn for a cylindrical surface; - lines from @scheme[subarea<%>] and @scheme[subwindow<%>] wrap from + lines from @racket[subarea<%>] and @racket[subwindow<%>] wrap from the left edge of the diagram to the right edge. @diagram->table[windowing-diagram] @@ -323,14 +323,14 @@ Menu bars, menus, and menu items are graphical elements, but not areas @itemize[ - @item{@scheme[menu-bar%] --- a @deftech{menu bar} is a top-level + @item{@racket[menu-bar%] --- a @deftech{menu bar} is a top-level collection of menus that are associated with a frame.} - @item{@scheme[menu%] --- a @deftech{menu} contains a set of menu + @item{@racket[menu%] --- a @deftech{menu} contains a set of menu items. The menu can appear in a menu bar, in a popup menu, or as a submenu in another menu.} - @item{@scheme[popup-menu%] --- a @deftech{popup menu} is a + @item{@racket[popup-menu%] --- a @deftech{popup menu} is a top-level menu that is dynamically displayed in a canvas or editor canvas.} @@ -340,18 +340,18 @@ Menu bars, menus, and menu items are graphical elements, but not areas @itemize[ - @item{@scheme[separator-menu-item%] --- a @deftech{separator} is + @item{@racket[separator-menu-item%] --- a @deftech{separator} is an unselectable line in a menu or popup menu.} - @item{@scheme[menu-item%] --- a @deftech{plain menu item} is a + @item{@racket[menu-item%] --- a @deftech{plain menu item} is a selectable text item in a menu. When the item is selected, its callback procedure is invoked.} - @item{@scheme[checkable-menu-item%] --- a @deftech{checkable menu + @item{@racket[checkable-menu-item%] --- a @deftech{checkable menu item} is a text item in a menu; the user selects a checkable menu item to toggle a check mark next to the item.} - @item{@scheme[menu%] --- a menu is a menu item as well as a menu + @item{@racket[menu%] --- a menu is a menu item as well as a menu item container.} ]} @@ -392,7 +392,7 @@ The built-in container classes include horizontal panels (and panes), with the following program: -@schemeblock[ +@racketblock[ (code:comment @#,t{Create a dialog}) (define dialog (instantiate dialog% ("Example"))) @@ -496,12 +496,12 @@ A @deftech{margin} is space surrounding a containee. Each containee's margin is independent of its minimum size, but from the container's point of view, a margin effectively increases the minimum size of the containee. For example, if a button has a vertical margin of - @scheme[2], then the container must allocate enough room to leave two + @racket[2], then the container must allocate enough room to leave two pixels of space above and below the button, in addition to the space that is allocated for the button's minimum height. A programmer can adjust a containee's margin with @method[subarea<%> horiz-margin] and - @method[subarea<%> vert-margin]. The default margin is @scheme[2] for - a control, and @scheme[0] for any other type of containee. + @method[subarea<%> vert-margin]. The default margin is @racket[2] for + a control, and @racket[0] for any other type of containee. In practice, the @tech{requested minimum size} and @tech{margin} of a control are rarely changed, although they are often changed for a @@ -588,7 +588,7 @@ A container's spacing determines the amount of space left between can be placed. A programmer can adjust a container's border and spacing dynamically via the @method[area-container<%> border] and @method[area-container<%> spacing] methods. The default border and - spacing are @scheme[0] for all container types. + spacing are @racket[0] for all container types. Because a panel or pane is a containee as well as a container, it has a containee margin in addition to its border margin. For a panel, @@ -603,7 +603,7 @@ For a top-level-window container, such as a frame or dialog, the containers (i.e., panels and panes), the container's stretchability is its stretchability as a containee in some other container. All types of containers are initially stretchable in both - directions---except instances of @scheme[grow-box-spacer-pane%], + directions---except instances of @racket[grow-box-spacer-pane%], which is intended as a lightweight spacer class rather than a useful container class---but a programmer can change the stretchability of an area at any time via the @method[area<%> stretchable-width] and @@ -613,10 +613,10 @@ The alignment specification for a container determines how it positions its children when the container has leftover space. (A container can only have leftover space in a particular direction when none of its children are stretchable in that direction.) For example, - when the container's horizontal alignment is @indexed-scheme['left], + when the container's horizontal alignment is @indexed-racket['left], the children are left-aligned in the container and leftover space is accumulated to the right. When the container's horizontal alignment - is @indexed-scheme['center], each child is horizontally centered in + is @indexed-racket['center], each child is horizontally centered in the container. A container's alignment is changed with the @method[area-container<%> set-alignment] method. @@ -625,7 +625,7 @@ The alignment specification for a container determines how it Although nested horizontal and vertical containers can express most layout patterns, a programmer can define a new type of container with an explicit layout procedure. A programmer defines a new type of - container by deriving a class from @scheme[panel%] or @scheme[pane%] + container by deriving a class from @racket[panel%] or @racket[pane%] and overriding the @method[area-container<%> container-size] and @method[area-container<%> place-children] methods. The @method[area-container<%> container-size] method takes a list of size @@ -640,7 +640,7 @@ An input size specification is a list of four values: @itemize[ @item{the child's minimum width;} @item{the child's minimum height;} - @item{the child's horizontal stretchability (@scheme[#t] means stretchable, @scheme[#f] means not stretchable); and} + @item{the child's horizontal stretchability (@racket[#t] means stretchable, @racket[#f] means not stretchable); and} @item{the child's vertical stretchability.} ] @@ -703,7 +703,7 @@ Whenever the user moves the mouse, clicks or releases a mouse button, target window. A program can use the @method[window<%> focus] method to move the focus to a subwindow or to set the initial focus. - A @indexed-scheme['wheel-up] or @indexed-scheme['wheel-down] + A @indexed-racket['wheel-up] or @indexed-racket['wheel-down] event may be sent to a window other than the one with the keyboard focus, depending on how the operating system handles wheel events. @@ -792,7 +792,7 @@ An @deftech{eventspace} is a context for processing GUI events. Each eventspace maintains its own queue of events, and events in a single eventspace are dispatched sequentially by a designated @deftech{handler thread}. An event-handling procedure running in this - handler thread can yield to the system by calling @scheme[yield], in + handler thread can yield to the system by calling @racket[yield], in which case other event-handling procedures may be called in a nested (but single-threaded) manner within the same handler thread. Events from different eventspaces are dispatched asynchronously by separate @@ -803,7 +803,7 @@ An @deftech{eventspace} is a context for processing GUI as described in @secref["currenteventspace"]. Events for a top-level window and its descendants are always dispatched in the window's eventspace. Every dialog is modal; a dialog's - @method[dialog% show] method implicitly calls @scheme[yield] to + @method[dialog% show] method implicitly calls @racket[yield] to handle events while the dialog is shown. (See also @secref["espacethreads"] for information about threads and modal dialogs.) Furthermore, when a modal dialog is shown, the system @@ -824,7 +824,7 @@ In addition to events corresponding to user and windowing actions, dispatches two kinds of internal events: @tech{timer events} and @tech{explicitly queued events}. -@deftech{Timer events} are created by instances of @scheme[timer%]. When +@deftech{Timer events} are created by instances of @racket[timer%]. When a timer is started and then expires, the timer queues an event to call the timer's @method[timer% notify] method. Like a top-level window, each timer is associated with a particular eventspace (the @@ -833,11 +833,11 @@ In addition to events corresponding to user and windowing actions, queues the event in its eventspace. @deftech{Explicitly queued events} are created with - @scheme[queue-callback], which accepts a callback procedure to handle + @racket[queue-callback], which accepts a callback procedure to handle the event. The event is enqueued in the current eventspace at the - time of the call to @scheme[queue-callback], with either a high or + time of the call to @racket[queue-callback], with either a high or low priority as specified by the (optional) second argument to - @scheme[queue-callback]. + @racket[queue-callback]. An eventspace's event queue is actually a priority queue with events sorted according to their kind, from highest-priority (dispatched @@ -846,7 +846,7 @@ An eventspace's event queue is actually a priority queue with events @itemize[ @item{The highest-priority events are high-priority events installed - with @scheme[queue-callback].} + with @racket[queue-callback].} @item{Timer events have the second-highest priority.} @@ -854,14 +854,14 @@ An eventspace's event queue is actually a priority queue with events the second-lowest priority.} @item{The lowest-priority events are low-priority events installed - with @scheme[queue-callback].} + with @racket[queue-callback].} ] Although a programmer has no direct control over the order in which events are dispatched, a programmer can control the timing of dispatches by setting the @deftech{event dispatch handler} via the - @scheme[event-dispatch-handler] parameter. This parameter and other + @racket[event-dispatch-handler] parameter. This parameter and other eventspace procedures are described in more detail in @secref["eventspace-funcs"]. @@ -877,27 +877,27 @@ When a new eventspace is created, a corresponding @tech{handler eventspace. When a handler thread shows a dialog, the dialog's @method[dialog% - show] method implicitly calls @scheme[yield] for as long as the + show] method implicitly calls @racket[yield] for as long as the dialog is shown. When a non-handler thread shows a dialog, the non-handler thread simply blocks until the dialog is - dismissed. Calling @scheme[yield] with no arguments from a - non-handler thread has no effect. Calling @scheme[yield] with a + dismissed. Calling @racket[yield] with no arguments from a + non-handler thread has no effect. Calling @racket[yield] with a semaphore from a non-handler thread is equivalent to calling - @scheme[semaphore-wait]. + @racket[semaphore-wait]. @subsection[#:tag "currenteventspace"]{Creating and Setting the Eventspace} Whenever a frame, dialog, or timer is created, it is associated with the @deftech{current eventspace} as determined by the - @scheme[current-eventspace] parameter @|SeeMzParam|. + @racket[current-eventspace] parameter @|SeeMzParam|. -The @scheme[make-eventspace] procedure creates a new +The @racket[make-eventspace] procedure creates a new eventspace. The following example creates a new eventspace and a new - frame in the eventspace (the @scheme[parameterize] syntactic form + frame in the eventspace (the @racket[parameterize] syntactic form temporary sets a parameter value): -@schemeblock[ +@racketblock[ (let ([new-es (make-eventspace)]) (parameterize ([current-eventspace new-es]) (new frame% [label "Example"]))) @@ -910,14 +910,14 @@ When an eventspace is created, it is placed under the management of can-close?] or @xmethod[top-level-window<%> on-close]), all timers in the eventspace are stopped, and all enqueued callbacks are removed. Attempting to create a new window, timer, or explicitly - queued event in a shut-down eventspace raises the @scheme[exn:misc] + queued event in a shut-down eventspace raises the @racket[exn:misc] exception. An eventspace is a @techlink[#:doc reference-doc]{synchronizable event} (not to be confused with a GUI event), so it can be used with - @scheme[sync]. As a synchronizable event, an eventspace is in a + @racket[sync]. As a synchronizable event, an eventspace is in a blocking state when a frame is visible, a timer is active, a callback - is queued, or a @scheme[menu-bar%] is created with a @scheme['root] + is queued, or a @racket[menu-bar%] is created with a @racket['root] parent. (Note that the blocking state of an eventspace is unrelated to whether an event is ready for dispatching.) diff --git a/collects/scribblings/gui/window-intf.scrbl b/collects/scribblings/gui/window-intf.scrbl index b01843a8..6ad1f6e5 100644 --- a/collects/scribblings/gui/window-intf.scrbl +++ b/collects/scribblings/gui/window-intf.scrbl @@ -4,15 +4,15 @@ @definterface/title[window<%> (area<%>)]{ -A @scheme[window<%>] object is an @scheme[area<%>] with a graphical +A @racket[window<%>] object is an @racket[area<%>] with a graphical representation that can respond to events. -All @scheme[window<%>] classes accept the following named instantiation +All @racket[window<%>] classes accept the following named instantiation arguments: @itemize[ - @item{@indexed-scheme[enabled] --- default is @scheme[#t]; passed to -@method[window<%> enable] if @scheme[#f]} + @item{@indexed-racket[enabled] --- default is @racket[#t]; passed to +@method[window<%> enable] if @racket[#f]} ] @@ -40,7 +40,7 @@ screen coordinates. On Mac OS X, the screen coordinates start with @math{(0, 0)} at the upper left of the menu bar. In contrast, @xmethod[top-level-window<%> move] considers @math{(0, 0)} to be below the menu bar. See also -@scheme[get-display-left-top-inset]. +@racket[get-display-left-top-inset]. } @@ -54,7 +54,7 @@ Enables or disables a window so that input events are ignored. (Input @MonitorMethod[@elem{The enable state of a window} @elem{enabling a parent window} @elem{@method[window<%> on-superwindow-enable]} @elem{enable state}] -If @scheme[enable?] is true, the window is enabled, otherwise it is +If @racket[enable?] is true, the window is enabled, otherwise it is disabled. } @@ -120,7 +120,7 @@ See also @defmethod[(get-cursor) (or/c (is-a?/c cursor%) #f)]{ -Returns the window's cursor, or @scheme[#f] if this window's cursor +Returns the window's cursor, or @racket[#f] if this window's cursor defaults to the parent's cursor. See @method[window<%> set-cursor] for more information. @@ -137,7 +137,7 @@ platform: @item{Windows: @tt{HWND}} - @item{Mac OS X: @tt{NSWindow} for a @scheme[top-level-window<%>] object, + @item{Mac OS X: @tt{NSWindow} for a @racket[top-level-window<%>] object, @tt{NSView} for other windows} @item{Unix: @tt{GtkWidget}} @@ -172,8 +172,8 @@ Gets a window's label, if any. Control windows generally display their for identification purposes. Messages, buttons, and check boxes can have bitmap labels (only when they are created with bitmap labels), but all other windows have string labels. In addition, a message - label can be an icon symbol @scheme['app], @scheme['caution], or - @scheme['stop], and a button can have both a bitmap label and a + label can be an icon symbol @racket['app], @racket['caution], or + @racket['stop], and a button can have both a bitmap label and a string label (along with a position for the bitmap). A label string may contain @litchar{&}s, which serve as @@ -186,7 +186,7 @@ A label string may contain @litchar{&}s, which serve as (with no displayed underline). See also @method[top-level-window<%> on-traverse-char]. -If the window does not have a label, @scheme[#f] is returned. +If the window does not have a label, @racket[#f] is returned. } @@ -197,7 +197,7 @@ If the window does not have a label, @scheme[#f] is returned. Like @method[window<%> get-label], except that ampersands in the label are removed. If the window has no label or the window's - label is not a string, @scheme[#f] is returned. + label is not a string, @racket[#f] is returned. } @@ -264,8 +264,8 @@ Indicates whether the window currently has the keyboard focus. See @defmethod[(is-enabled?) boolean?]{ -Returns @scheme[#t] if the window is enabled when all of its ancestors - are enabled, @scheme[#f] otherwise. +Returns @racket[#t] if the window is enabled when all of its ancestors + are enabled, @racket[#f] otherwise. } @@ -276,8 +276,8 @@ Returns @scheme[#t] if the window is enabled when all of its ancestors Indicates whether the window is currently shown or not (when all of its ancestors are also shown). -The result is @scheme[#t] if this window is shown when its ancestors are - shown, or @scheme[#f] if this window remains hidden when its ancestors +The result is @racket[#t] if this window is shown when its ancestors are + shown, or @racket[#f] if this window remains hidden when its ancestors are shown. } @@ -295,7 +295,7 @@ On Mac OS X, when the application is running and user double-clicks an application-handled file or drags a file onto the application's icon, the main thread's application file handler is called (see -@scheme[application-file-handler]). The default handler calls the +@racket[application-file-handler]). The default handler calls the @method[window<%> on-drop-file] method of the most-recently activated frame if drag-and-drop is enabled for that frame, independent of the frame's eventspace (but the method is called in the frame's eventspace's handler @@ -309,7 +309,7 @@ On Mac OS X, when the application is running and user @methspec{ @index['("keyboard focus" "notification")]{Called} when a window - receives or loses the keyboard focus. If the argument is @scheme[#t], + receives or loses the keyboard focus. If the argument is @racket[#t], the keyboard focus was received, otherwise it was lost. Note that on Unix, keyboard focus can move to the menu bar @@ -368,14 +368,14 @@ Does nothing. Called when this window or a child window receives a keyboard event. The @method[window<%> on-subwindow-char] method of the receiver's top-level window is called first (see -@method[area<%> get-top-level-window]); if the return value is @scheme[#f], then the +@method[area<%> get-top-level-window]); if the return value is @racket[#f], then the @method[window<%> on-subwindow-char] method is called for the next child in the path to the receiver, and so on. Finally, if the receiver's -@method[window<%> on-subwindow-char] method returns @scheme[#f], the event is passed on to the receiver's +@method[window<%> on-subwindow-char] method returns @racket[#f], the event is passed on to the receiver's normal key-handling mechanism. -The @scheme[event] argument is the event that was generated for the - @scheme[receiver] window. +The @racket[event] argument is the event that was generated for the + @racket[receiver] window. The atomicity limitation @method[window<%> on-subwindow-event] applies to @method[window<%> on-subwindow-char] as well. That is, an insufficiently cooperative @@ -393,7 +393,7 @@ BEWARE: The default } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -405,14 +405,14 @@ Returns @scheme[#f]. Called when this window or a child window receives a mouse event. The @method[window<%> on-subwindow-event] method of the receiver's top-level window is called first (see -@method[area<%> get-top-level-window]); if the return value is @scheme[#f], the +@method[area<%> get-top-level-window]); if the return value is @racket[#f], the @method[window<%> on-subwindow-event] method is called for the next child in the path to the receiver, and so on. Finally, if the receiver's -@method[window<%> on-subwindow-event] method returns @scheme[#f], the event is passed on to the +@method[window<%> on-subwindow-event] method returns @racket[#f], the event is passed on to the receiver's normal mouse-handling mechanism. -The @scheme[event] argument is the event that was generated for the - @scheme[receiver] window. +The @racket[event] argument is the event that was generated for the + @racket[receiver] window. If the @method[window<%> on-subwindow-event] method chain does not complete atomically (i.e., without requiring other threads to run) or does not complete @@ -424,7 +424,7 @@ If the @method[window<%> on-subwindow-event] method chain does not complete } @methimpl{ -Returns @scheme[#f]. +Returns @racket[#f]. }} @@ -478,8 +478,8 @@ This method is not called when the window is initially created; it is @popupmenuinfo["window" "window" ""] -The @scheme[menu] is popped up within the window at position - (@scheme[x], @scheme[y]). +The @racket[menu] is popped up within the window at position + (@racket[x], @racket[y]). } @@ -496,7 +496,7 @@ Enqueues an event to repaint the window. (integer-in -10000 10000))]{ @index["global coordinates"]{Converts} global coordinates to window - local coordinates. See also @scheme[client->screen] for information + local coordinates. See also @racket[client->screen] for information on screen coordinates. } @@ -505,7 +505,7 @@ Enqueues an event to repaint the window. @defmethod[(set-cursor [cursor (or/c (is-a?/c cursor%) #f)]) void?]{ -Sets the window's cursor. Providing @scheme[#f] instead of a cursor +Sets the window's cursor. Providing @racket[#f] instead of a cursor value removes the window's cursor. If a window does not have a cursor, it uses the cursor of its parent. @@ -524,7 +524,7 @@ Sets a window's label. The window's natural minimum size might be is not recomputed. If the window was not created with a label, or if the window was - created with a non-string label, @scheme[l] is ignored. + created with a non-string label, @racket[l] is ignored. See @method[window<%> get-label] for more information. @@ -538,7 +538,7 @@ Shows or hides a window. @MonitorMethod[@elem{The visibility of a window} @elem{the user clicking the window's close box, for example} @elem{@method[window<%> on-superwindow-show] or @method[top-level-window<%> on-close]} @elem{visibility}] -If @scheme[show?] is @scheme[#f], the window is hidden. Otherwise, the +If @racket[show?] is @racket[#f], the window is hidden. Otherwise, the window is shown. }