diff --git a/collects/drscheme/private/drsig.ss b/collects/drscheme/private/drsig.ss index befdaa9226..54ac99bd98 100644 --- a/collects/drscheme/private/drsig.ss +++ b/collects/drscheme/private/drsig.ss @@ -26,35 +26,41 @@ drscheme:font^ drscheme:modes^ 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 get-modes add-initial-modes (struct mode (name surrogate repl-submit matches-language) #:omit-constructor))) - (define-signature drscheme:font^ + (define-signature drscheme:font-cm^ + ()) + (define-signature drscheme:font^ extends drscheme:font-cm^ (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/text make-debug-eval-handler hide-backtrace-window print-bug-to-stderr - profile-definitions-text-mixin - profile-tab-mixin - profile-unit-frame-mixin - profiling-enabled - test-coverage-enabled - test-coverage-interactions-text-mixin - test-coverage-definitions-text-mixin - test-coverage-tab-mixin - + + profiling-enabled + add-prefs-panel get-error-color @@ -66,18 +72,23 @@ display-srcloc-in-error 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 - module-language<%> 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)) - (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-error-port original-error-display-handler @@ -89,7 +100,9 @@ system-namespace 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 get-languages (struct language-settings (language settings)) @@ -105,14 +118,18 @@ add-built-in-languages 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)) get-successful-tools only-in-phase load/invoke-all-tools 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-interactions-text extend-definitions-text @@ -126,7 +143,7 @@ get-definitions-canvas get-unit-frame)) - (define-signature drscheme:unit^ + (define-signature drscheme:unit-cm^ (tab% tab<%> frame% @@ -134,26 +151,32 @@ definitions-canvas% get-definitions-text% definitions-text<%> - interactions-canvas% - open-drscheme-window + interactions-canvas%)) + (define-signature drscheme:unit^ extends drscheme:unit-cm^ + (open-drscheme-window find-symbol get-program-editor-mixin add-to-program-editor-mixin (struct teachpack-callbacks (get-names remove add)))) - (define-signature drscheme:frame^ + (define-signature drscheme:frame-cm^ (<%> mixin basics-mixin - basics<%> - create-root-menubar + basics<%>)) + (define-signature drscheme:frame^ extends drscheme:frame-cm^ + (create-root-menubar add-keybindings-item planet-spec?)) - (define-signature drscheme:program^ + (define-signature drscheme:program-cm^ (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/multiple traverse-program/multiple @@ -161,38 +184,49 @@ set-basic-parameters get-snip-classes)) - (define-signature drscheme:text^ + (define-signature drscheme:text-cm^ (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)) - (define-signature drscheme:rep^ + (define-signature drscheme:rep-cm^ (drs-bindings-keymap-mixin - current-rep + text% + text<%> + context<%>)) + (define-signature drscheme:rep^ extends drscheme:rep-cm^ + (current-rep current-language-settings current-value-port get-drs-bindings-keymap error-delta get-welcome-delta get-dark-green-delta - drs-autocomplete-mixin - text% - text<%> - context<%>)) + drs-autocomplete-mixin)) - (define-signature drscheme:app^ + (define-signature drscheme:app-cm^ + ()) + (define-signature drscheme:app^ extends drscheme:app-cm^ (about-drscheme invite-tour add-language-items-to-help-menu add-important-urls-to-help-menu 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)) - (define-signature drscheme:help-desk^ + (define-signature drscheme:help-desk-cm^ + ()) + (define-signature drscheme:help-desk^ extends drscheme:help-desk-cm^ (goto-help goto-tour goto-release-notes @@ -200,7 +234,14 @@ help-desk 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 extend-language-interface get-language-extensions @@ -233,28 +274,39 @@ register-capability capability-registered? get-capability-default - 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)) + get-capability-contract)) - (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)) - (define-signature drscheme:module-overview^ + (define-signature drscheme:module-overview-cm^ + ()) + (define-signature drscheme:module-overview^ extends drscheme:module-overview-cm^ (module-overview make-module-overview-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 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:unit: drscheme:unit^)) (open (prefix drscheme:rep: drscheme:rep^)) @@ -265,3 +317,4 @@ (open (prefix drscheme:help-desk: drscheme:help-desk^)) (open (prefix drscheme:eval: drscheme:eval^)) (open (prefix drscheme:modes: drscheme:modes^))))) + diff --git a/collects/drscheme/tool-lib.ss b/collects/drscheme/tool-lib.ss index eca151a8a8..9fc8551a19 100644 --- a/collects/drscheme/tool-lib.ss +++ b/collects/drscheme/tool-lib.ss @@ -6,25 +6,1453 @@ the main unit, starting up drscheme. After that, it just provides all of the names in the tools library, for use defining keybindings |# +#reader scribble/reader +#lang scheme/base +(require drscheme/private/link + drscheme/private/drsig + scheme/class + scheme/gui/base + scheme/unit + framework + scribble/srcdoc + framework/splash + scheme/contract) +(require (for-syntax scheme/base)) +(require/doc scheme/base scribble/manual) -(module tool-lib mzscheme - (require "private/link.ss" - "private/drsig.ss" - mzlib/class - mzlib/unit - framework - (lib "splash.ss" "framework")) (shutdown-splash) (define-values/invoke-unit/infer drscheme@) (close-splash) - (provide-signature-elements drscheme:tool^) + (provide-signature-elements drscheme:tool-cm^) ;; provide all of the classes & interfaces (provide drscheme:unit:program-editor-mixin) (define-syntax (drscheme:unit:program-editor-mixin stx) (syntax-case stx () [(_ a ...) #'((drscheme:unit:get-program-editor-mixin) a ...)] - [_ #'(drscheme:unit:get-program-editor-mixin)]))) + [_ #'(drscheme:unit:get-program-editor-mixin)])) - + +(define language-object + (object-contract + (config-panel ((is-a?/c area-container<%>) + . -> . + (case-> (any/c . -> . void?) (-> any/c)))) + (create-executable (any/c + (or/c (is-a?/c dialog%) (is-a?/c frame%)) + path? + . -> . + void?)) + (default-settings (-> any/c)) + (default-settings? (any/c . -> . boolean?)) + (order-manuals ((listof bytes?) . -> . (values (listof bytes?) boolean?))) + (front-end/complete-program (input-port? + any/c + . -> . + (-> any/c))) + (front-end/interaction (input-port? + any/c + . -> . + (-> any/c))) + (get-language-name (-> string?)) + (get-language-numbers (-> (cons/c number? (listof number?)))) + (get-language-position (-> (cons/c string? (listof string?)))) + (get-language-url (-> (or/c false/c string?))) + (get-one-line-summary (-> string?)) + (get-comment-character (-> (values string? char?))) + (get-style-delta (-> (or/c false/c + (is-a?/c style-delta%) + (listof (list/c (is-a?/c style-delta%) number? number?))))) + (marshall-settings (any/c . -> . printable/c)) + (on-execute (any/c ((-> any) . -> . any) . -> . any)) + (render-value (any/c + any/c + output-port? + . -> . + void?)) + (render-value/format (any/c + any/c + output-port? + (or/c number? (symbols 'infinity)) + . -> . + any)) + (unmarshall-settings (printable/c . -> . any)) + (capability-value + (->d ([s (and/c symbol? drscheme:language:capability-registered?)]) + () + [res (drscheme:language:get-capability-contract s)])))) + +(provide/doc + + ; + ; + ; + ; ; + ; ; + ; ; + ; ;;; ; ; ;;; ; + ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ;;;;;; ; ; ;;;; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; + ; ;;;; ; ;;;;; ; + ; + ; + ; + + + (proc-doc/names + drscheme:eval:set-basic-parameters + (-> (listof (is-a?/c snip-class%)) void?) + (snipclasses) + @{sets the parameters that are shared between the repl's + initialization and \\iscmprocedure{drscheme:eval:build-user-eventspace/custodian} + + Specifically, it sets these parameters: + \\begin{itemize} + \\item \\rawscm{current-namespace} has been set to a newly + created empty namespace. This namespace has the following modules + copied (with \\MzLink{mz:namespace-utilities}{\\rawscm{namespace-attach-module}}) + from DrScheme's original namespace: + \\begin{itemize} + \\item \\Symbol{mzscheme} + \\item \\scmc{'(lib \"mred.ss\" \"mred\")} + \\end{itemize} + + \\item + \\MzLink{mz:p:read-curly-brace-as-paren}{\\rawscm{read-curly-brace-as-paren}} + is \\scmc{\\#t}, + \\item + \\MzLink{mz:p:read-square-bracket-as-paren}{\\rawscm{read-square-bracket-as-paren}} + is \\scmc{\\#t}, + \\item + \\MzLink{mz:p:error-print-width}{\\rawscm{error-print-width}} is set to 250. + \\item + @scheme[flink current-ps-setup] + is set to a newly created + @scheme[ps-setup%] + object. + \\item The \\MzLink{mz:p:exit-handler}{\\rawscm{exit-handler}} is set to + a parameter that kills the user's custodian. + \\item The snip-class-list, returned by + @scheme[flink get-the-snip-class-list] + is initialized with all of the snipclasses in DrScheme's eventspace's snip-class-list. + + \\end{itemize}}) + + (proc-doc/names + drscheme:eval:get-snip-classes + (-> (listof (is-a?/c snip-class%))) + () + @{Returns a list of all of the snipclasses in the current eventspace.}) + + (proc-doc/names + drscheme:eval:expand-program + ((or/c port? drscheme:language:text/pos?) + drscheme:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + ((or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + . -> . + any) + . -> . + void?) + (input language-settings eval-compile-time-part? init kill-termination iter) + + @{Use this function to expand the contents of the definitions + window for use with external program processing tools. + + This function uses + @scheme[flink drscheme:eval:build-user-eventspace/custodian] + to build the user's environment. + The arguments \\var{language-settings}, \\var{init}, and + \\var{kill-termination} are passed to + @scheme[flink drscheme:eval:build-user-eventspace/custodian] % + . + + The \\var{input} argument specifies the source of the program. + + The \\var{eval-compile-time-part?} argument indicates if + \\Mzhyperref{\\rawscm{expand}}{mz:expansion} + is called or if + \\scheme|expand-top-level-with-compile-time-evals| + is called when the program is expanded. + Roughly speaking, if your tool will evaluate each expression + itself by calling + \\Mzhyperref{\\rawscm{eval}}{mz:evalload} + then pass \\scheme{#f}. Otherwise, if your tool + just processes the expanded program, be sure to pass + \\scheme{#t}. + + This function calls + @scheme[drscheme:language:language front-end/complete-program<%>] + to expand the program. + + The first argument to \\var{iter} is the expanded program + (represented as syntax) or eof. + The \\var{iter} argument is called for each expression in the + expanded program and once more with eof, unless an error is + raised during expansion. + It is called from the user's thread. + If an exception is raised during expansion of the + user's program, \\var{iter} is not called. + Consider setting the exception-handler during \\var{init} to + handle this situation. + + The second argument to \\var{iter} is a thunk that + continues expanding the rest of the contents of the + definitions window. If the first argument to \\var{iter} was + eof, this argument is just the primitive + \\rawscm{void}. + + See also + @scheme[flink drscheme:eval:expand-program/multiple] % + .}) + + (proc-doc/names + drscheme:eval:traverse-program/multiple + (drscheme:language-configuration:language-settings? + (-> void?) + (-> void?) + . -> . + ((or/c port? drscheme:language:text/pos?) + ((or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + . -> . + any) + boolean? + . -> . + void?)) + (language-settings init kill-termination) + + @{This function is similar to + @scheme[flink drscheme:eval:expand-program/multiple] + The only difference is that it does not + expand the program in the editor; instead + the processing function can decide how to + expand the program.}) + + (proc-doc/names + drscheme:eval:expand-program/multiple + (-> drscheme:language-configuration:language-settings? + boolean? + (-> void?) + (-> void?) + (-> (or/c port? drscheme:language:text/pos?) + (-> (or/c eof-object? syntax? (cons/c string? any/c)) + (-> any) + any) + boolean? + void?)) + (language-settings eval-compile-time-part? init kill-termination) + + @{This function is just like + @scheme[flink drscheme:eval:expand-program] + except that it is curried and the second application + can be used multiple times. + Use this function if you want to initialize the user's + thread (and namespace, etc) once but have program text + that comes from multiple sources. + + The extra boolean argument to the result function + determines if + @scheme[drscheme:language:language front-end/complete-program<%>] + or + @scheme[drscheme:language:language front-end/interaction<%>] + is called.}) + + (proc-doc/names + drscheme:eval:build-user-eventspace/custodian + (->* (drscheme:language-configuration:language-settings? + (-> void?) + (-> void?)) + () + (values eventspace? custodian?)) + ((language-settings init kill-termination) ()) + + @{This function creates a custodian and an eventspace (on the + new custodian) to expand the user's program. It does not + kill this custodian, but it can safely be shutdown (with + \\MzLink{mz:custodians}{custodian-shutdown-all}) after the + expansion is finished. + + It initializes the + user's eventspace's main thread with several parameters: + \\begin{itemize} + \\item \\rawscm{current-custodian} is set to a new custodian. + \\item + In addition, it calls + @scheme[flink drscheme:eval:set-basic-parameters] % + . + \\end{itemize} + + The \\var{language-settings} argument is the current + language and its settings. See + @scheme[flink drscheme:language-configuration:make-language-settings] + for details on that structure. + + If the program is associated with a DrScheme + frame, get the frame's language settings from the + @scheme[drscheme:unit:definitions-text get-next-settings<%>] + method of + @scheme[drscheme:unit:definitions-text<%>]. Also, the most recently chosen language in + the language dialog is saved via the framework's + preferences. Apply + @scheme[flink preferences:get] + to + @scheme[flink drscheme:language-configuration:get-settings-preferences-symbol] + for that \\var{language-settings}. + + The \\var{init} argument is called after the user's parameters + are all set, but before the program is run. It is called on + the user's thread. The + \\MzLink{mz:p:current-directory}{current-directory} and + \\MzLink{mz:p:current-load-relative-directory}{current-load-relative-directory} + parameters are not set, so if there are appropriate directories, + the \\var{init} argument is a good place to set them. + + The \\var{kill-termination} argument is called when the main thread of + the eventspace terminates, no matter if the custodian was + shutdown, or the thread was killed. This procedure is also + called when the thread terminates normally. This procedure is + called from a new, dedicated thread ({\\it i. e.}, not the thread + created to do the expansion, nor the thread that + \\rawscm{drscheme:eval:build-user-eventspace/custodian} was called from.)}) + + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; + ; ;; ; ;;; ; ;; ; ; ;; ; + ; ; ;; ; ; ;; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ;; ; ; ;; ; ;; + ; ;; ; ;;;; ; ;; ;; ; ;; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drscheme:debug:show-error-and-highlight + (string? + (or/c any/c exn?) + (-> (listof srcloc?) (or/c false/c (listof (list/c (is-a?/c text%) number? number?))) any) + . -> . + any) + (msg exn highlight-errors) + @{The first two arguments are the same as the arguments to the error-display-handler. + This function prints the error message to the current-error-port, like the default error-display-handler + and also calls \\var{highlight-errors} to do error highlighting. It is be passed the stack trace + for the error message. + + This function should be called on the same thread/eventspace where the error happened.}) + + (proc-doc/names + drscheme:debug:make-debug-error-display-handler + ((string? (or/c any/c exn?) . -> . any) + . -> . + (string? (or/c any/c exn?) . -> . any)) + + (oedh) + + @{This function implements an error-display-handler in terms + of another error-display-handler. + + This function is designed to work in conjunction with + @scheme[flink drscheme:debug:make-debug-eval-handler] % + . + + See also MzScheme's + MzLink{mz:p:error-display-handler}{error-display-handler} + parameter. + + If the current-error-port is the definitions window in + drscheme, this error handler inserts some debugging + annotations, calls \\var{oedh}, and then highlights the + source location of the runtime error.}) + + (proc-doc/names + drscheme:debug:make-debug-eval-handler + ((any/c . -> . any/c) + . -> . + (any/c . -> . any/c)) + + (odeh) + + @{This function implements an eval-handler in terms of another + eval-handler. + + This function is designed to work in conjunction with + @scheme[flink drscheme:debug:make-debug-error-display-handler] % + . + + See also MzScheme's MzLink{mz:p:eval-handler}{eval-handler} + parameter. + + The resulting eval-handler expands and annotates the input + expression and then passes it to the input eval-handler, + unless the input expression is already compiled, in which + case it just hands it directly to the input eval-handler.}) + + (proc-doc/names + drscheme:debug:hide-backtrace-window + (-> void?) + () + @{Hides the backtrace window.}) + + + (proc-doc/names + drscheme:debug:profiling-enabled + (case-> (boolean? . -> . void?) + (-> boolean?)) + ((enabled?) ()) + @{A parameter that controls if profiling information is recorded. + + Defaults to \\scmc{\\#f}. + + Only applies if + @scheme[flink drscheme:debug:make-debug-eval-handler] + has been added to the eval handler.}) + + (proc-doc/names + drscheme:debug:add-prefs-panel + (-> void?) + () + @{Adds the profiling preferences panel.}) + + (proc-doc/names + drscheme:debug:open-and-highlight-in-file + (srcloc? . -> . void?) + (debug-info) + @{This function opens a DrScheme to display + \\var{debug-info}. The first element in + the cons indicates where the file is + and the two number indicate a range of + text to show. + + See also + @scheme[flink drscheme:debug:get-cm-key] % + .}) + + (proc-doc/names + drscheme:debug:show-backtrace-window + (string? + (or/c exn? (listof srcloc?)) + . -> . + void?) + (error-message dis) + @{Shows the backtrace window you get when clicking on the bug in + DrScheme's REPL. + + The \\var{error-message} argument is the text of the error, + \\var{dis} is the debug information, extracted from the + continuation mark in the exception record, using + @scheme[flink drscheme:debug:get-cm-key] % + .}) + + (proc-doc/names + drscheme:debug:get-cm-key + (-> any) + () + @{Returns a key used with \\scheme|contination-mark-set->list|. + The contination mark set attached to an exception record + for the user's program may use this mark. If it does, + each mark on the continuation is a list of the fields + of a srcloc object.}) + + ; + ; + ; + ; ; + ; + ; ; + ; ; ; ; ;; ; ;;;; + ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; + ; ;; ; ; ; ; ;; + ; + ; + ; + + + (proc-doc/names + drscheme:unit:get-program-editor-mixin + (-> ((subclass?/c text%) . -> . (subclass?/c text%))) + () + @{Returns a mixin that must be mixed in to any + \\iscmclass{text} object that might contain + program text (and thus can be in the source + field of some syntax object). + + See also + @scheme[flink drscheme:unit:add-to-program-editor-mixin] % + .}) + + (proc-doc/names + drscheme:unit:add-to-program-editor-mixin + (((subclass?/c text%) . -> . (subclass?/c text%)) . -> . void?) + (mixin) + @{\\phase{1} + + Adds \\var{mixin} to the result of + @scheme[flink drscheme:unit:get-program-editor-mixin] % + .}) + + (proc-doc/names + drscheme:unit:open-drscheme-window + (case-> + (-> (is-a?/c drscheme:unit:frame%)) + ((or/c string? false/c) . -> . (is-a?/c drscheme:unit:frame%))) + (() (filename)) + + @{Opens a drscheme frame that displays \\var{filename}, + or nothing if \\var{filename} is \\scmc{\\#f} or not supplied.}) + + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;; ;; ;;; ;; ; ;;; ;;; + ; ;; ;; ; ; ; ; ;; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; + ; ; ; ; ; ; ; ; ;;;;;; ;; + ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ; + ; ; ; ; ;;; ;; ; ;;;; ;;; + ; + ; + ; + + + (proc-doc/names + drscheme:modes:add-mode + (string? + (or/c false/c (is-a?/c mode:surrogate-text<%>)) + ((is-a?/c drscheme:rep:text%) number? . -> . boolean?) + ((or/c false/c (listof string?)) . -> . boolean?) + . -> . + drscheme:modes:mode?) + (name surrogate repl-submit matches-language) + @{Adds a mode to DrScheme. Returns a mode value + that identifies the mode. + + The first argument, \\var{name}, is the name + of the mode, used in DrScheme's GUI to allow + the user to select this mode. + + The \\var{surrogate} argument is set to the + definitions text and the interactions text + (via the + @scheme[mode:host-text set-surrogate<%>] + method) whenever this mode is enabled. + + The \\var{repl-submit} procedure is called + whenever the user types a return in the interactions + window. It is passed the interactions editor + and the position where the last prompt occurs. + If it + returns \\scheme|#t|, the text after the last + prompt is treated as a program fragment and + evaluated, according to the language settings. + If it returns \\scheme|#f|, the text is + assumed to be an incomplete program fragment, and + the keystroke is not treated specially. + + The \\var{matches-language} predicate is called whenever + the language changes. If it returns \\scheme|#t| + this mode is installed. It is passed the list of strings + that correspond to the names of the language in the + language dialog. + + Modes are tested in the opposite order that they are + added. That is, the last mode to be added gets tested + first when the filename changes or when the language + changes. + + See also + @scheme[flink drscheme:modes:get-modes] % + .}) + + (proc-doc/names + drscheme:modes:mode? + (any/c . -> . boolean?) + (val) + @{Determines if \\var{val} is a mode.}) + + (proc-doc/names + drscheme:modes:get-modes + (-> (listof drscheme:modes:mode?)) + () + @{Returns all of the modes currently added to DrScheme. + + See also + @scheme[flink drscheme:modes:add-mode] % + .}) + + (proc-doc/names + drscheme:modes:mode-name + (drscheme:modes:mode? . -> . string?) + (mode) + @{Extracts the name of the mode. + + See also + @scheme[flink drscheme:modes:add-mode] % + .}) + + (proc-doc/names + drscheme:modes:mode-surrogate + (drscheme:modes:mode? . -> . (or/c false/c (is-a?/c mode:surrogate-text<%>))) + (mode) + @{Extracts the surrogate of the mode. + + See also + @scheme[flink drscheme:modes:add-mode] % + .}) + + (proc-doc/names + drscheme:modes:mode-repl-submit + (drscheme:modes:mode? . -> . any) + (mode) + @{Extracts the repl submission predicate of the mode. + + See also + @scheme[flink drscheme:modes:add-mode] % + .}) + + (proc-doc/names + drscheme:modes:mode-matches-language + (drscheme:modes:mode? . -> . ((or/c false/c (listof string?)) . -> . boolean?)) + (mode) + @{Extracts the language matching predicate of the mode. + + See also + @scheme[flink drscheme:modes:add-mode] % + .}) + + + ; + ; + ; + ; + ; + ; + ; ; ; ;;; ; ;; + ; ;; ; ; ;; ; + ; ; ; ; ; ; + ; ; ;;;;;; ; ; + ; ; ; ; ; + ; ; ; ;; ; + ; ; ;;;; ; ;; + ; ; + ; ; + ; ; + + + (proc-doc/names + drscheme:rep:get-welcome-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + phrase ``Welcome to'' in the beginning of the interactions window.}) + + (proc-doc/names + drscheme:rep:get-dark-green-delta + (-> (is-a?/c style-delta%)) + () + @{Returns a style delta that matches the style and color of the + name of a language in the interactions window.}) + + (proc-doc/names + drscheme:rep:get-drs-bindings-keymap + (-> (is-a?/c keymap%)) + () + @{Returns a keymap that binds various DrScheme-specific + keybindings. This keymap is used in the definitions + and interactions window. + + Defaultly binds C-x;o to a function that switches + the focus between the definitions and interactions + windows. Also binds f5 to Execute and f1 to Help Desk.}) + + (proc-doc/names + drscheme:rep:current-rep + (-> (or/c false/c (is-a?/c drscheme:rep:text%))) + () + + @{This is a parameter whose value should not be set by tools. + It is initialized to the repl that controls this evaluation + in the user's thread. + + It only returns \\scheme|#f| if the program not running + in the context of a repl (eg, the test suite window).}) + + (proc-doc/names + drscheme:rep:current-value-port + (-> (or/c false/c port?)) + () + @{This is a parameter whose value is a port that + prints in the REPL in blue. It is used to print + the values of toplevel expressions in the REPL. + + It is only initialized on the user's thread.}) + + + ; + ; + ; + ; ; ; + ; ; ; + ; ; ; ; ; + ; ;; ; ;;; ;;;; ; ;;; ; ; ;;;; ;;; ; ;; ;; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; ; ; ;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ;;;;;; ; ; ;;;;;; ; ; ;;;;;; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;; ; ; ; ; ; ; ; ; ; ; ; ;; + ; ;; ; ;;;; ;; ; ;;;; ; ; ;; ;;;; ; ; ;; ; + ; ; ; + ; ; ; ; + ; ;;;; + + + (proc-doc/names + drscheme:get/extend:extend-tab + (case-> + ((make-mixin-contract drscheme:unit:tab%) . -> . void?) + ((make-mixin-contract drscheme:unit:tab%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This class implements the tabs in drscheme. One is created for each tab + in a frame (each frame always has at least one tab, even if the tab bar is not shown) + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#t}.}) + + (proc-doc/names + drscheme:get/extend:extend-interactions-text + (case-> + ((make-mixin-contract drscheme:rep:text<%>) . -> . void?) + ((make-mixin-contract drscheme:rep:text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the bottom window of drscheme frames. + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#t}.}) + + (proc-doc/names + drscheme:get/extend:get-interactions-text + (-> (implementation?/c drscheme:rep:text<%>)) + () + + @{Once this function is called, + @scheme[flink drscheme:get/extend:extend-interactions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drscheme:get/extend:extend-definitions-text + (case-> + ((make-mixin-contract drscheme:unit:definitions-text<%>) . -> . void?) + ((make-mixin-contract drscheme:unit:definitions-text<%>) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This text is used in the top window of drscheme frames. + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#f}.}) + + (proc-doc/names + drscheme:get/extend:get-definitions-text + (-> (implementation?/c drscheme:unit:definitions-text<%>)) + () + + @{Once this function is called, + @scheme[flink drscheme:get/extend:extend-definitions-text] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drscheme:get/extend:extend-interactions-canvas + (case-> + ((make-mixin-contract drscheme:unit:interactions-canvas%) . -> . void?) + ((make-mixin-contract drscheme:unit:interactions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the bottom window of drscheme frames. + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#f}.}) + + (proc-doc/names + drscheme:get/extend:get-interactions-canvas + (-> (subclass?/c drscheme:unit:interactions-canvas%)) + () + + @{Once this function is called, + @scheme[flink drscheme:get/extend:extend-interactions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drscheme:get/extend:extend-definitions-canvas + (case-> + ((make-mixin-contract drscheme:unit:definitions-canvas%) . -> . void?) + ((make-mixin-contract drscheme:unit:definitions-canvas%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This canvas is used in the top window of drscheme frames. + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#f}.}) + + (proc-doc/names + drscheme:get/extend:get-definitions-canvas + (-> (subclass?/c drscheme:unit:definitions-canvas%)) + () + + @{Once this function is called, + @scheme[flink drscheme:get/extend:extend-definitions-canvas] + raises an error, disallowing any more extensions.}) + + (proc-doc/names + drscheme:get/extend:extend-unit-frame + (case-> + ((make-mixin-contract drscheme:unit:frame%) . -> . void?) + ((make-mixin-contract drscheme:unit:frame%) boolean? . -> . void?)) + ((mixin) (mixin before?)) + + @{This is the frame that implements the main drscheme window. + + The argument, \\var{before}, controls if the mixin is applied before or + after already installed mixins. + If unsupplied, this is the same as supplying \\scmc{\\#f}.}) + + (proc-doc/names + drscheme:get/extend:get-unit-frame + (-> (subclass?/c drscheme:unit:frame%)) + () + + @{Once this function is called, + @scheme[flink drscheme:get/extend:extend-unit-frame] + raises an error, disallowing any more extensions.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + ; + ; + ; + ; ;;; ; ; + ; ; + ; ; ; + ; ;;; ;;; ; ;; ;;;; ; ;; ; ; ; ; ; ;;; ;;;; ; ;;; ; ;; + ; ; ; ; ; ;; ; ; ; ; ;; ; ; ;; ; ; ; ; ; ; ;; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ;;;; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ; ; ; ;; ; ;; ; ; ; ; ; ; ; ; ; + ; ;;; ;;; ; ; ; ; ;; ; ;; ; ; ;;;;; ;; ; ;;; ; ; + ; ; + ; ; ; + ; ;;;; + + (proc-doc/names + drscheme:language-configuration:get-languages + (-> (listof (is-a?/c drscheme:language:language<%>))) + () + @{This can only be called after all of the tools initialization phases have completed. + + Returns the list of all of the languages installed in DrScheme.}) + + (proc-doc/names + drscheme:language-configuration:add-language + ((and/c (is-a?/c drscheme:language:language<%>) language-object) + . -> . void?) + (language) + + @{\\phase{2} + + Adds \\var{language} to the languages offerend by DrScheme.}) + + (proc-doc/names + drscheme:language-configuration:get-settings-preferences-symbol + (-> symbol?) + () + @{Returns the symbol that is used to store the user's language + settings. Use as an argument to either + @scheme[flink preferences:get] + or + @scheme[flink preferences:set] % + .}) + + (proc-doc/names + drscheme:language-configuration:make-language-settings + ((or/c (is-a?/c drscheme:language:language<%>) language-object) + any/c + . -> . + drscheme:language-configuration:language-settings?) + (language settings) + + @{This is the constructor for a record consisting of two + elements, a language and its settings. + + The settings is a language-specific record that holds a + value describing a parameterization of the language. + + It has two selectors, + @scheme[flink drscheme:language-configuration:language-settings-language] + and + @scheme[flink drscheme:language-configuration:language-settings-settings] % + , and a predicate, + @scheme[flink drscheme:language-configuration:language-settings?]}) + + (proc-doc/names + drscheme:language-configuration:language-settings-settings + (-> drscheme:language-configuration:language-settings? + any/c) + (ls) + @{Extracts the settings field of a language-settings.}) + + (proc-doc/names + drscheme:language-configuration:language-settings-language + (drscheme:language-configuration:language-settings? + . -> . + (or/c (is-a?/c drscheme:language:language<%>) language-object)) + (ls) + + @{Extracts the language field of a language-settings.}) + + (proc-doc/names + drscheme:language-configuration:language-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if the argument is a language-settings or not.}) + + (proc-doc/names + drscheme:language-configuration:language-dialog + (->* (boolean? drscheme:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>)) + boolean?) + (or/c false/c drscheme:language-configuration:language-settings?)) + ((show-welcome? language-settings-to-show) + ((parent #t) + (manuals? #f))) + @{Opens the language configuration dialog. + See also + @scheme[flink drscheme:language-configuration:fill-language-dialog] % + . + + The \\var{show-welcome?} argument determines if + if a ``Welcome to DrScheme'' message and some + natural language buttons are shown. + + The \\var{language-settings-to-show} argument + must be some default language settings that the dialog + is initialized to. + If unsure of a default, the currently set language + in the user's preferences can be obtained via: + \\begin{schemedisplay} + (preferences:get (drscheme:language-configuration:get-settings-preferences-symbol)) + \\end{schemedisplay} + + The \\var{parent} argument is used as the parent + to the dialog. + + The \\var{manuals?} argument is passed to + @scheme[flink drscheme:language-configuration:fill-language-dialog] % + . + + The result if \\scheme|#f| when the user cancells the dialog, and + the selected language if they hit ok.}) + + (proc-doc/names + drscheme:language-configuration:fill-language-dialog + (->* + ((is-a?/c vertical-panel%) + (is-a?/c area-container<%>) + drscheme:language-configuration:language-settings?) + ((or/c false/c (is-a?/c top-level-window<%>)) + boolean? + (-> symbol? void?)) + drscheme:language-configuration:language-settings?) + ((panel button-panel language-setting) + ((re-center #f) + (manuals? #f) + (ok-handler void))) + @{This procedure accepts two parent panels and + fills them with the contents of the language dialog. + It is used to include language configuration controls + in some larger context in another dialog. + + The \\var{panel} argument is the main panel where the + language controls will be placed. + The function adds buttons to the \\var{button-panel} + to revert a language to its default settings and to + show the details of a language. + + The \\var{language-setting} is the default + language to show in the dialog. + + The \\var{re-center} argument is used when the \\gui{Show Details} + button is clicked. If that argument is a \\iscmintf{top-level-window}, + the \\gui{Show Details} callback will recenter the window each time + it is clicked. Otherwise, the argument is not used. + + If \\var{manuals?} is \\scheme{#f} the usual language dialog (as seen + in the start up drscheme window and from the Choose Language dialog + created when drscheme is started up) is shown. If it isn't, the dialog + does not have the details and on the right-hand side shows the manual + ordering for the chosen language. This is used in Help Desk. + + \\var{ok-handler} is a function that is in charge of interfacing the OK + button. It should accept a symbol message: \\scheme{'enable} and + \\scheme{'disable} to toggle the button, and \\scheme{'execute} to run + the desired operation. (The language selection dialog also uses an + internal \\scheme{'enable-sync} message.)}) + + (proc-doc + drscheme:language:register-capability + (->d ([s symbol?] + [the-contract contract?] + [default the-contract]) + () + [res void?]) + @{Registers a new capability with a default value for each language + and a contract on the values the capability might have. + + By default, these capabilities are registered as DrScheme starts up: + \\begin{itemize} + \\item \\scheme|(drscheme:language:register-capability 'drscheme:check-syntax-button (flat-contract boolean?) #t)| + --- controls the visiblity of the check syntax button + \\item \\scheme|(drscheme:language:register-capability 'drscheme:language-menu-title (flat-contract string?) (string-constant scheme-menu-name))| + --- controls the name of the menu just to the right of the language menu (defaultly named ``Scheme'') + \\item \\scheme|(drscheme:language:register-capability 'drscheme:define-popup (or/c (cons/c string? string?) false/c) (cons \"(define\" \"(define ...)\"))| + --- specifies the prefix that the define popup should look for and what label it should have, + or \\scheme|#f| if it should not appear at all. + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-fraction (flat-contract boolean?) #t)| + --- determines if the insert fraction menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-lambda (flat-contract boolean?) #t)| + --- determines if the insert lambda menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-large-letters (flat-contract boolean?) #t)| + --- determines if the insert large letters menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-image (flat-contract boolean?) #t)| + --- determines if the insert image menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-comment-box (flat-contract boolean?) #t)| + --- determines if the insert comment box menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-gui-tool (flat-contract boolean?) #t)| + --- determines if the insert gui menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:slideshow-menu-item (flat-contract boolean?) #t)| + --- determines if the insert pict box menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:insert-text-box (flat-contract boolean?) #t)| + --- determines if the insert text box menu item in the special menu is visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:special:xml-menus (flat-contract boolean?) #t)| + --- determines if the insert scheme box, insert scheme splice box, and the insert xml box menu item ins the special menu are visible + \\item \\scheme|(drscheme:language:register-capability 'drscheme:autocomplete-words (listof string?) '()| + --- determines the list of words that are used when completing words in this language + \\end{itemize}}) + + (proc-doc/names + drscheme:language:capability-registered? + (-> symbol? boolean?) + (s) + @{Indicates if + @scheme[flink drscheme:language:register-capability] + has been called with \\var{s}.}) + (proc-doc + drscheme:language:get-capability-default + (->d ([s (and/c symbol? drscheme:language:capability-registered?)]) + () + [res (drscheme:language:get-capability-contract s)]) + @{Returns the default for a particular capability.}) + + + ; + ; + ; + ; ; + ; ; + ; ; + ; ; ;;; ; ;; ;; ; ; ; ;;; ;; ; ;;; + ; ; ; ; ;; ; ; ;; ; ; ; ; ; ;; ; ; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ;;;; ; ; ; ; ; ; ;;;; ; ; ;;;;;; + ; ; ; ; ; ; ; ; ; ; ; ; ; ; ; + ; ; ; ; ; ; ; ;; ; ;; ; ; ; ;; ; + ; ; ;;;;; ; ; ;; ; ;; ; ;;;;; ;; ; ;;;; + ; ; ; + ; ; ; ; ; + ; ;;;; ;;;; + + + (proc-doc/names + drscheme:language:add-snip-value + (->* ((-> any/c boolean?) + (-> any/c (is-a?/c snip%))) + ((-> any/c)) + void?) + ((test-value convert-value) + ((setup-thunk void))) + @{Registers a handler to convert values into snips as they are printed in the REPL. + + The \\var{test-snip} argument is called to determine if this handler can convert the value + and the \\var{convert-value} argument is called to build a snip. + The (optional) \\var{setup-thunk} is called just after the user's namespace and other + setings are built, but before any of the user's code is evaluated. + + All three functions are called on the user's thread and with the user's settings.}) + + (proc-doc/names + drscheme:language:extend-language-interface + (-> interface? + (make-mixin-contract drscheme:language:language<%>) + void?) + (interface default-implementation) + + @{\\phase{1} + + Each language added passed to + @scheme[flink drscheme:language-configuration:add-language] + must implement \\var{interface}. + + The \\var{default-implementation} is a mixin + that provides a default implementation of + \\var{interface}. Languages that are unaware of + the specifics of \\var{extension} use + \\var{default-implementation} via + @scheme[flink drscheme:language:get-default-mixin] % + .}) + + (proc-doc + drscheme:language:get-default-mixin + (-> (make-mixin-contract drscheme:language:language<%>)) + + @{\\phase{2} + + The result of this function is the composite of all of the + \\var{default-implementation} arguments passed + to + @scheme[flink drscheme:language:extend-language-interface] % + .}) + + (proc-doc/names + drscheme:language:get-language-extensions + (-> (listof interface?)) + () + @{\\phase{2} + + Returns a list of the interfaces passed to + @scheme[flink drscheme:language:extend-language-interface] % + .}) + + (proc-doc/names + drscheme:language:put-executable + ((is-a?/c top-level-window<%>) + path? + (or/c boolean? (symbols 'launcher 'standalone 'distribution)) + boolean? + string? + . -> . (or/c false/c path?)) + (parent program-filename mode mred? title) + @{Calls the MrEd primitive + @scheme[flink put-file] + with arguments appropriate for creating an executable + from the file \\var{program-filename}. + + The arguments \\var{mred?} and \\var{mode} indicates + what type of executable this should be (and the dialog + may be slightly different on some platforms, depending + on these arguments). For historical reasons, \\scmc{\\#f} + is allowed for \\var{mode} as an alias for \\Symbol{launcher}, and + \\scmc{\\#t} is allowed for \\var{mode} as an alias for \\Symbol{stand-alone}. + + The \\var{title} argument is used as the title to the primitive + @scheme[flink put-file] + or + @scheme[flink get-directory] + primitive.}) + + (proc-doc/names + drscheme:language:create-executable-gui + ((or/c false/c (is-a?/c top-level-window<%>)) + (or/c false/c string?) + (or/c (λ (x) (eq? x #t)) (symbols 'launcher 'standalone 'distribution)) + (or/c (λ (x) (eq? x #t)) (symbols 'mzscheme 'mred)) + . -> . + (or/c false/c + (list/c (symbols 'no-show 'launcher 'stand-alone 'distribution) + (symbols 'no-show 'mred 'mzscheme) + string?))) + (parent program-name show-type show-base) + @{Opens a dialog to prompt the user about their choice of executable. + If \\var{show-type} is \\scmc{\\#t}, the user is prompted about + a choice of executable: stand-alone, + launcher, or distribution; otherwise, the symbol determines the type. + If \\var{show-base} + is \\scmc{\\#t}, the user is prompted about a choice of base + binary: mzscheme or mred; otherwise the symbol determines the base. + + The \\var{program-name} argument is used to construct the default + executable name in a platform-specific manner. + + The \\var{parent} argument is used for the parent of the dialog. + + The result of this function is \\scmc{\\#f} if the user cancel's + the dialog and a list of three items indicating what options + they chose. If either \\var{show-type} or \\var{show-base} + was not \\scmc{\\#t}, the corresponding result will be \\scmc{'no-show}, + otherwise it will indicate the user's choice.}) + + (proc-doc/names + drscheme:language:create-module-based-stand-alone-executable + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure creates a stand-alone executable in the file + \\var{executable-filename} that runs the program + \\var{program-filename}. + + The arguments + \\var{module-language-spec} and + \\var{transformer-module-language-spec} specify the + settings of the initial namespace, both the transformer + portion and the regular portion. + + The \\var{init-code} argument is an s-expression representing + the code for a module. This module is expected to provide + the identifer \\rawscm{init-code}, bound to a procedure of no + arguments. That module is required and the \\var{init-code} + procedure is executed to initialize language-specific + settings before the code in \\var{program-filename} runs. + + The \\var{gui?} argument indicates if a MrEd or MzScheme + stand-alone executable is created. + + The \\var{use-copy?} argument indicates if the initial + namespace should be populated with + \\rawscm{namespace-require/copy} or + \\rawscm{namespace-require}. }) + + (proc-doc/names + drscheme:language:create-module-based-distribution + ((or/c path? string?) + (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + distribution-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{Like + @scheme[flink drscheme:language:create-module-based-stand-alone-executable] % + , but packages the stand-alone executable into a distribution.}) + + (proc-doc/names + drscheme:language:create-distribution-for-executable + ((or/c path? string?) + boolean? + (-> path? void?) + . -> . + void?) + (distribution-filename + gui? + make-executable) + + @{Creates a distribution where the given \\var{make-executable} procedure + creates the stand-alone executable to be distributed. + The \\var{make-executable} procedure is given the name of the + executable to create. The \\var{gui?} argument is needed in case the + executable's name (which \\rawscm{drscheme:language:create-distribution-for-executable} + must generate) depends on the type of executable. During the distribution-making + process, a progress dialog is shown to the user, and the user can click an + \\OnScreen{Abort} button that sends a break to the current thread.}) + + (proc-doc/names + drscheme:language:create-module-based-launcher + ((or/c path? string?) (or/c path? string?) any/c any/c any/c boolean? boolean? + . -> . + void?) + (program-filename + executable-filename + module-language-spec + transformer-module-language-spec + init-code + gui? + use-copy?) + + @{This procedure is identical to + @scheme[flink drscheme:language:create-module-based-stand-alone-executable] % + , except that it creates a launcher instead of a + stand-alone executable.}) + + (proc-doc/names + drscheme:language:text/pos-text + (drscheme:language:text/pos? . -> . (is-a?/c text%)) + (text/pos) + + @{Selects the \\iscmclass{text} from a text/pos.}) + + (proc-doc/names + drscheme:language:text/pos-start + (drscheme:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the starting position from a text/pos.}) + + (proc-doc/names + drscheme:language:text/pos-end + (drscheme:language:text/pos? . -> . number?) + (text/pos) + + @{Selects the ending position from a text/pos.}) + + (proc-doc/names + drscheme:language:text/pos? + (any/c . -> . boolean?) + (val) + + @{Returns \\scmc{\\#t} if \\var{val} is a text/pos, and \\scmc{\\#f} + otherwise.}) + + (proc-doc/names + drscheme:language:make-text/pos + ((is-a?/c text%) number? number? + . -> . + drscheme:language:text/pos?) + (text start end) + + @{Constructs a text/pos.}) + + (proc-doc/names + drscheme:language:simple-settings-case-sensitive + (drscheme:language:simple-settings? . -> . boolean?) + (simple-settings) + + @{Extracts the case-sensitive setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings-printing-style + (drscheme:language:simple-settings? + . -> . + (symbols 'constructor 'quasiquote 'write 'current-print)) + (simple-settings) + + @{Extracts the printing-style setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings-fraction-style + (drscheme:language:simple-settings? + . -> . + (symbols 'mixed-fraction + 'mixed-fraction-e + 'repeating-decimal + 'repeating-decimal-e)) + (simple-settings) + + @{Extracts the fraction-style setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings-show-sharing + (drscheme:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the show-sharing setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings-insert-newlines + (drscheme:language:simple-settings? + . -> . + boolean?) + (simple-settings) + + @{Extracts the insert-newline setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings-annotations + (drscheme:language:simple-settings? + . -> . + (symbols 'none 'debug 'debug/profile 'test-coverage)) + (simple-settings) + + @{Extracts the debugging setting from a simple-settings.}) + + (proc-doc/names + drscheme:language:simple-settings? + (any/c . -> . boolean?) + (val) + + @{Determines if \\var{val} is a simple-settings.}) + + (proc-doc/names + drscheme:language:make-simple-settings + (-> boolean? + (symbols 'constructor 'quasiquote 'write 'current-print) + (symbols 'mixed-fraction 'mixed-fraction-e 'repeating-decimal 'repeating-decimal-e) + boolean? + boolean? + (symbols 'none 'debug 'debug/profile 'test-coverage) + drscheme:language:simple-settings?) + (case-sensitive + printing-style + fraction-style + show-sharing + insert-newlines + annotations) + + @{Constructs a simple settings.}) + + (proc-doc/names + drscheme:language:simple-settings->vector + (drscheme:language:simple-settings? . -> . vector?) + (simple-settings) + + @{Constructs a vector whose elements are the fields of \\var{simple-settings}.})) \ No newline at end of file diff --git a/collects/scribblings/tools/common.ss b/collects/scribblings/tools/common.ss index ed1308b4a8..21e0718902 100644 --- a/collects/scribblings/tools/common.ss +++ b/collects/scribblings/tools/common.ss @@ -4,10 +4,12 @@ (require scribble/manual scribble/basic + scribble/extract scheme/class scheme/contract) (provide (all-from-out scribble/manual) (all-from-out scribble/basic) + (all-from-out scribble/extract) (all-from-out scheme/class) (all-from-out scheme/contract)) @@ -42,6 +44,6 @@ void?] [(extend (mixin mixin-contract) (before boolean?)) void?])]{ - Does stuff. + Adds a new mixin to the class eventually created in DrScheme. } - @defproc[(get) class?]{Returns the class.}))])) \ No newline at end of file + @defproc[(get) class?]{Returns the class (with all registered mixins applied).}))])) \ No newline at end of file diff --git a/collects/scribblings/tools/debug.scrbl b/collects/scribblings/tools/debug.scrbl index 163b607727..8ea9fda6f7 100644 --- a/collects/scribblings/tools/debug.scrbl +++ b/collects/scribblings/tools/debug.scrbl @@ -1,20 +1,11 @@ #lang scribble/doc @(require "common.ss") @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<%>) ()]{ - -%% %% drscheme:unit %% -} - - -@defmixin[drscheme:debug:profile-definitions-text-mixin (drscheme:unit:definitions-text<%> text%) ()]{ - -} - +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:debug:") diff --git a/collects/scribblings/tools/eval.scrbl b/collects/scribblings/tools/eval.scrbl new file mode 100644 index 0000000000..be588dd4f7 --- /dev/null +++ b/collects/scribblings/tools/eval.scrbl @@ -0,0 +1,4 @@ +#lang scribble/doc +@(require "common.ss") +@title{@tt{drscheme:eval}} +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:eval:") diff --git a/collects/scribblings/tools/frame.scrbl b/collects/scribblings/tools/frame.scrbl index 7b8d55a672..b75e4e8b81 100644 --- a/collects/scribblings/tools/frame.scrbl +++ b/collects/scribblings/tools/frame.scrbl @@ -1,7 +1,6 @@ #lang scribble/doc @(require "common.ss") @title{@tt{drscheme:frame}} -@(defmodule drscheme/tool-lib) @defclass[drscheme:frame:name-message% canvas% ()]{ @@ -12,7 +11,7 @@ side of drscheme's frame. @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?]) void?]{ @methspec{ @@ -267,3 +266,4 @@ Does nothing. }}} +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:frame:") diff --git a/collects/scribblings/tools/get-slash-extend.scrbl b/collects/scribblings/tools/get-slash-extend.scrbl index 43f515f021..f48ceb1ce8 100644 --- a/collects/scribblings/tools/get-slash-extend.scrbl +++ b/collects/scribblings/tools/get-slash-extend.scrbl @@ -1,11 +1,5 @@ #lang scribble/doc @(require "common.ss") @title{@tt{drscheme:get/extend}} -@(defmodule drscheme/tool-lib) -@docs-get/extend[definitions-text] -@docs-get/extend[interactions-text] -@docs-get/extend[unit-frame] -@docs-get/extend[definitions-canvas] -@docs-get/extend[interactions-canvas] -@docs-get/extend[tab] +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:get/extend:") diff --git a/collects/scribblings/tools/help-desk.scrbl b/collects/scribblings/tools/help-desk.scrbl new file mode 100644 index 0000000000..e522405e56 --- /dev/null +++ b/collects/scribblings/tools/help-desk.scrbl @@ -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:") diff --git a/collects/scribblings/tools/language-configuration.scrbl b/collects/scribblings/tools/language-configuration.scrbl new file mode 100644 index 0000000000..20b5ab1c82 --- /dev/null +++ b/collects/scribblings/tools/language-configuration.scrbl @@ -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:") diff --git a/collects/scribblings/tools/language.scrbl b/collects/scribblings/tools/language.scrbl index d4338ca4f0..711de01db6 100644 --- a/collects/scribblings/tools/language.scrbl +++ b/collects/scribblings/tools/language.scrbl @@ -1,7 +1,6 @@ #lang scribble/doc @(require "common.ss") @title{@tt{drscheme:language}} -@(defmodule drscheme/tool-lib) @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 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. @@ -74,7 +73,7 @@ for this language. [language-position (cons string (listof string))] [language-numbers (cons number (listof number)) (map (lambda (x) 0) language-position)] [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?))] [language-id string?])]{ @@ -238,15 +237,15 @@ Sets the structure inspector to a new inspector, saving the original inspector for use during printing. 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 any newlines. 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 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. 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 (unmarshall-settings) - (union \#f settings)]{ + (or/c false/c settings)]{ Builds a settings structure from the vector, or @scheme[#f] if 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 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. @@ -457,7 +456,7 @@ This method is the same as } @defmethod[(unmarshall-settings [input writable]) - (union settings \#f)]{ + (or/c settings false/c)]{ This method is the same as @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 the method returns @scheme[#t], the mzscheme primitive -\MzLink{mz:namespaces}{namespace-require/copy} +@scheme[namespace-require/copy] is used and if it returns @scheme[#f], -\MzLink{mz:namespaces}{namespace-require} +@scheme[namespace-require] is used. } @@ -499,7 +498,7 @@ Defaultly returns @scheme[#f]. @defmethod[#:mode override (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 @scheme[settings]. @@ -513,7 +512,7 @@ between this method and @defmethod[#:mode override (front-end/interaction) - (-> (union sexp syntax eof))]{ + (-> (or/c sexp/c syntax? eof-object?))]{ Reads a syntax object, from @scheme[input]. Does not use @scheme[settings]. @@ -541,10 +540,10 @@ Returns the last element of the list returned by Calls the super method. -Uses \MzLink{mz:namespaces}{namespace-require} +Uses @scheme[namespace-require] to install the result of @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 @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] - [parent (union (instanceof @scheme[dialog%]) (instanceof @scheme[frame%]))] + [parent (or/c (is-a?/c dialog%) (is-a?/c frame%))] [program-filename string?]) void?]{ This method creates an executable in the given language. The @@ -633,7 +632,7 @@ See also @defmethod[(front-end/complete-program [port port] [settings settings]) - (-> (union sexp syntax eof))]{ + (-> (or/c sexp/c syntax? eof-object?))]{ @scheme[front-end/complete-program] method reads, parses, and optionally compiles a program in the language. The first 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 programs that are @scheme[load]ed or @scheme[eval]ed. See -\MzLink{mz:p:current-load}{current-load} and -\MzLink{mz:p:current-eval}{current-eval} +@scheme[current-load] and +@scheme[current-eval] for those. This method is expected to raise an appropriate exception if @@ -678,7 +677,7 @@ See also @defmethod[(front-end/interaction [port input-port] [settings settings]) - (-> (union sexp syntax eof))]{ + (-> (or/c sexp/c syntax? eof-object?))]{ This method is just like @method[drscheme:language:language<%> front-end/complete-program] except that it is called with program fragments, 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-namespace] has been set to a newly 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: @itemize{ @item{@scheme['mzscheme]} @item{@scheme['(lib "mred.ss" "mred")]} }} @item{ - \MzLink{mz:p:read-curly-brace-as-paren}{@scheme[read-curly-brace-as-paren]} + @scheme[read-curly-brace-as-paren] is @scheme[#t],} @item{ - \MzLink{mz:p:read-square-bracket-as-paren}{@scheme[read-square-bracket-as-paren]} + @scheme[read-square-bracket-as-paren] is @scheme[#t],} @item{The - \MzLink{mz:portwritehandler}{@scheme[port-write-handler]} + @scheme[port-write-handler] and - \MzLink{mz:portwritehandler}{@scheme[port-display-handler]} + @scheme[port-display-handler] have been set to procedures that call - \MzlibLink{mz:mzlibpretty}{@scheme[pretty-print]} + @scheme[pretty-print] and - \MzlibLink{mz:mzlibpretty}{@scheme[pretty-display]} instead + @scheme[pretty-display] instead of - \MzLink{mz:readandwrite}{@scheme[write]} and + @scheme[write] and @scheme[display]. When @scheme[pretty-print] and @scheme[pretty-display] are 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[write] and @scheme[display]. This is done so that special scheme values can be displayed as snips.} @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 directly to be inserted into the interactions @scheme[text%] object.} @item{The output and input ports are set to point to the interactions window with these parameters: - \MzLink{mz:p:current-input-port}{@scheme[current-input-port]}, - \MzLink{mz:p:current-output-port}{@scheme[current-output-port]}, and - \MzLink{mz:p:current-error-port}{@scheme[current-error-port]}.} + @scheme[current-input-port], + @scheme[current-output-port], and + @scheme[current-error-port].} @item{The @scheme[event-dispatch-handler] is set so that DrScheme can perform some initial setup and close down around the user's code.} @item{The - \MzLink{mz:p:current-directory}{@scheme[current-directory]} and - \MzLink{mz:p:current-load-relative-directory}{@scheme[current-load-relative-directory]} + @scheme[current-directory] and + @scheme[current-load-relative-directory] are set to the directory where the definitions file is saved, or if it isn't saved, to the initial directory where DrScheme started up.} @@ -948,9 +947,9 @@ changed from the defaults in MzScheme: @item{ 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 -\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 exception record, with font and color information and inserts 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:") diff --git a/collects/scribblings/tools/modes.scrbl b/collects/scribblings/tools/modes.scrbl new file mode 100644 index 0000000000..56bd968733 --- /dev/null +++ b/collects/scribblings/tools/modes.scrbl @@ -0,0 +1,4 @@ +#lang scribble/doc +@(require "common.ss") +@title{@tt{drscheme:modes}} +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:modes:") diff --git a/collects/scribblings/tools/rep.scrbl b/collects/scribblings/tools/rep.scrbl index 39e6162452..f9c8fc224f 100644 --- a/collects/scribblings/tools/rep.scrbl +++ b/collects/scribblings/tools/rep.scrbl @@ -1,7 +1,6 @@ #lang scribble/doc @(require "common.ss") @title{@tt{drscheme:rep}} -@(defmodule drscheme/tool-lib) @definterface[drscheme:rep:text<%> ()]{ @@ -97,7 +96,7 @@ The @scheme[complete-program?] argument determines if the }} @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{ 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{ -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 second and third are the beginning and ending regions, respectively. @@ -116,13 +115,13 @@ respectively. }} @defmethod[(get-user-custodian) - (union \#f custodian)]{ + (or/c false/c custodian?)]{ This is the custodian controlling the user's program. } @defmethod[(get-user-eventspace) - (union \#f eventspace)]{ + (or/c false/c eventspace?)]{ This is the user's eventspace. The result of @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) - (union \#f namespace)]{ + (or/c false/c namespace?)]{ Returns the user's namespace. This method returns a new namespace each time Run is clicked. @@ -146,7 +145,7 @@ clicked. } @defmethod[(get-user-thread) - (union \#f thread)]{ + (or/c false/c thread?)]{ This method returns the thread that the users code runs in. It is returns a different result, each time the user runs the program. @@ -410,21 +409,21 @@ that the appropriate tab is visible, if necessary. } @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 @method[drscheme:rep:context<%> set-breakables]. } @defmethod[(get-directory) - (union string \#f)]{ + (union string false/c)]{ The result of this method is used as the initial directory for the user's program to be evaluated in. } @defmethod[(needs-execution) - (union string? false/c)]{ + (or/c string? false/c)]{ This method should return an explanatory string when the state of the program that the repl reflects has changed. It should return @scheme[#f] otherwise. @@ -439,8 +438,8 @@ ignores any prior clicks. } -@defmethod[(set-breakables [thread (union thread \#f)] - [custodian (union custodian \#f)]) +@defmethod[(set-breakables [thread (or/c thread false/c)] + [custodian (or/c custodian false/c)]) void?]{ Calling this method with a thread and a custodian means that 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:") diff --git a/collects/scribblings/tools/tools.scrbl b/collects/scribblings/tools/tools.scrbl index 979803be8c..c3ab652b5f 100644 --- a/collects/scribblings/tools/tools.scrbl +++ b/collects/scribblings/tools/tools.scrbl @@ -13,6 +13,7 @@ ) @title{@bold{Plugins}: Extending DrScheme} +@(defmodule drscheme/tool-lib) @bold{This Manual} @@ -484,8 +485,12 @@ for a list of the capabilities registered by default. @include-section["get-slash-extend.scrbl"] @include-section["unit.scrbl"] @include-section["language.scrbl"] +@include-section["language-configuration.scrbl"] @include-section["debug.scrbl"] @include-section["rep.scrbl"] @include-section["frame.scrbl"] +@include-section["help-desk.scrbl"] +@include-section["eval.scrbl"] +@include-section["modes.scrbl"] @index-section[] diff --git a/collects/scribblings/tools/unit.scrbl b/collects/scribblings/tools/unit.scrbl index 2a89813db3..37c883aa37 100644 --- a/collects/scribblings/tools/unit.scrbl +++ b/collects/scribblings/tools/unit.scrbl @@ -1,7 +1,6 @@ #lang scribble/doc @(require "common.ss") @title{@tt{drscheme:unit}} -@(defmodule drscheme/tool-lib) @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 (get-breakables) - (values (union thread \#f) (union custodian \#f))]{} + (values (or/c thread? false/c) (or/c custodian? false/c))]{} @defmethod[(get-defs) (is-a?/c @scheme[drscheme:rep:text%])]{ @@ -77,7 +76,7 @@ object, but if you change @defmethod[#:mode override (get-directory) - (union string \#f)]{ + (or/c string? false/c)]{ This is the directory that the file is saved in, or the directory DrScheme started up in, if the file has not been @@ -151,8 +150,8 @@ Calls the definitions text's void?]{} @defmethod[#:mode override - (set-breakables [thread (union thread \#f)] - [custodian (union custodian \#f)]) + (set-breakables [thread (or/c thread? false/c)] + [custodian (or/c custodian? false/c)]) void?]{}} @@ -841,3 +840,4 @@ Initializes the visibility of the save button. } +@(include-extracted (lib "tool-lib.ss" "drscheme") #rx"^drscheme:unit:")