diff --git a/collects/framework/decorated-editor-snip.rkt b/collects/framework/decorated-editor-snip.rkt index 5875dac677..e1b75b2f2e 100644 --- a/collects/framework/decorated-editor-snip.rkt +++ b/collects/framework/decorated-editor-snip.rkt @@ -1,9 +1,9 @@ -#lang scheme/base +#lang racket/base (require "private/decorated-editor-snip.ss") (provide (rename-out [editor-snip:decorated% decorated-editor-snip%]) - (rename-out [editor-snip:decorated-snipclass decorated-editor-snipclass%]) + (rename-out [editor-snip:decorated-snipclass% decorated-editor-snipclass%]) (rename-out [editor-snip:decorated-mixin decorated-editor-snip-mixin]) (rename-out [editor-snip:decorated<%> decorated-editor-snip<%>])) diff --git a/collects/framework/framework-unit.rkt b/collects/framework/framework-unit.rkt index c1bea36f2c..d4eead1207 100644 --- a/collects/framework/framework-unit.rkt +++ b/collects/framework/framework-unit.rkt @@ -32,7 +32,7 @@ "private/mode.rkt" "private/early-init.rkt") -(provide framework-separate@ framework@) +(provide framework@) (define-compound-unit/infer framework-separate@ (import mred^) diff --git a/collects/framework/main.rkt b/collects/framework/main.rkt index a5e2cacf9b..7c577af453 100644 --- a/collects/framework/main.rkt +++ b/collects/framework/main.rkt @@ -1,6 +1,10 @@ -#lang at-exp scheme/gui +#lang at-exp racket/base -(require mred/mred-unit +(require racket/contract + racket/unit + racket/class + racket/gui/base + mred/mred-unit mred/mred-sig framework/framework-unit framework/private/sig @@ -37,7 +41,7 @@ (prefix editor: framework:editor-class^) (prefix pasteboard: framework:pasteboard-class^) (prefix text: framework:text-class^) - (prefix color: framework:color^) + (prefix color: framework:color-class^) (prefix color-prefs: framework:color-prefs-class^) (prefix comment-box: framework:comment-box-class^) (prefix finder: framework:finder-class^) @@ -55,6 +59,14 @@ (provide/doc + (proc-doc + color:get-parenthesis-colors-table + (-> (listof (list/c symbol? string? (vectorof (is-a?/c color%))))) + @{Returns a table of colors that get used for parenthesis highlighting. + Each entry in the table consists of a symbolic name, a name to show + in a GUI, and the color to use. The colors are used to show the nesting + structure in the parens.}) + (proc-doc/names text:range? (-> any/c boolean?) (arg) @{Determines if @scheme[arg] is an instance of the @tt{range} struct.}) @@ -145,6 +157,11 @@ shown in the decimal state. See also @scheme[number-snip:make-repeating-decimal-snip].}) + + (thing-doc + comment-box:snipclass + (is-a?/c snip-class%) + @{The @racket[snip-class%] object used by @racket[comment-box:snip%].}) (proc-doc/names version:add-spec diff --git a/collects/framework/preferences.rkt b/collects/framework/preferences.rkt index 6e2ec99014..1806a2f237 100644 --- a/collects/framework/preferences.rkt +++ b/collects/framework/preferences.rkt @@ -30,8 +30,6 @@ the state transitions / contracts are: racket/contract racket/file) (require/doc racket/base scribble/manual (for-label racket/serialize)) -(provide exn:struct:unknown-preference) - (define-struct (exn:unknown-preference exn) ()) ;; these two names are for consistency @@ -496,6 +494,12 @@ the state transitions / contracts are: (exn) @{Determines if a value is an unknown preference exn.}) + (thing-doc + exn:struct:unknown-preference + struct-type? + @{The struct type for the unknown preference exn.}) + + (parameter-doc preferences:low-level-put-preferences (parameter/c ((listof symbol?) (listof any/c) . -> . any)) diff --git a/collects/framework/private/color.rkt b/collects/framework/private/color.rkt index 4120e3aa3b..d870d3c0f3 100644 --- a/collects/framework/private/color.rkt +++ b/collects/framework/private/color.rkt @@ -1,4 +1,4 @@ -#lang scheme/unit +#lang racket/unit #| update-region-end is now gone get-region is gone diff --git a/collects/framework/private/decorated-editor-snip.rkt b/collects/framework/private/decorated-editor-snip.rkt index 969e76c446..81df2cf211 100644 --- a/collects/framework/private/decorated-editor-snip.rkt +++ b/collects/framework/private/decorated-editor-snip.rkt @@ -5,7 +5,7 @@ (provide editor-snip:decorated% - editor-snip:decorated-snipclass + editor-snip:decorated-snipclass% editor-snip:decorated-mixin editor-snip:decorated<%>) @@ -230,7 +230,7 @@ (super-new (editor (make-editor))))) -(define editor-snip:decorated-snipclass +(define editor-snip:decorated-snipclass% (class snip-class% ;; make-snip : stream-in -> (is-a?/c snip%) diff --git a/collects/framework/private/sig.rkt b/collects/framework/private/sig.rkt index 5d342e983c..60520eeb3f 100644 --- a/collects/framework/private/sig.rkt +++ b/collects/framework/private/sig.rkt @@ -1,4 +1,4 @@ -#lang scheme/base +#lang racket/base (require scheme/unit) @@ -12,9 +12,9 @@ make-fraction-snip)) (define-signature comment-box-class^ - (snipclass snip%)) + (snip%)) (define-signature comment-box^ extends comment-box-class^ - ()) + (snipclass)) (define-signature menu-class^ (can-restore<%> diff --git a/collects/scribblings/framework/framework.scrbl b/collects/scribblings/framework/framework.scrbl index 912ebadb41..72ef3c8d8a 100644 --- a/collects/scribblings/framework/framework.scrbl +++ b/collects/scribblings/framework/framework.scrbl @@ -1,6 +1,6 @@ #lang scribble/doc -@(require (for-label framework racket/gui)) +@(require (for-label framework framework/framework-unit framework/framework-sig racket/gui)) @(require scribble/manual) @title{@bold{Framework}: Racket GUI Application Framework} @@ -12,91 +12,8 @@ The framework provides a number of mixins, classes and functions designed to help you build a complete application program on top of the @racket[racket/gui] library. -@itemize[ -@item{@bold{Entire Framework} - -@itemize[ - -@item{@racket[(require @#,racketmodname[framework])] - - This library provides all of the definitions and syntax - described in this manual. -} -@item{@racket[(require framework/framework-sig)] - - This library provides the signature definitions: - @racket[framework^], and - @racket[framework-class^]. - The @racket[framework^] signature contains all of the - names of the procedures described in this manual, except - those that begin with @racket[test:] and - @racket[gui-utils:]. The @racket[framework-class^] - signature contains all of the classes defined in this - manual. -} -@item{@racket[(require framework/framework-unit)] - - This library provides one - @racket[unit/sig]: @racket[framework@]. It exports the signature - @racket[framework^]. It imports the @racket[mred^] signature. - -} -]} -@item{ - @bold{Test Suite Engine} - -@racket[(require @#,racketmodname[framework/test])] - -This library provides all of the definitions beginning with -@racket[test:] described in this manual. -} -@item{ @bold{GUI Utilities} -@racket[(require @#,racketmodname[framework/gui-utils])] - - This libraries provides all of the definitions beginning - with @racket[gui-utils:] described in this manual. -} -@item{ @bold{Preferences} -@racket[(require @#,racketmodname[framework/preferences])] - - This library provides a subset of the names of the - @tt{framework.ss} library, namely those for - manipulating preference settings and is designed to be - used from @exec{racket}. - -The precise set of exported names is: -@racket[preferences:snapshot?], -@racket[preferences:restore-prefs-snapshot], -@racket[preferences:get-prefs-snapshot], -@racket[exn:make-unknown-preference], -@racket[exn:unknown-preference?], -@racket[preferences:low-level-put-preferences], -@racket[preferences:get], -@racket[preferences:set], -@racket[preferences:add-callback], -@racket[preferences:set-default], -@racket[preferences:set-un/marshall], and -@racket[preferences:restore-defaults]. -} - -@item{@bold{Splash Screen} - @racket[(require @#,racketmodname[framework/splash])] - - This library provides support for a splash screen. See - @racketmodname[framework/splash] for more. -} - -@item{@bold{Decorated Editor Snip} -@racket[(require framework/decorated-editor-snip)] - -This library is here for backwards compatibility. The -functionality in it has moved into the framework proper, in -the @secref["editor-snip"] section. -} -] @bold{Thanks} - Thanks to Shriram Krishnamurthi, Cormac Flanagan, Matthias Felleisen, Ian Barland, Gann Bierner, Richard Cobbe, Dan Grossman, Stephanie Weirich, Paul Steckler, Sebastian Good, @@ -104,6 +21,40 @@ Johnathan Franklin, Mark Krentel, Corky Cartwright, Michael Ernst, Kennis Koldewyn, Bruce Duba, and many others for their feedback and help. + +@section{Framework Libraries Overview} + +@itemize[ +@item{Entire Framework: @racketmodname[framework] + + This library provides all of the definitions and syntax + described in this manual. +} + +@item{Test Suite Engine: @racketmodname[framework/test] + +This library provides all of the definitions beginning with +@racket[test:] described in this manual. +} + +@item{GUI Utilities @racketmodname[framework/gui-utils] + + This libraries provides all of the definitions beginning + with @racket[gui-utils:] described in this manual. +} +@item{Preferences @racketmodname[framework/preferences] + + This library provides a subset of the names of the + @racketmodname[framework] library, namely those for + manipulating preference settings and is designed to be + used from @exec{racket}. +} + +@item{Splash Screen @racketmodname[framework/splash] + This library provides support for a splash screen. See + @racketmodname[framework/splash] for more. +}] + @include-section["application.scrbl"] @include-section["autosave.scrbl"] @include-section["canvas.scrbl"] @@ -111,6 +62,29 @@ their feedback and help. @include-section["color-prefs.scrbl"] @include-section["color.scrbl"] @include-section["comment-box.scrbl"] + +@section{Decorated Editor Snip} + +@defmodule[framework/decorated-editor-snip] + +This library is here for backwards compatibility. The +functionality in it has moved into the framework proper, in +the @secref["editor-snip"] section. + + @defidform[decorated-editor-snip%]{ + Use @racket[editor-snip:decorated%] instead. + } + @defidform[decorated-editor-snipclass%]{ + Use @racket[editor-snip:decorated-snipclass%] instead. + } + @defidform[decorated-editor-snip-mixin]{ + Use @racket[editor-snip:decorated-mixin] instead. + } + @defidform[decorated-editor-snip<%>]{ + Use @racket[editor-snip:decorated<%>] instead. + } + + @include-section["editor-snip.scrbl"] @include-section["editor.scrbl"] @include-section["exit.scrbl"] @@ -135,4 +109,29 @@ their feedback and help. @include-section["test.scrbl"] @include-section["version.scrbl"] +@section{Signatures} + +@defmodule[framework/framework-sig] + +@defsignature[framework^ ()]{ + Contains of the names of the procedures in this + manual, except those that begin with @racket[test:] and + @racket[gui-utils:]. +} + + +@defsignature[framework-class^ ()]{ + Contains all of the classes defined in this + manual. +} + +@section{Unit} + +@defmodule[framework/framework-unit] + +@defthing[framework@ unit?]{ + Exports the signature + @racket[framework^] and imports the @racket[mred^] signature. +} + @index-section[] diff --git a/collects/scribblings/framework/gui-utils.scrbl b/collects/scribblings/framework/gui-utils.scrbl index 172a1be0e7..171e31f64b 100644 --- a/collects/scribblings/framework/gui-utils.scrbl +++ b/collects/scribblings/framework/gui-utils.scrbl @@ -1,7 +1,9 @@ #lang scribble/doc -@(require scribble/manual scribble/extract) -@(require (for-label framework)) -@(require (for-label scheme/gui)) +@(require scribble/manual scribble/extract + (for-label framework racket/gui)) @title{GUI Utilities} -@(defmodule framework/gui-utils) + +@defmodule*/no-declare[(framework/gui-utils)] +@declare-exporting[framework/gui-utils framework] + @(include-extracted (lib "gui-utils.ss" "framework")) diff --git a/collects/scribblings/framework/preferences-text.scrbl b/collects/scribblings/framework/preferences-text.scrbl index 2506cdf3cc..7558b43f30 100644 --- a/collects/scribblings/framework/preferences-text.scrbl +++ b/collects/scribblings/framework/preferences-text.scrbl @@ -4,6 +4,7 @@ @(require (for-label scheme/gui)) @title{Preferences, Textual} -@(defmodule framework/preferences) +@defmodule*/no-declare[(framework/preferences)] +@declare-exporting[framework/preferences framework] @(include-extracted (lib "preferences.ss" "framework")) diff --git a/collects/scribblings/framework/splash.scrbl b/collects/scribblings/framework/splash.scrbl index e9dc332818..80335dd59a 100644 --- a/collects/scribblings/framework/splash.scrbl +++ b/collects/scribblings/framework/splash.scrbl @@ -1,6 +1,7 @@ #lang scribble/doc @(require scribble/manual - (for-label racket/gui + (for-label framework/splash + racket/gui racket/base)) @title{Splash} @defmodule[framework/splash] diff --git a/collects/scribblings/framework/test.scrbl b/collects/scribblings/framework/test.scrbl index 50f848f024..fc264028f7 100644 --- a/collects/scribblings/framework/test.scrbl +++ b/collects/scribblings/framework/test.scrbl @@ -4,7 +4,8 @@ @(require (for-label scheme/gui)) @title{Test} -@(defmodule framework/test) +@defmodule*/no-declare[(framework/test)] +@declare-exporting[framework/test framework] The framework provides several new primitive functions that simulate user actions, which may be used to test applications. You use these diff --git a/collects/scribblings/framework/text.scrbl b/collects/scribblings/framework/text.scrbl index 269c5350fe..a5aa37448b 100644 --- a/collects/scribblings/framework/text.scrbl +++ b/collects/scribblings/framework/text.scrbl @@ -1173,6 +1173,7 @@ @defclass[text:basic% (text:basic-mixin (editor:basic-mixin text%)) ()]{} @defclass[text:hide-caret/selection% (text:hide-caret/selection-mixin text:basic%) ()]{} @defclass[text:nbsp->space% (text:nbsp->space-mixin text:basic%) ()]{} +@defclass[text:normalize-paste% (text:normalize-paste-mixin text:basic%) ()]{} @defclass[text:delegate% (text:delegate-mixin text:basic%) ()]{} @defclass[text:wide-snip% (text:wide-snip-mixin text:basic%) ()]{} @defclass[text:standard-style-list% (editor:standard-style-list-mixin text:wide-snip%) ()]{} diff --git a/collects/framework/tests/test-docs-complete.rkt b/collects/tests/framework/test-docs-complete.rkt similarity index 75% rename from collects/framework/tests/test-docs-complete.rkt rename to collects/tests/framework/test-docs-complete.rkt index c10eb24d82..b742ab4f8f 100644 --- a/collects/framework/tests/test-docs-complete.rkt +++ b/collects/tests/framework/test-docs-complete.rkt @@ -9,5 +9,5 @@ (check-docs (quote framework/framework-unit)) (check-docs (quote framework/framework-sig)) (check-docs (quote framework/decorated-editor-snip)) -(check-docs (quote framework/comment-snip)) -(check-docs (quote framework/collapsed-snipclass)) +(check-docs (quote framework/comment-snip) #:skip '(snip-class)) +(check-docs (quote framework/collapsed-snipclass) #:skip '(snip-class))