improced scribble class/interface doc forms
svn: r7284
This commit is contained in:
parent
06d80a5254
commit
93cc35bd5b
|
@ -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
|
||||
|
|
495
collects/games/cards/doc.scrbl
Normal file
495
collects/games/cards/doc.scrbl
Normal file
|
@ -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.}
|
||||
|
||||
}
|
|
@ -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"))))
|
||||
|
||||
|
|
|
@ -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])
|
||||
|
|
|
@ -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))]))
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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)
|
||||
(string<? (car a) (car b)))))))))
|
||||
supers))])
|
||||
(if (null? inh)
|
||||
null
|
||||
(list (make-auxiliary-table
|
||||
"inherited"
|
||||
(map (lambda (i)
|
||||
(list (make-flow (list (make-paragraph (list i))))))
|
||||
(cons (make-element "inheritedlbl" '("Inherited methods:")) inh)))))))
|
||||
|
||||
(define (register-class name super intfs mk-head body)
|
||||
(let ([ht (make-hash-table)])
|
||||
(when super
|
||||
(hash-table-for-each (decl-methods super)
|
||||
(lambda (k v)
|
||||
(hash-table-put! ht k v))))
|
||||
(for-each (lambda (intf)
|
||||
(hash-table-for-each (decl-methods intf)
|
||||
(lambda (k v)
|
||||
(hash-table-put! ht k v))))
|
||||
intfs)
|
||||
(for-each (lambda (i)
|
||||
(when (meth? i)
|
||||
(hash-table-put! ht (meth-name i) (cons name i))))
|
||||
body)
|
||||
(make-decl name super intfs mk-head
|
||||
(append body
|
||||
(collect-inherited (append
|
||||
(if super (list super) null)
|
||||
intfs)
|
||||
ht))
|
||||
ht)))
|
||||
|
||||
(define (*include-class-section decl)
|
||||
(make-splice
|
||||
(cons (section #:style 'hidden (to-element (decl-name decl)))
|
||||
(make-auxiliary-table "inherited" null)
|
||||
(make-auxiliary-table
|
||||
"inherited"
|
||||
(map (lambda (i)
|
||||
(cond
|
||||
[(constructor? i) ((constructor-def i))]
|
||||
[(meth? i)
|
||||
((meth-def i) (meth-desc i))]
|
||||
[else i]))
|
||||
(append
|
||||
((decl-mk-head decl) #t)
|
||||
(decl-body decl))))))
|
||||
(list (make-flow (list (make-paragraph (list i))))))
|
||||
(cons (make-element "inheritedlbl" '("Inherited methods:")) inh))))))
|
||||
|
||||
(define (make-decl-collect decl)
|
||||
(make-part-collect-decl
|
||||
(make-collect-element
|
||||
#f null
|
||||
(lambda (ci)
|
||||
(let ([tag (register-scheme-definition (decl-name decl))])
|
||||
(collect-put! ci
|
||||
`(cls/intf ,tag)
|
||||
(make-cls/intf
|
||||
(make-element
|
||||
"schemesymbol"
|
||||
(list (make-link-element
|
||||
"schemevaluelink"
|
||||
(list (symbol->string (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 "<method not found>")]
|
||||
[(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))))
|
||||
|
||||
;; ----------------------------------------
|
||||
)
|
||||
|
|
|
@ -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)))
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
||||
;; ----------------------------------------
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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<%>].
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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.
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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|.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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|.
|
||||
|
|
|
@ -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%].
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%].
|
||||
|
|
|
@ -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%].
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%].
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"))
|
|
@ -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
|
||||
|
|
|
@ -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%]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%]
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%].
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%]
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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%
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user