started updating the docs to say drracket: instead of drscheme:

This commit is contained in:
Robby Findler 2010-04-27 09:19:44 -05:00
parent 3ac0ba56f8
commit 1f5f0fb760
11 changed files with 253 additions and 248 deletions

View File

@ -13,19 +13,21 @@ all of the names in the tools library, for use defining keybindings
racket/contract racket/contract
racket/class racket/class
"private/link.rkt" ;; these have to be absolute requires for `include-extracted' to work with this file.
"private/drsig.rkt" drscheme/private/link
drscheme/private/drsig
drscheme/private/language-object-contract
framework framework
framework/splash framework/splash
mrlib/switchable-button mrlib/switchable-button
scribble/srcdoc scribble/srcdoc)
"private/language-object-contract.rkt")
(require (for-syntax scheme/base)) (require (for-syntax scheme/base))
(require/doc "private/ts.rkt" scheme/base scribble/manual) (require/doc drscheme/private/ts ;; probably this also has to be an absolute require
scheme/base scribble/manual)
(require/doc (for-label errortrace/errortrace-key (require/doc (for-label errortrace/errortrace-key
scheme/pretty scheme/pretty

View File

@ -1,5 +1,4 @@
#reader scribble/reader #lang at-exp racket/base
#lang scheme/base
(require (for-syntax scheme/base)) (require (for-syntax scheme/base))
(require scribble/manual (require scribble/manual
@ -30,14 +29,14 @@
(provide tools-title tools-include) (provide tools-title tools-include)
(define (tools-title name) (define (tools-title name)
(title (tt (format "drscheme:~a" name)))) (title (tt (format "drracket:~a" name))))
(define-syntax (tools-include stx) (define-syntax (tools-include stx)
(syntax-case stx () (syntax-case stx ()
[(_ name) [(_ name)
(string? (syntax-e #'name)) (string? (syntax-e #'name))
(let ([name (syntax-e #'name)]) (let ([name (syntax-e #'name)])
(with-syntax ([rx (regexp (format "^drscheme:~a:" name))]) (with-syntax ([rx (regexp (regexp-quote (format "^drracket:~a:" name)))])
#'(include-previously-extracted "tool-lib-extracts.ss" rx)))])) #'(include-previously-extracted scribblings/tools/tool-lib-extracts rx)))]))
(provide docs-get/extend) (provide docs-get/extend)
(define-syntax (docs-get/extend stx) (define-syntax (docs-get/extend stx)
@ -47,18 +46,18 @@
(with-syntax ([get (datum->syntax (with-syntax ([get (datum->syntax
#'id #'id
(string->symbol (string->symbol
(format "drscheme:get/extend:get-~a" (format "drracket:get/extend:get-~a"
(syntax-e #'id))))] (syntax-e #'id))))]
[extend (datum->syntax [extend (datum->syntax
#'id #'id
(string->symbol (string->symbol
(format "drscheme:get/extend:extend-~a" (format "drracket:get/extend:extend-~a"
(syntax-e #'id))))]) (syntax-e #'id))))])
#'(begin #'(begin
@defproc*[([(extend (mixin mixin-contract)) @defproc*[([(extend (mixin mixin-contract))
void?] void?]
[(extend (mixin mixin-contract) (before boolean?)) [(extend (mixin mixin-contract) (before boolean?))
void?])]{ void?])]{
Adds a new mixin to the class eventually created in DrScheme.} Adds a new mixin to the class eventually created in DrRacket.}
@defproc[(get) class?]{ @defproc[(get) class?]{
Returns the class (with all registered mixins applied).}))])) Returns the class (with all registered mixins applied).}))]))

View File

@ -2,18 +2,18 @@
@(require "common.ss") @(require "common.ss")
@(tools-title "debug") @(tools-title "debug")
@defmixin[drscheme:debug:profile-unit-frame-mixin @defmixin[drracket:debug:profile-unit-frame-mixin
(drscheme:frame:<%> drscheme:unit:frame<%>) (drracket:frame:<%> drracket:unit:frame<%>)
()]{ ()]{
} }
@defmixin[drscheme:debug:profile-interactions-text-mixin @defmixin[drracket:debug:profile-interactions-text-mixin
(drscheme:rep:text<%>) (drracket:rep:text<%>)
()]{ ()]{
} }
@defmixin[drscheme:debug:profile-definitions-text-mixin @defmixin[drracket:debug:profile-definitions-text-mixin
(drscheme:unit:definitions-text<%> text%) (drracket:unit:definitions-text<%> text%)
()]{ ()]{
} }

View File

@ -2,7 +2,7 @@
@(require "common.ss") @(require "common.ss")
@(tools-title "frame") @(tools-title "frame")
@defclass[drscheme:frame:name-message% canvas% ()]{ @defclass[drracket:frame:name-message% canvas% ()]{
This class implements the little filename button in the top-right hand This class implements the little filename button in the top-right hand
side of drscheme's frame. side of drscheme's frame.
@ -31,14 +31,14 @@ hasn't been saved is shown.
}}} }}}
@defmixin[drscheme:frame:mixin (drscheme:frame:basics<%> frame:text-info<%> frame:editor<%>) (drscheme:frame:<%>)]{ @defmixin[drracket:frame:mixin (drracket:frame:basics<%> frame:text-info<%> frame:editor<%>) (drracket:frame:<%>)]{
Provides an implementation of Provides an implementation of
@scheme[drscheme:frame:<%>] @scheme[drracket:frame:<%>]
} }
@defmixin[drscheme:frame:basics-mixin (frame:standard-menus<%>) (drscheme:frame:basics<%>)]{ @defmixin[drracket:frame:basics-mixin (frame:standard-menus<%>) (drracket:frame:basics<%>)]{
Use this mixin to establish some common menu items across various DrScheme windows. Use this mixin to establish some common menu items across various DrScheme windows.
@ -176,14 +176,14 @@ Returns @scheme[#t].
}} }}
@definterface[drscheme:frame:basics<%> (frame:standard-menus<%>)]{ @definterface[drracket:frame:basics<%> (frame:standard-menus<%>)]{
This interface is the result of the @scheme[drscheme:frame:basics-mixin] This interface is the result of the @scheme[drracket:frame:basics-mixin]
} }
@definterface[drscheme:frame:<%> (frame:editor<%> frame:text-info<%> drscheme:frame:basics<%>)]{ @definterface[drracket:frame:<%> (frame:editor<%> frame:text-info<%> drracket:frame:basics<%>)]{
@ -196,7 +196,7 @@ menu. This method is intended to be overridden. It is
expected to add other Show/Hide menu items to the show menu. expected to add other Show/Hide menu items to the show menu.
See also See also
@method[drscheme:frame:<%> get-show-menu]. @method[drracket:frame:<%> get-show-menu].
} }
@methimpl{ @methimpl{
@ -212,10 +212,10 @@ Does nothing.
@index{View menu} @index{View menu}
returns the view menu, for use by the returns the view menu, for use by the
@method[drscheme:frame:<%> update-shown] method. @method[drracket:frame:<%> update-shown] method.
See also See also
@method[drscheme:frame:<%> add-show-menu-items]. @method[drracket:frame:<%> add-show-menu-items].
The method (and others) uses the word @tt{show} to preserve The method (and others) uses the word @tt{show} to preserve
backwards compatibility from when the menu itself was named backwards compatibility from when the menu itself was named
@ -251,7 +251,7 @@ Call this method whenever the state of the show menu might
need to change. need to change.
See also See also
@method[drscheme:frame:<%> get-show-menu]. @method[drracket:frame:<%> get-show-menu].
} }
@methimpl{ @methimpl{

View File

@ -2,16 +2,16 @@
@(require "common.ss") @(require "common.ss")
@(tools-title "language") @(tools-title "language")
@definterface[drscheme:language:simple-module-based-language<%> ()]{ @definterface[drracket:language:simple-module-based-language<%> ()]{
This interface represents the bare essentials when defining This interface represents the bare essentials when defining
a module-based language. Use the a module-based language. Use the
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] @scheme[drracket:language:simple-module-based-language->module-based-language-mixin]
mixin to construct an implementation of mixin to construct an implementation of
@scheme[drscheme:language:module-based-language<%>] from an implementation of this interface. @scheme[drracket:language:module-based-language<%>] from an implementation of this interface.
The class The class
@scheme[drscheme:language:simple-module-based-language%] provides an implementation of this interface. @scheme[drracket:language:simple-module-based-language%] provides an implementation of this interface.
@ -19,7 +19,7 @@ The class
(cons number (listof number))]{ (cons number (listof number))]{
Returns a list of numbers, whose length must be the same as Returns a list of numbers, whose length must be the same as
the result of the result of
@method[drscheme:language:simple-module-based-language<%> get-language-position]. Each number indicates the sorted order of the @method[drracket:language:simple-module-based-language<%> get-language-position]. Each number indicates the sorted order of the
language positions in the language dialog. language positions in the language dialog.
} }
@ -27,7 +27,7 @@ language positions in the language dialog.
@defmethod[(get-language-position) @defmethod[(get-language-position)
(cons string (listof string))]{ (cons string (listof string))]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> get-language-position]. @method[drracket:language:language<%> get-language-position].
} }
@ -36,8 +36,8 @@ This method is the same as
This method specifies the module that defines the language. This method specifies the module that defines the language.
This method replaces This method replaces
@method[drscheme:language:language<%> front-end/complete-program] and @method[drracket:language:language<%> front-end/complete-program] and
@method[drscheme:language:language<%> front-end/interaction]. @method[drracket:language:language<%> front-end/interaction].
The result is expected to be the The result is expected to be the
@ -66,7 +66,7 @@ for this language.
}} }}
@defclass[drscheme:language:simple-module-based-language% object% (drscheme:language:simple-module-based-language<%>)]{ @defclass[drracket:language:simple-module-based-language% object% (drracket:language:simple-module-based-language<%>)]{
@ -79,8 +79,8 @@ for this language.
[language-id string?])]{ [language-id string?])]{
The init args are used as the results of the The init args are used as the results of the
@method[drscheme:language:simple-module-based-language% get-module] and @method[drracket:language:simple-module-based-language% get-module] and
@method[drscheme:language:simple-module-based-language% get-language-position] methods @method[drracket:language:simple-module-based-language% get-language-position] methods
} }
@ -132,12 +132,12 @@ returns the corresponding init arg.
}} }}
@defmixin[drscheme:language:simple-module-based-language->module-based-language-mixin (drscheme:language:simple-module-based-language<%>) (drscheme:language:module-based-language<%>)]{ @defmixin[drracket:language:simple-module-based-language->module-based-language-mixin (drracket:language:simple-module-based-language<%>) (drracket:language:module-based-language<%>)]{
@index{drscheme:language:simple-settings} @index{drracket:language:simple-settings}
This mixin uses a struct definition for its settings: This mixin uses a struct definition for its settings:
@schemeblock[ @schemeblock[
(define-struct drscheme:language:simple-settings (define-struct drracket:language:simple-settings
(case-sensitive (code:comment @#,t{boolean?}) (case-sensitive (code:comment @#,t{boolean?})
printing-style (code:comment @#,t{(symbols 'constructor 'quasiquote 'write 'print)}) printing-style (code:comment @#,t{(symbols 'constructor 'quasiquote 'write 'print)})
fraction-style (code:comment @#,t{(symbols 'mixed-fraction 'mixed-fraction-e}) fraction-style (code:comment @#,t{(symbols 'mixed-fraction 'mixed-fraction-e})
@ -169,7 +169,7 @@ Constructs a configuration panel that lets the user
configure all of the settings for this language. configure all of the settings for this language.
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] @scheme[drracket:language:simple-module-based-language->module-based-language-mixin]
for details of the for details of the
simple-settings structure, this mixin's @scheme[settings] type. simple-settings structure, this mixin's @scheme[settings] type.
} }
@ -187,7 +187,7 @@ The defaults for the settings are
] ]
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] for details of the @scheme[drracket:language:simple-module-based-language->module-based-language-mixin] for details of the
simple-settings structure, this mixins @scheme[settings] type. simple-settings structure, this mixins @scheme[settings] type.
@ -225,7 +225,7 @@ Returns @scheme['mzscheme].
Constructs a vector from the structure. Constructs a vector from the structure.
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] @scheme[drracket:language:simple-module-based-language->module-based-language-mixin]
for details of the for details of the
simple-settings structure, this mixins @scheme[settings] type. simple-settings structure, this mixins @scheme[settings] type.
@ -254,7 +254,7 @@ debugging annotations. Additionally, it sets the
to show the debugging annotations when an error is raised. to show the debugging annotations when an error is raised.
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] for details of the @scheme[drracket:language:simple-module-based-language->module-based-language-mixin] for details of the
simple-settings structure, this mixin's @scheme[settings] type. simple-settings structure, this mixin's @scheme[settings] type.
@ -268,10 +268,10 @@ Translates the value to a string, based on the settings.
Restores a super struct inspector to render structs properly. Restores a super struct inspector to render structs properly.
(See also (See also
@method[drscheme:language:simple-module-based-language->module-based-language-mixin% on-execute]) @method[drracket:language:simple-module-based-language->module-based-language-mixin% on-execute])
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] for details of the @scheme[drracket:language:simple-module-based-language->module-based-language-mixin] for details of the
simple-settings structure, this mixin's @scheme[settings] type. simple-settings structure, this mixin's @scheme[settings] type.
@ -285,10 +285,10 @@ Translates the value to a string, based on the settings.
Restores a super struct inspector to render structs properly. Restores a super struct inspector to render structs properly.
(See also (See also
@method[drscheme:language:simple-module-based-language->module-based-language-mixin% on-execute]) @method[drracket:language:simple-module-based-language->module-based-language-mixin% on-execute])
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] @scheme[drracket:language:simple-module-based-language->module-based-language-mixin]
for details of the for details of the
simple-settings structure, this mixin's @scheme[settings] type. simple-settings structure, this mixin's @scheme[settings] type.
@ -303,7 +303,7 @@ Builds a settings structure from the vector, or @scheme[#f] if
the vector doesn't match the types of the structure. the vector doesn't match the types of the structure.
See also See also
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] for details of the @scheme[drracket:language:simple-module-based-language->module-based-language-mixin] for details of the
simple-settings structure, this mixin's @scheme[settings] type. simple-settings structure, this mixin's @scheme[settings] type.
@ -320,36 +320,36 @@ Returns @scheme[#t].
}} }}
@definterface[drscheme:language:module-based-language<%> ()]{ @definterface[drracket:language:module-based-language<%> ()]{
This interface is for languages that can be implemented This interface is for languages that can be implemented
with MzScheme @scheme[module]s. with MzScheme @scheme[module]s.
Use the Use the
@scheme[drscheme:language:module-based-language->language-mixin] @scheme[drracket:language:module-based-language->language-mixin]
mixin to construct an implementation of mixin to construct an implementation of
@scheme[drscheme:language:language<%>] from an implementation of this interface. @scheme[drracket:language:language<%>] from an implementation of this interface.
@defmethod[(config-panel [parent (is-a?/c panel%)]) @defmethod[(config-panel [parent (is-a?/c panel%)])
(case-> (-> settings) (settings -> void))]{ (case-> (-> settings) (settings -> void))]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> config-panel]. @method[drracket:language:language<%> config-panel].
} }
@defmethod[(default-settings) @defmethod[(default-settings)
settings]{ settings]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> default-settings]. @method[drracket:language:language<%> default-settings].
} }
@defmethod[(default-settings? [settings settings]) @defmethod[(default-settings? [settings settings])
boolean?]{ boolean?]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> default-settings?]. @method[drracket:language:language<%> default-settings?].
} }
@ -369,14 +369,14 @@ environment, based on the settings.
@defmethod[(get-language-numbers) @defmethod[(get-language-numbers)
(cons number (listof number))]{ (cons number (listof number))]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> get-language-numbers]. @method[drracket:language:language<%> get-language-numbers].
} }
@defmethod[(get-language-position) @defmethod[(get-language-position)
(cons string (listof string))]{ (cons string (listof string))]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> get-language-position]. @method[drracket:language:language<%> get-language-position].
} }
@ -390,7 +390,7 @@ The result is expected to be the
except as value, ie @scheme[quote]d. except as value, ie @scheme[quote]d.
See also See also
@method[drscheme:language:module-based-language<%> get-transformer-module]. @method[drracket:language:module-based-language<%> get-transformer-module].
} }
@ -428,14 +428,14 @@ If the result is @scheme[#f], no module is required into the
transformer part of the namespace. transformer part of the namespace.
See also See also
@method[drscheme:language:module-based-language<%> get-module]. @method[drracket:language:module-based-language<%> get-module].
} }
@defmethod[(marshall-settings [settings settings]) @defmethod[(marshall-settings [settings settings])
writable]{ writable]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> marshall-settings]. @method[drracket:language:language<%> marshall-settings].
} }
@ -443,7 +443,7 @@ This method is the same as
[run-in-user-thread ((-> void) -> void)]) [run-in-user-thread ((-> void) -> void)])
vod]{ vod]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> on-execute]. @method[drracket:language:language<%> on-execute].
} }
@ -452,7 +452,7 @@ This method is the same as
[port port]) [port port])
void?]{ void?]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> render-value]. @method[drracket:language:language<%> render-value].
} }
@ -462,14 +462,14 @@ This method is the same as
[width (or/c number (symbols 'infinity))]) [width (or/c number (symbols 'infinity))])
void?]{ void?]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> render-value/format]. @method[drracket:language:language<%> render-value/format].
} }
@defmethod[(unmarshall-settings [input writable]) @defmethod[(unmarshall-settings [input writable])
(or/c settings false/c)]{ (or/c settings false/c)]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> unmarshall-settings]. @method[drracket:language:language<%> unmarshall-settings].
} }
@ -503,7 +503,7 @@ Defaultly returns @scheme[#f].
}}} }}}
@defmixin[drscheme:language:module-based-language->language-mixin (drscheme:language:module-based-language<%>) (drscheme:language:language<%>)]{ @defmixin[drracket:language:module-based-language->language-mixin (drracket:language:module-based-language<%>) (drracket:language:language<%>)]{
@ -516,7 +516,7 @@ Reads a syntax object, from @scheme[input]. Does not use
For languages that use these mixins, there is no difference For languages that use these mixins, there is no difference
between this method and between this method and
@method[drscheme:language:module-based-language->language-mixin% front-end/interaction]. @method[drracket:language:module-based-language->language-mixin% front-end/interaction].
} }
@ -530,7 +530,7 @@ Reads a syntax object, from @scheme[input]. Does not use
For languages that use these mixins, there is no difference For languages that use these mixins, there is no difference
between this method and between this method and
@method[drscheme:language:module-based-language->language-mixin% front-end/complete-program]. @method[drracket:language:module-based-language->language-mixin% front-end/complete-program].
} }
@ -540,7 +540,7 @@ between this method and
string?]{ string?]{
Returns the last element of the list returned by Returns the last element of the list returned by
@method[drscheme:language:language<%> get-language-position]. @method[drracket:language:language<%> get-language-position].
} }
@ -553,16 +553,16 @@ Calls the super method.
Uses @scheme[namespace-require] Uses @scheme[namespace-require]
to install the result of to install the result of
@method[drscheme:language:module-based-language<%> get-module] and @method[drracket:language:module-based-language<%> get-module] and
Uses @scheme[namespace-transformer-require] Uses @scheme[namespace-transformer-require]
to install the result of to install the result of
@method[drscheme:language:module-based-language<%> get-transformer-module] into the user's namespace. @method[drracket:language:module-based-language<%> get-transformer-module] into the user's namespace.
}} }}
@definterface[drscheme:language:language<%> ()]{ @definterface[drracket:language:language<%> ()]{
Implementations of this interface are languages that Implementations of this interface are languages that
DrScheme supports. DrScheme supports.
@ -578,13 +578,13 @@ adding languages to DrScheme.
Returns the language-specific value for some capability. See Returns the language-specific value for some capability. See
also also
@scheme[drscheme:language:register-capability]. @scheme[drracket:language:register-capability].
} }
@methimpl{ @methimpl{
Defaultly returns the value from: Defaultly returns the value from:
@scheme[drscheme:language:get-capability-default]. @scheme[drracket:language:get-capability-default].
}} }}
@ -609,8 +609,8 @@ in the executable and @scheme[executable-filename] is the name
of a file where the executable goes. of a file where the executable goes.
See also See also
@scheme[drscheme:language:create-module-based-stand-alone-executable] and @scheme[drracket:language:create-module-based-stand-alone-executable] and
@scheme[drscheme:language:create-module-based-launcher]. @scheme[drracket:language:create-module-based-launcher].
} }
@ -624,7 +624,7 @@ Specifies the default settings for this language.
boolean?]{ boolean?]{
Return @scheme[#t] if the input settings matches the Return @scheme[#t] if the input settings matches the
default settings obtained via default settings obtained via
@method[drscheme:language:language<%> default-settings]. @method[drracket:language:language<%> default-settings].
} }
@ -636,7 +636,7 @@ no program is run. It is called from the user's eventspace's
main thread. main thread.
See also See also
@method[drscheme:rep:text% initialize-console]. @method[drracket:rep:text% initialize-console].
} }
@ -682,16 +682,16 @@ or
and the use of the expanded code dictates which applies. and the use of the expanded code dictates which applies.
See also See also
@method[drscheme:language:language<%> front-end/interaction] @method[drracket:language:language<%> front-end/interaction]
and and
@method[drscheme:language:language<%> front-end/finished-complete-program]. @method[drracket:language:language<%> front-end/finished-complete-program].
} }
@defmethod[(front-end/finished-complete-program [settings settings]) any]{ @defmethod[(front-end/finished-complete-program [settings settings]) any]{
This method is called when @onscreen{Run} is clicked, but only after This method is called when @onscreen{Run} is clicked, but only after
@method[drscheme:language:language<%> front-end/complete-program] @method[drracket:language:language<%> front-end/complete-program]
has been called. Specifically, has been called. Specifically,
@method[drscheme:language:language<%> front-end/complete-program] is @method[drracket:language:language<%> front-end/complete-program] is
first called to get a thunk that reads from the program. That thunk first called to get a thunk that reads from the program. That thunk
is called some number of times, eventually returning @scheme[eof], is called some number of times, eventually returning @scheme[eof],
or raising an exception. Then, this method is called. or raising an exception. Then, this method is called.
@ -705,13 +705,13 @@ and
[settings settings]) [settings settings])
(-> (or/c sexp/c syntax? eof-object?))]{ (-> (or/c sexp/c syntax? eof-object?))]{
This method is just like This method is just like
@method[drscheme:language:language<%> front-end/complete-program] @method[drracket:language:language<%> front-end/complete-program]
except that it is called with program fragments, for example the except that it is called with program fragments, for example the
expressions entered in the interactions window. It is also used in expressions entered in the interactions window. It is also used in
other contexts by tools to expand single expressions. other contexts by tools to expand single expressions.
See also See also
@method[drscheme:language:language<%> front-end/finished-complete-program]. @method[drracket:language:language<%> front-end/finished-complete-program].
} }
@defmethod[(get-comment-character) @defmethod[(get-comment-character)
@ -734,13 +734,13 @@ the drscheme window.
@defmethod[(get-language-numbers) @defmethod[(get-language-numbers)
(cons number (listof number))]{ (cons number (listof number))]{
This method is used in a manner analogous to This method is used in a manner analogous to
@method[drscheme:language:language<%> get-language-position]. @method[drracket:language:language<%> get-language-position].
Each element in the list indicates how the names at that Each element in the list indicates how the names at that
point in dialog will be sorted. Names with lower numbers point in dialog will be sorted. Names with lower numbers
appear first. If two languages are added to DrScheme with appear first. If two languages are added to DrScheme with
the same strings (as given by the the same strings (as given by the
@method[drscheme:language:language<%> get-language-position] method) the corresponding numbers returned by this method @method[drracket:language:language<%> get-language-position] method) the corresponding numbers returned by this method
must be the same. Additionally, no two languages can have the must be the same. Additionally, no two languages can have the
same set of numbers. same set of numbers.
@ -795,11 +795,11 @@ to this url.
string?]{ string?]{
This method is only called when This method is only called when
@method[drscheme:language:language<%> get-reader-module] returns an sexp. @method[drracket:language:language<%> get-reader-module] returns an sexp.
It is expected to return a string that contains N lines, It is expected to return a string that contains N lines,
where N is the result of calling where N is the result of calling
@method[drscheme:language:language<%> get-metadata-lines]. The string is prefixed to the buffer before the file is @method[drracket:language:language<%> get-metadata-lines]. The string is prefixed to the buffer before the file is
saved by DrScheme, and removed from the buffer after it is saved by DrScheme, and removed from the buffer after it is
opened in DrScheme. opened in DrScheme.
@ -811,9 +811,9 @@ name, but without the path, and without an extension. The
@scheme[settings] argument is the current language's settings value. @scheme[settings] argument is the current language's settings value.
See also See also
@method[drscheme:language:language<%> metadata->settings], @method[drracket:language:language<%> metadata->settings],
@method[drscheme:language:language<%> get-metadata-lines], and @method[drracket:language:language<%> get-metadata-lines], and
@method[drscheme:language:language<%> get-reader-module]. @method[drracket:language:language<%> get-reader-module].
} }
@ -822,14 +822,14 @@ See also
number]{ number]{
This method is only called when This method is only called when
@method[drscheme:language:language<%> get-reader-module] returns an sexp. @method[drracket:language:language<%> get-reader-module] returns an sexp.
The result of the method is a count of the number of lines The result of the method is a count of the number of lines
in the strings that in the strings that
@method[drscheme:language:language<%> get-metadata] returns. The @method[drracket:language:language<%> get-metadata] returns. The
@method[drscheme:language:language<%> get-metadata] function does not necessarily return the same string @method[drracket:language:language<%> get-metadata] function does not necessarily return the same string
each time it is called (see each time it is called (see
@method[drscheme:language:language<%> metadata->settings]) but it is expected to always return a string with a fixed @method[drracket:language:language<%> metadata->settings]) but it is expected to always return a string with a fixed
number of lines, as indicated by the result of this method. number of lines, as indicated by the result of this method.
@ -856,13 +856,13 @@ The result of this method is used when saving or loading files.
If the result is a sexp, saved files get a prefix inserted If the result is a sexp, saved files get a prefix inserted
at the beginning (the prefix is determined by calling at the beginning (the prefix is determined by calling
@method[drscheme:language:language<%> get-metadata]). When the file is then loaded, DrScheme recognizes this @method[drracket:language:language<%> get-metadata]). When the file is then loaded, DrScheme recognizes this
prefix and sets the language back to match the saved file. prefix and sets the language back to match the saved file.
See also See also
@method[drscheme:language:language<%> metadata->settings], @method[drracket:language:language<%> metadata->settings],
@method[drscheme:language:language<%> get-metadata-lines], and @method[drracket:language:language<%> get-metadata-lines], and
@method[drscheme:language:language<%> get-metadata]. @method[drracket:language:language<%> get-metadata].
} }
@ -902,15 +902,15 @@ object that can be written out to disk.
settings]{ settings]{
This method is only called when This method is only called when
@method[drscheme:language:language<%> get-reader-module] returns an sexp. @method[drracket:language:language<%> get-reader-module] returns an sexp.
When a file is opened in DrScheme, if this language's When a file is opened in DrScheme, if this language's
@method[drscheme:language:language<%> get-reader-module] returns an sexp, the prefix of the file @method[drracket:language:language<%> get-reader-module] returns an sexp, the prefix of the file
(the first N lines, where N is the number (the first N lines, where N is the number
returned by returned by
@method[drscheme:language:language<%> get-metadata-lines]) is scanned for @scheme["#reader"] followed by the @method[drracket:language:language<%> get-metadata-lines]) is scanned for @scheme["#reader"] followed by the
result of result of
@method[drscheme:language:language<%> get-reader-module]. If that pattern is found, the language is set to this language. @method[drracket:language:language<%> get-reader-module]. If that pattern is found, the language is set to this language.
Also, the entire prefix is passed, as a string, Also, the entire prefix is passed, as a string,
to this method which returns a @scheme[settings] value, used as to this method which returns a @scheme[settings] value, used as
the settings for this language. the settings for this language.
@ -1024,7 +1024,7 @@ if doc.txt files should be searched.
[port port]) [port port])
void?]{ void?]{
This method is just like This method is just like
@method[drscheme:language:language<%> render-value/format] except that it is expected to put the entire value on a @method[drracket:language:language<%> render-value/format] except that it is expected to put the entire value on a
single line with no newline after the value. single line with no newline after the value.
} }
@ -1043,7 +1043,7 @@ newlines in appropriate places and is expected to render a
newline after the value. newline after the value.
See also See also
@method[drscheme:language:language<%> render-value]. @method[drracket:language:language<%> render-value].
} }

View File

@ -13,7 +13,7 @@ Specifically, DrScheme will pass @scheme['drscheme:toolbar-buttons]
to the function and expect back a value matching this contract: to the function and expect back a value matching this contract:
@schemeblock[(listof (list/c string? @schemeblock[(listof (list/c string?
(is-a?/c bitmap%) (is-a?/c bitmap%)
(-> (is-a?/c drscheme:unit:frame<%>) any)))] (-> (is-a?/c drracket:unit:frame<%>) any)))]
which is then used to create new toolbar buttons, one for each list in the which is then used to create new toolbar buttons, one for each list in the
first. The string is the label on the button; the bitmap is the icon (it should be 16x16), first. The string is the label on the button; the bitmap is the icon (it should be 16x16),
and the function is called when the button is clicked. and the function is called when the button is clicked.

View File

@ -2,7 +2,7 @@
@(require "common.ss") @(require "common.ss")
@(tools-title "module-language") @(tools-title "module-language")
@definterface[drscheme:language:module-language<%> ()]{ @definterface[drracket:language:module-language<%> ()]{
The only language that implements this interface is DrScheme's ``Use the language declared in the source'' language, The only language that implements this interface is DrScheme's ``Use the language declared in the source'' language,
i.e., the ``Module'' language. i.e., the ``Module'' language.

View File

@ -3,11 +3,11 @@
@(tools-title "rep") @(tools-title "rep")
@definterface[drscheme:rep:text<%> ()]{ @definterface[drracket:rep:text<%> ()]{
} }
@defclass[drscheme:rep:text% scheme:text% (drscheme:rep:text<%>)]{ @defclass[drracket:rep:text% scheme:text% (drracket:rep:text<%>)]{
This class implements a read-eval-print loop for DrScheme. User This class implements a read-eval-print loop for DrScheme. User
submitted evaluations in DrScheme are evaluated asynchronously, in an submitted evaluations in DrScheme are evaluated asynchronously, in an
@ -16,7 +16,7 @@ class affect the implementation that uses it.
@defconstructor/make[([context (implements drscheme:rep:context<%>)])]{ @defconstructor/make[([context (implements drracket:rep:context<%>)])]{
} }
@defmethod[#:mode override @defmethod[#:mode override
@ -82,11 +82,11 @@ This function evaluates all of the expressions in a text.
It evaluates all of the expressions in @scheme[text] starting at It evaluates all of the expressions in @scheme[text] starting at
@scheme[start] and ending at @scheme[end], calling @scheme[start] and ending at @scheme[end], calling
@method[drscheme:rep:text% do-many-evals] to handle the evaluation. @method[drracket:rep:text% do-many-evals] to handle the evaluation.
The @scheme[complete-program?] argument determines if the The @scheme[complete-program?] argument determines if the
@method[drscheme:language:language<%> front-end/complete-program] method or the @method[drracket:language:language<%> front-end/complete-program] method or the
@method[drscheme:language:language<%> front-end/interaction] method is called. @method[drracket:language:language<%> front-end/interaction] method is called.
}} }}
@ -97,9 +97,9 @@ The @scheme[complete-program?] argument determines if the
any]{ any]{
Evaluates the program in the @scheme[port] argument. If @scheme[complete-program?] Evaluates the program in the @scheme[port] argument. If @scheme[complete-program?]
is @scheme[#t], this method calls the is @scheme[#t], this method calls the
@method[drscheme:language:language<%> front-end/complete-program] to evaluate @method[drracket:language:language<%> front-end/complete-program] to evaluate
the program. If it is @scheme[#f], it calls the program. If it is @scheme[#f], it calls
@method[drscheme:language:language<%> front-end/interaction] method. @method[drracket:language:language<%> front-end/interaction] method.
When evaluation finishes, it calls @scheme[cleanup] on the user's main thread. When evaluation finishes, it calls @scheme[cleanup] on the user's main thread.
This method must be called from the drscheme main thread. This method must be called from the drscheme main thread.
@ -107,17 +107,17 @@ The @scheme[complete-program?] argument determines if the
@defmethod[#:mode augment (after-many-evals) any]{ @defmethod[#:mode augment (after-many-evals) any]{
Called from the drscheme main thread after Called from the drscheme main thread after
@method[drscheme:rep:text% evaluate-from-port] finishes (no matter @method[drracket:rep:text% evaluate-from-port] finishes (no matter
how it finishes). how it finishes).
} }
@defmethod[#:mode augment (on-execute [run-on-user-thread (-> any)]) any]{ @defmethod[#:mode augment (on-execute [run-on-user-thread (-> any)]) any]{
Called from the drscheme thread after the language's Called from the drscheme thread after the language's
@method[drscheme:language:language<%> on-execute] @method[drracket:language:language<%> on-execute]
method has been invoked, and after the method has been invoked, and after the
special values have been setup (the ones registered special values have been setup (the ones registered
via @scheme[drscheme:language:add-snip-value]). via @scheme[drracket:language:add-snip-value]).
Use @scheme[run-on-user-thread] to initialize the user's parameters, etc. Use @scheme[run-on-user-thread] to initialize the user's parameters, etc.
@ -151,7 +151,7 @@ This is the custodian controlling the user's program.
@defmethod[(get-user-eventspace) @defmethod[(get-user-eventspace)
(or/c false/c eventspace?)]{ (or/c false/c eventspace?)]{
This is the user's eventspace. The result of This is the user's eventspace. The result of
@method[drscheme:rep:text% get-user-thread] is the main thread of this eventspace. @method[drracket:rep:text% get-user-thread] is the main thread of this eventspace.
} }
@ -159,7 +159,7 @@ This is the user's eventspace. The result of
language-settings]{ language-settings]{
Returns the user's language-settings for the most recently Returns the user's language-settings for the most recently
run program. Consider using run program. Consider using
@method[drscheme:unit:definitions-text<%> get-next-settings] instead, since the user may have selected a new language @method[drracket:unit:definitions-text<%> get-next-settings] instead, since the user may have selected a new language
since the program was last run. since the program was last run.
} }
@ -194,8 +194,8 @@ for more information about parameters.
void?]{ void?]{
Call this method to highlight errors associated with this repl. Call this method to highlight errors associated with this repl.
See also See also
@method[drscheme:rep:text% reset-highlighting], and @method[drracket:rep:text% reset-highlighting], and
@method[drscheme:rep:text% highlight-errors/exn]. @method[drracket:rep:text% highlight-errors/exn].
This method highlights a series of dis-contiguous ranges in This method highlights a series of dis-contiguous ranges in
the editor. the editor.
@ -212,7 +212,7 @@ and read errors -- does not extract any information from the
continuation marks) continuation marks)
See also See also
@method[drscheme:rep:text% highlight-errors]. @method[drracket:rep:text% highlight-errors].
} }
@ -222,12 +222,12 @@ See also
This inserts the ``Welcome to DrScheme'' message into the interactions This inserts the ``Welcome to DrScheme'' message into the interactions
buffer, calls buffer, calls
@method[drscheme:rep:text% reset-console], @method[drracket:rep:text% reset-console],
@method[drscheme:rep:text% insert-prompt], and @method[drracket:rep:text% insert-prompt], and
@method[editor<%> clear-undos]. @method[editor<%> clear-undos].
Once the console is initialized, this method calls Once the console is initialized, this method calls
@method[drscheme:language:language<%> first-opened]. Accordingly, this method should not be called to initialize @method[drracket:language:language<%> first-opened]. Accordingly, this method should not be called to initialize
a REPL when the user's evaluation is imminent. That is, a REPL when the user's evaluation is imminent. That is,
this method should be called when new tabs or new windows this method should be called when new tabs or new windows
are created, but not when the Run button is clicked. are created, but not when the Run button is clicked.
@ -252,7 +252,7 @@ This method is called when the user chooses the kill menu item.
void?]{ void?]{
Calls Calls
@method[drscheme:rep:text% shutdown]. @method[drracket:rep:text% shutdown].
Calls the super method. Calls the super method.
@ -279,8 +279,8 @@ parameterization for it.
@defmethod[(reset-highlighting) @defmethod[(reset-highlighting)
void?]{ void?]{
This method resets the highlighting being displayed for this repl. See also: This method resets the highlighting being displayed for this repl. See also:
@method[drscheme:rep:text% highlight-errors], and @method[drracket:rep:text% highlight-errors], and
@method[drscheme:rep:text% highlight-errors/exn]. @method[drracket:rep:text% highlight-errors/exn].
} }
@ -292,7 +292,7 @@ This function runs it's arguments in the user evaluation thread. This
thread is the same as the user's eventspace main thread. thread is the same as the user's eventspace main thread.
See also See also
@method[drscheme:rep:text% do-many-evals]. @method[drracket:rep:text% do-many-evals].
} }
@methimpl{ @methimpl{
@ -331,7 +331,7 @@ in the user's eventspace
}} }}
@defmixin[drscheme:rep:drs-bindings-keymap-mixin (editor:keymap<%>) ()]{ @defmixin[drracket:rep:drs-bindings-keymap-mixin (editor:keymap<%>) ()]{
This mixin adds some drscheme-specific keybindings to the This mixin adds some drscheme-specific keybindings to the
editor it is mixed onto. editor it is mixed onto.
@ -357,10 +357,10 @@ interactions windows.}
}} }}
@definterface[drscheme:rep:context<%> ()]{ @definterface[drracket:rep:context<%> ()]{
Objects that match this interface provide all of the services that the Objects that match this interface provide all of the services that the
@scheme[drscheme:rep:text%] class needs to connect with it's context. @scheme[drracket:rep:text%] class needs to connect with it's context.
@ -399,7 +399,7 @@ initiating evaluation in the frame.
This method is also called when the user switches tabs. This method is also called when the user switches tabs.
See also See also
@method[drscheme:rep:context<%> enable-evaluation]. @method[drracket:rep:context<%> enable-evaluation].
} }
@ -413,11 +413,11 @@ at a time.
It is also called when the user switches tabs. It is also called when the user switches tabs.
See also See also
@method[drscheme:rep:context<%> disable-evaluation]. @method[drracket:rep:context<%> disable-evaluation].
} }
@defmethod[(ensure-rep-shown [rep (is-a?/c drscheme:rep:text<%>)]) @defmethod[(ensure-rep-shown [rep (is-a?/c drracket:rep:text<%>)])
void?]{ void?]{
This method is called to force the rep window to be visible when, for This method is called to force the rep window to be visible when, for
@ -430,7 +430,7 @@ that the appropriate tab is visible, if necessary.
@defmethod[(get-breakables) @defmethod[(get-breakables)
(values (or/c thread? false/c) (or/c custodian? false/c))]{ (values (or/c thread? false/c) (or/c custodian? false/c))]{
Returns the last values passed to Returns the last values passed to
@method[drscheme:rep:context<%> set-breakables]. @method[drracket:rep:context<%> set-breakables].
} }
@ -465,7 +465,7 @@ the next time the break button is clicked, it will either
break the thread or shutdown the custodian. break the thread or shutdown the custodian.
See also See also
@method[drscheme:rep:context<%> get-breakables]. @method[drracket:rep:context<%> get-breakables].
} }

View File

@ -2,4 +2,4 @@
(require scribble/extract) (require scribble/extract)
(provide-extracted (lib "tool-lib.ss" "drscheme")) (provide-extracted (lib "tool-lib.rkt" "drscheme"))

View File

@ -105,14 +105,14 @@ loaded at DrScheme's startup.
Each of @scheme[tools] files must contain a module that Each of @scheme[tools] files must contain a module that
@scheme[provide]s @scheme[tool@], which must be bound to a @scheme[provide]s @scheme[tool@], which must be bound to a
@scheme[unit]. The unit @scheme[unit]. The unit
must import the @scheme[drscheme:tool^] signature, which is must import the @scheme[drracket:tool^] signature, which is
provided by the @FileFirst{tool.ss} library in the provided by the @FileFirst{tool.ss} library in the
@scheme[drscheme] collection. The @scheme[drscheme:tool^] @scheme[drscheme] collection. The @scheme[drracket:tool^]
signature contains all of the names listed in this manual. signature contains all of the names listed in this manual.
The unit must export the @scheme[drscheme:tool-exports^] The unit must export the @scheme[drracket:tool-exports^]
signature. signature.
The @scheme[drscheme:tool-exports^] signature contains two The @scheme[drracket:tool-exports^] signature contains two
names: @scheme[phase1] and @scheme[phase2]. These names must names: @scheme[phase1] and @scheme[phase2]. These names must
be bound to thunks. After all of the tools are loaded, all of be bound to thunks. After all of the tools are loaded, all of
the @tt{phase1} functions are called and then all of the the @tt{phase1} functions are called and then all of the
@ -120,14 +120,14 @@ the @tt{phase1} functions are called and then all of the
only be called during the dynamic extent of those calls. only be called during the dynamic extent of those calls.
This mechanism is designed to support DrScheme's This mechanism is designed to support DrScheme's
@scheme[drscheme:language:language<%>] extension @scheme[drracket:language:language<%>] extension
capabilities. That is, this mechanism enables two tools to capabilities. That is, this mechanism enables two tools to
cooperate via new capabilities of languages. The first phase cooperate via new capabilities of languages. The first phase
is used for adding functionality that each language must is used for adding functionality that each language must
support and the second is used for creating instances of support and the second is used for creating instances of
languages. As an example, a tool may require certain languages. As an example, a tool may require certain
specialized language-specific information. It uses phase1 to specialized language-specific information. It uses phase1 to
extend the @scheme[drscheme:language:language<%>] interface extend the @scheme[drracket:language:language<%>] interface
and supply a default implementation of the interface and supply a default implementation of the interface
extension. Then, other languages that are aware of the extension. Then, other languages that are aware of the
extension can supply non-default implementations of the extension can supply non-default implementations of the
@ -135,15 +135,15 @@ additional functionality.
Phase 1 functions: Phase 1 functions:
@itemize[ @itemize[
@item{@scheme[drscheme:language:extend-language-interface]} @item{@scheme[drracket:language:extend-language-interface]}
@item{@scheme[drscheme:unit:add-to-program-editor-mixin]} @item{@scheme[drracket:unit:add-to-program-editor-mixin]}
] ]
Phase 2 functions: Phase 2 functions:
@itemize[ @itemize[
@item{@scheme[drscheme:language-configuration:add-language]} @item{@scheme[drracket:language-configuration:add-language]}
@item{@scheme[drscheme:language:get-default-mixin]} @item{@scheme[drracket:language:get-default-mixin]}
@item{@scheme[drscheme:language:get-language-extensions]} @item{@scheme[drracket:language:get-language-extensions]}
] ]
If the tool raises an error as it is loaded, invoked, or as If the tool raises an error as it is loaded, invoked, or as
@ -168,8 +168,8 @@ scheme/gui
(define tool@ (define tool@
(unit (unit
(import drscheme:tool^) (import drracket:tool^)
(export drscheme:tool-exports^) (export drracket:tool-exports^)
(define (phase1) (message-box "tool example" "phase1")) (define (phase1) (message-box "tool example" "phase1"))
(define (phase2) (message-box "tool example" "phase2")) (define (phase2) (message-box "tool example" "phase2"))
(message-box "tool example" "unit invoked"))) (message-box "tool example" "unit invoked")))
@ -297,20 +297,20 @@ not just those that use standard configurations and
@scheme[module]. @scheme[module].
Each language is a class that implement the Each language is a class that implement the
@scheme[drscheme:language:language<%>] interface. DrScheme also @scheme[drracket:language:language<%>] interface. DrScheme also
provides two simpler interfaces: provides two simpler interfaces:
@scheme[drscheme:language:module-based-language<%>] and @scheme[drracket:language:module-based-language<%>] and
@scheme[drscheme:language:simple-module-based-language<%>], @scheme[drracket:language:simple-module-based-language<%>],
and and
@scheme[mixins] @scheme[mixins]
@scheme[drscheme:language:simple-module-based-language->module-based-language-mixin] @scheme[drracket:language:simple-module-based-language->module-based-language-mixin]
and and
@scheme[drscheme:language:module-based-language->language-mixin] @scheme[drracket:language:module-based-language->language-mixin]
that build implementations of @scheme[language^]s from these simpler interfaces. that build implementations of @scheme[language^]s from these simpler interfaces.
Once you have an implementation of the Once you have an implementation of the
@scheme[drscheme:language:language^] interface, call @scheme[drracket:language:language^] interface, call
@scheme[drscheme:language-configuration:add-language] to add the language @scheme[drracket:language-configuration:add-language] to add the language
to DrScheme. to DrScheme.
Each language comes with its own type, called Each language comes with its own type, called
@ -326,10 +326,10 @@ the current settings for each language.
@subsection{Language Extensions} @subsection{Language Extensions}
Some tools may require additional functionality from the Some tools may require additional functionality from the
@scheme[drscheme:language:language] interface. The @scheme[drracket:language:language] interface. The
@scheme[drscheme:language:extend-language-interface] @scheme[drracket:language:extend-language-interface]
function and the function and the
@scheme[drscheme:language:get-default-mixin] @scheme[drracket:language:get-default-mixin]
mixin make this possible. mixin make this possible.
For example, the MrFlow tool expands a program, analyzes it For example, the MrFlow tool expands a program, analyzes it
@ -337,14 +337,14 @@ and then displays sets of values for each program point.
These sets of values should be rendered in the syntax of the These sets of values should be rendered in the syntax of the
language that MrFlow analyzes. Since MrFlow doesn't language that MrFlow analyzes. Since MrFlow doesn't
know which languages are available, it can call know which languages are available, it can call
@scheme[drscheme:language:extend-language-interface] @scheme[drracket:language:extend-language-interface]
to extend the @scheme[drscheme:language:language<%>] to extend the @scheme[drracket:language:language<%>]
interface with a method for rendering sets of values and interface with a method for rendering sets of values and
provide a default implementation of that method. Tools that provide a default implementation of that method. Tools that
know about MrFlow can then override the value rendering know about MrFlow can then override the value rendering
method to provide a language-specific implementation of method to provide a language-specific implementation of
value rendering. Additionally, since the value rendering. Additionally, since the
@scheme[drscheme:language:get-default-mixin] @scheme[drracket:language:get-default-mixin]
adds the default implementation for the value-set rendering adds the default implementation for the value-set rendering
method, all languages at least have some form of value-set method, all languages at least have some form of value-set
rendering. rendering.
@ -381,7 +381,7 @@ environment variable to load it in isolation.
Each frame in DrScheme has certain menus and functionality, Each frame in DrScheme has certain menus and functionality,
most of which is achieved by using the framework. most of which is achieved by using the framework.
Additionally, there is one mixin that DrScheme provides to Additionally, there is one mixin that DrScheme provides to
augment that. It is @scheme[drscheme:frame:basics-mixin]. augment that. It is @scheme[drracket:frame:basics-mixin].
Be sure to mix it into any new frame class that you add to Be sure to mix it into any new frame class that you add to
DrScheme. DrScheme.
@ -389,12 +389,12 @@ DrScheme.
Each of the names: Each of the names:
@itemize[ @itemize[
@item{@scheme[drscheme:get/extend:extend-interactions-text]} @item{@scheme[drracket:get/extend:extend-interactions-text]}
@item{@scheme[drscheme:get/extend:extend-definitions-text]} @item{@scheme[drracket:get/extend:extend-definitions-text]}
@item{@scheme[drscheme:get/extend:extend-interactions-canvas]} @item{@scheme[drracket:get/extend:extend-interactions-canvas]}
@item{@scheme[drscheme:get/extend:extend-definitions-canvas]} @item{@scheme[drracket:get/extend:extend-definitions-canvas]}
@item{@scheme[drscheme:get/extend:extend-unit-frame]} @item{@scheme[drracket:get/extend:extend-unit-frame]}
@item{@scheme[drscheme:get/extend:extend-tab]}] @item{@scheme[drracket:get/extend:extend-tab]}]
is bound to an extender function. In order to change the is bound to an extender function. In order to change the
behavior of drscheme, you can derive new classes from the behavior of drscheme, you can derive new classes from the
standard classes for the frame, texts, canvases. Each standard classes for the frame, texts, canvases. Each
@ -403,7 +403,7 @@ accepts must take a class as it's argument and return a
classes derived from that class as its result. For example: classes derived from that class as its result. For example:
@schemeblock[ @schemeblock[
(drscheme:get/extend:extend-interactions-text (drracket:get/extend:extend-interactions-text
(lambda (super%) (lambda (super%)
(class super% (class super%
(public method1) (public method1)
@ -420,7 +420,7 @@ extends the interactions text class with a method named @tt{method1}.
Macro-expanding a program may involve arbitrary computation Macro-expanding a program may involve arbitrary computation
and requires the setup of the correct language. To aid this, and requires the setup of the correct language. To aid this,
DrScheme's tool interface provides DrScheme's tool interface provides
@scheme[drscheme:eval:expand-program] to help. Use @scheme[drracket:eval:expand-program] to help. Use
this method to extract the fully expanded program text in a this method to extract the fully expanded program text in a
particular language. particular language.
@ -429,20 +429,20 @@ evaluate arbitrary code that the user wrote, tools that
expand the user's program should also allow the user to break expand the user's program should also allow the user to break
the expansion. To help with this, the tools interfaces the expansion. To help with this, the tools interfaces
provides these methods: provides these methods:
@method[drscheme:rep:context<%> enable-evaluation] @method[drracket:rep:context<%> enable-evaluation]
and and
@method[drscheme:rep:context<%> disable-evaluation]. @method[drracket:rep:context<%> disable-evaluation].
Since your tool will be expanding the program text, you Since your tool will be expanding the program text, you
should be both overriding should be both overriding
@method[drscheme:rep:context<%> enable-evaluation] @method[drracket:rep:context<%> enable-evaluation]
and and
@method[drscheme:rep:context<%> disable-evaluation] @method[drracket:rep:context<%> disable-evaluation]
to disable your tool and calling them to disable your tool and calling them
to ensure that only one expansion is happening to ensure that only one expansion is happening
at a time. at a time.
Finally, DrScheme provides the Finally, DrScheme provides the
@method[drscheme:rep:context<%> set-breakables] @method[drracket:rep:context<%> set-breakables]
method. This method controls what behavior the Break button method. This method controls what behavior the Break button
has. has.
@ -452,7 +452,7 @@ has.
DrScheme provides support for multiple editor modes. Tools DrScheme provides support for multiple editor modes. Tools
register modes via register modes via
@scheme[drscheme:modes:add-mode]. Each mode is @scheme[drracket:modes:add-mode]. Each mode is
visible in the @onscreen{Modes} submenu of the @onscreen{Edit} visible in the @onscreen{Modes} submenu of the @onscreen{Edit}
menu. Initially, DrScheme only supports two modes: scheme menu. Initially, DrScheme only supports two modes: scheme
mode and text mode. mode and text mode.
@ -468,13 +468,13 @@ Drscheme's capability interface provides a mechanism for
tools to allow languages to hide their GUI interface, if the tools to allow languages to hide their GUI interface, if the
tool does not apply to the language. Tools register tool does not apply to the language. Tools register
capabilities keyed with symbols via. capabilities keyed with symbols via.
@scheme[drscheme:language:register-capability]. Once @scheme[drracket:language:register-capability]. Once
registered, a tool can query a language, via the registered, a tool can query a language, via the
@method[drscheme:language:language<%> capability-value] @method[drracket:language:language<%> capability-value]
method. The result from this method controls whether or not method. The result from this method controls whether or not
the tool shows this part of the GUI for DrScheme. the tool shows this part of the GUI for DrScheme.
See @scheme[drscheme:language:register-capability] See @scheme[drracket:language:register-capability]
for a list of the capabilities registered by default. for a list of the capabilities registered by default.
@section{Check Syntax} @section{Check Syntax}
@ -491,7 +491,11 @@ not taking any advantage of
(-> (is-a?/c (-> (is-a?/c
top-level-window<%>) top-level-window<%>)
any))]{ any))]{
This is meant to be used with the @scheme['drscheme:toolbar-buttons] This is meant to be used with the @scheme['drscheme:toolbar-buttons]
argument to the info proc returned
from @scheme[read-language].
}
toolbar-buttons]
argument to the info proc returned argument to the info proc returned
from @scheme[read-language]. from @scheme[read-language].
} }

View File

@ -2,7 +2,7 @@
@(require "common.ss") @(require "common.ss")
@(tools-title "unit") @(tools-title "unit")
@definterface[drscheme:unit:tab<%> (drscheme:rep:context<%>)]{ @definterface[drracket:unit:tab<%> (drracket:rep:context<%>)]{
@defmethod[(break-callback) void?]{ @defmethod[(break-callback) void?]{
@methspec{ @methspec{
This method is called when the break button is clicked and This method is called when the break button is clicked and
@ -43,13 +43,13 @@ Enables the Run button, and the Run menu item and unlocks
(values (or/c thread? false/c) (or/c custodian? false/c))]{} (values (or/c thread? false/c) (or/c custodian? false/c))]{}
@defmethod[(get-defs) @defmethod[(get-defs)
(is-a?/c drscheme:unit:definitions-text<%>)]{ (is-a?/c drracket:unit:definitions-text<%>)]{
This text is initially the top half of the drscheme window and This text is initially the top half of the drscheme window and
contains the users program. contains the users program.
This text defaults to a @scheme[text%] This text defaults to a @scheme[text%]
object, but if you change object, but if you change
@scheme[drscheme:get/extend:extend-definitions-text] procedure, it will use the extended class to create the text. @scheme[drracket:get/extend:extend-definitions-text] procedure, it will use the extended class to create the text.
} }
@ -73,19 +73,19 @@ is already running (in another thread).
} }
@defmethod[(get-frame) @defmethod[(get-frame)
(is-a?/c drscheme:unit:frame%)]{ (is-a?/c drracket:unit:frame%)]{
Returns the frame that this tab is inside. Returns the frame that this tab is inside.
} }
@defmethod[(get-ints) @defmethod[(get-ints)
(is-a?/c drscheme:rep:text%)]{ (is-a?/c drracket:rep:text%)]{
This text is initially the bottom half of the drscheme window and This text is initially the bottom half of the drscheme window and
contains the users interactions with the REPL. contains the users interactions with the REPL.
This text defaults to a @scheme[drscheme:rep:text%] This text defaults to a @scheme[drracket:rep:text%]
object, but if you use the object, but if you use the
@scheme[drscheme:get/extend:extend-interactions-text] procedure, @scheme[drracket:get/extend:extend-interactions-text] procedure,
it will use the extended class to create the text. it will use the extended class to create the text.
} }
@ -120,7 +120,7 @@ This method is called when the tab is closed.
Calls the definitions text's Calls the definitions text's
@method[editor:basic<%> on-close] and interactions text's @method[editor:basic<%> on-close] and interactions text's
@method[drscheme:rep:text% on-close] methods. @method[drracket:rep:text% on-close] methods.
}} }}
@ -135,7 +135,7 @@ Calls the definitions text's
void?]{}} void?]{}}
@defclass[drscheme:unit:tab% object% (drscheme:unit:tab<%>)]{ @defclass[drracket:unit:tab% object% (drracket:unit:tab<%>)]{
The base class that implements the tab's functionality. The base class that implements the tab's functionality.
@ -155,7 +155,7 @@ Clears any error highlighting.
}} }}
@defmixin[drscheme:unit:program-editor-mixin (text% editor:basic<%>) ()]{ @defmixin[drracket:unit:program-editor-mixin (text% editor:basic<%>) ()]{
This mixes in the ability to reset the highlighting for This mixes in the ability to reset the highlighting for
error message when the user modifies the buffer. Use it for error message when the user modifies the buffer. Use it for
@ -189,7 +189,7 @@ Resets an error highlighting.
}} }}
@defclass[drscheme:unit:interactions-canvas% canvas:wide-snip% ()]{ @defclass[drracket:unit:interactions-canvas% canvas:wide-snip% ()]{
@ -200,7 +200,7 @@ Passes all arguments to @scheme[super-init].
}} }}
@defclass[drscheme:unit:frame% (drscheme:frame:basics-mixin (drscheme:frame:mixin frame:searchable%)) (drscheme:unit:frame<%>)]{ @defclass[drracket:unit:frame% (drracket:frame:basics-mixin (drracket:frame:mixin frame:searchable%)) (drracket:unit:frame<%>)]{
This frame inserts the Scheme and Language menus into the menu bar as it is initialized. This frame inserts the Scheme and Language menus into the menu bar as it is initialized.
@ -274,9 +274,9 @@ button or chooses the Run menu item.
@methimpl{ @methimpl{
It calls It calls
@method[drscheme:rep:context<%> ensure-rep-shown] and then it calls @method[drracket:rep:context<%> ensure-rep-shown] and then it calls
@method[drscheme:rep:text% do-many-text-evals] passing in the result of @method[drracket:rep:text% do-many-text-evals] passing in the result of
@method[drscheme:unit:frame<%> get-interactions-text] and its entire range, unless the first two characters are @method[drracket:unit:frame<%> get-interactions-text] and its entire range, unless the first two characters are
@litchar{#!} in which case, it skips the first line. @litchar{#!} in which case, it skips the first line.
@ -368,7 +368,7 @@ See also mrlib's @scheme[switchable-button%].
(is-a?/c editor-canvas%)]{ (is-a?/c editor-canvas%)]{
Returns the result of Returns the result of
@method[drscheme:unit:frame<%> get-definitions-canvas]. @method[drracket:unit:frame<%> get-definitions-canvas].
} }
@ -378,7 +378,7 @@ Returns the result of
(is-a?/c canvas%)]{ (is-a?/c canvas%)]{
Returns the result of Returns the result of
@scheme[drscheme:get/extend:get-definitions-canvas]. @scheme[drracket:get/extend:get-definitions-canvas].
} }
@ -416,7 +416,7 @@ Second case:
(is-a?/c editor<%>)]{ (is-a?/c editor<%>)]{
Returns the result of Returns the result of
@method[drscheme:unit:frame<%> get-definitions-text]. @method[drracket:unit:frame<%> get-definitions-text].
@ -427,7 +427,7 @@ Returns the result of
(is-a?/c editor<%>)]{ (is-a?/c editor<%>)]{
Returns the result of Returns the result of
@scheme[drscheme:get/extend:get-definitions-text]. @scheme[drracket:get/extend:get-definitions-text].
} }
@ -443,15 +443,15 @@ Returns the Run button. Mostly used for test suites.
(is-a?/c text:searching%)]{ (is-a?/c text:searching%)]{
returns the text that is active in the last canvas passed to returns the text that is active in the last canvas passed to
@method[drscheme:unit:frame% make-searchable] @method[drracket:unit:frame% make-searchable]
} }
@defmethod[(make-searchable [canvas (is-a?/c drscheme:unit:interactions-canvas%)]) @defmethod[(make-searchable [canvas (is-a?/c drracket:unit:interactions-canvas%)])
void?]{ void?]{
stores the canvas, until stores the canvas, until
@method[drscheme:unit:frame% get-text-to-search] is called. @method[drracket:unit:frame% get-text-to-search] is called.
} }
@ -461,9 +461,9 @@ stores the canvas, until
void?]{ void?]{
Sends the result of Sends the result of
@method[drscheme:unit:frame<%> get-interactions-text] the @method[drracket:unit:frame<%> get-interactions-text] the
@method[drscheme:rep:text% shutdown] and @method[drracket:rep:text% shutdown] and
@method[drscheme:rep:text% on-close] methods. @method[drracket:rep:text% on-close] methods.
Calls the super method. Calls the super method.
@ -487,7 +487,7 @@ width and height.
determines if the definitions window has not been determines if the definitions window has not been
modified. Used in conjunction with modified. Used in conjunction with
@method[drscheme:unit:frame% change-to-file]. @method[drracket:unit:frame% change-to-file].
} }
@ -510,7 +510,7 @@ the @scheme[modified?] argument as an initial visibility for
the save button. the save button.
This method is called by the This method is called by the
@method[drscheme:unit:definitions-text% set-modified] method. @method[drracket:unit:definitions-text% set-modified] method.
} }
@ -520,7 +520,7 @@ This method is called by the
Updates the save message on the drscheme frame. This method is called by Updates the save message on the drscheme frame. This method is called by
the the
@method[drscheme:unit:definitions-text% set-filename] method. @method[drracket:unit:definitions-text% set-filename] method.
} }
@ -536,13 +536,13 @@ items based on the contents of the windows.
}} }}
@definterface[drscheme:unit:frame<%> ()]{ @definterface[drracket:unit:frame<%> ()]{
@defmethod[(get-language-menu) (is-a?/c menu%)]{ Returns the @defmethod[(get-language-menu) (is-a?/c menu%)]{ Returns the
language-specific menu. This menu is called the language-specific menu. This menu is called the
@onscreen{Scheme} menu in the Scheme language but is, in general, @onscreen{Scheme} menu in the Scheme language but is, in general,
controlled by the @scheme['drscheme:language-menu-title] controlled by the @scheme['drscheme:language-menu-title]
capability (see @scheme[drscheme:language:register-capability] capability (see @scheme[drracket:language:register-capability]
for details on capabilities). for details on capabilities).
} }
@ -570,12 +570,12 @@ Shows the interactions window
} }
@defmethod[(get-current-tab) @defmethod[(get-current-tab)
(is-a?/c drscheme:unit:tab<%>)]{ (is-a?/c drracket:unit:tab<%>)]{
Returns the currently active tab. Returns the currently active tab.
} }
@defmethod[(get-tab-filename [i (<=/c 0 (#,(method drscheme:unit:frame<%> get-tab-count)))]) string?]{ @defmethod[(get-tab-filename [i (<=/c 0 (#,(method drracket:unit:frame<%> get-tab-count)))]) string?]{
Returns a string naming the file in the @scheme[i]th tab or, if Returns a string naming the file in the @scheme[i]th tab or, if
the file is not saved, something like ``Untitled''. the file is not saved, something like ``Untitled''.
} }
@ -595,24 +595,24 @@ Returns the currently active tab.
} }
@defmethod[(get-definitions-canvas) @defmethod[(get-definitions-canvas)
(is-a?/c drscheme:unit:definitions-canvas%)]{ (is-a?/c drracket:unit:definitions-canvas%)]{
This canvas is the canvas containing the This canvas is the canvas containing the
@method[drscheme:unit:frame<%> get-definitions-text]. It is initially the top half of the drscheme window. @method[drracket:unit:frame<%> get-definitions-text]. It is initially the top half of the drscheme window.
This canvas defaults to a @scheme[drscheme:unit:definitions-canvas%] This canvas defaults to a @scheme[drracket:unit:definitions-canvas%]
object, but if you change the object, but if you change the
@scheme[drscheme:get/extend:extend-definitions-canvas] procedure, it will use the class in the parameter to create the canvas. @scheme[drracket:get/extend:extend-definitions-canvas] procedure, it will use the class in the parameter to create the canvas.
} }
@defmethod[(get-definitions-text) @defmethod[(get-definitions-text)
(is-a?/c drscheme:unit:definitions-text%)]{ (is-a?/c drracket:unit:definitions-text%)]{
Calls result of Calls result of
@method[drscheme:unit:frame<%> get-current-tab]'s @method[drracket:unit:frame<%> get-current-tab]'s
@method[drscheme:unit:tab<%> get-defs] method. @method[drracket:unit:tab<%> get-defs] method.
} }
@ -626,38 +626,38 @@ Returns the Insert menu.
}} }}
@defmethod[(get-interactions-canvas) @defmethod[(get-interactions-canvas)
(instanceof (derivedfrom drscheme:unit:interactions-canvas%))]{ (instanceof (derivedfrom drracket:unit:interactions-canvas%))]{
This canvas is the canvas containing the This canvas is the canvas containing the
@method[drscheme:unit:frame<%> get-interactions-text]. It is initially the bottom half of the drscheme window. @method[drracket:unit:frame<%> get-interactions-text]. It is initially the bottom half of the drscheme window.
This canvas defaults to a @scheme[drscheme:unit:interactions-canvas%] This canvas defaults to a @scheme[drracket:unit:interactions-canvas%]
object, but if you use the object, but if you use the
@scheme[drscheme:get/extend:extend-interactions-canvas] procedure, @scheme[drracket:get/extend:extend-interactions-canvas] procedure,
it will use the extended class to create the canvas. it will use the extended class to create the canvas.
} }
@defmethod[(get-interactions-text) @defmethod[(get-interactions-text)
(instanceof (derivedfrom drscheme:rep:text%))]{ (is-a?/c drracket:rep:text%)]{
Calls result of Calls result of
@method[drscheme:unit:frame<%> get-current-tab]'s @method[drracket:unit:frame<%> get-current-tab]'s
@method[drscheme:unit:tab<%> get-ints] method. @method[drracket:unit:tab<%> get-ints] method.
} }
@defmethod[(get-tabs) @defmethod[(get-tabs)
(listof drscheme:unit:tab<%>)]{ (listof (is-a?/c drracket:unit:tab<%>))]{
Returns the list of tabs in this frame. Returns the list of tabs in this frame.
} }
@defmethod[#:mode pubment @defmethod[#:mode pubment
(on-tab-change [from-tab (is-a?/c drscheme:unit:tab<%>)] (on-tab-change [from-tab (is-a?/c drracket:unit:tab<%>)]
[to-tab (is-a?/c drscheme:unit:tab<%>)]) [to-tab (is-a?/c drracket:unit:tab<%>)])
void?]{ void?]{
@methspec{ @methspec{
@ -688,7 +688,7 @@ around, except by the this capability. If they are, things
can go funny (i.e., no good checks are in place). can go funny (i.e., no good checks are in place).
Note that the capability must be registered separately, via Note that the capability must be registered separately, via
@scheme[drscheme:language:register-capability]. @scheme[drracket:language:register-capability].
} }
@ -713,7 +713,7 @@ that the button is not referenced by this frame and thus can be gc'd.
} }
@defclass[drscheme:unit:definitions-text% (drscheme:rep:drs-bindings-keymap-mixin (drscheme:unit:program-editor-mixin (scheme:text-mixin text:info%))) (drscheme:unit:definitions-text<%>)]{ @defclass[drracket:unit:definitions-text% (drracket:rep:drs-bindings-keymap-mixin (drracket:unit:program-editor-mixin (scheme:text-mixin text:info%))) (drracket:unit:definitions-text<%>)]{
@defconstructor[()]{ @defconstructor[()]{
Passes all arguments to @scheme[super-init]. Passes all arguments to @scheme[super-init].
@ -724,7 +724,7 @@ Passes all arguments to @scheme[super-init].
void?]{ void?]{
Calls Calls
@method[drscheme:unit:frame% update-save-message]. @method[drracket:unit:frame% update-save-message].
} }
@defmethod[#:mode override @defmethod[#:mode override
@ -732,11 +732,11 @@ Calls
void?]{ void?]{
Calls Calls
@method[drscheme:unit:frame% update-save-button]. @method[drracket:unit:frame% update-save-button].
}} }}
@definterface[drscheme:unit:definitions-text<%> ()]{ @definterface[drracket:unit:definitions-text<%> ()]{
This interface is implemented by the definitions text. This interface is implemented by the definitions text.
@ -748,7 +748,7 @@ This interface is implemented by the definitions text.
@methspec{ @methspec{
Called when the next settings changes. See also Called when the next settings changes. See also
@method[drscheme:unit:definitions-text<%> get-next-settings]. @method[drracket:unit:definitions-text<%> get-next-settings].
} }
@ -766,7 +766,7 @@ the buffer to insert metadata. The metadata is only inserted
during saving, so tools that track changes to DrScheme will during saving, so tools that track changes to DrScheme will
need to ignore changes that occur after this method is need to ignore changes that occur after this method is
called, and before called, and before
@method[drscheme:unit:definitions-text<%> end-metadata-changes] is called. @method[drracket:unit:definitions-text<%> end-metadata-changes] is called.
A call to @scheme[begin-metadata-changes] will always be A call to @scheme[begin-metadata-changes] will always be
followed with a call to @scheme[end-metadata-changes] (ie, followed with a call to @scheme[end-metadata-changes] (ie,
@ -778,7 +778,7 @@ the calls cannot be nested).
void?]{ void?]{
Called when the changes to insert metadata are done, and the Called when the changes to insert metadata are done, and the
editor is back to its state at the time of the call to editor is back to its state at the time of the call to
@method[drscheme:unit:definitions-text<%> begin-metadata-changes]. @method[drracket:unit:definitions-text<%> begin-metadata-changes].
A call to @scheme[begin-metadata-changes] will always be A call to @scheme[begin-metadata-changes] will always be
followed with a call to @scheme[end-metadata-changes] (ie, followed with a call to @scheme[end-metadata-changes] (ie,
@ -804,7 +804,7 @@ the editor should be used.)
} }
@defmethod[(get-tab) @defmethod[(get-tab)
(instanceof drscheme:unit:tab%)]{ (is-a?/c drracket:unit:tab%)]{
Returns the editor's enclosing tab. Returns the editor's enclosing tab.
} }
@ -846,14 +846,14 @@ Changes the language settings for this window. If
changed, which affects newly created windows. changed, which affects newly created windows.
See also See also
@method[drscheme:unit:definitions-text<%> after-set-next-settings] and @method[drracket:unit:definitions-text<%> after-set-next-settings] and
@method[drscheme:unit:definitions-text<%> get-next-settings]. @method[drracket:unit:definitions-text<%> get-next-settings].
}} }}
@defclass[drscheme:unit:definitions-canvas% editor-canvas% ()]{ @defclass[drracket:unit:definitions-canvas% editor-canvas% ()]{
Initializes the visibility of the save button. Initializes the visibility of the save button.