fix defclass and some scheme/gui argument schemevarfont binding

svn: r14042
This commit is contained in:
Matthew Flatt 2009-03-10 23:14:53 +00:00
parent 812372c162
commit d8d25debcd
25 changed files with 85 additions and 92 deletions

View File

@ -44,7 +44,7 @@
(define-struct decl (name super app-mixins intfs ranges mk-head body))
(define-struct constructor (def))
(define-struct meth (names mode desc def))
(define-struct meth (names mode def))
(define-struct spec (def))
(define-struct impl (def))
@ -155,7 +155,7 @@
(define (build-body decl body)
`(,@(map (lambda (i)
(cond [(constructor? i) ((constructor-def i))]
[(meth? i) ((meth-def i) (meth-desc i))]
[(meth? i) ((meth-def i))]
[else i]))
body)
,(make-delayed-block (lambda (r d ri) (make-inherited-table r d ri decl)))))
@ -426,16 +426,14 @@
#'(make-meth '(name ...)
'mode
(lambda ()
(defproc* #:mode send #:within cname
([(name arg ...) result-type] ...)
(make-splice
(append-map (lambda (f)
(cond [(impl? f) ((impl-def f))]
[(spec? f) ((spec-def f))]
[else (list f)]))
(list extra ... desc ...))))
(lambda (desc-splice)
(defproc* #:mode send #:within cname
([(name arg ...) result-type] ...)
(desc-splice))))))]
(list extra ... desc ...))))))))]
[(_ ([(name arg ...) result-type] ...) desc ...)
#'(defmethod* #:mode public ([(name arg ...) result-type] ...) desc ...)]))

View File

@ -4,16 +4,18 @@
scribble/manual
scribble/scheme
scribble/decode
(for-label scheme/gui/base))
(for-label scheme/gui/base)
(for-syntax scheme/base))
(provide (except-out (all-defined-out) p))
(provide (except-out (all-defined-out) p define-inline))
(define-syntax-rule (define-inline (name) body)
(define-syntax (name stx)
(datum->syntax stx 'body stx)))
(define (p . l)
(decode-paragraph l))
(define (itemstyleinfo)
@elem{The @scheme[style] argument is reserved for future use.})
(define (labelsimplestripped where what)
@elem{If @litchar{&} occurs in @|where|, it is specially parsed;
under Windows and X, the character
@ -83,13 +85,6 @@
(define (insertscrolldetails what)
@elem{@|what| editor's display is scrolled to show the new selection @techlink{position}.})
(define (insertdetails what)
@elem{If @scheme[end] is
not @scheme['same], then the region from @scheme[start] to @scheme[end] is
replaced with the text. @insertmovedetails[@scheme[end]]. If @scheme[scroll-ok?] is not @scheme[#f]
@insertscrolldetails[@elem{and @scheme[start] is the same as the
current caret @techlink{position}, then the}]})
(define (insertmovedetails what)
@elem{If the insertion @techlink{position} is before
or equal to the selection's start/end @techlink{position}, then the selection's
@ -143,13 +138,6 @@ information@|details|, even if the editor currently has delayed refreshing (see
(define seesniporderdiscuss
@elem{See @secref["tb:miaoverview"] for information about snip order in pasteboards.})
(define (clipboardtypes)
@elem{The @scheme[format] string is typically four capital letters. (Under
Mac OS X, only four characters for @scheme[format] are ever used.) For
example, @scheme["TEXT"] is the name of the UTF-8-encoded string format. New
format names can be used to communicate application- and
platform-specific data formats.})
(define PrintNote
(make-splice
(list
@ -170,35 +158,38 @@ information@|details|, even if the editor currently has delayed refreshing (see
(define LineNumbering @elem{Lines are numbered starting with @scheme[0].})
(define ParagraphNumbering @elem{Paragraphs are numbered starting with @scheme[0].})
(define (italicptyStyleNote)
@elem{The @scheme[style] argument is provided for future extensions. Currently, @scheme[style] must be the empty list.})
(define (italicptyStyleNote style)
@elem{The @|style| argument is provided for future extensions. Currently, @|style| must be the empty list.})
(define (HVLabelNote what)
@elem{If @scheme[style] includes @scheme['vertical-label], then the @|what| is
created with a label above the control; if @scheme[style] does not include
(define (HVLabelNote style what)
@elem{If @|style| includes @scheme['vertical-label], then the @|what| is
created with a label above the control; if @|style| does not include
@scheme['vertical-label] (and optionally includes @scheme['horizontal-label]), then the
label is created to the left of the @|what|.})
(define (DeletedStyleNote what)
@elem{If @scheme[style] includes @scheme['deleted], then the @|what| is created as hidden,
(define (DeletedStyleNote style parent what)
@elem{If @|style| includes @scheme['deleted], then the @|what| is created as hidden,
and it does not affect its parent's geometry; the @|what| can be made active later by calling
@scheme[parent]'s @method[area-container<%> add-child] method.})
@|parent|'s @method[area-container<%> add-child] method.})
(define (InStyleListNote)
@elem{The editor's style list must contain @scheme[style], otherwise
(define (InStyleListNote style)
@elem{The editor's style list must contain @style, otherwise
the style is not changed. See also @xmethod[style-list% convert].})
(define (FontKWs) @elem{The @scheme[font] argument determines the font for the control.})
(define (FontLabelKWs) @elem{The @scheme[font] argument determines the font for the control content,
and @scheme[label-font] determines the font for the control label.})
(define (FontKWs font) @elem{The @|font| argument determines the font for the control.})
(define (FontLabelKWs font label-font) @elem{The @|font| argument determines the font for the control content,
and @|label-font| determines the font for the control label.})
(define (WindowKWs) @elem{For information about the @scheme[enabled] argument, see @scheme[window<%>].})
(define (SubareaKWs) @elem{For information about the @scheme[horiz-margin] and @scheme[vert-margin]
(define (WindowKWs enabled) @elem{For information about the @|enabled| argument, see @scheme[window<%>].})
(define-inline (SubareaKWs)
@elem{For information about the @scheme[horiz-margin] and @scheme[vert-margin]
arguments, see @scheme[subarea<%>].})
(define (AreaContKWs) @elem{For information about the @scheme[border], @scheme[spacing], and @scheme[alignment]
(define-inline (AreaContKWs)
@elem{For information about the @scheme[border], @scheme[spacing], and @scheme[alignment]
arguments, see @scheme[area-container<%>].})
(define (AreaKWs) @elem{For information about the
(define-inline (AreaKWs)
@elem{For information about the
@scheme[min-width], @scheme[min-height], @scheme[stretchable-width], and
@scheme[stretchable-height] arguments, see @scheme[area<%>].})

View File

@ -50,9 +50,9 @@ The @scheme[callback] procedure is called (with the event type
If @scheme[style] includes @scheme['border], the button is drawn with
a special border that indicates to the user that it is the default
action button (see @method[top-level-window<%>
on-traverse-char]). @DeletedStyleNote{button}
on-traverse-char]). @DeletedStyleNote[@scheme[style] @scheme[parent]]{button}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]}
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]}
@defmethod[#:mode override

View File

@ -86,7 +86,7 @@ The @scheme[gl-config] argument determines properties of an OpenGL
@xmethod[dc<%> get-gl-context].
@WindowKWs[] @SubareaKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -35,12 +35,12 @@ Creates a check box with a string or bitmap label. @bitmaplabeluse[label]
The @scheme[callback] procedure is called (with the event type
@indexed-scheme['check-box]) whenever the user clicks the check box.
@DeletedStyleNote{check box}
@DeletedStyleNote[@scheme[style] @scheme[parent]]{check box}
If @scheme[value] is true, it is passed to
@method[check-box% set-value] so that the box is initially checked.
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]

View File

@ -49,7 +49,7 @@ The @scheme[callback] procedure is called (with the event type
@indexed-scheme['choice]) when the user selects a choice item (or
re-selects the currently selected item).
@HVLabelNote{choice item} @DeletedStyleNote{choice item}
@HVLabelNote[@scheme[style]]{choice item} @DeletedStyleNote[@scheme[style] @scheme[parent]]{choice item}
By default, the first choice (if any) is initially selected. If
@scheme[selection] is positive, it is passed to
@ -57,7 +57,7 @@ By default, the first choice (if any) is initially selected. If
must be less than the length of @scheme[choices], it can be @scheme[0]
when @scheme[choices] is empty.
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}}

View File

@ -24,7 +24,11 @@ Creates a clipboard client that supports no data formats.
Adds a new data format name to the list supported by the clipboard
client.
@clipboardtypes[]
The @scheme[format] string is typically four capital letters. (Under
Mac OS X, only four characters for @scheme[format] are ever used.)
For example, @scheme["TEXT"] is the name of the UTF-8-encoded string
format. New format names can be used to communicate application- and
platform-specific data formats.
}

View File

@ -55,9 +55,9 @@ If @scheme[init-value] is not @scheme[""], the minimum width of the text item
is made wide enough to show @scheme[init-value]. Otherwise, a built-in
default width is selected.
@HVLabelNote{combo} @DeletedStyleNote{combo}.
@HVLabelNote[@scheme[style]]{combo} @DeletedStyleNote[@scheme[style] @scheme[parent]]{combo}.
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -75,7 +75,7 @@ Even if the dialog is not shown, a few notification events may be
resources (e.g., memory) cannot be reclaimed until some events are
handled, or the dialog's eventspace is shut down.
@WindowKWs[] @AreaContKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @AreaContKWs[] @AreaKWs[]
}
@defmethod[#:mode override

View File

@ -422,7 +422,7 @@ Lets the user select a color though the platform-specific
dialog if possible. If @scheme[init-color] is provided, the dialog is
initialized to the given color.
@italicptyStyleNote[]
@italicptyStyleNote[@scheme[style]]
The result is @scheme[#f] if the user cancels the dialog, the selected
color otherwise.
@ -443,7 +443,7 @@ Lets the user select a font though the platform-specific
dialog if possible. If @scheme[init-font] is provided, the dialog is
initialized to the given font.
@italicptyStyleNote[]
@italicptyStyleNote[@scheme[style]]
The result is @scheme[#f] if the user cancels the dialog, the selected
font otherwise.
@ -465,7 +465,7 @@ Lets the user select a PostScript configuration though a (modal)
the given configuration, otherwise the current configuration from
@scheme[current-ps-setup] is used.
@italicptyStyleNote[]
@italicptyStyleNote[@scheme[style]]
The result is @scheme[#f] if the user cancels the dialog, , a
@scheme[ps-setup%] object that encapsulates the selected PostScript
@ -494,7 +494,7 @@ The @scheme[parent] argument is used as the parent window for a dialog if
configuration from
@scheme[current-ps-setup] is used.
@italicptyStyleNote[]
@italicptyStyleNote[@scheme[style]]
The result is @scheme[#f] if the user cancels the dialog, a
@scheme[ps-setup%] object that encapsulates the selected

View File

@ -93,7 +93,7 @@ If @scheme[horizontal-inset] is not @scheme[5], it is passed on to the
@scheme[vertical-inset] is not @scheme[5], it is passed on to the
@method[editor-canvas% vertical-inset] method.
@WindowKWs[] @SubareaKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -112,7 +112,7 @@ Even if the frame is not shown, a few notification events may be
resources (e.g., memory) cannot be reclaimed until some events are
handled, or the frame's eventspace is shut down.
@WindowKWs[] @AreaContKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @AreaContKWs[] @AreaKWs[]
}

View File

@ -37,9 +37,9 @@ The @scheme[range] argument is an integer specifying the maximum value of
The @scheme[style] list must include either @scheme['horizontal],
specifying a horizontal gauge, or @scheme['vertical], specifying
a vertical gauge. @HVLabelNote{gauge} @DeletedStyleNote{gauge}
a vertical gauge. @HVLabelNote[@scheme[style]]{gauge} @DeletedStyleNote[@scheme[style] @scheme[parent]]{gauge}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]

View File

@ -31,9 +31,9 @@ Unlike most panel classes, a group-box panel's horizontal and vertical
Creates a group pane whose title is @scheme[label].
@DeletedStyleNote{group panel}
@DeletedStyleNote[@scheme[style] @scheme[parent]]{group panel}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}}

View File

@ -24,9 +24,9 @@ A horizontal panel arranges its subwindows in a single row. See also
If the @scheme['border] style is specified, the window is created with
a thin border (only in this case, the client size of the panel may be
less than its total size). @DeletedStyleNote{panel}
less than its total size). @DeletedStyleNote[@scheme[style] @scheme[parent]]{panel}
@WindowKWs[] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
}
@defmethod[(set-orientation [horizontal? boolean?]) void?]{

View File

@ -83,13 +83,13 @@ The @scheme['multiple] and @scheme['extended] styles determine a
user can deselect the (sole) selected item in a @scheme['single] list
box.
@HVLabelNote{list box} @DeletedStyleNote{list box}
@HVLabelNote[@scheme[style]]{list box} @DeletedStyleNote[@scheme[style] @scheme[parent]]{list box}
If @scheme[selection] is an integer, it is passed to
@method[list-control<%> set-selection] to set the initial selection. The @scheme[selection] must be less than
the length of @scheme[choices].
@FontLabelKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontLabelKWs[@scheme[font] @scheme[label-font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -33,9 +33,9 @@ Creates a string or bitmap message initially showing @scheme[label].
@labelsimplestripped[(scheme label) @elem{message}]
@DeletedStyleNote{message}
@DeletedStyleNote[@scheme[style] @scheme[parent]]{message}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
If @scheme[auto-resize] is not @scheme[#f], then automatic resizing is
initially enanbled (see @method[message% auto-resize]), and the

View File

@ -33,9 +33,9 @@ A @scheme[panel%] object has a degenerate placement strategy for
If the @scheme['border] style is specified, the window is created with
a thin border (only in this case, the client size of the panel may be
less than its total size). @DeletedStyleNote{panel}
less than its total size). @DeletedStyleNote[@scheme[style] @scheme[parent]]{panel}
@WindowKWs[] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
}}

View File

@ -468,7 +468,7 @@ Changes the style of @scheme[style] to a specific style or by applying
a style delta. If @scheme[snip] is @scheme[#f], then all currently
selected snips are changed. See also @xmethod[editor<%> change-style].
When a @scheme[style] is provided: @InStyleListNote[]
When a @scheme[style] is provided: @InStyleListNote[@scheme[style]]
}

View File

@ -61,13 +61,13 @@ The @scheme[callback] procedure is called (with the event type
The @scheme[style] argument must include either @scheme['vertical] for a
collection of radio buttons vertically arranged, or
@scheme['horizontal] for a horizontal arrangement.
@HVLabelNote{radio box} @DeletedStyleNote{radio box}
@HVLabelNote[@scheme[style]]{radio box} @DeletedStyleNote[@scheme[style] @scheme[parent]]{radio box}
By default, the first radio button is initially selected. If
@scheme[selection] is positive, it is passed to @method[radio-box%
set-selection] to set the initial radio button selection.
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -52,9 +52,9 @@ The @scheme[style] argument must include either @scheme['vertical] for
a vertical slider, or @scheme['horizontal] for a horizontal
slider. If @scheme[style] includes @scheme['plain], the slider does
not display numbers for its range and current value to the user.
@HVLabelNote{slider} @DeletedStyleNote{slider}
@HVLabelNote[@scheme[style]]{slider} @DeletedStyleNote[@scheme[style] @scheme[parent]]{slider}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -47,9 +47,9 @@ The @scheme[callback] procedure is called (with the event type
@indexed-scheme['tab-panel]) when the user changes the tab selection.
If the @scheme[style] list includes @scheme['no-border], no border is
drawn around the panel content. @DeletedStyleNote{tab panel}
drawn around the panel content. @DeletedStyleNote[@scheme[style] @scheme[parent]]{tab panel}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]

View File

@ -344,7 +344,7 @@ Changes the style for a region in the editor by applying a style delta
then @method[editor<%> set-modified] is not called after applying the
style change.
When @scheme[style] is provided: @InStyleListNote[]
When @scheme[style] is provided: @InStyleListNote[@scheme[style]]
}

View File

@ -86,10 +86,10 @@ The style must contain exactly one of @scheme['single] or
autowrapping is enabled. A multiple-line text field always has a
vertical scrollbar. The @scheme['password] style indicates that the
field should draw each character of its content using a generic
symbol instead of the actual character. @HVLabelNote{text field}
@DeletedStyleNote{text field}.
symbol instead of the actual character. @HVLabelNote[@scheme[style]]{text field}
@DeletedStyleNote[@scheme[style] @scheme[parent]]{text field}.
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
@FontKWs[@scheme[font]] @WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaKWs[]
}

View File

@ -27,9 +27,9 @@ A vertical panel arranges its subwindows in a single column. See
If the @scheme['border] style is specified, the window is created with
a thin border (only in this case, the client size of the panel may be
less than its total size). @DeletedStyleNote{panel}
less than its total size). @DeletedStyleNote[@scheme[style] @scheme[parent]]{panel}
@WindowKWs[] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
@WindowKWs[@scheme[enabled]] @SubareaKWs[] @AreaContKWs[] @AreaKWs[]
}
@defmethod[(set-orientation [horizontal? boolean?]) void?]{