a tools manual that contains all of the bindings (but with lots of editing still to go)

svn: r9752
This commit is contained in:
Robby Findler 2008-05-08 21:16:28 +00:00
parent 548e45408b
commit 233e8431bc
14 changed files with 1631 additions and 142 deletions

View File

@ -26,35 +26,41 @@
drscheme:font^ drscheme:font^
drscheme:modes^ drscheme:modes^
drscheme:tool-exports^ drscheme:tool-exports^
drscheme:tool^) drscheme:tool^
drscheme:tool-cm^)
(define-signature drscheme:modes^ (define-signature drscheme:modes-cm^
())
(define-signature drscheme:modes^ extends drscheme:modes-cm^
(add-mode (add-mode
get-modes get-modes
add-initial-modes add-initial-modes
(struct mode (name surrogate repl-submit matches-language) (struct mode (name surrogate repl-submit matches-language)
#:omit-constructor))) #:omit-constructor)))
(define-signature drscheme:font^ (define-signature drscheme:font-cm^
())
(define-signature drscheme:font^ extends drscheme:font-cm^
(setup-preferences)) (setup-preferences))
(define-signature drscheme:debug^ (define-signature drscheme:debug-cm^
(profile-definitions-text-mixin
profile-tab-mixin
profile-unit-frame-mixin
test-coverage-interactions-text-mixin
test-coverage-definitions-text-mixin
test-coverage-tab-mixin))
(define-signature drscheme:debug^ extends drscheme:debug-cm^
(make-debug-error-display-handler (make-debug-error-display-handler
make-debug-error-display-handler/text make-debug-error-display-handler/text
make-debug-eval-handler make-debug-eval-handler
hide-backtrace-window hide-backtrace-window
print-bug-to-stderr print-bug-to-stderr
profile-definitions-text-mixin
profile-tab-mixin
profile-unit-frame-mixin
profiling-enabled
test-coverage-enabled test-coverage-enabled
test-coverage-interactions-text-mixin
test-coverage-definitions-text-mixin profiling-enabled
test-coverage-tab-mixin
add-prefs-panel add-prefs-panel
get-error-color get-error-color
@ -66,18 +72,23 @@
display-srcloc-in-error display-srcloc-in-error
show-syntax-error-context)) show-syntax-error-context))
(define-signature drscheme:module-language^ (define-signature drscheme:module-langauge-cm^
(module-language<%>))
(define-signature drscheme:module-language^ extends drscheme:module-langauge-cm^
(add-module-language (add-module-language
module-language<%>
module-language-put-file-mixin)) module-language-put-file-mixin))
(define-signature drscheme:get-collection^ (define-signature drscheme:get-collection-cm^ ())
(define-signature drscheme:get-collection^ extends drscheme:get-collection-cm^
(get-file/collection)) (get-file/collection))
(define-signature drscheme:main^ ()) (define-signature drscheme:main-cm^ ())
(define-signature drscheme:main^ extends drscheme:main-cm^ ())
(define-signature drscheme:init^ (define-signature drscheme:init-cm^
())
(define-signature drscheme:init^ extends drscheme:init-cm^
(original-output-port (original-output-port
original-error-port original-error-port
original-error-display-handler original-error-display-handler
@ -89,7 +100,9 @@
system-namespace system-namespace
first-dir)) first-dir))
(define-signature drscheme:language-configuration^ (define-signature drscheme:language-configuration-cm^
())
(define-signature drscheme:language-configuration^ extends drscheme:language-configuration-cm^
(add-language (add-language
get-languages get-languages
(struct language-settings (language settings)) (struct language-settings (language settings))
@ -105,14 +118,18 @@
add-built-in-languages add-built-in-languages
not-a-language-language<%>)) not-a-language-language<%>))
(define-signature drscheme:tools^ (define-signature drscheme:tools-cm^
())
(define-signature drscheme:tools^ extends drscheme:tools-cm^
((struct successful-tool (spec bitmap name url)) ((struct successful-tool (spec bitmap name url))
get-successful-tools get-successful-tools
only-in-phase only-in-phase
load/invoke-all-tools load/invoke-all-tools
add-prefs-panel)) add-prefs-panel))
(define-signature drscheme:get/extend^ (define-signature drscheme:get/extend-cm^
())
(define-signature drscheme:get/extend^ extends drscheme:get/extend-cm^
(extend-tab (extend-tab
extend-interactions-text extend-interactions-text
extend-definitions-text extend-definitions-text
@ -126,7 +143,7 @@
get-definitions-canvas get-definitions-canvas
get-unit-frame)) get-unit-frame))
(define-signature drscheme:unit^ (define-signature drscheme:unit-cm^
(tab% (tab%
tab<%> tab<%>
frame% frame%
@ -134,26 +151,32 @@
definitions-canvas% definitions-canvas%
get-definitions-text% get-definitions-text%
definitions-text<%> definitions-text<%>
interactions-canvas% interactions-canvas%))
open-drscheme-window (define-signature drscheme:unit^ extends drscheme:unit-cm^
(open-drscheme-window
find-symbol find-symbol
get-program-editor-mixin get-program-editor-mixin
add-to-program-editor-mixin add-to-program-editor-mixin
(struct teachpack-callbacks (get-names remove add)))) (struct teachpack-callbacks (get-names remove add))))
(define-signature drscheme:frame^ (define-signature drscheme:frame-cm^
(<%> (<%>
mixin mixin
basics-mixin basics-mixin
basics<%> basics<%>))
create-root-menubar (define-signature drscheme:frame^ extends drscheme:frame-cm^
(create-root-menubar
add-keybindings-item add-keybindings-item
planet-spec?)) planet-spec?))
(define-signature drscheme:program^ (define-signature drscheme:program-cm^
(frame%)) (frame%))
(define-signature drscheme:program^ extends drscheme:program-cm^
())
(define-signature drscheme:eval^ (define-signature drscheme:eval-cm^
())
(define-signature drscheme:eval^ extends drscheme:eval-cm^
(expand-program (expand-program
expand-program/multiple expand-program/multiple
traverse-program/multiple traverse-program/multiple
@ -161,38 +184,49 @@
set-basic-parameters set-basic-parameters
get-snip-classes)) get-snip-classes))
(define-signature drscheme:text^ (define-signature drscheme:text-cm^
(text<%> (text<%>
text%)) text%))
(define-signature drscheme:text^ extends drscheme:text-cm^
())
(define-signature drscheme:setup^ (define-signature drscheme:setup-cm^
())
(define-signature drscheme:setup^ extends drscheme:setup-cm^
(do-setup)) (do-setup))
(define-signature drscheme:rep^ (define-signature drscheme:rep-cm^
(drs-bindings-keymap-mixin (drs-bindings-keymap-mixin
current-rep text%
text<%>
context<%>))
(define-signature drscheme:rep^ extends drscheme:rep-cm^
(current-rep
current-language-settings current-language-settings
current-value-port current-value-port
get-drs-bindings-keymap get-drs-bindings-keymap
error-delta error-delta
get-welcome-delta get-welcome-delta
get-dark-green-delta get-dark-green-delta
drs-autocomplete-mixin drs-autocomplete-mixin))
text%
text<%>
context<%>))
(define-signature drscheme:app^ (define-signature drscheme:app-cm^
())
(define-signature drscheme:app^ extends drscheme:app-cm^
(about-drscheme (about-drscheme
invite-tour invite-tour
add-language-items-to-help-menu add-language-items-to-help-menu
add-important-urls-to-help-menu add-important-urls-to-help-menu
switch-language-to)) switch-language-to))
(define-signature drscheme:draw-arrow^ (define-signature drscheme:draw-arrow-cm^
())
(define-signature drscheme:draw-arrow^ extends drscheme:draw-arrow-cm^
(draw-arrow)) (draw-arrow))
(define-signature drscheme:help-desk^ (define-signature drscheme:help-desk-cm^
())
(define-signature drscheme:help-desk^ extends drscheme:help-desk-cm^
(goto-help (goto-help
goto-tour goto-tour
goto-release-notes goto-release-notes
@ -200,7 +234,14 @@
help-desk help-desk
get-docs)) get-docs))
(define-signature drscheme:language^ (define-signature drscheme:language-cm^
(language<%>
module-based-language<%>
simple-module-based-language<%>
simple-module-based-language%
simple-module-based-language->module-based-language-mixin
module-based-language->language-mixin))
(define-signature drscheme:language^ extends drscheme:language-cm^
(get-default-mixin (get-default-mixin
extend-language-interface extend-language-interface
get-language-extensions get-language-extensions
@ -233,28 +274,39 @@
register-capability register-capability
capability-registered? capability-registered?
get-capability-default get-capability-default
get-capability-contract get-capability-contract))
language<%>
module-based-language<%>
simple-module-based-language<%>
simple-module-based-language%
simple-module-based-language->module-based-language-mixin
module-based-language->language-mixin))
(define-signature drscheme:multi-file-search^ (define-signature drscheme:multi-file-search-cm^
())
(define-signature drscheme:multi-file-search^ extends drscheme:multi-file-search-cm^
(multi-file-search)) (multi-file-search))
(define-signature drscheme:module-overview^ (define-signature drscheme:module-overview-cm^
())
(define-signature drscheme:module-overview^ extends drscheme:module-overview-cm^
(module-overview (module-overview
make-module-overview-pasteboard make-module-overview-pasteboard
fill-pasteboard)) fill-pasteboard))
(define-signature drscheme:tool-exports^ (define-signature drscheme:tool-exports-cm^
())
(define-signature drscheme:tool-exports^ extends drscheme:tool-exports-cm^
(phase1 (phase1
phase2)) phase2))
(define-signature drscheme:tool^ (define-signature drscheme:tool-cm^
((open (prefix drscheme:debug: drscheme:debug-cm^))
(open (prefix drscheme:unit: drscheme:unit-cm^))
(open (prefix drscheme:rep: drscheme:rep-cm^))
(open (prefix drscheme:frame: drscheme:frame-cm^))
(open (prefix drscheme:get/extend: drscheme:get/extend-cm^))
(open (prefix drscheme:language-configuration: drscheme:language-configuration-cm^))
(open (prefix drscheme:language: drscheme:language-cm^))
(open (prefix drscheme:help-desk: drscheme:help-desk-cm^))
(open (prefix drscheme:eval: drscheme:eval-cm^))
(open (prefix drscheme:modes: drscheme:modes-cm^))))
(define-signature drscheme:tool^
((open (prefix drscheme:debug: drscheme:debug^)) ((open (prefix drscheme:debug: drscheme:debug^))
(open (prefix drscheme:unit: drscheme:unit^)) (open (prefix drscheme:unit: drscheme:unit^))
(open (prefix drscheme:rep: drscheme:rep^)) (open (prefix drscheme:rep: drscheme:rep^))
@ -265,3 +317,4 @@
(open (prefix drscheme:help-desk: drscheme:help-desk^)) (open (prefix drscheme:help-desk: drscheme:help-desk^))
(open (prefix drscheme:eval: drscheme:eval^)) (open (prefix drscheme:eval: drscheme:eval^))
(open (prefix drscheme:modes: drscheme:modes^))))) (open (prefix drscheme:modes: drscheme:modes^)))))

File diff suppressed because it is too large Load Diff

View File

@ -4,10 +4,12 @@
(require scribble/manual (require scribble/manual
scribble/basic scribble/basic
scribble/extract
scheme/class scheme/class
scheme/contract) scheme/contract)
(provide (all-from-out scribble/manual) (provide (all-from-out scribble/manual)
(all-from-out scribble/basic) (all-from-out scribble/basic)
(all-from-out scribble/extract)
(all-from-out scheme/class) (all-from-out scheme/class)
(all-from-out scheme/contract)) (all-from-out scheme/contract))
@ -42,6 +44,6 @@
void?] void?]
[(extend (mixin mixin-contract) (before boolean?)) [(extend (mixin mixin-contract) (before boolean?))
void?])]{ void?])]{
Does stuff. Adds a new mixin to the class eventually created in DrScheme.
} }
@defproc[(get) class?]{Returns the class.}))])) @defproc[(get) class?]{Returns the class (with all registered mixins applied).}))]))

View File

@ -1,20 +1,11 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:debug}} @title{@tt{drscheme:debug}}
@(defmodule drscheme/tool-lib)
@defmixin[drscheme:debug:profile-unit-frame-mixin (drscheme:frame:<%> drscheme:unit:frame<%>) ()]{ @defmixin[drscheme:debug:profile-unit-frame-mixin (drscheme:frame:<%> drscheme:unit:frame<%>) ()]{}
} @defmixin[drscheme:debug:profile-interactions-text-mixin (drscheme:rep:text<%>) ()]{}
@defmixin[drscheme:debug:profile-definitions-text-mixin (drscheme:unit:definitions-text<%> text%) ()]{}
@defmixin[drscheme:debug:profile-interactions-text-mixin (drscheme:rep:text<%>) ()]{ @(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:debug:")
%% %% drscheme:unit %%
}
@defmixin[drscheme:debug:profile-definitions-text-mixin (drscheme:unit:definitions-text<%> text%) ()]{
}

View File

@ -0,0 +1,4 @@
#lang scribble/doc
@(require "common.ss")
@title{@tt{drscheme:eval}}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:eval:")

View File

@ -1,7 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:frame}} @title{@tt{drscheme:frame}}
@(defmodule drscheme/tool-lib)
@defclass[drscheme:frame:name-message% canvas% ()]{ @defclass[drscheme:frame:name-message% canvas% ()]{
@ -12,7 +11,7 @@ side of drscheme's frame.
@defconstructor/make[([parent (instance (implements @scheme[area-container<%>]))])]{} @defconstructor/make[([parent (instance (implements @scheme[area-container<%>]))])]{}
@defmethod[(set-message [name (union string \#f)] @defmethod[(set-message [name (or/c string? false/c)]
[short-name string?]) [short-name string?])
void?]{ void?]{
@methspec{ @methspec{
@ -267,3 +266,4 @@ Does nothing.
}}} }}}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:frame:")

View File

@ -1,11 +1,5 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:get/extend}} @title{@tt{drscheme:get/extend}}
@(defmodule drscheme/tool-lib)
@docs-get/extend[definitions-text] @(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:get/extend:")
@docs-get/extend[interactions-text]
@docs-get/extend[unit-frame]
@docs-get/extend[definitions-canvas]
@docs-get/extend[interactions-canvas]
@docs-get/extend[tab]

View File

@ -0,0 +1,4 @@
#lang scribble/doc
@(require "common.ss")
@title{@tt{drscheme:help-desk}}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:help-desk:")

View File

@ -0,0 +1,4 @@
#lang scribble/doc
@(require "common.ss")
@title{@tt{drscheme:language-configuration}}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:language-configuration:")

View File

@ -1,7 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:language}} @title{@tt{drscheme:language}}
@(defmodule drscheme/tool-lib)
@definterface[drscheme:language:simple-module-based-language<%> ()]{ @definterface[drscheme:language:simple-module-based-language<%> ()]{
@ -58,7 +57,7 @@ when the user selects this language.
This method must return a procedure that is used to read This method must return a procedure that is used to read
syntax from a port in the same manner as syntax from a port in the same manner as
\MzLink{mz:stxobj}{read-syntax}. It is used as the reader @scheme[read-syntax]. It is used as the reader
for this language. for this language.
@ -74,7 +73,7 @@ for this language.
[language-position (cons string (listof string))] [language-position (cons string (listof string))]
[language-numbers (cons number (listof number)) (map (lambda (x) 0) language-position)] [language-numbers (cons number (listof number)) (map (lambda (x) 0) language-position)]
[one-line-summary string? ""] [one-line-summary string? ""]
[documentation-reference (union \#f something-else) #f] [documentation-reference (or/c false/c something-else) #f]
[reader (->* () (any/c input-port?) (or/c syntax? eof-object?))] [reader (->* () (any/c input-port?) (or/c syntax? eof-object?))]
[language-id string?])]{ [language-id string?])]{
@ -238,15 +237,15 @@ Sets the structure inspector to a new inspector,
saving the original inspector for use during printing. saving the original inspector for use during printing.
Sets the Sets the
\MzLink{mz:p:global-port-print-handler}{global-port-print-handler} @scheme[global-port-print-handler]
to print based on the settings structure, but without to print based on the settings structure, but without
any newlines. any newlines.
If debugging is enabled, it sets the If debugging is enabled, it sets the
\MzLink{mz:p:current-eval}{current-eval} @scheme[current-eval]
handler to one that annotates each evaluated program with handler to one that annotates each evaluated program with
debugging annotations. Additionally, it sets the debugging annotations. Additionally, it sets the
\MzLink{mz:p:error-display-handler}{error-display-handler} @scheme[error-display-handler]
to show the debugging annotations when an error is raised. to show the debugging annotations when an error is raised.
See also @secref["mz:simple-settings"] for details of the See also @secref["mz:simple-settings"] for details of the
@ -289,7 +288,7 @@ simple-settings structure, this mixins \scm{settings} type.
@defmethod[#:mode override @defmethod[#:mode override
(unmarshall-settings) (unmarshall-settings)
(union \#f settings)]{ (or/c false/c settings)]{
Builds a settings structure from the vector, or @scheme[#f] if 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.
@ -397,7 +396,7 @@ when the user selects this language.
This method must return a procedure that is used to read This method must return a procedure that is used to read
syntax from a port in the same manner as syntax from a port in the same manner as
\MzLink{mz:stxobj}{read-syntax}. It is used as the reader @scheme[read-syntax]. It is used as the reader
for this language. for this language.
@ -457,7 +456,7 @@ This method is the same as
} }
@defmethod[(unmarshall-settings [input writable]) @defmethod[(unmarshall-settings [input writable])
(union settings \#f)]{ (or/c settings false/c)]{
This method is the same as This method is the same as
@method[drscheme:language:language<%> unmarshall-settings]. @method[drscheme:language:language<%> unmarshall-settings].
@ -479,9 +478,9 @@ The result of this method controls how the module is
attached to the user's namespace. If attached to the user's namespace. If
the method returns @scheme[#t], the method returns @scheme[#t],
the mzscheme primitive the mzscheme primitive
\MzLink{mz:namespaces}{namespace-require/copy} @scheme[namespace-require/copy]
is used and if it returns @scheme[#f], is used and if it returns @scheme[#f],
\MzLink{mz:namespaces}{namespace-require} @scheme[namespace-require]
is used. is used.
} }
@ -499,7 +498,7 @@ Defaultly returns @scheme[#f].
@defmethod[#:mode override @defmethod[#:mode override
(front-end/complete-program) (front-end/complete-program)
(-> (union sexp syntax eof))]{ (-> (or/c sexp/c syntax? eof-object?))]{
Reads a syntax object, from @scheme[input]. Does not use Reads a syntax object, from @scheme[input]. Does not use
@scheme[settings]. @scheme[settings].
@ -513,7 +512,7 @@ between this method and
@defmethod[#:mode override @defmethod[#:mode override
(front-end/interaction) (front-end/interaction)
(-> (union sexp syntax eof))]{ (-> (or/c sexp/c syntax? eof-object?))]{
Reads a syntax object, from @scheme[input]. Does not use Reads a syntax object, from @scheme[input]. Does not use
@scheme[settings]. @scheme[settings].
@ -541,10 +540,10 @@ Returns the last element of the list returned by
Calls the super method. Calls the super method.
Uses \MzLink{mz:namespaces}{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[drscheme:language:module-based-language<%> get-module] and
Uses \MzLink{mz:namespaces}{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[drscheme:language:module-based-language<%> get-transformer-module] into the user's namespace.
@ -590,7 +589,7 @@ the current GUI.
} }
@defmethod[(create-executable [settings settings] @defmethod[(create-executable [settings settings]
[parent (union (instanceof @scheme[dialog%]) (instanceof @scheme[frame%]))] [parent (or/c (is-a?/c dialog%) (is-a?/c frame%))]
[program-filename string?]) [program-filename string?])
void?]{ void?]{
This method creates an executable in the given language. The This method creates an executable in the given language. The
@ -633,7 +632,7 @@ See also
@defmethod[(front-end/complete-program [port port] @defmethod[(front-end/complete-program [port port]
[settings settings]) [settings settings])
(-> (union sexp syntax eof))]{ (-> (or/c sexp/c syntax? eof-object?))]{
@scheme[front-end/complete-program] method reads, parses, @scheme[front-end/complete-program] method reads, parses,
and optionally compiles a program in the language. The first and optionally compiles a program in the language. The first
argument contains all of the data to be read (until eof) and argument contains all of the data to be read (until eof) and
@ -652,8 +651,8 @@ This method is only called for programs in the definitions
window. Notably, it is not called for window. Notably, it is not called for
programs that are @scheme[load]ed or @scheme[eval]ed. programs that are @scheme[load]ed or @scheme[eval]ed.
See See
\MzLink{mz:p:current-load}{current-load} and @scheme[current-load] and
\MzLink{mz:p:current-eval}{current-eval} @scheme[current-eval]
for those. for those.
This method is expected to raise an appropriate exception if This method is expected to raise an appropriate exception if
@ -678,7 +677,7 @@ See also
@defmethod[(front-end/interaction [port input-port] @defmethod[(front-end/interaction [port input-port]
[settings settings]) [settings settings])
(-> (union sexp syntax eof))]{ (-> (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] except that it is called with program fragments, @method[drscheme:language:language<%> front-end/complete-program] except that it is called with program fragments,
for example the expressions entered in the interactions for example the expressions entered in the interactions
@ -892,54 +891,54 @@ changed from the defaults in MzScheme:
@item{@scheme[current-custodian] is set to a new custodian.} @item{@scheme[current-custodian] is set to a new custodian.}
@item{@scheme[current-namespace] has been set to a newly @item{@scheme[current-namespace] has been set to a newly
created empty namespace.This namespace has the following modules created empty namespace.This namespace has the following modules
copied (with \MzLink{mz:namespace-utilities}{@scheme[namespace-attach-module]}) copied (with @scheme[namespace-attach-module])
from DrScheme's original namespace: from DrScheme's original namespace:
@itemize{ @itemize{
@item{@scheme['mzscheme]} @item{@scheme['mzscheme]}
@item{@scheme['(lib "mred.ss" "mred")]} @item{@scheme['(lib "mred.ss" "mred")]}
}} }}
@item{ @item{
\MzLink{mz:p:read-curly-brace-as-paren}{@scheme[read-curly-brace-as-paren]} @scheme[read-curly-brace-as-paren]
is @scheme[#t],} is @scheme[#t],}
@item{ @item{
\MzLink{mz:p:read-square-bracket-as-paren}{@scheme[read-square-bracket-as-paren]} @scheme[read-square-bracket-as-paren]
is @scheme[#t],} is @scheme[#t],}
@item{The @item{The
\MzLink{mz:portwritehandler}{@scheme[port-write-handler]} @scheme[port-write-handler]
and and
\MzLink{mz:portwritehandler}{@scheme[port-display-handler]} @scheme[port-display-handler]
have been set to procedures have been set to procedures
that call that call
\MzlibLink{mz:mzlibpretty}{@scheme[pretty-print]} @scheme[pretty-print]
and and
\MzlibLink{mz:mzlibpretty}{@scheme[pretty-display]} instead @scheme[pretty-display] instead
of of
\MzLink{mz:readandwrite}{@scheme[write]} and @scheme[write] and
@scheme[display]. When @scheme[display]. When
@scheme[pretty-print] and @scheme[pretty-print] and
@scheme[pretty-display] are @scheme[pretty-display] are
called by these parameters, the called by these parameters, the
\MzlibLink{mz:mzlibpretty}{@scheme[pretty-print-columns]} parameter is set to @scheme[pretty-print-columns] parameter is set to
@scheme['infinity], so the output looks just like @scheme['infinity], so the output looks just like
@scheme[write] and @scheme[write] and
@scheme[display]. This is done so that @scheme[display]. This is done so that
special scheme values can be displayed as snips.} special scheme values can be displayed as snips.}
@item{The @item{The
\MzLink{mz:mzlibpconvert}{current-print-covert-hook} is to a @scheme[current-print-covert-hook] is to a
procedure so that @scheme[snip%]s are just returned procedure so that @scheme[snip%]s are just returned
directly to be inserted into the interactions directly to be inserted into the interactions
@scheme[text%] object.} @scheme[text%] object.}
@item{The output and input ports are set to point to the @item{The output and input ports are set to point to the
interactions window with these parameters: interactions window with these parameters:
\MzLink{mz:p:current-input-port}{@scheme[current-input-port]}, @scheme[current-input-port],
\MzLink{mz:p:current-output-port}{@scheme[current-output-port]}, and @scheme[current-output-port], and
\MzLink{mz:p:current-error-port}{@scheme[current-error-port]}.} @scheme[current-error-port].}
@item{The @item{The
@scheme[event-dispatch-handler] is set so that DrScheme can perform some initial setup and @scheme[event-dispatch-handler] is set so that DrScheme can perform some initial setup and
close down around the user's code.} close down around the user's code.}
@item{The @item{The
\MzLink{mz:p:current-directory}{@scheme[current-directory]} and @scheme[current-directory] and
\MzLink{mz:p:current-load-relative-directory}{@scheme[current-load-relative-directory]} @scheme[current-load-relative-directory]
are set to the directory where the definitions file is are set to the directory where the definitions file is
saved, or if it isn't saved, to the initial directory where saved, or if it isn't saved, to the initial directory where
DrScheme started up.} DrScheme started up.}
@ -948,9 +947,9 @@ changed from the defaults in MzScheme:
@item{ @item{
The The
\MzLink{mz:p:error-print-source-location}{error-print-source-location} @scheme[error-print-source-location]
parameter is set to @scheme[#f] and the parameter is set to @scheme[#f] and the
\MzLink{mz:p:error-display-handler}{error-display-handler} @scheme[error-display-handler]
is set to a handler that creates an error message from the is set to a handler that creates an error message from the
exception record, with font and color information and inserts exception record, with font and color information and inserts
that error message into the definitions window.} that error message into the definitions window.}
@ -1009,3 +1008,4 @@ Translates a Scheme value into a settings, returning
}} }}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:language:")

View File

@ -0,0 +1,4 @@
#lang scribble/doc
@(require "common.ss")
@title{@tt{drscheme:modes}}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:modes:")

View File

@ -1,7 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:rep}} @title{@tt{drscheme:rep}}
@(defmodule drscheme/tool-lib)
@definterface[drscheme:rep:text<%> ()]{ @definterface[drscheme:rep:text<%> ()]{
@ -97,7 +96,7 @@ The @scheme[complete-program?] argument determines if the
}} }}
@defmethod[(get-error-range) @defmethod[(get-error-range)
(union \#f (list (instanceof @scheme[text:basic%] number number)))]{ (or/c false/c (list/c (is-a?/c text:basic%) number? number?))]{
@methspec{ @methspec{
Indicates the highlighted error range. The state for the Indicates the highlighted error range. The state for the
@ -107,7 +106,7 @@ there can only be one highlighted error region at a time.
} }
@methimpl{ @methimpl{
If \scm{\#f}, no region is highlighted. If a list, the first If @scheme[#f], no region is highlighted. If a list, the first
element is the editor where the range is highlighted and the element is the editor where the range is highlighted and the
second and third are the beginning and ending regions, second and third are the beginning and ending regions,
respectively. respectively.
@ -116,13 +115,13 @@ respectively.
}} }}
@defmethod[(get-user-custodian) @defmethod[(get-user-custodian)
(union \#f custodian)]{ (or/c false/c custodian?)]{
This is the custodian controlling the user's program. This is the custodian controlling the user's program.
} }
@defmethod[(get-user-eventspace) @defmethod[(get-user-eventspace)
(union \#f 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[drscheme:rep:text% get-user-thread] is the main thread of this eventspace.
@ -138,7 +137,7 @@ since the program was last run.
} }
@defmethod[(get-user-namespace) @defmethod[(get-user-namespace)
(union \#f namespace)]{ (or/c false/c namespace?)]{
Returns the user's namespace. This method Returns the user's namespace. This method
returns a new namespace each time Run is returns a new namespace each time Run is
clicked. clicked.
@ -146,7 +145,7 @@ clicked.
} }
@defmethod[(get-user-thread) @defmethod[(get-user-thread)
(union \#f thread)]{ (or/c false/c thread?)]{
This method returns the thread that the users code runs This method returns the thread that the users code runs
in. It is returns a different result, each time the user in. It is returns a different result, each time the user
runs the program. runs the program.
@ -410,21 +409,21 @@ that the appropriate tab is visible, if necessary.
} }
@defmethod[(get-breakables) @defmethod[(get-breakables)
(values (union thread \#f) (union custodian \#f))]{ (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[drscheme:rep:context<%> set-breakables].
} }
@defmethod[(get-directory) @defmethod[(get-directory)
(union string \#f)]{ (union string false/c)]{
The result of this method is used as the initial directory for the The result of this method is used as the initial directory for the
user's program to be evaluated in. user's program to be evaluated in.
} }
@defmethod[(needs-execution) @defmethod[(needs-execution)
(union string? false/c)]{ (or/c string? false/c)]{
This method should return an explanatory string when the This method should return an explanatory string when the
state of the program that the repl reflects has changed. It state of the program that the repl reflects has changed. It
should return @scheme[#f] otherwise. should return @scheme[#f] otherwise.
@ -439,8 +438,8 @@ ignores any prior clicks.
} }
@defmethod[(set-breakables [thread (union thread \#f)] @defmethod[(set-breakables [thread (or/c thread false/c)]
[custodian (union custodian \#f)]) [custodian (or/c custodian false/c)])
void?]{ void?]{
Calling this method with a thread and a custodian means that Calling this method with a thread and a custodian means that
the next time the break button is clicked, it will either the next time the break button is clicked, it will either
@ -461,3 +460,4 @@ in the user's world.
}} }}
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:rep:")

View File

@ -13,6 +13,7 @@
) )
@title{@bold{Plugins}: Extending DrScheme} @title{@bold{Plugins}: Extending DrScheme}
@(defmodule drscheme/tool-lib)
@bold{This Manual} @bold{This Manual}
@ -484,8 +485,12 @@ for a list of the capabilities registered by default.
@include-section["get-slash-extend.scrbl"] @include-section["get-slash-extend.scrbl"]
@include-section["unit.scrbl"] @include-section["unit.scrbl"]
@include-section["language.scrbl"] @include-section["language.scrbl"]
@include-section["language-configuration.scrbl"]
@include-section["debug.scrbl"] @include-section["debug.scrbl"]
@include-section["rep.scrbl"] @include-section["rep.scrbl"]
@include-section["frame.scrbl"] @include-section["frame.scrbl"]
@include-section["help-desk.scrbl"]
@include-section["eval.scrbl"]
@include-section["modes.scrbl"]
@index-section[] @index-section[]

View File

@ -1,7 +1,6 @@
#lang scribble/doc #lang scribble/doc
@(require "common.ss") @(require "common.ss")
@title{@tt{drscheme:unit}} @title{@tt{drscheme:unit}}
@(defmodule drscheme/tool-lib)
@definterface[drscheme:unit:tab<%> (drscheme:rep:context<%>)]{ @definterface[drscheme:unit:tab<%> (drscheme:rep:context<%>)]{
@ -62,7 +61,7 @@ Enables the Run button, and the Run menu item and unlocks
@defmethod[#:mode override @defmethod[#:mode override
(get-breakables) (get-breakables)
(values (union thread \#f) (union custodian \#f))]{} (values (or/c thread? false/c) (or/c custodian? false/c))]{}
@defmethod[(get-defs) @defmethod[(get-defs)
(is-a?/c @scheme[drscheme:rep:text%])]{ (is-a?/c @scheme[drscheme:rep:text%])]{
@ -77,7 +76,7 @@ object, but if you change
@defmethod[#:mode override @defmethod[#:mode override
(get-directory) (get-directory)
(union string \#f)]{ (or/c string? false/c)]{
This is the directory that the file is saved in, or the This is the directory that the file is saved in, or the
directory DrScheme started up in, if the file has not been directory DrScheme started up in, if the file has not been
@ -151,8 +150,8 @@ Calls the definitions text's
void?]{} void?]{}
@defmethod[#:mode override @defmethod[#:mode override
(set-breakables [thread (union thread \#f)] (set-breakables [thread (or/c thread? false/c)]
[custodian (union custodian \#f)]) [custodian (or/c custodian? false/c)])
void?]{}} void?]{}}
@ -841,3 +840,4 @@ Initializes the visibility of the save button.
} }
@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:unit:")