From 93cc35bd5bbc419650b2c9a85dfce555658dfdb4 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Thu, 6 Sep 2007 13:19:15 +0000 Subject: [PATCH] improced scribble class/interface doc forms svn: r7284 --- collects/games/cards/cards.ss | 3 +- collects/games/cards/doc.scrbl | 495 ++++++++++++++++++ collects/games/cards/info.ss | 4 +- collects/games/cards/main.ss | 9 +- collects/scribble/base-render.ss | 6 +- collects/scribble/html-render.ss | 13 +- collects/scribble/manual.ss | 411 ++++++++------- collects/scribble/scheme.ss | 10 +- collects/scribble/struct.ss | 10 +- collects/scribblings/gui/add-color-intf.scrbl | 4 +- .../scribblings/gui/area-container-intf.scrbl | 5 +- .../gui/area-container-window-intf.scrbl | 6 +- collects/scribblings/gui/area-intf.scrbl | 4 +- collects/scribblings/gui/bitmap-class.scrbl | 4 +- .../scribblings/gui/bitmap-dc-class.scrbl | 5 +- collects/scribblings/gui/brush-class.scrbl | 4 +- .../scribblings/gui/brush-list-class.scrbl | 4 +- collects/scribblings/gui/button-class.scrbl | 5 +- collects/scribblings/gui/canvas-class.scrbl | 5 +- collects/scribblings/gui/canvas-intf.scrbl | 5 +- .../scribblings/gui/check-box-class.scrbl | 5 +- .../gui/checkable-menu-item-class.scrbl | 5 +- collects/scribblings/gui/choice-class.scrbl | 5 +- .../gui/clipboard-client-class.scrbl | 4 +- collects/scribblings/gui/clipboard-intf.scrbl | 4 +- collects/scribblings/gui/color-class.scrbl | 4 +- .../scribblings/gui/color-database-intf.scrbl | 4 +- .../scribblings/gui/combo-field-class.scrbl | 5 +- .../scribblings/gui/control-event-class.scrbl | 5 +- collects/scribblings/gui/control-intf.scrbl | 5 +- collects/scribblings/gui/cursor-class.scrbl | 4 +- collects/scribblings/gui/dc-intf.scrbl | 4 +- collects/scribblings/gui/dc-path-class.scrbl | 4 +- collects/scribblings/gui/dialog-class.scrbl | 5 +- collects/scribblings/gui/draw-classes.scrbl | 41 +- .../scribblings/gui/editor-admin-class.scrbl | 4 +- .../scribblings/gui/editor-canvas-class.scrbl | 5 +- collects/scribblings/gui/editor-classes.scrbl | 63 ++- .../gui/editor-data-class-class.scrbl | 4 +- .../gui/editor-data-class-list-intf.scrbl | 4 +- .../scribblings/gui/editor-data-class.scrbl | 4 +- collects/scribblings/gui/editor-intf.scrbl | 4 +- .../scribblings/gui/editor-snip-class.scrbl | 5 +- .../gui/editor-snip-editor-admin-intf.scrbl | 4 +- .../gui/editor-stream-in-base-class.scrbl | 4 +- .../editor-stream-in-bytes-base-class.scrbl | 5 +- .../gui/editor-stream-in-class.scrbl | 4 +- .../gui/editor-stream-out-base-class.scrbl | 4 +- .../editor-stream-out-bytes-base-class.scrbl | 5 +- .../gui/editor-stream-out-class.scrbl | 4 +- .../gui/editor-wordbreak-map-class.scrbl | 4 +- collects/scribblings/gui/event-class.scrbl | 4 +- collects/scribblings/gui/font-class.scrbl | 4 +- .../scribblings/gui/font-list-class.scrbl | 4 +- .../gui/font-name-directory-intf.scrbl | 4 +- collects/scribblings/gui/frame-class.scrbl | 5 +- collects/scribblings/gui/gauge-class.scrbl | 5 +- .../scribblings/gui/gl-config-class.scrbl | 4 +- .../scribblings/gui/gl-context-intf.scrbl | 4 +- .../gui/group-box-panel-class.scrbl | 5 +- .../gui/grow-box-spacer-pane-class.scrbl | 5 +- .../gui/horizontal-pane-class.scrbl | 5 +- .../gui/horizontal-panel-class.scrbl | 5 +- .../scribblings/gui/image-snip-class.scrbl | 5 +- .../scribblings/gui/key-event-class.scrbl | 5 +- collects/scribblings/gui/keymap-class.scrbl | 4 +- .../gui/labelled-menu-item-intf.scrbl | 5 +- collects/scribblings/gui/list-box-class.scrbl | 5 +- .../scribblings/gui/list-control-intf.scrbl | 5 +- collects/scribblings/gui/menu-bar-class.scrbl | 5 +- collects/scribblings/gui/menu-class.scrbl | 6 +- .../scribblings/gui/menu-item-class.scrbl | 5 +- .../gui/menu-item-container-intf.scrbl | 4 +- collects/scribblings/gui/menu-item-intf.scrbl | 4 +- collects/scribblings/gui/message-class.scrbl | 5 +- .../scribblings/gui/mouse-event-class.scrbl | 5 +- collects/scribblings/gui/mred-classes.ss | 113 ---- .../scribblings/gui/mult-color-intf.scrbl | 4 +- collects/scribblings/gui/pane-class.scrbl | 6 +- collects/scribblings/gui/panel-class.scrbl | 6 +- .../scribblings/gui/pasteboard-class.scrbl | 5 +- collects/scribblings/gui/pen-class.scrbl | 4 +- collects/scribblings/gui/pen-list-class.scrbl | 4 +- collects/scribblings/gui/point-class.scrbl | 4 +- .../scribblings/gui/popup-menu-class.scrbl | 5 +- .../gui/post-script-dc-class.scrbl | 5 +- .../scribblings/gui/printer-dc-class.scrbl | 5 +- collects/scribblings/gui/ps-setup-class.scrbl | 4 +- .../scribblings/gui/radio-box-class.scrbl | 5 +- .../scribblings/gui/readable-snip-intf.scrbl | 4 +- collects/scribblings/gui/region-class.scrbl | 4 +- .../scribblings/gui/scroll-event-class.scrbl | 5 +- .../gui/selectable-menu-item-intf.scrbl | 5 +- .../gui/separator-menu-item-class.scrbl | 5 +- collects/scribblings/gui/slider-class.scrbl | 5 +- .../scribblings/gui/snip-admin-class.scrbl | 4 +- .../scribblings/gui/snip-class-class.scrbl | 4 +- .../gui/snip-class-list-intf.scrbl | 4 +- collects/scribblings/gui/snip-class.scrbl | 4 +- .../scribblings/gui/string-snip-class.scrbl | 5 +- .../scribblings/gui/style-delta-class.scrbl | 4 +- collects/scribblings/gui/style-intf.scrbl | 4 +- .../scribblings/gui/style-list-class.scrbl | 4 +- collects/scribblings/gui/subarea-intf.scrbl | 5 +- collects/scribblings/gui/subwindow-intf.scrbl | 6 +- .../scribblings/gui/tab-panel-class.scrbl | 5 +- collects/scribblings/gui/tab-snip-class.scrbl | 5 +- collects/scribblings/gui/text-class.scrbl | 6 +- .../scribblings/gui/text-field-class.scrbl | 5 +- collects/scribblings/gui/timer-class.scrbl | 4 +- .../gui/top-level-window-intf.scrbl | 5 +- .../scribblings/gui/vertical-pane-class.scrbl | 5 +- .../gui/vertical-panel-class.scrbl | 5 +- collects/scribblings/gui/win-classes.scrbl | 103 ++-- collects/scribblings/gui/window-intf.scrbl | 5 +- collects/scribblings/scribble/manual.scrbl | 95 ++-- collects/setup/scribble.ss | 4 + 117 files changed, 1131 insertions(+), 718 deletions(-) create mode 100644 collects/games/cards/doc.scrbl delete mode 100644 collects/scribblings/gui/mred-classes.ss diff --git a/collects/games/cards/cards.ss b/collects/games/cards/cards.ss index f6a3d8bc5e..c17ba93348 100644 --- a/collects/games/cards/cards.ss +++ b/collects/games/cards/cards.ss @@ -4,7 +4,8 @@ "utils.ss" "region.ss") - (provide region + (provide table<%> card<%> + region make-region region? region-x region-y region-w region-h region-label region-callback region-interactive-callback diff --git a/collects/games/cards/doc.scrbl b/collects/games/cards/doc.scrbl new file mode 100644 index 0000000000..9db045947a --- /dev/null +++ b/collects/games/cards/doc.scrbl @@ -0,0 +1,495 @@ +#reader(lib "docreader.ss" "scribble") +@require[(lib "manual.ss" "scribble")] +@require-for-label["cards.ss" + (lib "mred.ss" "mred") + (lib "class.ss")] + +@title{Virtual Playing Cards Library} + +@declare-exporting[(lib "cards.ss" "games" "cards")] + +The library is @scheme[(lib "cards.ss" "games" "cards")]. + +@defproc[(make-table [title string? "Cards"] + [w nonnegative-exact-integer? 7] + [h nonnegative-exact-integer? 3]) + table<%>]{ + +Returns a table. The table is named by @scheme[title], and it is +@scheme[w] cards wide and @scheme[h] cards high. The table is not +initially shown; @scheme[(send table show #t)] shows it.} + +@defproc[(make-deck) + (listof card<%>)]{ + +Returns a list of 52 cards, one for each suit-value combination. The +cards are all face-down, sorted lowest-suit then lowest-value. A card +can only be on one table at a time.} + +@defproc[(make-card [front-bm (is-a?/c bitmap?)] + [back-bm (or/c (is-a?/c bitmap%) false/c)] + [suit-id any/c] + [value any/c]) + (is-a?/c card<%>)]{ + +Returns a single card given a bitmap for the front, an optional bitmap +for the back, and arbitrary values for the card's suit and value +(which are returned by the card's @method[card<%> get-value] and +@method[card<%> get-suit-id] methods). All provided bitmaps should be +71 by 96 pixels.} + +@defproc[(shuffle-list [lst list?] [n exact-nonnegative-integer?]) + list?]{ + +Shuffles the given @scheme[lst] @scheme[n] times, returning the new +list. Shuffling simulates an actual shuffle: the list is split into +halves which are merged back together by repeatedly pulling the top +card off one of the halves, randomly selecting one half or the +other. According to some mathematical theorem, 7 is a large enough +@scheme[n] to get a perfect shuffle.} + +@defstruct[region ([(x #:immutable) real?] + [(y #:immutable) real?] + [(w #:immutable) (and/c real? (not/c negative?))] + [(h #:immutable) (and/c real? (not/c negative?))] + [(label #:immutable) (or/c string? false/c)] + [callback (or/c ((listof (is-a?/c card<%>)) . -> . any) + false/c)])]{ + +The @scheme[x], @scheme[y], @scheme[w], and @scheme[h] fields +determine the region's location on the table. + +When @scheme[label] is a string, it is drawn in the region in 12-pixel +text, centered horizontally and 5 pixels down from the region's top +outline. If label is @scheme[#f], no label or box is drawn for the +region. + +The @scheme[callback] procedure takes a list of cards that were +dragged to the region; if callback is @scheme[#f], the region is not +active (i.e., dragging cards to the region doesn't highlight the +region box). The region remains hilited until the callback returns. + +The only available mutator on the structure is +@scheme[set-region-callback!]. The structure created by +@scheme[make-region] actually has extra hidden fields.} + +@defproc[(make-button-region [x real?] + [y real?] + [w (and/c real? (not/c negative?))] + [h (and/c real? (not/c negative?))] + [label (or/c string? false/c)] + [callback (or/c ((listof (is-a?/c card<%>)) . -> . any) + false/c)]) + region?]{ + +Returns a region like one made by @scheme[make-region], but the is + drawn slightly differently and it reacts differently to cards and the + mouse. The label is drawn in the middle of the box instead of at the + top, and the callback is called with no arguments when the user + clicks the region (instead of dragging cards to the region).} + +@defproc[(make-background-region [x real?] + [y real?] + [w (and/c real? (not/c negative?))] + [h (and/c real? (not/c negative?))] + [label (or/c string? false/c)] + [paint-callback + ((is-a?/c dc<%>) real? real? real? real? . -> . any)]) + region?]{ + + Returns a region that does not respond to mouse clicks, but which has + a general paint callback. The @scheme[paint-callback] function is + called with a drawing context, x and y offsets, and the width and + height (which are always @scheme[w] and @scheme[h]). The x and y + offsets can be different than the supplied @scheme[x] and @scheme[y] + when part of the table is drawn offscreen. Regions are painted in the + order that they are added to a table, and all regions are painted + before any card. The @scheme[paint-callback] procedure should not + assume a particular state for the drawing context (i.e.,current brush + or pen), and it should restore any modified drawing context state + before returning.} + +@defproc[(set-region-interactive-callback! + [r region?] + [callback (or/c (boolean? (listof (is-a?/c card<%>)) . -> . any) + false/c)]) + void?]{ + + Sets a callback procedure that is invoked when a region is + (un)hilited as the user drags a set of cards to the region. The + callback is provided two arguments: a boolean indicating whether the + region is hilited, and the list of cards being dragged. Like + region-callback, the default is @scheme[#f], which indicates that the + region has no interactive callback (but does not affect whether the + region is hilited as cards are dragged). The final unhilite (when + cards are potentially delivered) does not trigger this callback.} + + +@defproc[(region-interactive-callback [r region?]) + (boolean? (listof (is-a?/c card<%>)) . -> . any)]{ + + Gets the current callback that is installed via + @scheme[set-region-interaction-callback!].} + +@; ---------------------------------------- + +@definterface[table<%> (frame%)]{ + +Create an instance with @scheme[make-table]. + +@defmethod[(add-card [card (is-a?/c card<%>)] + [x real?] + [y real?]) + void?]{ + + Adds @scheme[card] to the table with its top-left corner at + (@scheme[x], @scheme[y]) in table pixels.} + +@defmethod[(add-cards [cards (listof (is-a?/c card<%>))] + [x real?] + [y real?] + [offset-proc (nonnegative-exact-integer? . -> . (values real? real?)) + (lambda (i) (values 0 0))]) + void?]{ + + Adds a list of cards at (@scheme[x], @scheme[y]). The optional + @scheme[offset-proc] procedure is called with an index @scheme[_i] + (counting from 0) and should return two values: @scheme[_dx] and + @scheme[_dy]; the @scheme[_i]th card is the placed at @scheme[(+ x + +dx)] and @scheme[(+ y _dy)]. The cards are added in order on top of + cards already one the table such that the first card in + @scheme[cards] is topmost.} + +@defmethod[(add-cards-to-region [cards (listof (is-a?/c card<%>))] + [region? r]) + void?]{ + + Adds @scheme[cards] to fill the region @scheme[r], fanning them out + bottom-right to top-left. The region @scheme[r] does not have to be + added to the table.} + +@defmethod[(remove-card [card (is-a?/c card<%>)]) + void?]{ + +Removes @scheme[card] from the table.} + +@defmethod[(remove-cards [cards (listof (is-a?/c card<%>))]) + void?]{ + + Removes @scheme[cards] from the table.} + +@defmethod[(move-card [card (is-a?/c card<%>)] + [x real?] + [y real?]) + void?]{ + + Moves @scheme[card], which must be on the same already. The movement + of the cards is animated. If the cards are in snap-back-after-move + mode and a drag is active, snapping back will use the new location.} + +@defmethod[(move-cards [cards (listof (is-a?/c card<%>))] + [x real?] + [y real?] + [offset-proc (nonnegative-exact-integer? . -> . (values real? real?)) + (lambda (i) (values 0 0))]) + void?]{ + + Like @method[table<%> add-cards], but moves cards that are already on + the table like @method[table<%> move-card]. All of the cards are + moved at once.} + +@defmethod[(move-cards-to-region [cards (listof (is-a?/c card<%>))] + [region? r]) + void?]{ + + Like @method[table<%> add-cards-to-region], but moves cards that are + already on the table like @scheme[move-card]. All of the cards are + moved at once.} + + +@defmethod[(flip-card [card (is-a?/c card<%>)]) void?]{ + + Flips @scheme[card] over with animation.} + +@defmethod[(flip-cards [cards (listof (is-a?/c card<%>))]) void?]{ + + Flips all @scheme[cards] over (at once) with animation.} + +@defmethod[(card-face-down [card (is-a?/c card<%>)]) void?]{ + + Like @method[table<%> flip-card], but only if @scheme[card] is + currently face up.} + +@defmethod[(cards-face-down [cards (listof (is-a?/c card<%>))]) void?]{ + + Like @method[table<%> flip-cards], but only for elements of + @scheme[cards] that are currently face up.} + +@defmethod[(card-face-up [card (is-a?/c card<%>)]) void?]{ + + Like @method[table<%> flip-card], but only if @scheme[card] is + currently face down.} + +@defmethod[(cards-face-up [cards (listof (is-a?/c card<%>))]) void?]{ + + Like @method[table<%> flip-cards], but only for elements of + @scheme[cards] that are currently face down.} + +@defmethod[(card-to-front [card (is-a?/c card<%>)]) void?]{ + + Moves @scheme[card] in front of all other cards.} + +@defmethod[(card-to-back [card (is-a?/c card<%>)]) void?]{ + + Moves @scheme[card] behind of all other cards.} + +@defmethod[(stack-cards [cards (listof (is-a?/c card<%>))]) void?]{ + + The first card in @scheme[cards] is not moved; the second card is + moved to follow immediately behind the first one, then + @method[table<%> stack-cards] is called on @scheme[(cdr cards)]. If + @scheme[cards] is empty or contains only one card, no action is + taken.} + +@defmethod[(card-location [card (is-a?/c card<%>)]) + (values real? real?)]{ + + Returns the location of the given card; an exception is raised if the + card is not on the table.} + +@defmethod[(all-cards) (listof (is-a?/c card<%>))]{ + + Returns a list of all cards on the table in stacking order from front + to back.} + +@defmethod[(table-width) nonnegative-exact-integer?]{ + + Returns the width of the table in pixels.} + +@defmethod[(table-height) nonnegative-exact-integer?]{ + + Returns the height of the table in pixels.} + +@defmethod[(begin-card-sequence) void?]{ + + Starts a sequence of card or region changes that won't be animated or + updated until the end of the sequence.} + +@defmethod[(end-card-sequence) void?]{ + + Ends a sequence; @schemeidfont{begin-}/@schemeidfont{end-} pairs can + be nested.} + +@defmethod[(add-region [r region?]) void]{ + + Adds the region @scheme[r] to the table; regions are drawn in the + order that they are added to the table, and when a region added later + is hilighted, it can obscure regions added earlier.} + +@defmethod[(remove-region [r region?]) void]{ + + Removes the region @scheme[r] from the table.} + +@defmethod[(hilite-region [r region?]) void?]{ + + Manual hilite (usually for animation).} + +@defmethod[(unhilite-region [r region?]) void?]{ + + Manual unhilite (usually for animation).} + +@defmethod[(set-button-action [which (one-of/c 'left 'middle 'right)] + [action symbol?]) + void?]{ + + Sets the way that a mouse click is handled for a particular button + indicated by @scheme[which]. The @scheme[action] argument must be one + of the following: + + @itemize{ + + @item[@scheme['drag/one]]{ --- drag only the clicked-on card.} + + @item[@scheme['drag-raise/one]]{ --- like drag/one, but raise the + card to the top on a click.} + + @item[@scheme['drag/above]]{ --- drag the card along with any card + on top of the card (i.e., more towards the front and + overlapping with the card). The on-top-of relation + is closed transitively.} + + @item[@scheme['drag-raise/above]]{ --- like @scheme['drag/above], + but raises.} + + @item[@scheme['drag-below]]{ --- drag the card along with any card + underneath the card (i.e., more towards the back and + overlapping with the card). The underneath relation + is closed transitively.} + + @item[@scheme['drag-raise/below]]{ --- like @scheme['drag/below], + but raises.} + } + + The initial settings are: @scheme['drag-raise/above] for + @scheme['left], @scheme['drag/one] for @scheme['middle], and + @scheme['drag/below] for @scheme['right].} + +@defmethod[(set-double-click-action + [proc ((is-a?/c card<%>) . -> . any)]) + void?]{ + + Sets the procedure to be called when a card is double-clicked. The + procedure is called with the double-clicked card. The default + procedure flips the cards along with its on-top-of cards, raises the + cards, and reverses the front-to-back order of the cards} + +@defmethod[(set-single-click-action + [proc ((is-a?/c card<%>) . -> . any)]) + void?]{ + + Sets the procedure to be called when a card is single-clicked, after + the button action is initiated. (If the card is double-clicked, this + action is invoked for the first click, then the double-click action + is invoked.) The default action does nothing.} + +@defmethod[(pause [secs real?]) void?]{ + + Pauses, allowing the table display to be updated (unless a sequence + is active), but does not let the user click on the cards.} + +@defmethod*[([(animated) boolean?] + [(animated [on? any/c]) void?])]{ + + Gets/sets animation enabled/diabled.} + +@defmethod[(create-status-pane) (is-a?/c pane%)]{ + + Creates a pane with a status message (initially empty) and returns + the pane so that you can add additional controls.} + +@defmethod[(set-status [str sring]) void?]{ + + Sets the text message in the status pane.} + +@defmethod[(add-help-button [pane (is-a?/c area-container<%>)] + [coll-path (listof string?)] + [str string?] + [tt? any/c]) + void?]{ + + Adds a @onscreen{Help} button to the give pane, where clicking the + button opens a new window to display @file{doc.txt} from the given + collection. The @scheme[str] argument is used for the help window + title. If @scheme[tt?] is true, then @file{doc.txt} is displayed + verbatim, otherwise it is formatted as for @scheme[show-help] from + @scheme[(lib "show-help.ss" "games")].} +} + +@; ---------------------------------------- + +@definterface[card<%> ()]{ + +Create instances with @scheme[make-deck] or @scheme[make-card]. + +@defmethod[(card-width) nonnegative-exact-integer?]{ + + Returns the width of the card in pixels. All cards have the same + width.} + +@defmethod[(card-height) nonnegative-exact-integer?]{ + + Returns the height of the card in pixels. All cards have the same + height.} + +@defmethod[(flip) void?]{ + + Flips the card without animation. This method is useful for flipping + a card before it is added to a table.} + +@defmethod[(face-up) void?]{ + + Makes the card face up without animation.} + +@defmethod[(face-down) void?]{ + + Makes the card face down without animation.} + +@defmethod[(face-down?) boolean?]{ + + Returns @scheme[#t] if the card is currently face down.} + +@defmethod[(get-suit-id) any/c]{ + + Normally returns @scheme[1], @scheme[2], @scheme[3], or @scheme[4] + (see @method[card<%> get-suit] for corresponding suit names), but the + result can be anything for a card created by @scheme[make-card].} + +@defmethod[(get-suit) symbol?]{ + + Returns @scheme['clubs], @scheme['diamonds], @scheme['hearts], + @scheme['spades], or @scheme['unknown], depending on whether + @method[card<%> get-suit-id] returns @scheme[1], @scheme[2], + @scheme[3], @scheme[4], or something else.} + +@defmethod[(get-value) any/c]{ + + Normally returns @scheme[1] (Ace), @scheme[2], ... @scheme[10], + @scheme[11] (Jack), @scheme[12] (Queen), or @scheme[13] (King), but + the result can be anything for a card created by @scheme[make-card].} + +@defmethod*[([(user-can-flip) boolean?] + [(user-can-flip [can? any/c]) void?])]{ + + Gets/sets whether the user can flip the card interactively, usually + by double-clicking it. Initially @scheme[#t].} + +@defmethod*[([(user-can-move) boolean?] + [(user-can-move [can? any/c]) void?])]{ + + Gets/sets whether the user can move the card interactively, usually + by dragging it. Disabling moves has the side-effect of disabling + raises and double-clicks. Initially @scheme[#t].} + +@defmethod*[([(snap-back-after-move) boolean?] + [(snap-back-after-move [on? any/c]) void?])]{ + + Assuming user can move the card interactively, gets/sets whether the + card stays where the user dragged it or snaps back to its original + place. Initially @scheme[#f]. + + A region's @italic{interactive} callback can disable snap-back for a + card so that the card can be delivered to the region. (A region's + normal callback cannot release the card, because it's too late.)} + +@defmethod*[([(stay-in-region) (or/c region? false/c)] + [(stay-in-region [r (or/c region? false/c)]) void?])]{ + + + Gets/sets a constraining region @scheme[r]. If @scheme[r] is not + @scheme[#f], the user cannot move the card out of @scheme[r]. + Initially @scheme[#f].} + +@defmethod*[([(home-region) (or/c region? false/c)] + [(home-region [r (or/c region? false/c)]) void?])]{ + + Gets/sets a home region @scheme[r]. If @scheme[r] is not @scheme[#f], + then the user can move the card freely within the region, but it + snaps back if moved completely out of the region. If moved partly out + of the region, the card is moved enough to get completely back + in. Initially @scheme[#f]. + + A region's @italic{interactive} callback can disable snap-back for a + card so that the card can be delivered to the region. (A region's + normal callback cannot release the card, because it's too late.)} + +@defmethod*[([(dim) boolean?] + [(dim [can? any/c]) void?])]{ + + Gets/sets a hilite on the card, whichis rendered by drawing it dimmer + than normal.} + +@defmethod[(copy) (is-a?/c card<%>)]{ + + Makes a new card with the same suit and value.} + +} diff --git a/collects/games/cards/info.ss b/collects/games/cards/info.ss index 59fb938463..b2e3e1a5f0 100644 --- a/collects/games/cards/info.ss +++ b/collects/games/cards/info.ss @@ -1,3 +1,5 @@ (module info (lib "infotab.ss" "setup") (define name "Game Cards") - (define doc.txt "doc.txt")) + (define doc.txt "doc.txt") + (define scribblings '(("doc.scrbl")))) + diff --git a/collects/games/cards/main.ss b/collects/games/cards/main.ss index e754cb932e..7771ec1f33 100644 --- a/collects/games/cards/main.ss +++ b/collects/games/cards/main.ss @@ -3,9 +3,14 @@ (require (lib "class.ss") (lib "etc.ss") "make-cards.ss" - "classes.ss") + "classes.ss" + "card-class.ss") - (provide make-table make-deck make-card) + (provide make-table make-deck make-card + table<%> card<%>) + + (define table<%> (class->interface table%)) + (define card<%> (class->interface card%)) (define make-table (opt-lambda ([title "Cards"][w 7][h 3]) diff --git a/collects/scribble/base-render.ss b/collects/scribble/base-render.ss index e918f79df9..20e797c39c 100644 --- a/collects/scribble/base-render.ss +++ b/collects/scribble/base-render.ss @@ -278,11 +278,7 @@ [(element? i) (cond [(link-element? i) - (let-values ([(dest ext?) (resolve-get/where d ri (link-element-tag i))]) - (when ext? - (hash-table-put! (resolve-info-undef ri) - (tag-key (link-element-tag i) ri) - #t)))]) + (resolve-get d ri (link-element-tag i))]) (for-each (lambda (e) (resolve-element e d ri)) (element-content i))])) diff --git a/collects/scribble/html-render.ss b/collects/scribble/html-render.ss index f4ce24ebe0..86dbf2f498 100644 --- a/collects/scribble/html-render.ss +++ b/collects/scribble/html-render.ss @@ -150,8 +150,17 @@ ,@(render-onthispage-contents d ri top) ,@(apply append (map (lambda (t) - (render-table t d ri)) - (filter auxiliary-table? (flow-paragraphs (part-flow d))))))))) + (let loop ([t t]) + (if (table? t) + (render-table t d ri) + (loop (delayed-flow-element-flow-elements t ri))))) + (filter (lambda (e) + (let loop ([e e]) + (or (and (auxiliary-table? e) + (pair? (table-flowss e))) + (and (delayed-flow-element? e) + (loop (delayed-flow-element-flow-elements e ri)))))) + (flow-paragraphs (part-flow d))))))))) (define/private (render-onthispage-contents d ri top) (if (ormap (lambda (p) (part-whole-page? p ri)) diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 35140712e3..7115ebbd87 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -8,7 +8,8 @@ (lib "string.ss") (lib "list.ss") (lib "class.ss") - (lib "stxparam.ss")) + (lib "stxparam.ss") + (lib "serialize.ss")) (require-for-syntax (lib "stxparam.ss")) (require-for-label (lib "lang.ss" "big") (lib "class.ss")) @@ -214,14 +215,15 @@ (elem (method a b) " in " (scheme a))])) (define (*method sym id) - (let ([tag (method-tag (register-scheme-definition id #t) - sym)]) - (make-element - "schemesymbol" - (list (make-link-element - "schemevaluelink" - (list (symbol->string sym)) - tag))))) + (**method sym (register-scheme-definition id #t))) + + (define (**method sym tag) + (make-element + "schemesymbol" + (list (make-link-element + "schemevaluelink" + (list (symbol->string sym)) + (method-tag tag sym))))) (define (method-tag vtag sym) (list 'meth @@ -376,7 +378,7 @@ [(_ name ([field field-contract] ...) immutable? transparent? desc ...) (*defstruct (quote-syntax/loc name) 'name '([field field-contract] ...) (list (lambda () (schemeblock0 field-contract)) ...) - #t #t (lambda () (list desc ...)))])) + immutable? transparent? (lambda () (list desc ...)))])) (define-syntax (defform*/subs stx) (syntax-case stx () [(_ #:literals (lit ...) [spec spec1 ...] ([non-term-id non-term-form ...] ...) desc ...) @@ -543,7 +545,7 @@ (define (annote-exporting-library e) (make-delayed-element (lambda (render p ri) - (let ([from (resolve-get p ri '(exporting-libraries #f))]) + (let ([from (resolve-get/tentative p ri '(exporting-libraries #f))]) (if (and from (pair? from)) (list (make-hover-element @@ -890,6 +892,12 @@ (define (*defstruct stx-id name fields field-contracts immutable? transparent? content-thunk) (define spacer (hspace 1)) (define to-flow (lambda (e) (make-flow (list (make-paragraph (list e)))))) + (define (field-name f) (if (pair? (car f)) + (caar f) + (car f))) + (define (field-view f) (if (pair? (car f)) + (make-shaped-parens (car f) #\[) + (car f))) (make-splice (cons (make-table @@ -914,13 +922,18 @@ (list 'make- name) (append (map (lambda (f) - (list name '- (car f))) + (list name '- (field-name f))) fields) (if immutable? null - (map (lambda (f) - (list 'set- name '- (car f) '!)) - fields))))))]) + (filter + values + (map (lambda (f) + (if (and (pair? (car f)) + (memq '#:immutable (car f))) + #f + (list 'set- name '- (field-name f) '!))) + fields)))))))]) (if (pair? name) (to-element (list just-name (make-just-context (cadr name) stx-id))) @@ -928,12 +941,18 @@ [short-width (apply + (length fields) 8 - (map (lambda (s) - (string-length (symbol->string s))) - (append (if (pair? name) - name - (list name)) - (map car fields))))]) + (append + (map (lambda (s) + (string-length (symbol->string s))) + (append (if (pair? name) + name + (list name)) + (map field-name fields))) + (map (lambda (f) + (if (pair? (car f)) + (+ 3 2 (string-length (keyword->string (cadar f)))) + 0)) + fields)))]) (if (and (short-width . < . max-proto-width) (not immutable?) (not transparent?)) @@ -942,7 +961,7 @@ (to-element `(,(schemeparenfont "struct") ,the-name - ,(map car fields))))) + ,(map field-view fields))))) (make-table #f (append @@ -958,8 +977,8 @@ (schemeparenfont "("))))) (to-flow (if (or (null? fields) (short-width . < . max-proto-width)) - (to-element (map car fields)) - (to-element (caar fields)))))) + (to-element (map field-view fields)) + (to-element (field-view (car fields))))))) (if (short-width . < . max-proto-width) null (let loop ([fields fields]) @@ -971,7 +990,7 @@ (to-flow spacer) (to-flow spacer) (to-flow - (let ([e (to-element (car fld))]) + (let ([e (to-element (field-view fld))]) (if (null? (cdr fields)) (make-element #f @@ -1033,7 +1052,7 @@ #f (list (list (to-flow (hspace 2)) - (to-flow (to-element (car v))) + (to-flow (to-element (field-name v))) (to-flow spacer) (to-flow ":") (to-flow spacer) @@ -1322,9 +1341,9 @@ ;; ---------------------------------------- (provide defclass - define-class-doc + defclass/title definterface - define-interface-doc + definterface/title defconstructor defconstructor/make defconstructor*/make @@ -1333,141 +1352,135 @@ defmethod* methspec methimpl - this-obj - include-class-section - include-class) + this-obj) (define-syntax-parameter current-class #f) - (define-struct decl (name super intfs mk-head body methods)) + (define-struct decl (name super intfs mk-head body)) (define-struct constructor (def)) (define-struct meth (name mode desc def)) (define-struct spec (def)) (define-struct impl (def)) - (define-for-syntax (class-id->class-doc-info-id id) - (datum->syntax-object id - (string->symbol (format "class-doc-info:~a" (syntax-e id))) - id)) + (define-serializable-struct cls/intf (name-element super intfs methods)) - (define-syntax (define-class-doc-info stx) - (syntax-case stx () - [(_ id val) - (with-syntax ([id (class-id->class-doc-info-id #'id)]) - #'(begin - (provide id) - (define id val)))])) - - (define-syntax (class-doc-info stx) - (syntax-case* stx (object%) module-label-identifier=? - [(_ object%) #'#f] - [(_ id) (class-id->class-doc-info-id #'id)])) - - (define (collect-inherited supers ht) - (let* ([supers (let loop ([supers supers][accum null]) - (cond - [(null? supers) (reverse accum)] - [(memq (car supers) accum) - (loop (cdr supers) accum)] - [else - (let ([super (car supers)]) - (loop (append (reverse (decl-intfs super)) - (if (decl-super super) - (list (decl-super super)) - null) - (cdr supers)) - (cons super accum)))]))] + (define (make-inherited-table r d ri decl) + (let* ([start (let ([key (register-scheme-definition (decl-name decl))]) + (list (cons key (lookup-cls/intf d ri key))))] + [supers (cdr + (let loop ([supers start][accum null]) + (cond + [(null? supers) (reverse accum)] + [(memq (car supers) accum) + (loop (cdr supers) accum)] + [else + (let ([super (car supers)]) + (loop (append (map (lambda (i) + (cons i (lookup-cls/intf d ri i))) + (reverse (cls/intf-intfs (cdr super)))) + (let ([s (cls/intf-super (cdr super))]) + (if s + (list (cons s (lookup-cls/intf d ri s))) + null)) + (cdr supers)) + (cons super accum)))])))] + [ht (let ([ht (make-hash-table)]) + (for-each (lambda (i) + (when (meth? i) + (hash-table-put! ht (meth-name i) #t))) + (decl-body decl)) + ht)] [inh (apply append (map (lambda (super) (let ([inh (filter values - (hash-table-map - (decl-methods super) - (lambda (k v) - (let ([v (hash-table-get ht k)]) - (and (eq? (car v) (decl-name super)) - (cons (symbol->string k) - (*method k (car v))))))))]) + (map + (lambda (k) + (if (hash-table-get ht k #f) + #f + (begin + (hash-table-put! ht k #t) + (cons (symbol->string k) + (**method k (car super)))))) + (cls/intf-methods (cdr super))))]) (if (null? inh) null (cons (make-element #f (list (make-element "inheritedlbl" '("from ")) - (to-element (decl-name super)))) + (cls/intf-name-element (cdr super)))) (map cdr (sort inh (lambda (a b) (stringstring (syntax-e (decl-name decl)))) + tag))) + (and (decl-super decl) + (not (module-label-identifier=? #'object% (decl-super decl))) + (register-scheme-definition (decl-super decl))) + (map register-scheme-definition (decl-intfs decl)) + (map (lambda (m) + (meth-name m)) + (filter meth? (decl-body decl)))))))))) + + (define (build-body decl body) + (append + (map (lambda (i) + (cond + [(constructor? i) ((constructor-def i))] + [(meth? i) + ((meth-def i) (meth-desc i))] + [else i])) + body) + (list + (make-delayed-flow-element + (lambda (r d ri) + (make-inherited-table r d ri decl)))))) + + (define (*include-class/title decl) + (make-splice + (list* (title #:style 'hidden (to-element (decl-name decl))) + (make-decl-collect decl) + (build-body decl + (append + ((decl-mk-head decl) #t) + (decl-body decl)))))) (define (*include-class decl) (make-splice - (append - ((decl-mk-head decl) #f) - (list - (make-blockquote - "leftindent" - (flow-paragraphs - (decode-flow - (map (lambda (i) - (cond - [(constructor? i) ((constructor-def i))] - [(meth? i) - ((meth-def i) (meth-desc i))] - [else i])) - (decl-body decl))))))))) + (cons + (make-decl-collect decl) + (append + ((decl-mk-head decl) #f) + (list + (make-blockquote + "leftindent" + (flow-paragraphs + (decode-flow + (build-body decl (decl-body decl)))))))))) - (define-syntax include-class-section - (syntax-rules () - [(_ id) (*include-class-section (class-doc-info id))])) - - (define-syntax include-class - (syntax-rules () - [(_ id) (*include-class (class-doc-info id))])) - - (define (*define-class-doc stx-id super intfs whole-page?) + (define (*class-doc stx-id super intfs whole-page?) (let ([spacer (hspace 1)]) (make-table 'boxed @@ -1476,7 +1489,7 @@ (list (make-flow (list (make-paragraph - (list (let ([tag (register-scheme-definition stx-id #t)] + (list (let ([tag (register-scheme-definition stx-id)] [content (list (annote-exporting-library (to-element stx-id)))]) (if tag ((if whole-page? @@ -1521,51 +1534,57 @@ (make-flow (list (make-paragraph (list (to-element i))))))) (cdr intfs))))))))))))) - (define-syntax define-class-doc + (define-syntax *defclass (syntax-rules () - [(_ name super (intf ...) body ...) - (define-class-doc-info name + [(_ *include-class name super (intf ...) body ...) + (*include-class (syntax-parameterize ([current-class (quote-syntax name)]) - (register-class (quote-syntax/loc name) - (class-doc-info super) - (list (class-doc-info intf) ...) - (lambda (whole-page?) - (list - (*define-class-doc (quote-syntax/loc name) - (quote-syntax super) - (list (quote-syntax intf) ...) - whole-page?))) - (list body ...))))])) + (make-decl (quote-syntax/loc name) + (quote-syntax/loc super) + (list (quote-syntax/loc intf) ...) + (lambda (whole-page?) + (list + (*class-doc (quote-syntax/loc name) + (quote-syntax super) + (list (quote-syntax intf) ...) + whole-page?))) + (list body ...))))])) (define-syntax defclass (syntax-rules () - [(_ name . rest) - (begin - (define-class-doc name . rest) - (include-class name))])) + [(_ name super (intf ...) body ...) + (*defclass *include-class name super (intf ...) body ...)])) - (define-syntax define-interface-doc + (define-syntax defclass/title (syntax-rules () - [(_ name (intf ...) body ...) - (define-class-doc-info name - (syntax-parameterize ([current-class (quote-syntax name)]) - (register-class (quote-syntax/loc name) - #f - (list (class-doc-info intf) ...) - (lambda (whole-page?) - (list - (*define-class-doc (quote-syntax/loc name) - #f - (list (quote-syntax intf) ...) - whole-page?))) - (list body ...))))])) + [(_ name super (intf ...) body ...) + (*defclass *include-class/title name super (intf ...) body ...)])) + (define-syntax *definterface + (syntax-rules () + [(_ *include-class name (intf ...) body ...) + (*include-class + (syntax-parameterize ([current-class (quote-syntax name)]) + (make-decl (quote-syntax/loc name) + #f + (list (quote-syntax/loc intf) ...) + (lambda (whole-page?) + (list + (*class-doc (quote-syntax/loc name) + #f + (list (quote-syntax intf) ...) + whole-page?))) + (list body ...))))])) + (define-syntax definterface (syntax-rules () - [(_ name . rest) - (begin - (define-interface-doc name . rest) - (include-class name))])) + [(_ name (intf ...) body ...) + (*definterface *include-class name (intf ...) body ...)])) + + (define-syntax definterface/title + (syntax-rules () + [(_ name (intf ...) body ...) + (*definterface *include-class/title name (intf ...) body ...)])) (define-syntax (defconstructor*/* stx) (syntax-case stx () @@ -1628,7 +1647,7 @@ [(override) "Overrides "] [(extend) "Extends "] [(augment) "Augments "]) - (*xmethod/super (class-doc-info cname) 'name1) "."))] + (*xmethod/super (quote-syntax/loc cname) 'name1) "."))] [else null])]) #'(make-meth 'name1 @@ -1671,17 +1690,43 @@ (with-syntax ([cname (syntax-parameter-value #'current-class)]) #'(*this-obj 'cname))])) - (define (*xmethod/super decl name) - (let ([super (ormap (lambda (decl) - (and decl - (let ([m (hash-table-get (decl-methods decl) name #f)]) - (and m (car m))))) - (cons (decl-super decl) - (decl-intfs decl)))]) - (make-element #f - (list (*method name super) - " in " - (to-element super))))) + (define (*xmethod/super cname name) + (let ([get + (lambda (d ri key) + (let ([v (lookup-cls/intf d ri key)]) + (if v + (cons (cls/intf-super v) + (cls/intf-intfs v)) + null)))]) + (make-delayed-element + (lambda (r d ri) + (let loop ([search (get d ri (register-scheme-definition cname))]) + (cond + [(null? search) + (make-element #f "")] + [(not (car search)) + (loop (cdr search))] + [else + (let ([v (lookup-cls/intf d ri (car search))]) + (if v + (if (member name (cls/intf-methods v)) + (list + (make-element #f + (list (**method name (car search)) + " in " + (cls/intf-name-element v)))) + (loop (append (cdr search) (get d ri (car search))))) + (loop (cdr search))))]))) + (lambda () (format "~a in ~a" (syntax-e cname) name)) + (lambda () (format "~a in ~a" (syntax-e cname) name))))) + + (define (lookup-cls/intf d ri name) + (let ([v (resolve-get d ri `(cls/intf ,name))]) + (or v + (make-cls/intf "unknown" + #f + null + null)))) ;; ---------------------------------------- ) diff --git a/collects/scribble/scheme.ss b/collects/scribble/scheme.ss index 60e3a569f2..59cb5bd243 100644 --- a/collects/scribble/scheme.ss +++ b/collects/scribble/scheme.ss @@ -78,7 +78,7 @@ (lambda (renderer sec ri) (let* ([vtag `(def ,tag)] [stag `(form ,tag)] - [sd (resolve-get sec ri stag)]) + [sd (resolve-get/tentative sec ri stag)]) (list (cond [sd @@ -541,11 +541,15 @@ (car b)) (cadr b))))) + (define (register-scheme/invent stx warn-if-no-label?) + (or (register-scheme stx warn-if-no-label?) + (format ":UNKNOWN:~a" (syntax-e stx)))) + (define (register-scheme-definition stx [warn-if-no-label? #f]) - `(def ,(register-scheme stx warn-if-no-label?))) + `(def ,(register-scheme/invent stx warn-if-no-label?))) (define (register-scheme-form-definition stx [warn-if-no-label? #f]) - `(form ,(register-scheme stx warn-if-no-label?))) + `(form ,(register-scheme/invent stx warn-if-no-label?))) (define syntax-ize-hook (make-parameter (lambda (v col) #f))) diff --git a/collects/scribble/struct.ss b/collects/scribble/struct.ss index 24001b989a..0d608a43b0 100644 --- a/collects/scribble/struct.ss +++ b/collects/scribble/struct.ss @@ -38,6 +38,14 @@ (values v #t))])))) (define (resolve-get part ri key) + (let-values ([(v ext?) (resolve-get/where part ri key)]) + (when ext? + (hash-table-put! (resolve-info-undef ri) + (tag-key key ri) + #t)) + v)) + + (define (resolve-get/tentative part ri key) (let-values ([(v ext?) (resolve-get/where part ri key)]) v)) @@ -47,7 +55,7 @@ part-collected-info collect-put! resolve-get - resolve-get/where) + resolve-get/tentative) ;; ---------------------------------------- diff --git a/collects/scribblings/gui/add-color-intf.scrbl b/collects/scribblings/gui/add-color-intf.scrbl index 1c545c11df..3c6d55fe20 100644 --- a/collects/scribblings/gui/add-color-intf.scrbl +++ b/collects/scribblings/gui/add-color-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[add-color<%> ()]{ +@definterface/title[add-color<%> ()]{ An @scheme[add-color<%>] object is used to additively change the RGB values of a @scheme[color%] object. An @scheme[add-color<%>] object diff --git a/collects/scribblings/gui/area-container-intf.scrbl b/collects/scribblings/gui/area-container-intf.scrbl index a1b3681101..2727d310ed 100644 --- a/collects/scribblings/gui/area-container-intf.scrbl +++ b/collects/scribblings/gui/area-container-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-intf.scrbl"] -@define-interface-doc[area-container<%> (area<%>)]{ +@definterface/title[area-container<%> (area<%>)]{ An @scheme[area-container<%>] is a container @scheme[area<%>]. diff --git a/collects/scribblings/gui/area-container-window-intf.scrbl b/collects/scribblings/gui/area-container-window-intf.scrbl index 109ec0c0e8..8071960510 100644 --- a/collects/scribblings/gui/area-container-window-intf.scrbl +++ b/collects/scribblings/gui/area-container-window-intf.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-container-intf.scrbl"] -@require["window-intf.scrbl"] -@define-interface-doc[area-container-window<%> (area-container<%> window<%>)]{ +@definterface/title[area-container-window<%> (area-container<%> window<%>)]{ Combines two interfaces. diff --git a/collects/scribblings/gui/area-intf.scrbl b/collects/scribblings/gui/area-intf.scrbl index 2153356331..cb1f60fdf5 100644 --- a/collects/scribblings/gui/area-intf.scrbl +++ b/collects/scribblings/gui/area-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[area<%> ()]{ +@definterface/title[area<%> ()]{ An @scheme[area<%>] object is either a window or a windowless container for managing the position and size of other areas. An diff --git a/collects/scribblings/gui/bitmap-class.scrbl b/collects/scribblings/gui/bitmap-class.scrbl index 308447c1e4..7d217361ee 100644 --- a/collects/scribblings/gui/bitmap-class.scrbl +++ b/collects/scribblings/gui/bitmap-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[bitmap% object% ()]{ +@defclass/title[bitmap% object% ()]{ A @scheme[bitmap%] object is a pixel-based image, either monochrome or color. diff --git a/collects/scribblings/gui/bitmap-dc-class.scrbl b/collects/scribblings/gui/bitmap-dc-class.scrbl index 5763a9a5ba..c353898114 100644 --- a/collects/scribblings/gui/bitmap-dc-class.scrbl +++ b/collects/scribblings/gui/bitmap-dc-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["dc-intf.scrbl"] -@define-class-doc[bitmap-dc% object% (dc<%>)]{ +@defclass/title[bitmap-dc% object% (dc<%>)]{ A @scheme[bitmap-dc%] object allows drawing directly into a bitmap. A @scheme[bitmap%] object must be supplied at initialization or diff --git a/collects/scribblings/gui/brush-class.scrbl b/collects/scribblings/gui/brush-class.scrbl index 245de8e8a4..5ef8f6cc70 100644 --- a/collects/scribblings/gui/brush-class.scrbl +++ b/collects/scribblings/gui/brush-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[brush% object% ()]{ +@defclass/title[brush% object% ()]{ A brush is a drawing tool with a color and a style that is used for filling in areas, such as the interior of a rectangle or ellipse. On diff --git a/collects/scribblings/gui/brush-list-class.scrbl b/collects/scribblings/gui/brush-list-class.scrbl index c78320e534..27125506bc 100644 --- a/collects/scribblings/gui/brush-list-class.scrbl +++ b/collects/scribblings/gui/brush-list-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[brush-list% object% ()]{ +@defclass/title[brush-list% object% ()]{ A @scheme[brush-list%] object maintains a list of @scheme[brush%] objects to avoid creating brushes repeatedly. A @scheme[brush%] diff --git a/collects/scribblings/gui/button-class.scrbl b/collects/scribblings/gui/button-class.scrbl index 6de59b978c..cfc8b2d6cc 100644 --- a/collects/scribblings/gui/button-class.scrbl +++ b/collects/scribblings/gui/button-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[button% object% (control<%>)]{ +@defclass/title[button% object% (control<%>)]{ Whenever a button is clicked by the user, the buttons's callback procedure is invoked. A callback procedure is provided as an diff --git a/collects/scribblings/gui/canvas-class.scrbl b/collects/scribblings/gui/canvas-class.scrbl index 42a84b3670..0cfc9ad8c1 100644 --- a/collects/scribblings/gui/canvas-class.scrbl +++ b/collects/scribblings/gui/canvas-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["canvas-intf.scrbl"] -@define-class-doc[canvas% object% (canvas<%>)]{ +@defclass/title[canvas% object% (canvas<%>)]{ A @scheme[canvas%] object is a general-purpose window for drawing and handling events. diff --git a/collects/scribblings/gui/canvas-intf.scrbl b/collects/scribblings/gui/canvas-intf.scrbl index e10ec45819..f4c62587fb 100644 --- a/collects/scribblings/gui/canvas-intf.scrbl +++ b/collects/scribblings/gui/canvas-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["subwindow-intf.scrbl"] -@define-interface-doc[canvas<%> (subwindow<%>)]{ +@definterface/title[canvas<%> (subwindow<%>)]{ A canvas is a subwindow onto which graphics and text can be drawn. Canvases also receive mouse and keyboard events. diff --git a/collects/scribblings/gui/check-box-class.scrbl b/collects/scribblings/gui/check-box-class.scrbl index 0133359609..37b30f6417 100644 --- a/collects/scribblings/gui/check-box-class.scrbl +++ b/collects/scribblings/gui/check-box-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[check-box% object% (control<%>)]{ +@defclass/title[check-box% object% (control<%>)]{ A check box is a labeled box which is either checked or unchecked. diff --git a/collects/scribblings/gui/checkable-menu-item-class.scrbl b/collects/scribblings/gui/checkable-menu-item-class.scrbl index 28306b56a5..2abff56801 100644 --- a/collects/scribblings/gui/checkable-menu-item-class.scrbl +++ b/collects/scribblings/gui/checkable-menu-item-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["selectable-menu-item-intf.scrbl"] -@define-class-doc[checkable-menu-item% object% (selectable-menu-item<%>)]{ +@defclass/title[checkable-menu-item% object% (selectable-menu-item<%>)]{ A @scheme[checkable-menu-item%] is a string-labelled menu item that maintains a check mark. Its parent must be a @scheme[menu%] or diff --git a/collects/scribblings/gui/choice-class.scrbl b/collects/scribblings/gui/choice-class.scrbl index b1fe6e3b79..27594d3fc5 100644 --- a/collects/scribblings/gui/choice-class.scrbl +++ b/collects/scribblings/gui/choice-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["list-control-intf.scrbl"] -@define-class-doc[choice% object% (list-control<%>)]{ +@defclass/title[choice% object% (list-control<%>)]{ A choice item allows the user to select one string item from a pop-up list of items. Unlike a list box, only the currently selection is diff --git a/collects/scribblings/gui/clipboard-client-class.scrbl b/collects/scribblings/gui/clipboard-client-class.scrbl index ddf79abfd8..b4fb0501c7 100644 --- a/collects/scribblings/gui/clipboard-client-class.scrbl +++ b/collects/scribblings/gui/clipboard-client-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[clipboard-client% object% ()]{ +@defclass/title[clipboard-client% object% ()]{ A @scheme[clipboard-client%] object allows a program to take over the clipboard and service requests for clipboard data. See diff --git a/collects/scribblings/gui/clipboard-intf.scrbl b/collects/scribblings/gui/clipboard-intf.scrbl index 747f361873..7b97a43824 100644 --- a/collects/scribblings/gui/clipboard-intf.scrbl +++ b/collects/scribblings/gui/clipboard-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[clipboard<%> ()]{ +@definterface/title[clipboard<%> ()]{ A single @scheme[clipboard<%>] object, @indexed-scheme[the-clipboard], manages the content of the system-wide clipboard for cut and paste. diff --git a/collects/scribblings/gui/color-class.scrbl b/collects/scribblings/gui/color-class.scrbl index a3a87f1189..3128198a1a 100644 --- a/collects/scribblings/gui/color-class.scrbl +++ b/collects/scribblings/gui/color-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[color% object% ()]{ +@defclass/title[color% object% ()]{ A color is an object representing a red-green-blue (RGB) combination of primary colors, and is used to determine drawing colors. Each red, diff --git a/collects/scribblings/gui/color-database-intf.scrbl b/collects/scribblings/gui/color-database-intf.scrbl index ef6be82ef2..9f87102370 100644 --- a/collects/scribblings/gui/color-database-intf.scrbl +++ b/collects/scribblings/gui/color-database-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[color-database<%> ()]{ +@definterface/title[color-database<%> ()]{ The global @indexed-scheme[the-color-database] object is an instance of @scheme[color-database<%>]. It maintains a database of standard RGB diff --git a/collects/scribblings/gui/combo-field-class.scrbl b/collects/scribblings/gui/combo-field-class.scrbl index 6803d827ab..13a36fd3e8 100644 --- a/collects/scribblings/gui/combo-field-class.scrbl +++ b/collects/scribblings/gui/combo-field-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["text-field-class.scrbl"] -@define-class-doc[combo-field% text-field% ()]{ +@defclass/title[combo-field% text-field% ()]{ A @scheme[combo-field%] object is a @scheme[text-field%] object that also resembles a @scheme[choice%] object, because it diff --git a/collects/scribblings/gui/control-event-class.scrbl b/collects/scribblings/gui/control-event-class.scrbl index af8c08e805..e7c88732fe 100644 --- a/collects/scribblings/gui/control-event-class.scrbl +++ b/collects/scribblings/gui/control-event-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["event-class.scrbl"] -@define-class-doc[control-event% event% ()]{ +@defclass/title[control-event% event% ()]{ A @scheme[control-event%] object contains information about a control event. An instance of @scheme[control-event%] is always diff --git a/collects/scribblings/gui/control-intf.scrbl b/collects/scribblings/gui/control-intf.scrbl index c29657d0c0..02204dc1ad 100644 --- a/collects/scribblings/gui/control-intf.scrbl +++ b/collects/scribblings/gui/control-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["subwindow-intf.scrbl"] -@define-interface-doc[control<%> (subwindow<%>)]{ +@definterface/title[control<%> (subwindow<%>)]{ The @scheme[control<%>] interface is implemented by the built-in control window classes: diff --git a/collects/scribblings/gui/cursor-class.scrbl b/collects/scribblings/gui/cursor-class.scrbl index 22963b6692..9369c35532 100644 --- a/collects/scribblings/gui/cursor-class.scrbl +++ b/collects/scribblings/gui/cursor-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[cursor% object% ()]{ +@defclass/title[cursor% object% ()]{ A cursor is a small icon that indicates the location of the mouse pointer. The bitmap image typically indicates the current mode or diff --git a/collects/scribblings/gui/dc-intf.scrbl b/collects/scribblings/gui/dc-intf.scrbl index 23e7c26fab..a764e7df12 100644 --- a/collects/scribblings/gui/dc-intf.scrbl +++ b/collects/scribblings/gui/dc-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[dc<%> ()]{ +@definterface/title[dc<%> ()]{ A @scheme[dc<%>] object is a drawing context for drawing graphics and text. It represents output devices in a generic way; e.g., a canvas diff --git a/collects/scribblings/gui/dc-path-class.scrbl b/collects/scribblings/gui/dc-path-class.scrbl index 2ea4f58799..954b7f6499 100644 --- a/collects/scribblings/gui/dc-path-class.scrbl +++ b/collects/scribblings/gui/dc-path-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[dc-path% object% ()]{ +@defclass/title[dc-path% object% ()]{ A path is a set of figures defined by curves. A path can be used with the @method[dc<%> draw-path] method of a @scheme[dc<%>] object to draw diff --git a/collects/scribblings/gui/dialog-class.scrbl b/collects/scribblings/gui/dialog-class.scrbl index 4d7e4b6aac..6099cb2145 100644 --- a/collects/scribblings/gui/dialog-class.scrbl +++ b/collects/scribblings/gui/dialog-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["top-level-window-intf.scrbl"] -@define-class-doc[dialog% object% (top-level-window<%>)]{ +@defclass/title[dialog% object% (top-level-window<%>)]{ A dialog is a top-level window that is @defterm{modal}: while the dialog is shown, all other top-level windows in the dialog's diff --git a/collects/scribblings/gui/draw-classes.scrbl b/collects/scribblings/gui/draw-classes.scrbl index 6f1b7ef635..96400e6753 100644 --- a/collects/scribblings/gui/draw-classes.scrbl +++ b/collects/scribblings/gui/draw-classes.scrbl @@ -1,29 +1,28 @@ #reader(lib "docreader.ss" "scribble") @require["common.ss"] @require["diagrams.ss"] -@require["mred-classes.ss"] @title[#:style '(toc quiet)]{Drawing Classes} @local-table-of-contents[] -@include-class-section[bitmap%] -@include-class-section[bitmap-dc%] -@include-class-section[brush%] -@include-class-section[brush-list%] -@include-class-section[color%] -@include-class-section[color-database<%>] -@include-class-section[dc<%>] -@include-class-section[dc-path%] -@include-class-section[font%] -@include-class-section[font-list%] -@include-class-section[font-name-directory<%>] -@include-class-section[gl-config%] -@include-class-section[gl-context<%>] -@include-class-section[pen%] -@include-class-section[pen-list%] -@include-class-section[point%] -@include-class-section[post-script-dc%] -@include-class-section[printer-dc%] -@include-class-section[ps-setup%] -@include-class-section[region%] +@include-section["bitmap-class.scrbl"] +@include-section["bitmap-dc-class.scrbl"] +@include-section["brush-class.scrbl"] +@include-section["brush-list-class.scrbl"] +@include-section["color-class.scrbl"] +@include-section["color-database-intf.scrbl"] +@include-section["dc-intf.scrbl"] +@include-section["dc-path-class.scrbl"] +@include-section["font-class.scrbl"] +@include-section["font-list-class.scrbl"] +@include-section["font-name-directory-intf.scrbl"] +@include-section["gl-config-class.scrbl"] +@include-section["gl-context-intf.scrbl"] +@include-section["pen-class.scrbl"] +@include-section["pen-list-class.scrbl"] +@include-section["point-class.scrbl"] +@include-section["post-script-dc-class.scrbl"] +@include-section["printer-dc-class.scrbl"] +@include-section["ps-setup-class.scrbl"] +@include-section["region-class.scrbl"] diff --git a/collects/scribblings/gui/editor-admin-class.scrbl b/collects/scribblings/gui/editor-admin-class.scrbl index 93028ffe60..74ad865d90 100644 --- a/collects/scribblings/gui/editor-admin-class.scrbl +++ b/collects/scribblings/gui/editor-admin-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-admin% object% ()]{ +@defclass/title[editor-admin% object% ()]{ See @|admindiscuss| for information about the role of administrators. The @scheme[editor-admin%] class is never instantiated directly. It diff --git a/collects/scribblings/gui/editor-canvas-class.scrbl b/collects/scribblings/gui/editor-canvas-class.scrbl index f73d3c10d3..c0fe65d8aa 100644 --- a/collects/scribblings/gui/editor-canvas-class.scrbl +++ b/collects/scribblings/gui/editor-canvas-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["canvas-intf.scrbl"] -@define-class-doc[editor-canvas% object% (canvas<%>)]{ +@defclass/title[editor-canvas% object% (canvas<%>)]{ An @scheme[editor-canvas%] object manages and displays a @scheme[text%] or @scheme[pasteboard%] object. diff --git a/collects/scribblings/gui/editor-classes.scrbl b/collects/scribblings/gui/editor-classes.scrbl index f2f4dac81e..c8b23f9114 100644 --- a/collects/scribblings/gui/editor-classes.scrbl +++ b/collects/scribblings/gui/editor-classes.scrbl @@ -1,7 +1,6 @@ #reader(lib "docreader.ss" "scribble") @require["common.ss"] @require["diagrams.ss"] -@require["mred-classes.ss"] @title[#:style '(toc quiet)]{Editor Classes} @@ -29,34 +28,34 @@ Alphabetical: @local-table-of-contents[] -@include-class-section[add-color<%>] -@include-class-section[editor<%>] -@include-class-section[editor-admin%] -@include-class-section[editor-canvas%] -@include-class-section[editor-data%] -@include-class-section[editor-data-class%] -@include-class-section[editor-data-class-list<%>] -@include-class-section[editor-snip-editor-admin<%>] -@include-class-section[editor-snip%] -@include-class-section[editor-stream-in%] -@include-class-section[editor-stream-in-base%] -@include-class-section[editor-stream-in-bytes-base%] -@include-class-section[editor-stream-out%] -@include-class-section[editor-stream-out-base%] -@include-class-section[editor-stream-out-bytes-base%] -@include-class-section[editor-wordbreak-map%] -@include-class-section[image-snip%] -@include-class-section[keymap%] -@include-class-section[mult-color<%>] -@include-class-section[pasteboard%] -@include-class-section[readable-snip<%>] -@include-class-section[snip%] -@include-class-section[snip-admin%] -@include-class-section[snip-class%] -@include-class-section[snip-class-list<%>] -@include-class-section[string-snip%] -@include-class-section[style<%>] -@include-class-section[style-delta%] -@include-class-section[style-list%] -@include-class-section[tab-snip%] -@include-class-section[text%] +@include-section["add-color-intf.scrbl"] +@include-section["editor-intf.scrbl"] +@include-section["editor-admin-class.scrbl"] +@include-section["editor-canvas-class.scrbl"] +@include-section["editor-data-class.scrbl"] +@include-section["editor-data-class-class.scrbl"] +@include-section["editor-data-class-list-intf.scrbl"] +@include-section["editor-snip-editor-admin-intf.scrbl"] +@include-section["editor-snip-class.scrbl"] +@include-section["editor-stream-in-class.scrbl"] +@include-section["editor-stream-in-base-class.scrbl"] +@include-section["editor-stream-in-bytes-base-class.scrbl"] +@include-section["editor-stream-out-class.scrbl"] +@include-section["editor-stream-out-base-class.scrbl"] +@include-section["editor-stream-out-bytes-base-class.scrbl"] +@include-section["editor-wordbreak-map-class.scrbl"] +@include-section["image-snip-class.scrbl"] +@include-section["keymap-class.scrbl"] +@include-section["mult-color-intf.scrbl"] +@include-section["pasteboard-class.scrbl"] +@include-section["readable-snip-intf.scrbl"] +@include-section["snip-class.scrbl"] +@include-section["snip-admin-class.scrbl"] +@include-section["snip-class-class.scrbl"] +@include-section["snip-class-list-intf.scrbl"] +@include-section["string-snip-class.scrbl"] +@include-section["style-intf.scrbl"] +@include-section["style-delta-class.scrbl"] +@include-section["style-list-class.scrbl"] +@include-section["tab-snip-class.scrbl"] +@include-section["text-class.scrbl"] diff --git a/collects/scribblings/gui/editor-data-class-class.scrbl b/collects/scribblings/gui/editor-data-class-class.scrbl index 4b60b8459c..749fedb6f2 100644 --- a/collects/scribblings/gui/editor-data-class-class.scrbl +++ b/collects/scribblings/gui/editor-data-class-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-data-class% object% ()]{ +@defclass/title[editor-data-class% object% ()]{ An @scheme[editor-data-class%] object defines a type for @scheme[editor-data%] objects. See also @|editordatadiscuss|. diff --git a/collects/scribblings/gui/editor-data-class-list-intf.scrbl b/collects/scribblings/gui/editor-data-class-list-intf.scrbl index 2f287ee6b3..db108a00b2 100644 --- a/collects/scribblings/gui/editor-data-class-list-intf.scrbl +++ b/collects/scribblings/gui/editor-data-class-list-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[editor-data-class-list<%> ()]{ +@definterface/title[editor-data-class-list<%> ()]{ Each eventspace has an instance of @scheme[editor-data-class-list<%>], obtained with @scheme[(get-the-editor-data-class-list)]. New diff --git a/collects/scribblings/gui/editor-data-class.scrbl b/collects/scribblings/gui/editor-data-class.scrbl index 7f58477bc3..f350a39b0d 100644 --- a/collects/scribblings/gui/editor-data-class.scrbl +++ b/collects/scribblings/gui/editor-data-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-data% object% ()]{ +@defclass/title[editor-data% object% ()]{ An @scheme[editor-data%] object contains extra data associated to a snip or region in an editor. See also @|editordatadiscuss|. diff --git a/collects/scribblings/gui/editor-intf.scrbl b/collects/scribblings/gui/editor-intf.scrbl index ba199e41d6..25fe49a774 100644 --- a/collects/scribblings/gui/editor-intf.scrbl +++ b/collects/scribblings/gui/editor-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[editor<%> ()]{ +@definterface/title[editor<%> ()]{ The @scheme[editor<%>] interface is implemented by @scheme[text%] and @scheme[pasteboard%]. diff --git a/collects/scribblings/gui/editor-snip-class.scrbl b/collects/scribblings/gui/editor-snip-class.scrbl index 8aea28de7f..18e73a521f 100644 --- a/collects/scribblings/gui/editor-snip-class.scrbl +++ b/collects/scribblings/gui/editor-snip-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["snip-class.scrbl"] -@define-class-doc[editor-snip% snip% ()]{ +@defclass/title[editor-snip% snip% ()]{ An @scheme[editor-snip%] object is a @scheme[snip%] object that contains and displays an @scheme[editor<%>] object. This snip class diff --git a/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl b/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl index 44733239df..12104c6a11 100644 --- a/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl +++ b/collects/scribblings/gui/editor-snip-editor-admin-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[editor-snip-editor-admin<%> ()]{ +@definterface/title[editor-snip-editor-admin<%> ()]{ An instance of this administrator interface is created with each @scheme[editor-snip%] object; new instances cannot be diff --git a/collects/scribblings/gui/editor-stream-in-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-base-class.scrbl index 6784ac81fa..355e3ee0b1 100644 --- a/collects/scribblings/gui/editor-stream-in-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-base-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-stream-in-base% object% ()]{ +@defclass/title[editor-stream-in-base% object% ()]{ An @scheme[editor-stream-in-base%] object is used by an @scheme[editor-stream-in%] object to perform low-level reading of diff --git a/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl b/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl index d4d74d4223..d1d9712607 100644 --- a/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-bytes-base-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["editor-stream-in-base-class.scrbl"] -@define-class-doc[editor-stream-in-bytes-base% editor-stream-in-base% ()]{ +@defclass/title[editor-stream-in-bytes-base% editor-stream-in-base% ()]{ An @scheme[editor-stream-in-bytes-base%] object can be used to read editor data from a byte string. diff --git a/collects/scribblings/gui/editor-stream-in-class.scrbl b/collects/scribblings/gui/editor-stream-in-class.scrbl index de5e40fc4b..0427dfd923 100644 --- a/collects/scribblings/gui/editor-stream-in-class.scrbl +++ b/collects/scribblings/gui/editor-stream-in-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-stream-in% object% ()]{ +@defclass/title[editor-stream-in% object% ()]{ An @scheme[editor-stream-in%] object is used to read editor information from a file or other input stream (such as the diff --git a/collects/scribblings/gui/editor-stream-out-base-class.scrbl b/collects/scribblings/gui/editor-stream-out-base-class.scrbl index 98f64a031f..fcd279e392 100644 --- a/collects/scribblings/gui/editor-stream-out-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-base-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-stream-out-base% object% ()]{ +@defclass/title[editor-stream-out-base% object% ()]{ An @scheme[editor-stream-out-base%] object is used by an @scheme[editor-stream-out%] object to perform low-level writing of diff --git a/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl b/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl index 17baf9f6f1..c6fef1ba49 100644 --- a/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-bytes-base-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["editor-stream-out-base-class.scrbl"] -@define-class-doc[editor-stream-out-bytes-base% editor-stream-out-base% ()]{ +@defclass/title[editor-stream-out-bytes-base% editor-stream-out-base% ()]{ An @scheme[editor-stream-out-bytes-base%] object can be used to write editor data into a byte string. diff --git a/collects/scribblings/gui/editor-stream-out-class.scrbl b/collects/scribblings/gui/editor-stream-out-class.scrbl index c004c844d6..3736046df8 100644 --- a/collects/scribblings/gui/editor-stream-out-class.scrbl +++ b/collects/scribblings/gui/editor-stream-out-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-stream-out% object% ()]{ +@defclass/title[editor-stream-out% object% ()]{ An @scheme[editor-stream-out%] object is used to write editor information to a file or other output stream (such as the diff --git a/collects/scribblings/gui/editor-wordbreak-map-class.scrbl b/collects/scribblings/gui/editor-wordbreak-map-class.scrbl index 1b63f70d65..3e3199017a 100644 --- a/collects/scribblings/gui/editor-wordbreak-map-class.scrbl +++ b/collects/scribblings/gui/editor-wordbreak-map-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[editor-wordbreak-map% object% ()]{ +@defclass/title[editor-wordbreak-map% object% ()]{ An @scheme[editor-wordbreak-map%] objects is used with a @scheme[text%] objects to specify word-breaking criteria for the diff --git a/collects/scribblings/gui/event-class.scrbl b/collects/scribblings/gui/event-class.scrbl index 1a668c6103..d5fea2bbfc 100644 --- a/collects/scribblings/gui/event-class.scrbl +++ b/collects/scribblings/gui/event-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[event% object% ()]{ +@defclass/title[event% object% ()]{ An @scheme[event%] object contains information about a control, keyboard, mouse, or scroll event. See also diff --git a/collects/scribblings/gui/font-class.scrbl b/collects/scribblings/gui/font-class.scrbl index 55a93349ac..7f0bfb1d9f 100644 --- a/collects/scribblings/gui/font-class.scrbl +++ b/collects/scribblings/gui/font-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[font% object% ()]{ +@defclass/title[font% object% ()]{ A @defterm{font} is an object which determines the appearance of text, primarily when drawing text to a device context. A font is determined diff --git a/collects/scribblings/gui/font-list-class.scrbl b/collects/scribblings/gui/font-list-class.scrbl index b304259743..e265db045c 100644 --- a/collects/scribblings/gui/font-list-class.scrbl +++ b/collects/scribblings/gui/font-list-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[font-list% object% ()]{ +@defclass/title[font-list% object% ()]{ A @scheme[font-list%] object maintains a list of @scheme[font%] objects to avoid repeatedly creating fonts. diff --git a/collects/scribblings/gui/font-name-directory-intf.scrbl b/collects/scribblings/gui/font-name-directory-intf.scrbl index 069525de21..d23175bf85 100644 --- a/collects/scribblings/gui/font-name-directory-intf.scrbl +++ b/collects/scribblings/gui/font-name-directory-intf.scrbl @@ -1,8 +1,8 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] @require[(lib "bnf.ss" "scribble")] -@define-interface-doc[font-name-directory<%> ()]{ +@definterface/title[font-name-directory<%> ()]{ There is one @scheme[font-name-directory<%>] object: @scheme[the-font-name-directory]. It implements the mapping from font diff --git a/collects/scribblings/gui/frame-class.scrbl b/collects/scribblings/gui/frame-class.scrbl index cf846e4f5a..336ddfa6ab 100644 --- a/collects/scribblings/gui/frame-class.scrbl +++ b/collects/scribblings/gui/frame-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["top-level-window-intf.scrbl"] -@define-class-doc[frame% object% (top-level-window<%>)]{ +@defclass/title[frame% object% (top-level-window<%>)]{ A frame is a top-level container window. It has a title bar (which displays the frame's label), an optional menu bar, and an optional diff --git a/collects/scribblings/gui/gauge-class.scrbl b/collects/scribblings/gui/gauge-class.scrbl index 9d748dc57b..3b6c9ace5b 100644 --- a/collects/scribblings/gui/gauge-class.scrbl +++ b/collects/scribblings/gui/gauge-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[gauge% object% (control<%>)]{ +@defclass/title[gauge% object% (control<%>)]{ A gauge is a horizontal or vertical bar for displaying the output value of a bounded integer quantity. Each gauge has an adjustable diff --git a/collects/scribblings/gui/gl-config-class.scrbl b/collects/scribblings/gui/gl-config-class.scrbl index 0667ab2815..5368c795fc 100644 --- a/collects/scribblings/gui/gl-config-class.scrbl +++ b/collects/scribblings/gui/gl-config-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[gl-config% object% ()]{ +@defclass/title[gl-config% object% ()]{ A @scheme[gl-config%] object encapsulates configuration information for an OpenGL drawing context. Use a @scheme[gl-config%] object as an diff --git a/collects/scribblings/gui/gl-context-intf.scrbl b/collects/scribblings/gui/gl-context-intf.scrbl index 59986a9279..cd7ef83741 100644 --- a/collects/scribblings/gui/gl-context-intf.scrbl +++ b/collects/scribblings/gui/gl-context-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[gl-context<%> ()]{ +@definterface/title[gl-context<%> ()]{ A @scheme[gl-context<%>] object represents a context for drawing with @as-index{OpenGL} to a specific @scheme[dc<%>] instance. To obtain a diff --git a/collects/scribblings/gui/group-box-panel-class.scrbl b/collects/scribblings/gui/group-box-panel-class.scrbl index c9c957f41a..110997a7fb 100644 --- a/collects/scribblings/gui/group-box-panel-class.scrbl +++ b/collects/scribblings/gui/group-box-panel-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["vertical-panel-class.scrbl"] -@define-class-doc[group-box-panel% vertical-panel% ()]{ +@defclass/title[group-box-panel% vertical-panel% ()]{ A group-box panel arranges its subwindows in a single column, but also draws an optional label at the top of the panel and a border around diff --git a/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl b/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl index 7ae9bc7fac..445234afc6 100644 --- a/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl +++ b/collects/scribblings/gui/grow-box-spacer-pane-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["pane-class.scrbl"] -@define-class-doc[grow-box-spacer-pane% pane% ()]{ +@defclass/title[grow-box-spacer-pane% pane% ()]{ A @scheme[grow-box-spacer-pane%] object is intended for use as a lightweight spacer in the bottom-right corner of a frame, rather than diff --git a/collects/scribblings/gui/horizontal-pane-class.scrbl b/collects/scribblings/gui/horizontal-pane-class.scrbl index 6046a50316..6d861146bf 100644 --- a/collects/scribblings/gui/horizontal-pane-class.scrbl +++ b/collects/scribblings/gui/horizontal-pane-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["pane-class.scrbl"] -@define-class-doc[horizontal-pane% pane% ()]{ +@defclass/title[horizontal-pane% pane% ()]{ A horizontal pane arranges its subwindows in a single row. See also @scheme[pane%]. diff --git a/collects/scribblings/gui/horizontal-panel-class.scrbl b/collects/scribblings/gui/horizontal-panel-class.scrbl index 06a72a3cbc..c68b45d34d 100644 --- a/collects/scribblings/gui/horizontal-panel-class.scrbl +++ b/collects/scribblings/gui/horizontal-panel-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["panel-class.scrbl"] -@define-class-doc[horizontal-panel% panel% ()]{ +@defclass/title[horizontal-panel% panel% ()]{ A horizontal panel arranges its subwindows in a single row. See also @scheme[panel%]. diff --git a/collects/scribblings/gui/image-snip-class.scrbl b/collects/scribblings/gui/image-snip-class.scrbl index fe22bbdff1..493f78c863 100644 --- a/collects/scribblings/gui/image-snip-class.scrbl +++ b/collects/scribblings/gui/image-snip-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["snip-class.scrbl"] -@define-class-doc[image-snip% snip% ()]{ +@defclass/title[image-snip% snip% ()]{ An @scheme[image-snip%] is a snip that can display bitmap images (usually loaded from a file). When the image file cannot be found, a diff --git a/collects/scribblings/gui/key-event-class.scrbl b/collects/scribblings/gui/key-event-class.scrbl index 6cc8caec44..56ba23c32a 100644 --- a/collects/scribblings/gui/key-event-class.scrbl +++ b/collects/scribblings/gui/key-event-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["event-class.scrbl"] -@define-class-doc[key-event% event% ()]{ +@defclass/title[key-event% event% ()]{ A @scheme[key-event%] object contains information about a key press or release event. Key events are primarily processed by diff --git a/collects/scribblings/gui/keymap-class.scrbl b/collects/scribblings/gui/keymap-class.scrbl index 72d1ce79c9..070ecbb358 100644 --- a/collects/scribblings/gui/keymap-class.scrbl +++ b/collects/scribblings/gui/keymap-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[keymap% object% ()]{ +@defclass/title[keymap% object% ()]{ A @scheme[keymap%] object is used by @scheme[editor<%>] objects to map keyboard and mouse sequences to arbitrary functions in an diff --git a/collects/scribblings/gui/labelled-menu-item-intf.scrbl b/collects/scribblings/gui/labelled-menu-item-intf.scrbl index c70cfbc855..3a6bf57044 100644 --- a/collects/scribblings/gui/labelled-menu-item-intf.scrbl +++ b/collects/scribblings/gui/labelled-menu-item-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["menu-item-intf.scrbl"] -@define-interface-doc[labelled-menu-item<%> (menu-item<%>)]{ +@definterface/title[labelled-menu-item<%> (menu-item<%>)]{ A @scheme[labelled-menu-item<%>] object is a @scheme[menu-item<%>] with a string label (i.e., any menu item other than a separator). More diff --git a/collects/scribblings/gui/list-box-class.scrbl b/collects/scribblings/gui/list-box-class.scrbl index fce813098a..e7045813cb 100644 --- a/collects/scribblings/gui/list-box-class.scrbl +++ b/collects/scribblings/gui/list-box-class.scrbl @@ -1,11 +1,10 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["list-control-intf.scrbl"] @define[lbnumnote @elem{List box items are indexed from @scheme[0].}] -@define-class-doc[list-box% object% (list-control<%>)]{ +@defclass/title[list-box% object% (list-control<%>)]{ A list box allows the user to select one or more string items from a scrolling list. A list box is either a single-selection control (if diff --git a/collects/scribblings/gui/list-control-intf.scrbl b/collects/scribblings/gui/list-control-intf.scrbl index 44deed3c67..8f984c19a8 100644 --- a/collects/scribblings/gui/list-control-intf.scrbl +++ b/collects/scribblings/gui/list-control-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-interface-doc[list-control<%> (control<%>)]{ +@definterface/title[list-control<%> (control<%>)]{ A list control gives the user a list of string items to choose from. There are two built-in classes that implement diff --git a/collects/scribblings/gui/menu-bar-class.scrbl b/collects/scribblings/gui/menu-bar-class.scrbl index 2e4bc4fb0b..6668d8f618 100644 --- a/collects/scribblings/gui/menu-bar-class.scrbl +++ b/collects/scribblings/gui/menu-bar-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["menu-item-container-intf.scrbl"] -@define-class-doc[menu-bar% object% (menu-item-container<%>)]{ +@defclass/title[menu-bar% object% (menu-item-container<%>)]{ A @scheme[menu-bar%] object is created for a particular @scheme[frame%] object. A frame can have at most one menu bar; diff --git a/collects/scribblings/gui/menu-class.scrbl b/collects/scribblings/gui/menu-class.scrbl index 861e680a7d..461e5d9ce1 100644 --- a/collects/scribblings/gui/menu-class.scrbl +++ b/collects/scribblings/gui/menu-class.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["labelled-menu-item-intf.scrbl"] -@require["menu-item-container-intf.scrbl"] -@define-class-doc[menu% object% (menu-item-container<%> labelled-menu-item<%>)]{ +@defclass/title[menu% object% (menu-item-container<%> labelled-menu-item<%>)]{ A @scheme[menu%] object is a submenu within a @scheme[menu%] or @scheme[popup-menu%], or as a top-level menu in a diff --git a/collects/scribblings/gui/menu-item-class.scrbl b/collects/scribblings/gui/menu-item-class.scrbl index 1e70708578..1aafc024a7 100644 --- a/collects/scribblings/gui/menu-item-class.scrbl +++ b/collects/scribblings/gui/menu-item-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["selectable-menu-item-intf.scrbl"] -@define-class-doc[menu-item% object% (selectable-menu-item<%>)]{ +@defclass/title[menu-item% object% (selectable-menu-item<%>)]{ A @scheme[menu-item%] is a plain string-labelled menu item. Its parent must be a @scheme[menu%] or @scheme[popup-menu%]. When the diff --git a/collects/scribblings/gui/menu-item-container-intf.scrbl b/collects/scribblings/gui/menu-item-container-intf.scrbl index b7812aca82..25dfab95e1 100644 --- a/collects/scribblings/gui/menu-item-container-intf.scrbl +++ b/collects/scribblings/gui/menu-item-container-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[menu-item-container<%> ()]{ +@definterface/title[menu-item-container<%> ()]{ A @scheme[menu-item-container<%>] object is a @scheme[menu%], @scheme[popup-menu%], or @scheme[menu-bar%]. diff --git a/collects/scribblings/gui/menu-item-intf.scrbl b/collects/scribblings/gui/menu-item-intf.scrbl index 2d78011abf..6acef1b127 100644 --- a/collects/scribblings/gui/menu-item-intf.scrbl +++ b/collects/scribblings/gui/menu-item-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[menu-item<%> ()]{ +@definterface/title[menu-item<%> ()]{ A @scheme[menu-item<%>] object is an element within a @scheme[menu%], @scheme[popup-menu%], or @scheme[menu-bar%]. Operations that affect diff --git a/collects/scribblings/gui/message-class.scrbl b/collects/scribblings/gui/message-class.scrbl index 12e1dac4ad..f410106c93 100644 --- a/collects/scribblings/gui/message-class.scrbl +++ b/collects/scribblings/gui/message-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[message% object% (control<%>)]{ +@defclass/title[message% object% (control<%>)]{ A message control is a static line of text or a static bitmap. The text or bitmap corresponds to the message's label (see diff --git a/collects/scribblings/gui/mouse-event-class.scrbl b/collects/scribblings/gui/mouse-event-class.scrbl index 3127a80b33..baeb281e30 100644 --- a/collects/scribblings/gui/mouse-event-class.scrbl +++ b/collects/scribblings/gui/mouse-event-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["event-class.scrbl"] -@define-class-doc[mouse-event% event% ()]{ +@defclass/title[mouse-event% event% ()]{ A @scheme[mouse-event%] object encapsulates a mouse event. Mouse events are primarily processed by diff --git a/collects/scribblings/gui/mred-classes.ss b/collects/scribblings/gui/mred-classes.ss deleted file mode 100644 index d45f9f419e..0000000000 --- a/collects/scribblings/gui/mred-classes.ss +++ /dev/null @@ -1,113 +0,0 @@ -(module mred-classes mzscheme - - (define-syntax require+provide - (syntax-rules () - [(_ s) (begin (require s) (provide (all-from s)))])) - - ;; Windowing - (require+provide "area-intf.scrbl") - (require+provide "area-container-intf.scrbl") - (require+provide "area-container-window-intf.scrbl") - (require+provide "button-class.scrbl") - (require+provide "canvas-intf.scrbl") - (require+provide "canvas-class.scrbl") - (require+provide "check-box-class.scrbl") - (require+provide "checkable-menu-item-class.scrbl") - (require+provide "choice-class.scrbl") - (require+provide "clipboard-client-class.scrbl") - (require+provide "clipboard-intf.scrbl") - (require+provide "combo-field-class.scrbl") - (require+provide "control-intf.scrbl") - (require+provide "control-event-class.scrbl") - (require+provide "cursor-class.scrbl") - (require+provide "dialog-class.scrbl") - (require+provide "event-class.scrbl") - (require+provide "frame-class.scrbl") - (require+provide "gauge-class.scrbl") - (require+provide "group-box-panel-class.scrbl") - (require+provide "grow-box-spacer-pane-class.scrbl") - (require+provide "horizontal-pane-class.scrbl") - (require+provide "horizontal-panel-class.scrbl") - (require+provide "key-event-class.scrbl") - (require+provide "labelled-menu-item-intf.scrbl") - (require+provide "list-box-class.scrbl") - (require+provide "list-control-intf.scrbl") - (require+provide "menu-class.scrbl") - (require+provide "menu-bar-class.scrbl") - (require+provide "menu-item-intf.scrbl") - (require+provide "menu-item-class.scrbl") - (require+provide "menu-item-container-intf.scrbl") - (require+provide "message-class.scrbl") - (require+provide "mouse-event-class.scrbl") - (require+provide "pane-class.scrbl") - (require+provide "panel-class.scrbl") - (require+provide "popup-menu-class.scrbl") - (require+provide "radio-box-class.scrbl") - (require+provide "selectable-menu-item-intf.scrbl") - (require+provide "separator-menu-item-class.scrbl") - (require+provide "scroll-event-class.scrbl") - (require+provide "slider-class.scrbl") - (require+provide "subarea-intf.scrbl") - (require+provide "subwindow-intf.scrbl") - (require+provide "tab-panel-class.scrbl") - (require+provide "text-field-class.scrbl") - (require+provide "timer-class.scrbl") - (require+provide "top-level-window-intf.scrbl") - (require+provide "vertical-pane-class.scrbl") - (require+provide "vertical-panel-class.scrbl") - (require+provide "window-intf.scrbl") - - ;; Drawing - (require+provide "bitmap-class.scrbl") - (require+provide "bitmap-dc-class.scrbl") - (require+provide "brush-class.scrbl") - (require+provide "brush-list-class.scrbl") - (require+provide "color-class.scrbl") - (require+provide "color-database-intf.scrbl") - (require+provide "dc-intf.scrbl") - (require+provide "dc-path-class.scrbl") - (require+provide "font-class.scrbl") - (require+provide "font-list-class.scrbl") - (require+provide "font-name-directory-intf.scrbl") - (require+provide "gl-config-class.scrbl") - (require+provide "gl-context-intf.scrbl") - (require+provide "pen-class.scrbl") - (require+provide "pen-list-class.scrbl") - (require+provide "point-class.scrbl") - (require+provide "post-script-dc-class.scrbl") - (require+provide "printer-dc-class.scrbl") - (require+provide "ps-setup-class.scrbl") - (require+provide "region-class.scrbl") - - ;; Editor - (require+provide "add-color-intf.scrbl") - (require+provide "editor-intf.scrbl") - (require+provide "editor-admin-class.scrbl") - (require+provide "editor-canvas-class.scrbl") - (require+provide "editor-data-class.scrbl") - (require+provide "editor-data-class-class.scrbl") - (require+provide "editor-data-class-list-intf.scrbl") - (require+provide "editor-snip-editor-admin-intf.scrbl") - (require+provide "editor-snip-class.scrbl") - (require+provide "editor-stream-in-class.scrbl") - (require+provide "editor-stream-in-base-class.scrbl") - (require+provide "editor-stream-in-bytes-base-class.scrbl") - (require+provide "editor-stream-out-class.scrbl") - (require+provide "editor-stream-out-base-class.scrbl") - (require+provide "editor-stream-out-bytes-base-class.scrbl") - (require+provide "editor-wordbreak-map-class.scrbl") - (require+provide "image-snip-class.scrbl") - (require+provide "keymap-class.scrbl") - (require+provide "mult-color-intf.scrbl") - (require+provide "pasteboard-class.scrbl") - (require+provide "readable-snip-intf.scrbl") - (require+provide "snip-class.scrbl") - (require+provide "snip-admin-class.scrbl") - (require+provide "snip-class-class.scrbl") - (require+provide "snip-class-list-intf.scrbl") - (require+provide "string-snip-class.scrbl") - (require+provide "style-intf.scrbl") - (require+provide "style-delta-class.scrbl") - (require+provide "style-list-class.scrbl") - (require+provide "tab-snip-class.scrbl") - (require+provide "text-class.scrbl")) diff --git a/collects/scribblings/gui/mult-color-intf.scrbl b/collects/scribblings/gui/mult-color-intf.scrbl index d55c69a7cd..2ecf1914b3 100644 --- a/collects/scribblings/gui/mult-color-intf.scrbl +++ b/collects/scribblings/gui/mult-color-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[mult-color<%> ()]{ +@definterface/title[mult-color<%> ()]{ A @scheme[mult-color<%>] object is used to scale the RGB values of a @scheme[color%] object. A @scheme[mult-color<%>] object exist only diff --git a/collects/scribblings/gui/pane-class.scrbl b/collects/scribblings/gui/pane-class.scrbl index f7e76aa654..d466572699 100644 --- a/collects/scribblings/gui/pane-class.scrbl +++ b/collects/scribblings/gui/pane-class.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-container-intf.scrbl"] -@require["subarea-intf.scrbl"] -@define-class-doc[pane% object% (area-container<%> subarea<%>)]{ +@defclass/title[pane% object% (area-container<%> subarea<%>)]{ A pane is a both a container and a containee area. It serves only as a geometry management device. A @scheme[pane%] diff --git a/collects/scribblings/gui/panel-class.scrbl b/collects/scribblings/gui/panel-class.scrbl index 4c758bf531..09b80883aa 100644 --- a/collects/scribblings/gui/panel-class.scrbl +++ b/collects/scribblings/gui/panel-class.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["subwindow-intf.scrbl"] -@require["area-container-window-intf.scrbl"] -@define-class-doc[panel% object% (area-container-window<%> subwindow<%>)]{ +@defclass/title[panel% object% (area-container-window<%> subwindow<%>)]{ A panel is a both a container and a containee window. It serves mainly as a geometry management device, but the @scheme['border] creates a diff --git a/collects/scribblings/gui/pasteboard-class.scrbl b/collects/scribblings/gui/pasteboard-class.scrbl index 556834790b..87afbaeb3c 100644 --- a/collects/scribblings/gui/pasteboard-class.scrbl +++ b/collects/scribblings/gui/pasteboard-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["editor-intf.scrbl"] -@define-class-doc[pasteboard% object% (editor<%>)]{ +@defclass/title[pasteboard% object% (editor<%>)]{ A @scheme[pasteboard%] object is an editor for displaying snips with arbitrary @techlink{location}s. diff --git a/collects/scribblings/gui/pen-class.scrbl b/collects/scribblings/gui/pen-class.scrbl index f7ad632082..c0f270039e 100644 --- a/collects/scribblings/gui/pen-class.scrbl +++ b/collects/scribblings/gui/pen-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[pen% object% ()]{ +@defclass/title[pen% object% ()]{ A pen is a drawing tool with a color, width, and style. A pen draws lines and outlines, such as the outline of a rectangle. On a diff --git a/collects/scribblings/gui/pen-list-class.scrbl b/collects/scribblings/gui/pen-list-class.scrbl index 45c9cc96b6..d23db14a28 100644 --- a/collects/scribblings/gui/pen-list-class.scrbl +++ b/collects/scribblings/gui/pen-list-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[pen-list% object% ()]{ +@defclass/title[pen-list% object% ()]{ A @scheme[pen-list%] object maintains a list of @scheme[pen%] objects to avoid repeatedly creating pen objects. A @scheme[pen%] diff --git a/collects/scribblings/gui/point-class.scrbl b/collects/scribblings/gui/point-class.scrbl index c3ea832cbb..abd20d0eab 100644 --- a/collects/scribblings/gui/point-class.scrbl +++ b/collects/scribblings/gui/point-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[point% object% ()]{ +@defclass/title[point% object% ()]{ A @scheme[point%] is used for certain drawing commands. It encapsulates two real numbers. diff --git a/collects/scribblings/gui/popup-menu-class.scrbl b/collects/scribblings/gui/popup-menu-class.scrbl index 3629136bc6..078241bd61 100644 --- a/collects/scribblings/gui/popup-menu-class.scrbl +++ b/collects/scribblings/gui/popup-menu-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["menu-item-container-intf.scrbl"] -@define-class-doc[popup-menu% object% (menu-item-container<%>)]{ +@defclass/title[popup-menu% object% (menu-item-container<%>)]{ A @scheme[popup-menu%] object is created without a parent. Dynamically display a @scheme[popup-menu%] with @xmethod[window<%> popup-menu] diff --git a/collects/scribblings/gui/post-script-dc-class.scrbl b/collects/scribblings/gui/post-script-dc-class.scrbl index b944e27db7..d412fc5da7 100644 --- a/collects/scribblings/gui/post-script-dc-class.scrbl +++ b/collects/scribblings/gui/post-script-dc-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["dc-intf.scrbl"] -@define-class-doc[post-script-dc% object% (dc<%>)]{ +@defclass/title[post-script-dc% object% (dc<%>)]{ A @scheme[post-script-dc%] object is a PostScript device context, that can write PostScript files on any platform. See also diff --git a/collects/scribblings/gui/printer-dc-class.scrbl b/collects/scribblings/gui/printer-dc-class.scrbl index 20a7755c6f..d7cd196bf4 100644 --- a/collects/scribblings/gui/printer-dc-class.scrbl +++ b/collects/scribblings/gui/printer-dc-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["dc-intf.scrbl"] -@define-class-doc[printer-dc% object% (dc<%>)]{ +@defclass/title[printer-dc% object% (dc<%>)]{ A @scheme[printer-dc%] object is a Windows or Mac OS X printer device context. The class cannot be instantiated under X (an diff --git a/collects/scribblings/gui/ps-setup-class.scrbl b/collects/scribblings/gui/ps-setup-class.scrbl index fc8dd9c3a3..e7f00caf46 100644 --- a/collects/scribblings/gui/ps-setup-class.scrbl +++ b/collects/scribblings/gui/ps-setup-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[ps-setup% object% ()]{ +@defclass/title[ps-setup% object% ()]{ A @scheme[ps-setup%] object contains configuration information for producing PostScript files using a @scheme[post-script-dc%] object. diff --git a/collects/scribblings/gui/radio-box-class.scrbl b/collects/scribblings/gui/radio-box-class.scrbl index 2bd2738fa0..1171cfbf1c 100644 --- a/collects/scribblings/gui/radio-box-class.scrbl +++ b/collects/scribblings/gui/radio-box-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[radio-box% object% (control<%>)]{ +@defclass/title[radio-box% object% (control<%>)]{ A @scheme[radio-box%] control allows the user to select one of diff --git a/collects/scribblings/gui/readable-snip-intf.scrbl b/collects/scribblings/gui/readable-snip-intf.scrbl index ded9a28e70..36d18f48df 100644 --- a/collects/scribblings/gui/readable-snip-intf.scrbl +++ b/collects/scribblings/gui/readable-snip-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[readable-snip<%> ()]{ +@definterface/title[readable-snip<%> ()]{ A @scheme[readable-snip<%>] object is treated specially by the port generated by @scheme[open-input-text-editor]. When a diff --git a/collects/scribblings/gui/region-class.scrbl b/collects/scribblings/gui/region-class.scrbl index 49833948f2..26052c8287 100644 --- a/collects/scribblings/gui/region-class.scrbl +++ b/collects/scribblings/gui/region-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[region% object% ()]{ +@defclass/title[region% object% ()]{ A @scheme[region%] object specifies a portion of a drawing area (possibly discontinuous). It is normally used for clipping drawing diff --git a/collects/scribblings/gui/scroll-event-class.scrbl b/collects/scribblings/gui/scroll-event-class.scrbl index 971635068c..a82e74de2e 100644 --- a/collects/scribblings/gui/scroll-event-class.scrbl +++ b/collects/scribblings/gui/scroll-event-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["event-class.scrbl"] -@define-class-doc[scroll-event% event% ()]{ +@defclass/title[scroll-event% event% ()]{ A @scheme[scroll-event%] object contains information about a scroll event. An instance of @scheme[scroll-event%] is always provided to diff --git a/collects/scribblings/gui/selectable-menu-item-intf.scrbl b/collects/scribblings/gui/selectable-menu-item-intf.scrbl index 3891268423..ec7262f3f9 100644 --- a/collects/scribblings/gui/selectable-menu-item-intf.scrbl +++ b/collects/scribblings/gui/selectable-menu-item-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["labelled-menu-item-intf.scrbl"] -@define-interface-doc[selectable-menu-item<%> (labelled-menu-item<%>)]{ +@definterface/title[selectable-menu-item<%> (labelled-menu-item<%>)]{ A @scheme[selectable-menu-item<%>] object is a @scheme[labelled-menu-item<%>] that the user can select. It may also diff --git a/collects/scribblings/gui/separator-menu-item-class.scrbl b/collects/scribblings/gui/separator-menu-item-class.scrbl index a2b4cb8497..8dfd0fd04f 100644 --- a/collects/scribblings/gui/separator-menu-item-class.scrbl +++ b/collects/scribblings/gui/separator-menu-item-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["menu-item-intf.scrbl"] -@define-class-doc[separator-menu-item% object% (menu-item<%>)]{ +@defclass/title[separator-menu-item% object% (menu-item<%>)]{ A separator is an unselectable line in a menu. Its parent must be a @scheme[menu%] or @scheme[popup-menu%]. diff --git a/collects/scribblings/gui/slider-class.scrbl b/collects/scribblings/gui/slider-class.scrbl index 29f9815362..4a4263c3a5 100644 --- a/collects/scribblings/gui/slider-class.scrbl +++ b/collects/scribblings/gui/slider-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[slider% object% (control<%>)]{ +@defclass/title[slider% object% (control<%>)]{ A @scheme[slider] object is a panel item with a handle that the user can drag to change the control's value. Each slider has a fixed minimum diff --git a/collects/scribblings/gui/snip-admin-class.scrbl b/collects/scribblings/gui/snip-admin-class.scrbl index 0f109cf667..a2f0669387 100644 --- a/collects/scribblings/gui/snip-admin-class.scrbl +++ b/collects/scribblings/gui/snip-admin-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[snip-admin% object% ()]{ +@defclass/title[snip-admin% object% ()]{ See @|admindiscuss| for information about the role of administrators. The @scheme[snip-admin%] class is never instantiated directly. It diff --git a/collects/scribblings/gui/snip-class-class.scrbl b/collects/scribblings/gui/snip-class-class.scrbl index 25223ff147..ac60c58f05 100644 --- a/collects/scribblings/gui/snip-class-class.scrbl +++ b/collects/scribblings/gui/snip-class-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[snip-class% object% ()]{ +@defclass/title[snip-class% object% ()]{ Useful snip classes are defined by instantiating derived subclasses of @scheme[snip-class%]. A class derived from @scheme[snip-class%] diff --git a/collects/scribblings/gui/snip-class-list-intf.scrbl b/collects/scribblings/gui/snip-class-list-intf.scrbl index c721991de3..e4ce30c842 100644 --- a/collects/scribblings/gui/snip-class-list-intf.scrbl +++ b/collects/scribblings/gui/snip-class-list-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[snip-class-list<%> ()]{ +@definterface/title[snip-class-list<%> ()]{ Each eventspace has its own instance of @scheme[snip-class-list<%>], obtained with @scheme[(get-the-snip-class-list)]. New instances diff --git a/collects/scribblings/gui/snip-class.scrbl b/collects/scribblings/gui/snip-class.scrbl index f37529d39f..56d679876a 100644 --- a/collects/scribblings/gui/snip-class.scrbl +++ b/collects/scribblings/gui/snip-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[snip% object% ()]{ +@defclass/title[snip% object% ()]{ A direct instance of @scheme[snip%] is uninteresting. Useful snips are defined by instantiating derived subclasses, but this class defines diff --git a/collects/scribblings/gui/string-snip-class.scrbl b/collects/scribblings/gui/string-snip-class.scrbl index 7507480ab4..926659e7d6 100644 --- a/collects/scribblings/gui/string-snip-class.scrbl +++ b/collects/scribblings/gui/string-snip-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["snip-class.scrbl"] -@define-class-doc[string-snip% snip% ()]{ +@defclass/title[string-snip% snip% ()]{ An instance of @scheme[string-snip%] is created automatically when text is inserted into a text editor. See also @xmethod[text% diff --git a/collects/scribblings/gui/style-delta-class.scrbl b/collects/scribblings/gui/style-delta-class.scrbl index 95e10330f3..9e4d55be89 100644 --- a/collects/scribblings/gui/style-delta-class.scrbl +++ b/collects/scribblings/gui/style-delta-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[style-delta% object% ()]{ +@defclass/title[style-delta% object% ()]{ A @scheme[style-delta%] object encapsulates a style change. The changes expressible by a delta include: diff --git a/collects/scribblings/gui/style-intf.scrbl b/collects/scribblings/gui/style-intf.scrbl index 2cf305c645..f240ca167d 100644 --- a/collects/scribblings/gui/style-intf.scrbl +++ b/collects/scribblings/gui/style-intf.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-interface-doc[style<%> ()]{ +@definterface/title[style<%> ()]{ A @scheme[style<%>] object encapsulates drawing information (font, color, alignment, etc.) in a hierarchical manner. A @scheme[style<%>] diff --git a/collects/scribblings/gui/style-list-class.scrbl b/collects/scribblings/gui/style-list-class.scrbl index 287a1344f9..9a9f99c133 100644 --- a/collects/scribblings/gui/style-list-class.scrbl +++ b/collects/scribblings/gui/style-list-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[style-list% object% ()]{ +@defclass/title[style-list% object% ()]{ A @scheme[style-list%] object contains a set of @scheme[style<%>] objects and maintains the hierarchical relationships between them. A diff --git a/collects/scribblings/gui/subarea-intf.scrbl b/collects/scribblings/gui/subarea-intf.scrbl index 5d767623e5..455b81ce43 100644 --- a/collects/scribblings/gui/subarea-intf.scrbl +++ b/collects/scribblings/gui/subarea-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-intf.scrbl"] -@define-interface-doc[subarea<%> (area<%>)]{ +@definterface/title[subarea<%> (area<%>)]{ A @scheme[subarea<%>] is a containee @scheme[area<%>]. diff --git a/collects/scribblings/gui/subwindow-intf.scrbl b/collects/scribblings/gui/subwindow-intf.scrbl index 9957b0ea4d..47a4c5584c 100644 --- a/collects/scribblings/gui/subwindow-intf.scrbl +++ b/collects/scribblings/gui/subwindow-intf.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["window-intf.scrbl"] -@require["subarea-intf.scrbl"] -@define-interface-doc[subwindow<%> (subarea<%> window<%>)]{ +@definterface/title[subwindow<%> (subarea<%> window<%>)]{ A @scheme[subwindow<%>] is a containee window. diff --git a/collects/scribblings/gui/tab-panel-class.scrbl b/collects/scribblings/gui/tab-panel-class.scrbl index c276c0ff62..39f4813ab0 100644 --- a/collects/scribblings/gui/tab-panel-class.scrbl +++ b/collects/scribblings/gui/tab-panel-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["vertical-panel-class.scrbl"] -@define-class-doc[tab-panel% vertical-panel% ()]{ +@defclass/title[tab-panel% vertical-panel% ()]{ A tab panel arranges its subwindows in a single column, but also includes a horizontal row of tabs at the top of the panel. See diff --git a/collects/scribblings/gui/tab-snip-class.scrbl b/collects/scribblings/gui/tab-snip-class.scrbl index b8d4a557ca..44676ed6a6 100644 --- a/collects/scribblings/gui/tab-snip-class.scrbl +++ b/collects/scribblings/gui/tab-snip-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["string-snip-class.scrbl"] -@define-class-doc[tab-snip% string-snip% ()]{ +@defclass/title[tab-snip% string-snip% ()]{ An instance of @scheme[tab-snip%] is created automatically when a tab is inserted into an editor. diff --git a/collects/scribblings/gui/text-class.scrbl b/collects/scribblings/gui/text-class.scrbl index 8a35036cc1..6470907412 100644 --- a/collects/scribblings/gui/text-class.scrbl +++ b/collects/scribblings/gui/text-class.scrbl @@ -1,9 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["editor-intf.scrbl"] - -@define-class-doc[text% object% (editor<%>)]{ +@defclass/title[text% object% (editor<%>)]{ A @scheme[text%] object is a standard text editor. A text editor is displayed on the screen through an @scheme[editor-canvas%] object or diff --git a/collects/scribblings/gui/text-field-class.scrbl b/collects/scribblings/gui/text-field-class.scrbl index df079b620b..628947c5e3 100644 --- a/collects/scribblings/gui/text-field-class.scrbl +++ b/collects/scribblings/gui/text-field-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["control-intf.scrbl"] -@define-class-doc[text-field% object% (control<%>)]{ +@defclass/title[text-field% object% (control<%>)]{ A @scheme[text-field%] object is an editable text field with an optional label displayed in front of it. There are two text field diff --git a/collects/scribblings/gui/timer-class.scrbl b/collects/scribblings/gui/timer-class.scrbl index 02dc425c0e..355f8cd257 100644 --- a/collects/scribblings/gui/timer-class.scrbl +++ b/collects/scribblings/gui/timer-class.scrbl @@ -1,7 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@define-class-doc[timer% object% ()]{ +@defclass/title[timer% object% ()]{ A @scheme[timer%] object encapsulates an event-based alarm. To use a timer, either instantiate it with a @scheme[timer-callback] thunk to diff --git a/collects/scribblings/gui/top-level-window-intf.scrbl b/collects/scribblings/gui/top-level-window-intf.scrbl index 7f79176de2..48ae17023c 100644 --- a/collects/scribblings/gui/top-level-window-intf.scrbl +++ b/collects/scribblings/gui/top-level-window-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-container-window-intf.scrbl"] -@define-interface-doc[top-level-window<%> (area-container-window<%>)]{ +@definterface/title[top-level-window<%> (area-container-window<%>)]{ A top-level window is either a @scheme[frame%] or @scheme[dialog%] object. diff --git a/collects/scribblings/gui/vertical-pane-class.scrbl b/collects/scribblings/gui/vertical-pane-class.scrbl index c0023b1c47..3ca068ca60 100644 --- a/collects/scribblings/gui/vertical-pane-class.scrbl +++ b/collects/scribblings/gui/vertical-pane-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["pane-class.scrbl"] -@define-class-doc[vertical-pane% pane% ()]{ +@defclass/title[vertical-pane% pane% ()]{ A vertical pane arranges its subwindows in a single column. See also @scheme[pane%]. diff --git a/collects/scribblings/gui/vertical-panel-class.scrbl b/collects/scribblings/gui/vertical-panel-class.scrbl index 9002878c20..eb33af08f4 100644 --- a/collects/scribblings/gui/vertical-panel-class.scrbl +++ b/collects/scribblings/gui/vertical-panel-class.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["panel-class.scrbl"] -@define-class-doc[vertical-panel% panel% ()]{ +@defclass/title[vertical-panel% panel% ()]{ A vertical panel arranges its subwindows in a single column. See also @scheme[panel%]. diff --git a/collects/scribblings/gui/win-classes.scrbl b/collects/scribblings/gui/win-classes.scrbl index 33317baea3..ea8e1ff569 100644 --- a/collects/scribblings/gui/win-classes.scrbl +++ b/collects/scribblings/gui/win-classes.scrbl @@ -1,7 +1,6 @@ #reader(lib "docreader.ss" "scribble") @require["common.ss"] @require["diagrams.ss"] -@require["mred-classes.ss"] @title[#:style '(toc quiet)]{Windowing Classes} @@ -21,54 +20,54 @@ Alphabetical: @local-table-of-contents[] -@include-class-section[area<%>] -@include-class-section[area-container<%>] -@include-class-section[area-container-window<%>] -@include-class-section[button%] -@include-class-section[canvas<%>] -@include-class-section[canvas%] -@include-class-section[check-box%] -@include-class-section[checkable-menu-item%] -@include-class-section[choice%] -@include-class-section[clipboard<%>] -@include-class-section[clipboard-client%] -@include-class-section[combo-field%] -@include-class-section[control<%>] -@include-class-section[control-event%] -@include-class-section[cursor%] -@include-class-section[dialog%] -@include-class-section[event%] -@include-class-section[frame%] -@include-class-section[gauge%] -@include-class-section[group-box-panel%] -@include-class-section[grow-box-spacer-pane%] -@include-class-section[horizontal-pane%] -@include-class-section[horizontal-panel%] -@include-class-section[key-event%] -@include-class-section[labelled-menu-item<%>] -@include-class-section[list-box%] -@include-class-section[list-control<%>] -@include-class-section[menu%] -@include-class-section[menu-bar%] -@include-class-section[menu-item<%>] -@include-class-section[menu-item%] -@include-class-section[menu-item-container<%>] -@include-class-section[message%] -@include-class-section[mouse-event%] -@include-class-section[pane%] -@include-class-section[panel%] -@include-class-section[popup-menu%] -@include-class-section[radio-box%] -@include-class-section[scroll-event%] -@include-class-section[selectable-menu-item<%>] -@include-class-section[separator-menu-item%] -@include-class-section[slider%] -@include-class-section[subarea<%>] -@include-class-section[subwindow<%>] -@include-class-section[tab-panel%] -@include-class-section[text-field%] -@include-class-section[timer%] -@include-class-section[top-level-window<%>] -@include-class-section[vertical-pane%] -@include-class-section[vertical-panel%] -@include-class-section[window<%>] +@include-section["area-intf.scrbl"] +@include-section["area-container-intf.scrbl"] +@include-section["area-container-window-intf.scrbl"] +@include-section["button-class.scrbl"] +@include-section["canvas-intf.scrbl"] +@include-section["canvas-class.scrbl"] +@include-section["check-box-class.scrbl"] +@include-section["checkable-menu-item-class.scrbl"] +@include-section["choice-class.scrbl"] +@include-section["clipboard-client-class.scrbl"] +@include-section["clipboard-intf.scrbl"] +@include-section["combo-field-class.scrbl"] +@include-section["control-intf.scrbl"] +@include-section["control-event-class.scrbl"] +@include-section["cursor-class.scrbl"] +@include-section["dialog-class.scrbl"] +@include-section["event-class.scrbl"] +@include-section["frame-class.scrbl"] +@include-section["gauge-class.scrbl"] +@include-section["group-box-panel-class.scrbl"] +@include-section["grow-box-spacer-pane-class.scrbl"] +@include-section["horizontal-pane-class.scrbl"] +@include-section["horizontal-panel-class.scrbl"] +@include-section["key-event-class.scrbl"] +@include-section["labelled-menu-item-intf.scrbl"] +@include-section["list-box-class.scrbl"] +@include-section["list-control-intf.scrbl"] +@include-section["menu-class.scrbl"] +@include-section["menu-bar-class.scrbl"] +@include-section["menu-item-intf.scrbl"] +@include-section["menu-item-class.scrbl"] +@include-section["menu-item-container-intf.scrbl"] +@include-section["message-class.scrbl"] +@include-section["mouse-event-class.scrbl"] +@include-section["pane-class.scrbl"] +@include-section["panel-class.scrbl"] +@include-section["popup-menu-class.scrbl"] +@include-section["radio-box-class.scrbl"] +@include-section["selectable-menu-item-intf.scrbl"] +@include-section["separator-menu-item-class.scrbl"] +@include-section["scroll-event-class.scrbl"] +@include-section["slider-class.scrbl"] +@include-section["subarea-intf.scrbl"] +@include-section["subwindow-intf.scrbl"] +@include-section["tab-panel-class.scrbl"] +@include-section["text-field-class.scrbl"] +@include-section["timer-class.scrbl"] +@include-section["top-level-window-intf.scrbl"] +@include-section["vertical-pane-class.scrbl"] +@include-section["vertical-panel-class.scrbl"] +@include-section["window-intf.scrbl"] diff --git a/collects/scribblings/gui/window-intf.scrbl b/collects/scribblings/gui/window-intf.scrbl index d8e7d11171..0e5acb5222 100644 --- a/collects/scribblings/gui/window-intf.scrbl +++ b/collects/scribblings/gui/window-intf.scrbl @@ -1,8 +1,7 @@ -#reader(lib "defreader.ss" "scribble") +#reader(lib "docreader.ss" "scribble") @require["common.ss"] -@require["area-intf.scrbl"] -@define-interface-doc[window<%> (area<%>)]{ +@definterface/title[window<%> (area<%>)]{ A @scheme[window<%>] object is an @scheme[area<%>] with a graphical representation that can respond to events. diff --git a/collects/scribblings/scribble/manual.scrbl b/collects/scribblings/scribble/manual.scrbl index 37e53114fb..2aa7510bec 100644 --- a/collects/scribblings/scribble/manual.scrbl +++ b/collects/scribblings/scribble/manual.scrbl @@ -167,9 +167,13 @@ in a form definition.} @; ------------------------------------------------------------------------ @section{Definition Reference} -@defform[(defproc (id arg-spec ...) - result-contract-expr-datum - pre-flow ...)]{ +@defform/subs[(defproc (id arg-spec ...) + result-contract-expr-datum + pre-flow ...) + ([arg-spec (arg-id contract-expr-datum) + (arg-id contract-expr-datum default-expr) + (keyword arg-id contract-expr-datum) + (keyword arg-id contract-expr-datum default-expr)])]{ Produces a sequence of flow elements (encaptured in a @scheme[splice]) to document a procedure named @scheme[id]. The @scheme[id] is indexed, @@ -368,56 +372,73 @@ at once, aligned around the @litchar{=} and @litchar{|}.} @; ------------------------------------------------------------------------ @section{Classes and Interfaces} -@defform[(define-class-doc id super-id (intf-id ...) pre-flow ...)]{ +@defform[(defclass id super-id (intf-id ...) pre-flow ...)]{ -Binds @schemeidfont{class-doc-info:}@scheme[id] to documentation for -the class @scheme[id]. If @scheme[super-id] is not @scheme[object%], -then @schemeidfont{class-doc-info:}@scheme[super-id] must be bound to -documentation for the superclass (so that links can be created to -inherited methods, etc.). Similarly, -@schemeidfont{class-doc-info:}@scheme[intf-id] must be bound to -documentation for interfaces implemented by the class. At the same -time, @scheme[id], @scheme[super-id], and the @scheme[int-id]s must -have for-label bindings that are used for hyperlinks in the usual way. +Creates documentation for a class @scheme[id] that is a subclass of +@scheme[super-id] and implements each interface @scheme[intf-id]. Each +@scheme[super-id] (except @scheme[object%]) and @scheme[intf-id] must +be documented somewhere via @scheme[defclass] or @scheme[definterface]. The decoding of the @scheme[pre-flow] sequence should start with general documentation about the class, followed by constructor definition (see @scheme[defconstructor]), and then field and method -definitions (see @scheme[defmethod]). +definitions (see @scheme[defmethod]). In rendered form, the +constructor and method specification are indented to visually group +them under the class definition.} -A @scheme[define-class-doc] form is a Scheme-level definition. It does -not produce documentation directly. Instead, @scheme[(include-class -id)] or @scheme[(include-class-section id)] should be used later to -produce the documentation.} +@defform[(defclass/title id super-id (intf-id ...) pre-flow ...)]{ -@defform[(include-class id)]{ +Like @scheme[defclass], also includes a @scheme[title] declaration +with the style @scheme['hidden]. In addition, the constructor and +methods are not left-indented. -Generates inline documentation based on the information bound to -@schemeidfont{class-doc-info:}@scheme[id]. Constructor and method -specification are indented to visually group them under the class -definition.} +This form is normally used to create a section to be rendered on its +own HTML. The @scheme['hidden] style is used because the definition +box serves as a title.} -@defform[(include-class-section id)]{ +@defform[(definterface id (intf-id ...) pre-flow ...)]{ -Generates documentation based on the information bound to -@schemeidfont{class-doc-info:}@scheme[id] as a new section. The -@scheme[id] is used as the section title, but the title is not -rendered in HTML output, as the definition box serves as a title. With -the expectation that the section will have its own page, constructor -and method specifications are not indented (unlike the result of -@scheme[include-class]).} +Like @scheme[defclass], but for an interfaces. Naturally, +@scheme[pre-flow] should not generate a constructor declaration.} -@defform[(defclass id super-id (intf-id ...) pre-flow ...)]{ +@defform[(definterface/title id (intf-id ...) pre-flow ...)]{ -Combines @scheme[define-class-doc] and @scheme[include-class].} +Like @scheme[definterface], but for single-page rendering as in +@scheme[defclass/title].} -@defform[(defconstructor)]{ +@defform/subs[(defconstructor (arg-spec ...) pre-flow ...) + ([arg-spec (arg-id contract-expr-datum) + (arg-id contract-expr-datum default-expr)])]{ -TBD.} +Like @scheme[defproc], but for a constructor declaration in the body +of @scheme[defclass], so no return contract is specified. Also, the +@scheme[new]-style keyword for each @scheme[arg-spec] is implicit from +the @scheme[arg-id].} -@defform[(defmethod)]{ +@defform[(defconstructor/make (arg-spec ...) pre-flow ...)]{ -TBD.} +Like @scheme[defconstructor], but specifying by-position +initialization arguments (for use with @scheme[make-object]) instead +of by-name arguments (for use with @scheme[new]).} + +@defform[(defconstructor*/make [(arg-spec ...) ...] pre-flow ...)]{ + +Like @scheme[defconstructor/make], but with multiple constructor +patterns analogous @scheme[defproc*].} + +@defform[(defmethod (id arg-spec ...) + result-contract-expr-datum + pre-flow ...)]{ + +Like @scheme[defproc], but for a method within a @scheme[defclass] or +@scheme[definterface] body.} + +@defform[(defmethod* ([(id arg-spec ...) + result-contract-expr-datum] ...) + pre-flow ...)]{ + +Like @scheme[defproc*], but for a method within a @scheme[defclass] or +@scheme[definterface] body.} @; ------------------------------------------------------------------------ @section{Various String Forms} diff --git a/collects/setup/scribble.ss b/collects/setup/scribble.ss index 8a2d073c77..8e93c0ca8c 100644 --- a/collects/setup/scribble.ss +++ b/collects/setup/scribble.ss @@ -7,6 +7,7 @@ (lib "main-collects.ss" "setup") (lib "base-render.ss" "scribble") (lib "struct.ss" "scribble") + (lib "manual.ss" "scribble") ; really shouldn't be here... see dynamic-require-doc (prefix html: (lib "html-render.ss" "scribble")) (prefix latex: (lib "latex-render.ss" "scribble"))) @@ -373,6 +374,9 @@ (parameterize ([current-custodian c]) (namespace-attach-module (current-namespace) '(lib "base-render.ss" "scribble") p) (namespace-attach-module (current-namespace) '(lib "html-render.ss" "scribble") p) + ;; This is here for de-serialization; we need a better repair than + ;; hard-wiring the "manual.ss" library: + (namespace-attach-module (current-namespace) '(lib "manual.ss" "scribble") p) (parameterize ([current-namespace p]) (call-in-nested-thread (lambda ()