diff --git a/collects/drscheme/private/rep.ss b/collects/drscheme/private/rep.ss index 777472a8d6..1972191874 100644 --- a/collects/drscheme/private/rep.ss +++ b/collects/drscheme/private/rep.ss @@ -1291,6 +1291,10 @@ TODO (update-running #f) (send context set-breakables #f #f) + ;; set this relatively late, so that the + ;; setup code for the language doesn't use it + ;(current-load/use-compiled drscheme-load/use-compiled-handler) + ;; after this returns, future event dispatches ;; will use the user's break parameterization (initialize-dispatch-handler) @@ -1695,6 +1699,70 @@ TODO (define input-delta (make-object style-delta%)) (send input-delta set-delta-foreground (make-object color% 0 150 0)) + + (define drscheme-load/use-compiled-handler + (let ([ol (current-load/use-compiled)]) + (λ (path mod) ;; =User= + (verify-file-saved path) + (cond + [(already-a-compiled-file? path) + (ol path mod)] + [else + (error 'drscheme-load/use-compiled-handler + "time to compile! ~s" path)])))) + + ;; =User= + (define (verify-file-saved path) + (parameterize ([current-eventspace drscheme:init:system-eventspace]) + (let ([s (make-semaphore 0)]) + (queue-callback + (λ () ;; =Kernel= =Handler= + (let ([frame (send (group:get-the-frame-group) locate-file path)]) + (when frame + (send frame offer-to-save-file path))) + (semaphore-post s))) + (semaphore-wait s)))) + + ;; =User= + (define (already-a-compiled-file? path) + (let* ([filename (file-name-from-path path)] + [base (path-only path)] + [extension (and filename base (filename-extension filename))] + [basename (and extension + (let ([pbs (path->bytes filename)]) + (subbytes pbs + 0 + (- (bytes-length pbs) + (bytes-length extension) + 1 ;; extra one for '.' in there + ))))] + [fm (file-or-directory-modify-seconds path)] + [newer-exists? + (λ (pot-path) + (and (file-exists? pot-path) + (< fm (file-or-directory-modify-seconds pot-path))))]) + (and basename + (ormap + (λ (c-f-p) + (or (newer-exists? (build-path base c-f-p + (bytes->path + (bytes-append basename #"_" extension #".zo")))) + (ormap + (λ (ext) + (newer-exists? (build-path base + c-f-p + "native" + (system-library-subpath) + (bytes->path + (bytes-append basename #"_" extension ext))))) + '(#".so" #".dll" #".dylib")))) + (use-compiled-file-paths))))) + + (define (path->cache-zo-file-path path) + (apply build-path + + (cdr (explode-path path)))) + ;; insert-error-in-text : (is-a?/c text%) ;; (union #f (is-a?/c drscheme:rep:text<%>)) diff --git a/collects/drscheme/private/unit.ss b/collects/drscheme/private/unit.ss index 2925cb4068..a0639d4d01 100644 --- a/collects/drscheme/private/unit.ss +++ b/collects/drscheme/private/unit.ss @@ -2476,10 +2476,11 @@ module browser threading seems wrong. (update-running (send current-tab is-running?)) (on-tab-change old-tab current-tab) + (restore-visible-tab-regions) (end-container-sequence) ;; restore-visible-tab-regions has to be outside the container sequence ;; or else things get moved again during the container sequence end - (restore-visible-tab-regions))) + #;(restore-visible-tab-regions))) (define/pubment (on-tab-change from-tab to-tab) (let ([old-enabled (send from-tab get-enabled)] @@ -2559,9 +2560,9 @@ module browser threading seems wrong. (list x y w h))) (send txt get-canvases))) - (inherit set-text-to-search) + (inherit set-text-to-search reflow-container) (define/private (restore-visible-tab-regions) - (define (set-visible-regions txt regions ints?) + (define (fix-up-canvas-numbers txt regions ints?) (when regions (let* ([canvases (send txt get-canvases)] [canvases-count (length canvases)] @@ -2586,25 +2587,30 @@ module browser threading seems wrong. (split-interactions (car canvases)) (split-definitions (car canvases))) (loop (- i 1) - (cdr canvases))))])) - (for-each (λ (c r) - (set-visible-tab-region txt c r)) + (cdr canvases))))])))) + + (define (set-visible-regions txt regions) + (when regions + (for-each (λ (canvas region) + (let ([admin (send txt get-admin)]) + (send admin scroll-to + (first region) + (second region) + (third region) + (fourth region)))) (send txt get-canvases) regions))) - (define (set-visible-tab-region txt canvas region) - (let ([admin (send txt get-admin)]) - (send admin scroll-to - (first region) - (second region) - (third region) - (fourth region)))) + (let-values ([(vi is?) (send current-tab get-visible-ints)] [(vd ds?) (send current-tab get-visible-defs)]) (set! interactions-shown? is?) (set! definitions-shown? ds?) (update-shown) - (set-visible-regions definitions-text vd #f) - (set-visible-regions interactions-text vi #t)) + (fix-up-canvas-numbers definitions-text vd #f) + (fix-up-canvas-numbers interactions-text vi #t) + (reflow-container) + (set-visible-regions definitions-text vd) + (set-visible-regions interactions-text vi)) (case (send current-tab get-focus-d/i) [(defs) (send (car definitions-canvases) focus) @@ -2617,15 +2623,23 @@ module browser threading seems wrong. (with-handlers ([exn:fail:filesystem? (λ (x) #f)]) (string=? (path->string (normal-case-path (normalize-path p1))) (path->string (normal-case-path (normalize-path p2)))))) + (define/override (make-visible filename) + (let ([tab (find-matching-tab filename)]) + (when tab + (change-to-tab tab)))) + + (define/private (find-matching-tab filename) (let loop ([tabs tabs]) - (unless (null? tabs) - (let* ([tab (car tabs)] - [tab-filename (send (send tab get-defs) get-filename)]) - (if (and tab-filename - (pathname-equal? filename tab-filename)) - (change-to-tab tab) - (loop (cdr tabs))))))) + (cond + [(null? tabs) #f] + [else + (let* ([tab (car tabs)] + [tab-filename (send (send tab get-defs) get-filename)]) + (if (and tab-filename + (pathname-equal? filename tab-filename)) + tab + (loop (cdr tabs))))]))) (define/override (editing-this-file? filename) (ormap (λ (tab) @@ -2666,7 +2680,22 @@ module browser threading seems wrong. (string-constant close))) (send item set-shortcut (if just-one? #\w #f)))) - + ;; offer-to-save-file : path -> void + ;; bring the tab that edits the file named by `path' to the front + ;; and opens a dialog asking if it should be saved. + (define/public (offer-to-save-file path) + (let ([original-tab current-tab] + [tab-to-save (find-matching-tab path)]) + (when tab-to-save + (let ([defs-to-save (send tab-to-save get-defs)]) + (when (send defs-to-save save-file-out-of-date?) + (unless (eq? tab-to-save original-tab) + (change-to-tab tab-to-save)) + (send defs-to-save user-saves-or-not-modified? #f) + (unless (eq? tab-to-save original-tab) + (change-to-tab original-tab))))))) + + ;; ;; end tabs ;; diff --git a/collects/framework/gui-utils.ss b/collects/framework/gui-utils.ss index b11bd38e53..9bcf60defd 100644 --- a/collects/framework/gui-utils.ss +++ b/collects/framework/gui-utils.ss @@ -1,8 +1,8 @@ #reader scribble/reader -#lang scheme/gui - -(require string-constants) +#lang scheme/base +(require string-constants scheme/gui/base + scheme/contract scheme/class) (require scribble/srcdoc) (require/doc scheme/base scribble/manual) @@ -232,12 +232,12 @@ (λ () (cursor-off))))]))) (define unsaved-warning - (lambda (filename action-anyway (can-save-now? #f) (parent #f)) + (lambda (filename action-anyway (can-save-now? #f) (parent #f) [cancel? #t]) (let ([mb-res (message-box/custom (string-constant warning) (format (string-constant file-is-not-saved) filename) (string-constant save) - (string-constant cancel) + (and cancel? (string-constant cancel)) action-anyway parent (if can-save-now? @@ -454,11 +454,13 @@ (boolean? (or/c false/c (is-a?/c frame%) - (is-a?/c dialog%))) + (is-a?/c dialog%)) + boolean?) (symbols 'continue 'save 'cancel)) ((filename action) ((can-save-now? #f) - (parent #f))) + (parent #f) + (cancel? #t))) @{This displays a dialog that warns the user of a unsaved file. @@ -468,7 +470,14 @@ The result symbol indicates the user's choice. If @scheme[can-save-now?] is @scheme[#f], this function does not give the user the ``Save'' option and thus will not return - @scheme['save].}) + @scheme['save]. + + If @scheme[cancel?] is @scheme[#t] there is a cancel button + in the dialog and the result may be @scheme['cancel]. If it + is @scheme[#f], then there is no cancel button, and @scheme['cancel] + will not be the result of the function. + + }) (proc-doc/names gui-utils:get-choice diff --git a/collects/framework/private/editor.ss b/collects/framework/private/editor.ss index 70a0a0c48d..fa3f4869e9 100644 --- a/collects/framework/private/editor.ss +++ b/collects/framework/private/editor.ss @@ -495,21 +495,23 @@ (inherit save-file) (define/public (allow-close-with-no-filename?) #f) (define/augment (can-close?) - (let* ([user-allowed-or-not-modified - (or (not (is-modified?)) - (and (not (get-filename)) - (allow-close-with-no-filename?)) - (case (gui-utils:unsaved-warning - (get-filename/untitled-name) - (string-constant dont-save) - #t - (or (get-top-level-window) - (get-can-close-parent))) - [(continue) #t] - [(save) (save-file)] - [else #f]))]) - (and user-allowed-or-not-modified - (inner #t can-close?)))) + (and (user-saves-or-not-modified?) + (inner #t can-close?))) + + (define/public (user-saves-or-not-modified? [allow-cancel? #t]) + (or (not (is-modified?)) + (and (not (get-filename)) + (allow-close-with-no-filename?)) + (case (gui-utils:unsaved-warning + (get-filename/untitled-name) + (string-constant dont-save) + #t + (or (get-top-level-window) + (get-can-close-parent)) + allow-cancel?) + [(continue) #t] + [(save) (save-file)] + [else #f]))) (define/public (get-can-close-parent) #f) diff --git a/collects/lang/htdp-langs.ss b/collects/lang/htdp-langs.ss index cc2d66d69f..570aa2e061 100644 --- a/collects/lang/htdp-langs.ss +++ b/collects/lang/htdp-langs.ss @@ -1041,11 +1041,48 @@ (cond [(preferences:get 'framework:white-on-black?) (send on-sd set-delta-foreground "white") - (send off-sd set-delta-background "indianred")] + (send off-sd set-delta-foreground "indianred")] [else - (send on-sd set-delta-foreground "black") - (send off-sd set-delta-foreground "lightgray") - (send off-sd set-delta-background "firebrick")]) + ;; picture 1.png + #; + (begin + (send on-sd set-delta-foreground "black") + (send off-sd set-delta-foreground "lightgray") + (send off-sd set-delta-background "firebrick")) + + ;; picture 2.png + #; + (begin + (send on-sd set-delta-foreground "darkgreen") + (send off-sd set-delta-foreground "firebrick") + (send off-sd set-delta-background "Khaki")) + + ;; picture 3.png + #; + (begin + (send on-sd set-delta-foreground "darkgreen") + (send off-sd set-delta-foreground "Khaki") + (send off-sd set-delta-background "black")) + + ;; picture 4.png + #; + (begin + (send on-sd set-delta-foreground "black") + (send off-sd set-delta-foreground "Khaki") + (send off-sd set-delta-background "darkblue")) + + ;; picture 5.png + (begin + (send on-sd set-delta-foreground (make-object color% 0 80 0)) + (send off-sd set-delta-foreground "orange") + (send off-sd set-delta-background "black")) + + ;; variation on 5. + (begin + (send on-sd set-delta-foreground "black") + (send off-sd set-delta-foreground "orange") + (send off-sd set-delta-background "black")) + ]) (send rep set-test-coverage-info ht on-sd off-sd #f))))))))) (let ([ht (thread-cell-ref current-test-coverage-info)]) (when ht diff --git a/collects/scribblings/framework/canvas.scrbl b/collects/scribblings/framework/canvas.scrbl index 5735b866f1..ec1cc5c3a0 100644 --- a/collects/scribblings/framework/canvas.scrbl +++ b/collects/scribblings/framework/canvas.scrbl @@ -27,7 +27,7 @@ @defmixin[canvas:delegate-mixin (canvas:basic<%>) (canvas:delegate<%>)]{ Provides an implementation of @scheme[canvas:delegate<%>]. - @defmethod*[#:mode override (((on-superwindow-show (shown? boolean)) void))]{ + @defmethod*[#:mode override (((on-superwindow-show (shown? boolean?)) void))]{ Notifies the delegate window when the original window is visible. When invisible, the blue highlighting is erased. diff --git a/collects/scribblings/framework/color.scrbl b/collects/scribblings/framework/color.scrbl index 2c61f6b75c..48cb60181b 100644 --- a/collects/scribblings/framework/color.scrbl +++ b/collects/scribblings/framework/color.scrbl @@ -78,7 +78,7 @@ If clear-colors is true all the text in the buffer will have it's style set to Standard. } - @defmethod*[(((force-stop-colorer (stop? boolean)) void))]{ + @defmethod*[(((force-stop-colorer (stop? boolean?)) void))]{ Causes the entire tokenizing/coloring system to become inactive. Intended for debugging purposes only. @@ -86,11 +86,11 @@ stop? determines whether the system is being forced to stop or allowed to wake back up. } - @defmethod*[(((is-stopped?) boolean))]{ + @defmethod*[(((is-stopped?) boolean?))]{ Indicates if the colorer for this editor has been stopped, or not. } - @defmethod*[(((is-frozen?) boolean))]{ + @defmethod*[(((is-frozen?) boolean?))]{ Indicates if this editor's colorer is frozen. See also @method[color:text<%> freeze-colorer] and @@ -131,7 +131,7 @@ This returns the list of regions that are currently being colored in the editor. } - @defmethod*[(((skip-whitespace (position natural-number?) (direction (symbols (quote forward) (quote backward))) (comments? boolean)) natural-number?))]{ + @defmethod*[(((skip-whitespace (position natural-number?) (direction (symbols (quote forward) (quote backward))) (comments? boolean?)) natural-number?))]{ Returns the next non-whitespace character. @@ -172,7 +172,7 @@ Must only be called while the tokenizer is started. } - @defmethod*[(((insert-close-paren (position natural-number?) (char char?) (flash? boolean) (fixup? boolean)) void))]{ + @defmethod*[(((insert-close-paren (position natural-number?) (char char?) (flash? boolean?) (fixup? boolean?)) void))]{ Position is the place to put the parenthesis and char is the diff --git a/collects/scribblings/framework/editor.scrbl b/collects/scribblings/framework/editor.scrbl index 7a29a05ada..d5d19533ea 100644 --- a/collects/scribblings/framework/editor.scrbl +++ b/collects/scribblings/framework/editor.scrbl @@ -8,13 +8,13 @@ Classes matching this interface support the basic @scheme[editor<%>] functionality required by the framework. - @defmethod*[(((has-focus?) boolean))]{ + @defmethod*[(((has-focus?) boolean?))]{ This function returns @scheme[#t] when the editor has the keyboard focus. It is implemented using: @method[editor<%> on-focus] } - @defmethod*[(((local-edit-sequence?) boolean))]{ + @defmethod*[(((local-edit-sequence?) boolean?))]{ Indicates if this editor is in an edit sequence. Enclosing buffer's edit-sequence status is not considered by this method. @@ -49,11 +49,11 @@ } - @defmethod*[(((save-file-out-of-date?) boolean))]{ + @defmethod*[(((save-file-out-of-date?) boolean?))]{ Returns @scheme[#t] if the file on disk has been modified, by some other program. } - @defmethod*[(((save-file/gui-error (filename (union path |#f|) |#f|) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) same copy) (quote same)) (show-errors? boolean |#t|)) boolean))]{ + @defmethod*[(((save-file/gui-error (filename (union path |#f|) |#f|) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) same copy) (quote same)) (show-errors? boolean |#t|)) boolean?))]{ This method is an alternative to @method[editor<%> save-file]. Rather than showing errors via the original stdout, it opens a dialog with an error message showing the error. @@ -63,7 +63,7 @@ no error occurred and @scheme[#f] if an error occurred. } - @defmethod*[(((load-file/gui-error (filename (union string |#f|) |#f|) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote guess)) (show-errors? boolean |#t|)) boolean))]{ + @defmethod*[(((load-file/gui-error (filename (union string |#f|) |#f|) (format (union (quote guess) (quote standard) (quote text) (quote text-force-cr) (quote same) (quote copy)) (quote guess)) (show-errors? boolean |#t|)) boolean?))]{ This method is an alternative to @method[editor<%> load-file]. Rather than showing errors via the original stdout, it opens a dialog with an error message showing the error. @@ -91,7 +91,7 @@ Does nothing. } - @defmethod*[(((can-close?) boolean))]{ + @defmethod*[(((can-close?) boolean?))]{ This method is called to query the editor if is okay to close the editor. Although there is no visible effect associated with closing an editor, there may be some cleanup @@ -105,7 +105,7 @@ Returns @scheme[#t]. } - @defmethod*[(((close) boolean))]{ + @defmethod*[(((close) boolean?))]{ This method is merely @schemeblock[ (if (can-close?) @@ -155,7 +155,7 @@ This installs the global keymap @scheme[keymap:get-global] to handle keyboard and mouse mappings not handled by @scheme[keymap]. The global keymap is created when the framework is invoked. - @defmethod*[#:mode augment (((can-save-file? (filename string) (format symbol?)) boolean))]{ + @defmethod*[#:mode augment (((can-save-file? (filename string) (format symbol?)) boolean?))]{ Checks to see if the file on the disk has been modified out side of this editor, using @@ -163,7 +163,7 @@ If it has, this method prompts the user to be sure they want to save. } - @defmethod*[#:mode augment (((after-save-file (success? boolean)) void))]{ + @defmethod*[#:mode augment (((after-save-file (success? boolean?)) void))]{ If the current filename is not a temporary filename, this method calls @scheme[handler:add-to-recent]with the current filename. @@ -175,19 +175,19 @@ @method[editor:basic<%> save-file-out-of-date?]. } - @defmethod*[#:mode augment (((after-load-file (success? boolean)) void))]{ + @defmethod*[#:mode augment (((after-load-file (success? boolean?)) void))]{ Updates a private instance variable with the modification time of the file, for using in implementing @method[editor:basic<%> save-file-out-of-date?] } - @defmethod*[#:mode override (((on-focus (on? boolean)) void))]{ + @defmethod*[#:mode override (((on-focus (on? boolean?)) void))]{ Manages the state to implement @method[editor:basic<%> has-focus?] } - @defmethod*[#:mode augment (((on-edit-sequence) boolean))]{ + @defmethod*[#:mode augment (((on-edit-sequence) boolean?))]{ Always returns @scheme[#t]. Updates a flag for @method[editor:basic<%> local-edit-sequence?] @@ -323,7 +323,7 @@ in the editor. } - @defmethod*[(((allow-close-with-no-filename?) boolean))]{ + @defmethod*[(((allow-close-with-no-filename?) boolean?))]{ This method indicates if closing the file when it hasn't been saved is a reason to alert the user. See also @method[editor:file-mixin can-close?]. @@ -331,6 +331,15 @@ Defaultly returns @scheme[#f]. } + + @defmethod[(user-saves-or-not-modified? [allow-cancel? #t]) boolean?]{ + If the file has not been saved, this prompts the user about saving and, + if the user says to save, then it saves the file. + + The result is @scheme[#t] if the save file is up to date, or if + the user says it is okay to continue without saving. Generally used + when closing the file or quiting the app. + } } @defmixin[editor:file-mixin (editor:keymap<%>) (editor:file<%>)]{ This editor locks itself when the file that is opened is read-only in @@ -344,7 +353,7 @@ frame that matches @scheme[frame:editor<%>]. } - @defmethod*[#:mode augment (((can-close?) boolean))]{ + @defmethod*[#:mode augment (((can-close?) boolean?))]{ If the @method[editor:file<%> allow-close-with-no-filename?] @@ -369,7 +378,7 @@ } @definterface[editor:backup-autosave<%> (editor:basic<%>)]{ Classes matching this interface support backup files and autosaving. - @defmethod*[(((backup?) boolean))]{ + @defmethod*[(((backup?) boolean?))]{ Indicates weather this @scheme[editor<%>] should be backed up. @@ -382,7 +391,7 @@ @index{'framework:backup-files?} } - @defmethod*[(((autosave?) boolean))]{ + @defmethod*[(((autosave?) boolean?))]{ Indicates weather this @scheme[editor<%>] should be autosaved. @@ -455,7 +464,7 @@ See also @scheme[frame:text-info<%>]. - @defmethod*[#:mode override (((lock (lock? boolean)) void))]{ + @defmethod*[#:mode override (((lock (lock? boolean?)) void))]{ Uses @method[editor:basic<%> run-after-edit-sequence] diff --git a/collects/scribblings/framework/group.scrbl b/collects/scribblings/framework/group.scrbl index a43a1a8a45..9281970308 100644 --- a/collects/scribblings/framework/group.scrbl +++ b/collects/scribblings/framework/group.scrbl @@ -83,7 +83,7 @@ } - @defmethod*[(((clear) boolean))]{ + @defmethod*[(((clear) boolean?))]{ This removes all of the frames in the group. It does not close the frames. See also @method[group:% on-close-all]and @method[group:% can-close-all?]. diff --git a/collects/scribblings/framework/keymap.scrbl b/collects/scribblings/framework/keymap.scrbl index 09ec0b9328..09cb673679 100644 --- a/collects/scribblings/framework/keymap.scrbl +++ b/collects/scribblings/framework/keymap.scrbl @@ -26,7 +26,7 @@ } } @defmixin[keymap:aug-keymap-mixin (keymap%) (keymap:aug-keymap<%>)]{ - @defmethod*[#:mode override (((chain-to-keymap (next (instance keymap%)) (prefix? boolean)) void))]{ + @defmethod*[#:mode override (((chain-to-keymap (next (instance keymap%)) (prefix? boolean?)) void))]{ Keeps a list of the keymaps chained to this one. } diff --git a/collects/scribblings/framework/panel.scrbl b/collects/scribblings/framework/panel.scrbl index 2e8c5c3cdc..19541b840d 100644 --- a/collects/scribblings/framework/panel.scrbl +++ b/collects/scribblings/framework/panel.scrbl @@ -47,7 +47,7 @@ } @defmixin[panel:single-window-mixin (panel:single<%> window<%>) (panel:single-window<%>)]{ - @defmethod*[#:mode override (((container-size (info (list-of (list exact-integer exact-integer boolean boolean)))) (values exact-integer exact-integer)))]{ + @defmethod*[#:mode override (((container-size (info (list-of (list exact-integer exact-integer boolean boolean?)))) (values exact-integer exact-integer)))]{ Factors the border width into the size calculation. } @@ -89,7 +89,7 @@ Return the current percentages of the children. } - @defmethod*[(((get-vertical?) boolean))]{ + @defmethod*[(((get-vertical?) boolean?))]{ This method controls the behavior of the other overridden methods in mixins that implement this interface. @@ -124,7 +124,7 @@ matches the number of children and calls @method[panel:dragable<%> after-percentage-change]. } - @defmethod*[#:mode override (((on-subwindow-event (receiver (instanceof window<%>)) (event (instanceof mouse-event%))) boolean))]{ + @defmethod*[#:mode override (((on-subwindow-event (receiver (instanceof window<%>)) (event (instanceof mouse-event%))) boolean?))]{ When the cursor is dragging the middle bar around, this method handles the resizing of the two panes. @@ -149,7 +149,7 @@ method of the @scheme[panel:dragable-mixin] to return @scheme[#t]. - @defmethod*[#:mode override (((get-vertical?) boolean))]{ + @defmethod*[#:mode override (((get-vertical?) boolean?))]{ Returns @scheme[#t]. } @@ -160,7 +160,7 @@ method of the @scheme[panel:dragable-mixin] to return @scheme[#f]. - @defmethod*[#:mode override (((get-vertical?) boolean))]{ + @defmethod*[#:mode override (((get-vertical?) boolean?))]{ Returns @scheme[#f]. } diff --git a/collects/scribblings/framework/scheme.scrbl b/collects/scribblings/framework/scheme.scrbl index 07ec4b51f7..e7f1c5bd3a 100644 --- a/collects/scribblings/framework/scheme.scrbl +++ b/collects/scribblings/framework/scheme.scrbl @@ -53,7 +53,7 @@ @scheme[preferences:get]) the matching open parenthesis is flashed. } - @defmethod*[(((tabify-on-return?) boolean))]{ + @defmethod*[(((tabify-on-return?) boolean?))]{ The result of this method is used to determine if the return key automatically tabs over to the correct position. diff --git a/collects/scribblings/framework/text.scrbl b/collects/scribblings/framework/text.scrbl index b8599a71af..b60f88e12d 100644 --- a/collects/scribblings/framework/text.scrbl +++ b/collects/scribblings/framework/text.scrbl @@ -70,7 +70,7 @@ Returns a list of (opaque) values representing the active ranges in the editor. } - @defmethod*[(((get-styles-fixed) boolean))]{ + @defmethod*[(((get-styles-fixed) boolean?))]{ If the result of this function is @scheme[#t], the styles in this @scheme[text:basic<%>] will be fixed. This means @@ -87,7 +87,7 @@ @method[text:basic<%> set-styles-fixed]when setting the styles. } - @defmethod*[(((set-styles-fixed (fixed? boolean)) void))]{ + @defmethod*[(((set-styles-fixed (fixed? boolean?)) void))]{ Sets the styles fixed parameter of this @scheme[text%]. See also @method[text:basic<%> get-styles-fixed] @@ -125,7 +125,7 @@ See also @method[text:basic<%> port-name-matches?]. } - @defmethod*[(((port-name-matches? (id (or/c path? symbol?))) boolean))]{ + @defmethod*[(((port-name-matches? (id (or/c path? symbol?))) boolean?))]{ Indicates if @scheme[id] matches the port name of this file. If the file is saved, the port name matches when the save file @@ -428,7 +428,7 @@ @defmixin[text:return-mixin (text%) (text:return<%>)]{ Use this buffer to perform some special action when return is typed. - @defconstructor[((return (-> boolean)))]{ + @defconstructor[((return (-> boolean?)))]{ } @defmethod*[#:mode override (((on-local-char (event (is-a?/c key-event%))) void))]{ @@ -612,7 +612,7 @@ ends an edit sequence in the delegate. } - @defmethod*[#:mode override (((resized (snip (is-a?/c snip%)) (redraw-now? boolean)) void))]{ + @defmethod*[#:mode override (((resized (snip (is-a?/c snip%)) (redraw-now? boolean?)) void))]{ Sends a message to the delegate to update the size of the copied snip, if there is one. @@ -634,7 +634,7 @@ remembers the filename, for use in @method[text:delegate-mixin after-load-file]. } - @defmethod*[#:mode augment (((after-load-file (success? boolean)) void))]{ + @defmethod*[#:mode augment (((after-load-file (success? boolean?)) void))]{ updates the delegate with the new contents of the text. } @@ -737,7 +737,7 @@ @definterface[text:file<%> (editor:file<%> text:basic<%>)]{ Mixins that implement this interface lock themselves when the file they are editing is read only. - @defmethod*[(((get-read-write?) boolean))]{ + @defmethod*[(((get-read-write?) boolean?))]{ Indicates whether or not this editor is in read-write mode. } @@ -748,14 +748,14 @@ } } @defmixin[text:file-mixin (editor:file<%> text:basic<%>) (text:file<%>)]{ - @defmethod*[#:mode augment (((can-insert? (start number) (len number)) boolean))]{ + @defmethod*[#:mode augment (((can-insert? (start number) (len number)) boolean?))]{ Returns false if the result of @method[text:file<%> get-read-write?] is true, otherwise returns the result of calling @scheme[inner]. } - @defmethod*[#:mode augment (((can-delete? (start number) (len number)) boolean))]{ + @defmethod*[#:mode augment (((can-delete? (start number) (len number)) boolean?))]{ Returns false if the result of @method[text:file<%> get-read-write?] @@ -850,14 +850,14 @@ @method[text:ports<%> get-unread-start-point]. } - @defmethod*[(((set-allow-edits (allow-edits? boolean)) void))]{ + @defmethod*[(((set-allow-edits (allow-edits? boolean?)) void))]{ Enables or disables editing in the buffer. Be sure to update the unread start point (via @method[text:ports<%> set-unread-start-point]) and the insertion point (via @method[text:ports<%> set-insertion-point]) after making changes to the buffer. } - @defmethod*[(((get-allow-edits) boolean))]{ + @defmethod*[(((get-allow-edits) boolean?))]{ Indicates if editing is allowed in the buffer at this point. } @@ -885,7 +885,7 @@ @method[text:ports<%> set-insertion-point]. } - @defmethod*[(((submit-to-port? (key char)) boolean))]{ + @defmethod*[(((submit-to-port? (key char)) boolean?))]{ Augment this method to help control when characters should be submitted to the input port. @@ -1028,13 +1028,13 @@ } @defmixin[text:ports-mixin (text:wide-snip<%>) (text:ports<%>)]{ - @defmethod*[#:mode augment (((can-insert? (start exact-integer) (len exact-integer)) boolean))]{ + @defmethod*[#:mode augment (((can-insert? (start exact-integer) (len exact-integer)) boolean?))]{ Returns the results of the @scheme[inner] call, unless @method[text:ports<%> get-allow-edits] returns @scheme[#f]. } - @defmethod*[#:mode augment (((can-delete? (start exact-integer) (len exact-integer)) boolean))]{ + @defmethod*[#:mode augment (((can-delete? (start exact-integer) (len exact-integer)) boolean?))]{ Returns the results of the @scheme[inner] call, unless @method[text:ports<%> get-allow-edits] @@ -1099,7 +1099,7 @@ @scheme[(make-object color% 204 153 255)]. } - @defmethod*[(((completion-mode-key-event? (key-event key-event%)) boolean))]{ + @defmethod*[(((completion-mode-key-event? (key-event key-event%)) boolean?))]{ Returns true when the key event passed to it should initiate the completions menu.