From 6abe2deff279f93fb9b51108d20a8e3cc8a72e75 Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Wed, 16 Apr 2008 03:09:57 +0000 Subject: [PATCH] more mysterx doc work (all ported, but need re-org and clean-up) svn: r9327 --- collects/mysterx/mysterx.ss | 12 + collects/mysterx/scribblings/com-events.scrbl | 56 + collects/mysterx/scribblings/html.scrbl | 687 +++++ collects/mysterx/scribblings/mysterx.scrbl | 2384 +---------------- collects/mysterx/scribblings/types.scrbl | 68 + collects/scribble/bnf.ss | 5 +- collects/scribble/manual.ss | 11 +- 7 files changed, 840 insertions(+), 2383 deletions(-) create mode 100644 collects/mysterx/scribblings/com-events.scrbl create mode 100644 collects/mysterx/scribblings/html.scrbl create mode 100644 collects/mysterx/scribblings/types.scrbl diff --git a/collects/mysterx/mysterx.ss b/collects/mysterx/mysterx.ss index df4a06c7fc..d7a4750394 100644 --- a/collects/mysterx/mysterx.ss +++ b/collects/mysterx/mysterx.ss @@ -27,6 +27,7 @@ mx-document<%> mx-event<%> mx-version + mx-any? block-while-browsers com-invoke com-get-property @@ -2596,6 +2597,17 @@ (define mx-document<%> (class->interface mx-document%)) + (define (mx-any? v) + (or (char? v) + (real? v) + (string? v) + (boolean? v) + (com-date? v) + (com-currency? v) + (com-scode? v) + (com-iunknown? v) + (com-object? v))) + (thread (lambda () (let loop () diff --git a/collects/mysterx/scribblings/com-events.scrbl b/collects/mysterx/scribblings/com-events.scrbl new file mode 100644 index 0000000000..5471d56db5 --- /dev/null +++ b/collects/mysterx/scribblings/com-events.scrbl @@ -0,0 +1,56 @@ +#lang scribble/doc +@(require "common.ss") + +@title[#:tag "com-events"]{COM Events} + + COM events are generated by COM objects. Unlike + HTML events, there is no fixed set of COM + events, though there are ``stock'' events that + many COM objects support. MysterX allows the + programmer to write handlers for both stock and + custom events. + +@defproc[(com-events [obj/type (or/c com-object? com-type?)]) + (listof string?)]{ + + Returns a list of strings naming the events supported by + @scheme[obj/type]. + + If calling this procedure results in an error indicating that the + COM object's coclass is ambiguous, try using either + @scheme[set-coclass!] or @scheme[set-coclass-from-progid!], then + retry @scheme[com-events].} + + +@defproc[(com-event-type [obj/type (or/c com-object? com-type?)] + [ev string?]) + (listof string?)]{ + + Returns the type of an event handler for the + event @scheme[ev] generated by the particular + COM object/type @scheme[obj/type]. The return type of + all COM event handlers is void. + + See also @scheme[com-events] for dealing with a COM + object that has an ambiguous class.} + +@defproc[(com-register-event-handler + [obj com-object?] + [ev string?] + [f (any/c . -> . any)]) + void?]{ + + Registers @scheme[f] as event handler for the event @scheme[ev] when + generated by @scheme[obj]. The type of argument supplied to + @scheme[f] depends on the event; the result of @scheme[f] is always + discarded. + + See also @scheme[com-events] for dealing with a COM + object that has an ambiguous class.} + +@defproc[(com-unregister-event-handler [obj com-object?] + [ev string?]) + void?]{ + + Unregisters any event handler for the event @scheme[ev] that is + generated by the COM object @scheme[obj].} diff --git a/collects/mysterx/scribblings/html.scrbl b/collects/mysterx/scribblings/html.scrbl new file mode 100644 index 0000000000..b1719ef83e --- /dev/null +++ b/collects/mysterx/scribblings/html.scrbl @@ -0,0 +1,687 @@ +#lang scribble/doc +@(require "common.ss" + scribble/bnf + scribble/decode + scribble/struct + (for-syntax scheme/base)) + + +@(define-syntax-rule (filter-table (name (option0 contract0) + (option contract) ...) ...) + (let ([spacer (hspace 1)] + [to-flow (lambda (e) + (make-flow (list (make-paragraph (list e)))))]) + (make-table + #f + (append + (list (list (to-flow spacer) + (to-flow @emph{filter}) + (to-flow spacer) + (to-flow @emph{option}) + (to-flow spacer) + (to-flow @emph{value}))) + (list + (list (to-flow spacer) + (to-flow (scheme 'name)) + (to-flow spacer) + (to-flow (scheme 'option0)) + (to-flow spacer) + (make-flow (list (schemeblock0 contract0)))) + (list (to-flow spacer) + (to-flow spacer) + (to-flow spacer) + (to-flow (scheme 'option)) + (to-flow spacer) + (make-flow (list (schemeblock0 contract)))) + ...) + ...)))) + +@(define-syntax-rule (argmatch id) + @elem{The argument must be a possible result from @method[mx-element% id].}) + +@(define-syntax-rule (resultmatch id) + @elem{Possible results are the same as for @method[mx-element% id].}) + +@(define-syntax-rule (valmatch id) + @elem{The non-string repersentation is the same as for @method[mx-element% id].}) + +@(define-syntax (defmethods stx) + (syntax-case stx () + [(_ id contract . more) + (with-syntax ([id-native + (datum->syntax #'id + (string->symbol + (format "~s-native" (syntax-e #'id))))] + [set-id! + (datum->syntax #'id + (string->symbol + (format "set-~s!" (syntax-e #'id))))] + [set-id-native! + (datum->syntax #'id + (string->symbol + (format "set-~s-native!" (syntax-e #'id))))] + [css-string (format "~a" (syntax-e #'id))]) + #'(make-splice + (list + @defmethod*[([(id) contract] + [(id-native) string?] + [(set-id! [v contract]) void?] + [(set-id-native! [str string?]) void?])]{ + Retrieves or sets a value describing the CSS @tt[css-string] for + the element. + + @(make-splice (list . more))})))])) + +@(define-syntax-rule (defdef defXmethods ret-contract arg-contract) + (define-syntax (defXmethods stx) + (syntax-case stx () + [(_ id) + (with-syntax ([set-id! + (datum->syntax #'id + (string->symbol + (format "set-~s!" (syntax-e #'id))))] + [css-string (format "~a" (syntax-e #'id))]) + #'@defmethod*[([(id) ret-contract] + [(set-id! [v arg-contract]) void?])]{ + Retrieves or sets the CSS @tt[css-string] for the element.})]))) + +@(defdef defboolmethods boolean? any/c) +@(defdef defintmethods exact-integer? exact-integer?) +@(defdef defrealmethods real? real?) + +@; ---------------------------------------------------------------------- + +@title[#:tag "html"]{HTML and Dynamic HTML} + +@deftogether[( +@defproc[(coclass->html [name string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + string?] +@defproc[(progid->html [name string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + string?] +)]{ + + Returns a string containing HTML which when inserted into a document + loads the COM object with the COM class or ProgID given by + @scheme[name]. This procedure is suitable for placing ActiveX + controls within complex HTML. The optional @scheme[size] argument + gives an interpretation for the @scheme[width] and @scheme[height] + arguments; by default, @scheme[size] is @scheme['pixels], but may + also be @scheme['percent], indicating that the width and height are + a fixed percentage of the document window size.} + +@section{HTML Elements} + + The @scheme[mx-element%] class encapsulates HTML elements. By + calling the methods of the class, you can change the appearance of + elements, and place new HTML before or after the element. While the + methods are described here, a good DHTML reference, such as + Goodman's @italic{Dynamic HTML} will have more complete information. + + Many of the @scheme[mx-element%] methods have two variants, a + version that takes or returns Scheme data, and another + @schemeidfont{-native} version that takes or returns a string. For + methods that return values of element properties, we assume two + characteristics, which we do not mention in the methods' + documentation: 1) Native methods return the empty string for + properties that have not been set, and 2) non-native methods raise + an error for properties that have not been set. + +@subsection{CSS} + + In the @scheme[mx-element%] method descriptions, ``CSS'' refers to + the Cascading Style Sheets specification. A CSS length is string + consisting of a decimal integer number followed by one of the units + @litchar{px} (pixels), @litchar{em} (font height), @litchar{ex} + (height of an ``x''), @litchar{in} (inches), @litchar{cm} + (centimeters), @litchar{mm} (millimeters), @litchar{pc} (picas), or + @litchar{pt} (points). A CSS percentage is a string consisting of a + decimal real number followed by @litchar{%}. When using + @schemeidfont{-native} methods, CSS lengths and percentages are + given as strings. For use by non-native methods, the + @scheme[css-percentage] and @scheme[css-length] structures have been + defined. + +@deftogether[( +@defstruct[css-percentage ([num real?])] +@defstruct[css-length ([num real?][units (symbols em ex cm mm in pt pc px)])] +)] + +@subsection{Colors} + + Many element properties represent colors. In HTML, colors may be + represented by an RGB string, which contains 7 characters. The first + character is @litchar{#}, the rest are hexadecimal digits + (@litchar{0}-@litchar{9} and @litchar{a}-@litchar{f} or + @litchar{A}-@litchar{F}); the first two digits are for the red + component of the color, the middle two for the green component, and + the last two for the blue component. For example, @scheme["#FFFFFF"] + is white, @scheme["#000000"] is black, and @scheme["#00FF00"] is + green. + + There are also predefined color names. The @schemeidfont{-native} + methods use these names in strings, while their nonnative counterpart + methods use the names as symbols. + + The predefined color names are: + +@verbatim[#:indent 2]{ + aliceblue antiquewhite aqua aquamarine azure + beige bisque black blanchedalmond blue + blueviolet brown burlywood cadetblue chartreuse + chocolate coral cornflower cornsilk crimson cyan + darkblue darkcyan darkgoldenrod darkgray + darkgreen darkkhaki darkmagenta darkolivegreen + darkorange darkorchid darkred darksalmon + darkseagreen darkslateblue darkslategray + darkturquoise darkviolet deeppink deepskyblue + dimgray dodgerblue firebrick floralwhite + forestgreen fuchsia gainsboro ghostwhite gold + goldenrod gray green greenyellow honeydew + hotpink indianred indigo ivory khaki lavender + lavenderblush lawngreen lemonchiffon lightblue + lightcoral lightcyan lightgoldenrodyellow + lightgreen lightgray lightpink lightsalmon + lightseagreen lightskyblue lightslategray + lightsteelblue lightyellow lime limegreen linen + magenta maroon mediumaquamarine mediumblue + mediumorchid mediumpurple mediumseagreen + mediumslateblue mediumspringgreen + mediumturquoise mediumvioletred midnightblue + mintcream mistyrose moccasin navajowhite navy + oldlace olive olivedrab orange orangered orchid + palegoldenrod palegreen paleturquoise + palevioletred papayawhip peachpuff peru pink + plum powderblue purple red rosybrown royalblue + saddlebrown salmon sandybrown seagreen seashell + sienna silver skyblue slateblue slategray snow + springgreen steelblue tan teal thistle tomato + turquoise violet wheat white whitesmoke yellow + yellowgreen +} + +@defclass[mx-element% object% ()]{ + +@defmethod[(get-html) + string?]{ + + Returns a string containing all the HTML between the pair of + tags represented by the element.} + +@defmethod[(get-text) + string?]{ + + Returns a string containing just the text between the pair of + tags represented by the element. Any nested HTML tags + are not contained in the returned string.} + +@defmethod[(insert-html [html string?]) + void?]{ + + Places the HTML given by the string @scheme[html] before the element.} + +@defmethod[(append-html [html string?]) + void?]{ + + Places the HTML given by the string @scheme[html] after the element.} + +@defmethod[(replace-html [html string?]) + void?]{ + + Replaces the HTML in the element with the string @scheme[html]. You + must use the @method[mx-document<%> find-element] or + @method[mx-document<%> find-element-by-id-or-name] methods of + @scheme[mx-document<%>] to retrieve the updated element.} + +@defmethod[(insert-text [txt string?]) + void?]{ + + Places the text given by the string @scheme[txt] before the HTML element.} + +@defmethod[(append-text [txt string?]) + void?]{ + + Places the text given by the string @scheme[txt] after the HTML element.} + +@defmethod[(insert-object-from-coclass [coclass string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + void?]{ + + Composes @scheme[coclass->html] with @method[mx-element% insert-html].} + +@defmethod[(insert-object-from-progid [coclass string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + void?]{ + + Composes @scheme[progid->html] with @method[mx-element% insert-html].} + +@defmethod[(append-object-from-coclass [coclass string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + void?]{ + + Composes @scheme[coclass->html] with @method[mx-element% append-html].} + +@defmethod[(append-object-from-progid [coclass string?] + [width exact-integer?] + [height exact-integer?] + [size (one-of/c 'pixels 'percent) 'pixels]) + void?]{ + + Composes @scheme[progid->html] with @method[mx-element% append-html].} + +@defmethod[(focus) + void?]{ + + Sets the focus to the element. This method works only with + Internet Explorer 5 and later.} + +@defmethod[(selection) + string?]{ + + If the element has the @scheme["select"] tag, returns a string + indicating the value of the current selection. Otherwise, an + exception s raised. The value of the selection may be different + from the string visible in the dropdown list.} + +@defmethod[(set-selection! [val string?]) + void?]{ + + If the element has the @scheme["select"] tag, sets the selection to + the entry with the value @scheme[val], a string. Otherwise, an + exception is raised. The value of the selection may be different + from the string visible in the dropdown list.} + +@defmethod[(attribute [attr string?]) + (or/c string? real? boolean?)]{ + + Retrieves the attribute named by the string @scheme[attr]. The return + value has a type that depends on the attribute.} + +@defmethod[(set-attribute! [attr string?] + [val (or/c string? real? boolean?)]) + void?]{ + + Sets the attribute named by the string @scheme[attr]. The new + value @scheme[val] has a type that depends on the attribute.} + +@defmethod[(click) + void?]{ + + Simulates a mouse click on the element. } + +@defmethod[(tag) + string?]{ + + Retrieves the element's HTML tag.} + +@defmethods[font-family + (listof string?)] + +@defmethods[font-style + (one-of/c 'normal 'italic 'oblique)] + +@defmethods[font-variant + (one-of/c 'normal 'small-caps)] +@defmethods[font-weight + (one-of/c 'normal 'bold 'bolder 'lighter + 100 200 300 400 500 600 700 800 900)] + +@defmethod*[([(font-native) string?] + [(set-size-native! [fs string?]) void?])]{ + + Retrieves or sets a string that encodes the CSS @tt{font-style}, + @tt{font-variant}, @tt{font-weight}, @tt{font-size}, + @tt{line-height}, and @tt{font-family} using the format + + @BNF-seq[@optional[@BNF-alt/close[@nonterm{font-style} @nonterm{font-variant} @nonterm{font-weight}]] + @nonterm{font-size} + @optional[@nonterm{line-height}] + @nonterm{font-family}]} + +@defmethods[font-size + (or/c + (one-of/c + 'xx-small 'x-small 'small 'medium 'large 'x-large 'xx-large + 'larger 'smaller) + css-length? + css-percentage?)] + +@defmethod*[([(background-native) string?] + [(set-background-native! [b string]) void?])]{ + + Gets or sets the element's CSS @tt{background-color}, @tt{background-image}, + @tt{background-repeat}, @tt{background-attachment}, and @tt{background-position} + using the string @scheme[b].} + + +@defmethods[background-image + (or/c (one-of/c 'none) string?)] + +@defmethods[background-repeat + (one-of/c 'no-repeat 'repeat 'repeat-x 'repeat-y)] + +@defmethods[background-position + (or/c + css-length? + css-percentage? + (one-of/c 'left 'center 'right) + (list/c + (or/c css-length? css-percentage? + (one-of/c 'left 'center 'right)) + (or/c css-length? css-percentage? + (one-of/c 'left 'center 'right))))] + +@defmethods[text-decoration + (listof (one-of/c 'none 'underline 'overline 'line-through 'blink))] + +@defmethods[text-transform + (one-of/c 'none 'capitalize 'uppercase 'lowercase)] + +@defmethods[text-align + (one-of/c 'left 'right 'center 'justify)] +@defmethods[margin + (listof (or/c (one-of 'auto) + css-length? + css-percentage?))]{ + + A list representation contains one to four elements. A single + element applies to all sides; two elements are top--bottom and + left--right, respectively; four elements are top, left, bottom, and + right, respectively.} + + +@defmethods[padding + (listof (or/c css-length? css-percentage?))]{ + + The list contains one to four elements, which apply to sides as for + @method[mx-element% margin].} + +@defmethods[border + (listof (or/c (or/c (one-of/c 'medium 'thin 'thick) css-length?) + (one-of/c 'none 'dotted 'dashed 'solid 'double + 'groove 'ridge 'inset 'outset) + (or/c symbol? string?)))]{ + + Each element of the list describes a width, style, or color. A color + is a symbol indicating a color or an RGB string.} + +@defmethods[border-top ....]{@valmatch[border]} +@defmethods[border-bottom ....]{@valmatch[border]} +@defmethods[border-left ....]{@valmatch[border]} +@defmethods[border-right ....]{@valmatch[border]} + +@defmethods[border-color (listof (or/c symbol? string?))]{ + + The list contains one to four elements, with side assignments + as for @method[mx-element% margin].} + +@defmethods[border-width + (listof (or/c css-length? + (one-of/c 'medium 'thin 'thick)))]{ + + The list contains one to four elements, with side assignments + as for @method[mx-element% margin].} + +@defmethods[border-style + (one-of/c 'none 'dotted 'dashed 'solid 'double + 'groove 'ridge 'inset 'outset)] + +@defmethods[border-top-style ....]{@valmatch[border-style]} +@defmethods[border-bottom-style ....]{@valmatch[border-style]} +@defmethods[border-left-style ....]{@valmatch[border-style]} +@defmethods[border-right-style ....]{@valmatch[border-style]} + +@defmethods[style-float + (one-of/c 'none 'left 'right)] + +@defmethods[clear + (one-of/c 'none 'left 'right 'both)] + +@defmethods[display + (one-of/c 'block 'none 'inline 'list-item + 'table-header-group 'table-footer-group)] + +@defmethods[visibility + (one-of/c 'inherit 'visible 'hidden)] + +@defmethods[list-style-type + (one-of/c 'disc 'circle 'square 'decimal + 'lower-roman 'upper-roman + 'lower-alpha 'upper-alpha 'none)] + +@defmethods[list-style-position + (one-of/c 'outside 'inside)] + +@defmethods[list-style-image (lambda (s) + (and string? + (regexp-match? #rx"^(none|url[(].*[)])$" s)))] + +@defmethods[list-style list?]{ + + A list representation contains one to three elements, + which have the same representations as for + @method[mx-element% list-style-type], + @method[mx-element% list-style-position], + and @method[mx-element% list-style-image]. The + values may appear in any order.} + +@defmethods[position + (one-of/c 'absolute 'relative 'static)] + +@defmethods[overflow + (one-of/c 'visible 'scroll 'hidden 'auto)] + +@defmethods[pagebreak-before + (one-of/c 'always 'auto 'none)] +@defmethods[pagebreak-after + (one-of/c 'always 'auto 'none)] + +@defmethod*[([(css-text-native) string?] + [(set-css-text-native! [txt string?]) void?])]{ + + Retrieves or sets a string describing the CSS @tt{text} for + the element.} + +@defmethods[cursor + (one-of/c 'auto 'crosshair 'default + 'hand 'move 'n-resize 'ne-resize 'nw-resize 's-resize + 'se-resize 'sw-resize 'e-resize 'w-resize 'text 'wait + 'help)] + +@defmethods[clip + (or/c (one-of/c 'auto) + (list/c (or/c (one-of/c 'auto) + css-length?) + (or/c (one-of/c 'auto) + css-length?) + (or/c (one-of/c 'auto) + css-length?) + (or/c (one-of/c 'auto) + css-length?)))] + +@defmethods[filter + (cons/c symbol? (listof (list/c symbol? any/c)))]{ + + For a filter value that combines a symbol with a list, the symbol is + a filter name, and the list maps symbol option names to values. The + table below shows the possible options and value types for each + possible filter name. + +@filter-table[ +( alpha (enabled boolean?) + (finish-opacity (integer-in 0 100)) + (opacity (integer-in 0 100)) + (start-x exact-integer?) + (start-y exact-integer?) + (finish-x exact-integer?) + (finish-y exact-integer?) + (style (one-of/c 'uniform + 'linear + 'radial + 'rectangular))) +( blend-trans (enable boolean?) + (duration real?) + (status (one-of/c 'stopped + 'applied + 'playing))) +( blur (add boolean?) + (enabled boolean?) + (direction (one-of/c 0 45 90 + 135 180 + 225 270 + 315)) + (strength (integer-in 1 100))) +( chroma (enabled boolean?) + (color string?)) +( drop-shadow (enabled boolean?) + (off-x exact-integer?) + (off-y exact-integer?)) +( flip-horizontal (enabled boolean?)) +( flip-vertical (enabled boolean?)) +( glow (enabled boolean?) + (color string?) + (strength (integer-in 1 100))) +( gray (enabled boolean?)) +( invert (enabled boolean?)) +( light (enabled boolean?)) +( mask (enabled boolean?) + (color string?)) +( redirect (enabled boolean?)) +( reveal-trans (enabled boolean?) + (duration real?) + (status (one-of/c 'stopped + 'applied + 'playing))) +( shadow (enabled boolean?) + (color string?) + (direction (one-of/c 0 45 90 + 135 180 + 225 270 + 315))) +( wave (enabled boolean?) + (freq (and/c real? + (not/c negative?))) + (light-strength (integer-in 1 100))) +( x-ray (enabled boolean?)) +]} + +@defmethod[(style-string) + string?]{ + + Retrieves a string describing the complete CSS + description for the element.} + +@defboolmethods[text-decoration-none] +@defboolmethods[text-decoration-underline] +@defboolmethods[text-decoration-overline] +@defboolmethods[text-decoration-linethrough] +@defboolmethods[text-decoration-blink] + +@defintmethods[pixel-top] +@defintmethods[pixel-left] +@defintmethods[pixel-width] +@defintmethods[pixel-height] + +@defrealmethods[pos-top] +@defrealmethods[pos-left] +@defrealmethods[pos-width] +@defrealmethods[pos-height] + +@defmethods[color + (or/c symbol? string?)] +@defmethods[background-color + (or/c symbol? string?)] + +@defmethods[background-position-x + (or/c css-length? css-percentage? + (one-of/c 'left 'center 'right))] +@defmethods[background-position-y + (or/c css-length? css-percentage? + (one-of/c 'left 'center 'right))] + +@defmethods[letter-spacing + (or/c css-length? (one-of/c 'normal))] + +@defmethods[vertical-align + (one-of/c 'baseline 'sub 'super 'top 'middle + 'bottom 'text-top 'text-bottom)] +@defmethods[text-indent + (or/c css-length? css-percentage?)] + +@defmethods[line-height + (or/c css-length? css-percentage? + (one-of/c 'normal))] + +@defmethods[margin-top + (or/c css-length? css-percentage? + (one-of/c 'auto))] +@defmethods[margin-bottom + (or/c css-length? css-percentage? + (one-of/c 'auto))] +@defmethods[margin-left + (or/c css-length? css-percentage? + (one-of/c 'auto))] +@defmethods[margin-right + (or/c css-length? css-percentage? + (one-of/c 'auto))] + +@defmethods[padding-top + (or/c css-length? css-percentage?)] +@defmethods[padding-bottom + (or/c css-length? css-percentage?)] +@defmethods[padding-left + (or/c css-length? css-percentage?)] +@defmethods[padding-right + (or/c css-length? css-percentage?)] + +@defmethods[border-top-color + (or/c symbol? string?)] +@defmethods[border-bottom-color + (or/c symbol? string?)] +@defmethods[border-left-color + (or/c symbol? string?)] +@defmethods[border-right-color + (or/c symbol? string?)] + +@defmethods[border-top-width + (or/c css-length? + (one-of/c 'medium 'thin 'thick))] +@defmethods[border-bottom-width + (or/c css-length? + (one-of/c 'medium 'thin 'thick))] +@defmethods[border-left-width + (or/c css-length? + (one-of/c 'medium 'thin 'thick))] +@defmethods[border-right-width + (or/c css-length? + (one-of/c 'medium 'thin 'thick))] + +@defmethods[width + (or/c css-length? css-percentage? + (one-of/c 'auto))] +@defmethods[height + (or/c css-length? css-percentage? + (one-of/c 'auto))] + +@defmethods[top + (or/c css-length? css-percentage? + (one-of/c 'auto))] +@defmethods[left + (or/c css-length? css-percentage? + (one-of/c 'auto))] + +@defmethods[z-index + (or/c exact-integer? (one-of/c 'auto))] + +} diff --git a/collects/mysterx/scribblings/mysterx.scrbl b/collects/mysterx/scribblings/mysterx.scrbl index 0ec07a3906..da79b9efff 100644 --- a/collects/mysterx/scribblings/mysterx.scrbl +++ b/collects/mysterx/scribblings/mysterx.scrbl @@ -23,2384 +23,6 @@ Recent versions of Windows come with DCOM; DCOM packages for Windows @include-section["com-types.scrbl"] @include-section["com.scrbl"] @include-section["dcom.scrbl"] - -@;{ - COM events - ----------- - - COM events are generated by COM objects. Unlike - HTML events, there is no fixed set of COM - events, though there are "stock" events that - many COM objects support. MysterX allows the - programmer to write handlers for both stock and - custom events. - -> (com-events [obj com-object?]) -> (com-events [type com-type?]) - - Returns a list of strings naming the events - supported by the COM object `a-com-object' or - the COM type `a-com-type'. If calling this - procedure results in an error indicating that - the COM object's coclass is ambiguous, try using - either `set-coclass!' or - `set-coclass-from-progid!', then retry the - procedure. - -> (com-event-type [obj com-object?] ev) -> (com-event-type [type com-type?] ev) - - Returns the type of an event handler for the - event ev, a string, generated by the particular - COM object `[obj com-object?]', or by COM objects - that have type `a-com-type'. The return type of - all COM event handlers is void. If calling this - procedure results in an error indicating that - the COM object's coclass is ambiguous, try using - either `set-coclass!' or - `set-coclass-from-progid!', then retry the - procedure. - -> (com-register-event-handler [obj com-object?] ev fn) - - Registers the event handler fn, a procedure, to - handle the event ev, a string, when generated by - the COM object `a-com-object'. The input type - of `fn' depends on the event. `fn' may have any - output type, though its output is always - discarded. If calling this procedure results in - an error indicating that the COM object's - coclass is ambiguous, try using either - `set-coclass!' or `set-coclass-from-progid', - then retry the procedure. - -> (com-unregister-event-handler [obj com-object?] ev) - - Unregisters any event handler for the event ev, - a string, that is generated by the COM object - `a-com-object'. - - MysterX types - ------------- - - There are a few special types that appear in the - types of COM component methods and properties. - We describe those types and, in some cases, operations - involving those types. - -> boolean - - A boolean. When a boolean is required in - argument position, MysterX will interpret @scheme[#f] as - false, and any other value as true. - -> short-int - - A 16-bit integer, with value -32768 <= n <= 32767. - -> com-currency - - A currency value. - -> (com-currency? a-val) - - Returns @scheme[#t] if `a-val' has type com-currency, @scheme[#f] otherwise. - -> (com-currency->number a-com-curr) - - Returns a number given `a-com-curr', a value of type - com-currency. - -> (number->com-currency a-num) - - Returns a value of type com-currency given `a-num', a number. - The com-currency value stores a 64-bit two's-complement integer, - though `a-num' may contain decimal digits. If the number is - too large, an error occurs. - -> com-date - - A date value. - -> (com-date? a-val) - - Returns @scheme[#t] if `a-val' has type com-date, @scheme[#f] otherwise. - -> (com-date->date a-com-date) - - Returns an instance of the date structure, given `a-com-date', - a com-date. In the returned structure, the dst? field is - always @scheme[#f] and the time-zone-offset field is 0. - -> (date->com-date a-date) - - Returns a com-date value, given `a-date', an instance of the date - structure. - -> com-scode - - An error value. - -> (com-scode? a-val) - - Returns @scheme[#t] if `a-val' has type com-scode, @scheme[#f] otherwise. - -> (com-scode->number an-scode) - - Returns a number, given `an-scode', a value of type com-scode. - -> (number->com-scode a-num) - - Returns a com-scode value, given the number `a-num'. - The number must be representable as a 32-bit two's-complement - number, else an error occurs. - -> com-iunknown - - An interface pointer for a COM object. - Currently, there is no way to construct such - values, though they may be returned by COM - objects. - -> (com-iunknown? a-val) - - Returns @scheme[#t] if `a-val' has type com-iunknown, @scheme[#f] otherwise. - -> mx-any - - A method or property requiring a value of mx-any - will accept values of any of these Scheme types: - char, int, float, real, and string, as well as - the values @scheme[#t] and @scheme[#f], as well as values of the - COM-specific types , , - , and . - - HTML and Dynamic HTML support - ----------------------------- - -> (coclass->html name width height [size]) - - Returns a string containing HTML which when - inserted into a document loads the COM object - with the COM class given by `name'. This - procedure is suitable for placing ActiveX - controls within complex HTML. `width' and - `height' are exact integers. The optional - `size' argument gives an interpretation for the - width and height. By default, size is 'pixels, - but may also be 'percent, indicating that the - width and height are a fixed percentage of the - document window size. See also `progid->html'. - -> (progid->html name width height [size]) - - Returns a string containing HTML which when - inserted into a document loads the COM object - with the ProgID given by `name'. This procedure - is suitable for placing ActiveX controls within - complex HTML. `width' and `height' are exact - integers. The optional `size' argument gives an - interpretation for the width and height. By - default, size is 'pixels, but may also be - 'percent, indicating that the width and height - are a fixed percentage of the document window - size. See also `coclass->html'. - - HTML elements - ------------- - - The mx-element% class encapsulates HTML - elements. By calling the methods of this class, - you can change the appearance of elements, and - place new HTML before or after the element. - While the methods are described here, a good - DHTML reference, such as D. Goodman, "Dynamic - HTML" will have more complete information. - - Many of the mx-element% methods have two - variants, a version that takes or returns Scheme - data, and another "native" version that takes or - returns a string. In versions of MysterX up to - v101, only the native methods were available, - though they were not labeled as such. Older - MysterX code can usually be ported by simply - adding "-native" to the names of those - mx-element% methods that have a native version. - For methods that return values of element - properties, we assume two characteristics, which - we do not mention in the methods' documentation: - 1) Native methods return the empty string for - properties that have not been set, and 2) - non-native methods raise an error for properties - that have not been set. - - In the following method descriptions, "CSS" - refers to the Cascading Style Sheets - specification. A CSS length is string - consisting of a decimal integer number followed - by one of the units "px" (pixels), "em" (font - height), "ex" (height of an "x"), "in" (inches), - "cm" (centimeters), "mm" (millimeters), "pc" - (picas), or "pt" (points). A CSS percentage is - a string consisting of a decimal real number - followed by "%". When using "-native" methods, - CSS lengths and percentages are given as - strings. For use by non-native methods, the - following structures have been defined: - - (define-struct css-percentage (num)) - (define-struct css-length (num units)) - - where num is a number, and units is a symbol. - The valid symbols for the units field are those - in '(em ex cm mm in pt pc px). - - Colors - ------ - - Many element properties represent colors. In - HTML, colors may be represented by an RGB string, - which contains 7 characters. The first character - is #, the rest are hexadecimal digits (0-9 and - A-F). The first two digits are for the red - component of the color, the middle two for the - green component, and the last two for the blue - component. For example, "@scheme[#f]FFFFF" is white, - "#000000" is black, and "#00FF00" is green. - - There are also predefined color names. The - "-native" methods use these names in strings, - while their nonnative counterpart methods use the - names as symbols. The predefined color names are: - - aliceblue antiquewhite aqua aquamarine azure - beige bisque black blanchedalmond blue - blueviolet brown burlywood cadetblue chartreuse - chocolate coral cornflower cornsilk crimson cyan - darkblue darkcyan darkgoldenrod darkgray - darkgreen darkkhaki darkmagenta darkolivegreen - darkorange darkorchid darkred darksalmon - darkseagreen darkslateblue darkslategray - darkturquoise darkviolet deeppink deepskyblue - dimgray dodgerblue firebrick floralwhite - forestgreen fuchsia gainsboro ghostwhite gold - goldenrod gray green greenyellow honeydew - hotpink indianred indigo ivory khaki lavender - lavenderblush lawngreen lemonchiffon lightblue - lightcoral lightcyan lightgoldenrodyellow - lightgreen lightgray lightpink lightsalmon - lightseagreen lightskyblue lightslategray - lightsteelblue lightyellow lime limegreen linen - magenta maroon mediumaquamarine mediumblue - mediumorchid mediumpurple mediumseagreen - mediumslateblue mediumspringgreen - mediumturquoise mediumvioletred midnightblue - mintcream mistyrose moccasin navajowhite navy - oldlace olive olivedrab orange orangered orchid - palegoldenrod palegreen paleturquoise - palevioletred papayawhip peachpuff peru pink - plum powderblue purple red rosybrown royalblue - saddlebrown salmon sandybrown seagreen seashell - sienna silver skyblue slateblue slategray snow - springgreen steelblue tan teal thistle tomato - turquoise violet wheat white whitesmoke yellow - yellowgreen - -> get-html :: (send an-mx-element get-html) - - Returns a string containing all the HTML between the pair of - tags represented by the element. - -> get-text :: (send an-mx-element get-text) - - Returns a string containing just the text between the pair of - tags represented by the element. Any nested HTML tags - are not contained in the returned string. - -> insert-html :: (send an-mx-element insert-html html) - - Places the HTML given by the string `html' before the element. - -> append-html :: (send an-mx-element append-html html) - - Places the HTML given by the string `html' after the element. - -> replace-html :: (send an-mx-element replace-html html) - - Replaces the HTML in the element with the string `html'. You must - use the `find-element' or `find-element-by-id-or-name' methods of - mx-document<%> to retrieve the updated element. - -> insert-text :: (send an-mx-element insert-text txt) - - Places the text given by the string `txt' before the HTML element. - -> append-text :: (send an-mx-element append-text txt) - - Places the text given by the string `txt' after the HTML element. - -> insert-object-from-coclass :: (send an-mx-element insert-object coclass width height [size]) - - Inserts a COM object with class `coclass' before the HTML element. - `width' and `height' are exact integers. The optional `size' argument - gives an interpretation for the width and height. By default, size - is 'pixels, but may also be 'percent, indicating that the width and - height are a fixed percentage of the document window size. - An instance of is returned. - -> insert-object-from-progid :: (send an-mx-element insert-object progid width height [size]) - - Inserts a COM object with ProgID `progid' before the HTML element. - `width' and `height' are exact integers. The optional `size' argument - gives an interpretation for the width and height. By default, size - is 'pixels, but may also be 'percent, indicating that the width and - height are a fixed percentage of the document window size. - An instance of is returned. - -> append-object-from-coclass :: (send an-mx-element append-object coclass width height [size]) - - Places a COM object with class `coclass' after the HTML element. - `width' and `height' are exact integers. The optional `size' argument - gives an interpretation for the width and height. By default, size - is 'pixels, but may also be 'percent, indicating that the width and - height are a fixed percentage of the document window size. - An instance of is returned. - -> append-object-from-progid :: (send an-mx-element append-object progid width height [size]) - - Places a COM object with ProgID `progid' after the HTML element. - `width' and `height' are exact integers. The optional `size' argument - gives an interpretation for the width and height. By default, size - is 'pixels, but may also be 'percent, indicating that the width and - height are a fixed percentage of the document window size. - An instance of is returned. - -> focus :: (send an-mx-element focus) - - Sets the focus to the element. This method works only with - Internet Explorer 5 and later. - -> selection :: (send an-mx-element selection) - - If the element has the SELECT tag, returns a string indicating - the value of the current selection. Otherwise, an error - occurs. The value of the selection may be different from - the string visible in the dropdown list. - -> set-selection! :: (send an-mx-element set-selection! val) - - If the element has the SELECT tag, sets the selection to - the entry with the value `val', a string. Otherwise, an error - occurs. The value of the selection may be different from - the string visible in the dropdown list. - -> attribute :: (send an-mx-element attribute attr) - - Retrieves the attribute named by the string `attr'. The return - value has a type that depends on the attribute. - -> set-attribute! :: (send an-mx-element set-attribute! attr val) - - Sets the attribute named by the string `attr'. The new - value `val' has a type that depends on the attribute, - but must be either a string, an integer, a float, @scheme[#t], or @scheme[#f]. - -> click :: (send an-mx-element click) - - Simulates a mouse click on the element. - -> tag :: (send an-mx-element tag) - - Retrieves the element's HTML tag, which is a string. - -> font-family :: (send an-mx-element font-family) - - Returns a list of strings representing a priority list of - font families for the element. - -> font-family-native :: (send an-mx-element font-family-native) - - Returns a comma-delimited string representing a priority list of - font families for the element. - -> set-font-family! :: (send an-mx-element set-font-family! ff) - - Sets the list of font families to the list of strings `ff', - representing a priority list. List items may include the generic - families "serif", "sans-serif", "cursive", "fantasy", and "monospace". - -> set-font-family-native! :: (send an-mx-element set-font-family-native! ff) - - Sets the list of font families to the string `ff', which is - a comma-delimited priority list. List items may include - the generic families `serif', `sans-serif', `cursive', - `fantasy', and `monospace'. - -> font-style :: (send an-mx-element font-style) - - Retrieves a symbol indicating the element's font style, - which is one of 'normal, 'italic, and 'oblique. - -> font-style-native :: (send an-mx-element font-style-native) - - Retrieves a string indicating the element's font style, - which is one of "normal", "italic", and "oblique". - -> set-font-style! :: (send an-mx-element set-font-style! fs) - - Sets the element's font style to the string `fs', which - should be one of "normal", "italic", or "oblique". - -> font-variant :: (send an-mx-element font-variant) - - Retrieves a symbol indicating the element's font variation, - which is either 'normal or 'small-caps. - -> font-variant-native :: (send an-mx-element font-variant-native) - - Retrieves a string indicating the element's font variation, - which is either "normal", "small-caps", or the empty string. - -> set-font-variant! :: (send an-mx-element set-font-variant! fv) - - Sets the element's font variation to the symbol `fv', which should - be either 'normal or 'small-caps. - -> set-font-variant-native! :: (send an-mx-element set-font-variant-native! fv) - - Sets the element's font variation to the string `fv', which should - be either "normal", "small-caps", or the empty string. - -> font-weight :: (send an-mx-element font-weight) - - Retrieves a value indicating the element's font weight, - which is either one of the following symbols: 'normal, 'bold, - 'bolder, 'lighter, or one of the numbers 100, 200, 300, - 400, 500, 600, 700", 800, or 900. - -> font-weight-native :: (send an-mx-element font-weight-native) - - Retrieves a string indicating the element's font weight, - which is one of the following strings: "normal", "bold", - "bolder", "lighter", "100", "200", "300", "400", "500", - "600", "700", "800", or "900". - -> set-font-weight! :: (send an-mx-element set-font-weight! fw) - - Sets the element's font weight using the value `fw', - which is either one of the symbols 'normal, 'bold, - 'bolder, 'lighter, or one of the numbers 100, 200, 300, 400, - 500, 600, 700, 800, or 900. - -> set-font-weight-native! :: (send an-mx-element set-font-weight-native! fw) - - Sets the element's font weight using the string `fw', - which is one of the following strings: "normal", "bold", - "bolder", "lighter", "100", "200", "300", "400", "500", - "600", "700", "800", or "900". - -> font-native :: (send an-mx-element font-native) - - Retrieves a string indicating the CSS font-style, font-variant, - font-weight, font-size, line-height, and font-family. - -> set-font-native! :: (send an-mx-element set-font-native! f) - - Sets the CSS font-style, font-variant, font-weight, font-size, - line-height, and font-family for the element from the string `f', - which has the format: - - [font-style | font-variant | font-weight] font-size / - [line-height] font-family - - See the "-native" versions of the methods of these properties - for syntax of the constituent substrings. - -> font-size :: (send an-mx-element font-size) - - Retrieves the CSS font-size for the element. See - `set-font-size!' for possible values. Raises an - error if the property has not been set. - -> font-size-native :: (send an-mx-element font-size-native) - - Retrieves the CSS font-size for the element. See - `set-font-size!' for possible values. Raises an - error if the property has not been set. - -> set-font-size! :: (send an-mx-element set-font-size! fs) - - Sets the element's CSS font-size using `fs', which may - be any of 1) an symbol in the list '(xx-small x-small small medium - large x-large xx-large); 2) a symbol in the list '(larger smaller), - indicating a size relative to a parent element; 3) an instance - of the css-length structure, or 4) an instance of the css-percentage - structure, where the percentage is relative to the parent element's - font-size. - -> set-font-size-native! :: (send an-mx-element set-font-size-native! fs) - - Sets the element's CSS font-size using `fs', which may - be any of 1) a string indicating an absolute size, one - of "xx-small", "x-small", "small", "medium", "large", "x-large", or - "xx-large"; 2) a string indicating a size relative to a parent - element, either "larger" or "smaller"; 3) a CSS length; or - 4) a CSS percentage, considered relative to the parent element's - font-size. - -> background-native :: (send an-mx-element background-native) - - Retrieves a string indicating the CSS background-color, - background-image, background-repeat, background-attachment, and - background-position for the element. - -> set-background-native! :: (send an-mx-element set-background-native! b) - - Sets the element's CSS background-color, background-image, - background-repeat, background-attachment, and background-position - using the string `b'. See the "-native" versions of the methods - for those properties for the syntax of the substrings. - -> background-image :: (send an-mx-element background-image) - - Retrieves a value indicating the CSS background-image for the - element, either 'none or a string representing a URL. - -> background-image-native :: (send an-mx-element background-image-native) - - Retrieves a string indicating the CSS background-image for the - element. The string may be "none", the empty string, or - of the form "url(url-string)", indicating a URL. - -> set-background-image! :: (send an-mx-element set-background-image! bi) - - Sets the element's CSS background-image using the value `bi', - which is either 'none, or of the form "url(url-string)". - -> set-background-image-native! :: (send an-mx-element set-background-image-native! bi) - - Sets the element's CSS background-image using the string `bi', - which is either "none", or of the form "url(url-string)". - -> background-repeat :: (send an-mx-element background-repeat) - - Retrieves a symbol indicating the CSS background-repeat for the - element. See set-background-repeat! for possible values of that - symbol. - -> background-repeat-native :: (send an-mx-element background-repeat-native) - - Retrieves a string indicating the CSS background-repeat for the element. - See set-background-repeat-native! for possible values of that - string. - -> set-background-repeat! :: (send an-mx-element set-background-repeat! br) - - Sets the element's CSS background-repeat using the symbol `br', - which must be from the list '(no-repeat repeat repeat-x repeat-y). - -> set-background-repeat-native! :: (send an-mx-element set-background-repeat-native! br) - - Sets the element's CSS background-repeat using the string `br', - which must be from the list '("no-repeat" "repeat" "repeat-x" "repeat-y"). - -> background-position :: (send an-mx-element background-position) - - Retrieves a string indicating the CSS background-position for the - element. - -> background-position-native :: (send an-mx-element background-position-native) - - Retrieves a string indicating the CSS background-position for the - element. - -> set-background-position! :: (send an-mx-element set-background-position! bp) - - Sets the element's CSS background-position using `bp', - which either 1) a single css-length, a css-percentage, or a - symbol from the list '(left center right), in which case the - property applies to the horizontal position; or 2) a two-element - list, where either element may be a css-length or css-percentage, - the first element may be a symbol from '(left center right), and - the second element may be from '(top center bottom), in which - case the first element applies horizontally, and the second - vertically. - -> set-background-position-native! :: (send an-mx-element set-background-position-native! bp) - - Sets the element's CSS background-position using the string `bp', - which may be either 1) a CSS percentage, a CSS length - or a string from '("left" "center" "right") or 2) two substrings - separated by spaces, where either substring may be a CSS percentage - or CSS length, the first substring may be one of - '("left" "center" "right"), and the second substring may be one of - '("top" "center" "bottom"). When one value is specified, it - applies to the horizontal position; when two are given, the - first applies to the horizontal position, the second applies to - the vertical position. - -> text-decoration :: (send an-mx-element text-decoration) - - Retrieves a list drawn from the symbols in - '(none underline overline line-through blink), indicating the - CSS text-decoration for the element. - -> text-decoration-native :: (send an-mx-element text-decoration-native) - - Retrieves a string indicating the CSS text-decoration for the - element. The string contains substrings drawn from - '("none" "underline" "overline" "line-through" "blink"). - -> set-text-decoration! :: (send an-mx-element set-text-decoration! td) - - Sets the element's CSS text-decoration using the list `td', - which contains symbols drawn from - '(none underline overline line-through blink). - -> set-text-decoration-native! :: (send an-mx-element set-text-decoration-native! td) - - Sets the element's CSS text-decoration using the string `td', - which contains space-separated substrings drawn from - '("none" "underline" "overline" "line-through" "blink"). - -> text-transform :: (send an-mx-element text-transform) - - Retrieves a symbol indicating the CSS text-transform for the - element, from the list '(none capitalize uppercase lowercase). - -> text-transform-native :: (send an-mx-element text-transform-native) - - Retrieves a string indicating the CSS text-transform for the - element, from the list '("none" "capitalize" "uppercase" "lowercase"). - -> set-text-transform! :: (send an-mx-element set-text-transform! tt) - - Sets the element's CSS text-transform using the symbol `tt', - which is from the list '(none capitalize lowercase uppercase). - -> set-text-transform-native! :: (send an-mx-element set-text-transform-native! tt) - - Sets the element's CSS text-transform using the string `tt', - which is one of "none", "capitalize", "lowercase", or "uppercase". - -> text-align :: (send an-mx-element text-align) - - Retrieves a symbol indicating the CSS text-align for the - element, from the list '(left right center justify). - -> text-align-native :: (send an-mx-element text-align-native) - - Retrieves a string indicating the CSS text-align for the - element, from the list '("left" "right" "center" "justify"). - -> set-text-align! :: (send an-mx-element set-text-align! ta) - - Sets the element's CSS text-transform using the symbol `ta', - which is from the list '(left right center justify). - -> set-text-align-native! :: (send an-mx-element set-text-align-native! ta) - - Sets the element's CSS text-transform using the string `ta', - which is from the list '("left" "right" "center" "justify"). - -> margin :: (send an-mx-element margin) - - Retrieves a list indicating the CSS margin for the - element. The list contains one to four elements, - each either 'auto, a css-length, or a css-percentage. - -> margin-native :: (send an-mx-element margin-native) - - Retrieves a string indicating the CSS margin for the - element. The string contains one to four substrings, each - either "auto", a CSS length, or a CSS percentage. - -> set-margin! :: (send an-mx-element set-margin! marg) - - Sets the element's CSS margin using the list `marg', which - consists of a list of one to four entries, each of - which is a css-length, css-percentage, or 'auto. - -> set-margin-native! :: (send an-mx-element set-margin-native! marg) - - Sets the element's CSS margin using the string `marg', which - consists of one to four space-separated entries, each of - which is a CSS length, CSS percentage, or "auto". - -> padding :: (send an-mx-element padding) - - Retrieves a list indicating the CSS padding for the - element. The list contains one to four elements, each - a css-length or a css-percentage. - -> padding-native :: (send an-mx-element padding-native) - - Retrieves a string indicating the CSS padding for the - element. The string consists of one to four CSS lengths - or CSS percentages, separated by spaces. - -> set-padding! :: (send an-mx-element set-padding! pad) - - Sets the element's CSS padding using the list `pad'. Each - element of the list is either a css-length or a css-percentage. - -> set-padding-native! :: (send an-mx-element set-padding-native! pad) - - Sets the element's CSS padding using the string `pad', which - consists of one to four space-separated entries, each of - which is a CSS length or percentage. - -> border :: (send an-mx-element border) - - Retrieves a list describing the CSS border for the element. - Each element of the list describes a width, style, or color. - A width may be in '(medium thin thick) or a css-length. - A style is in '(none dotted dashed solid double groove - ridge inset outset). A color is a symbol indicating a - color or an RGB string. - -> border-native :: (send an-mx-element border-native) - - Retrieves a string describing the CSS border for - the element. The string may contain - space-separated values indicating a width, - style, and color. A width may be in '("medium" - "thin" "thick") or a CSS length. A style is in - '("none" "dotted" "dashed" "solid" "double" - "groove" "ridge" "inset" "outset"). A color is - an HTML color or RGB string. - -> set-border! :: (send an-mx-element set-border! border) - - Sets the element's CSS border using the list - `border', which may contain a width, a style, - and a color. The width may be in '(medium thin - thick) or a css-length. The style is in '(none - dotted dashed solid double groove ridge inset - outset). A color is a symbol indicating an HTML - color or an RGB string. - -> set-border-native! :: (send an-mx-element set-border-native! border) - - Sets the element's CSS border using the string - `border', which may contain a width, style, and - color. The string may contain space-separated - values indicating a width, style, and color. A - width may be in '("medium" "thin" "thick") or a - CSS length. A style is in '("none" "dotted" - "dashed" "solid" "double" "groove" "ridge" - "inset" "outset"). A color is an HTML color - symbol or RGB string. - -> border-top :: (send an-mx-element border-top) - - Retrieves a list describing the CSS border-top - for the element. See the method `border' for a - description of the list. - -> border-top-native :: (send an-mx-element border-top-native) - - Retrieves a string describing the CSS border-top - for the element. See the method `border-native' - for a description of the string. - -> set-border-top! :: (send an-mx-element set-border-top! bt) - - Sets the element's CSS border-top using the list - `bt'. See the method `set-border!' for a - description of the list. - -> set-border-top-native! :: (send an-mx-element set-border-top-native! bt) - - Sets the element's CSS border-top using the - string `bt'. See the method - `set-border-native!' for a description of the - list. - -> border-bottom :: (send an-mx-element border-bottom) - - Retrieves a list describing the CSS - border-bottom for the element. See the method - `border' for a description of the list. - -> border-bottom-native :: (send an-mx-element border-bottom-native) - - Retrieves a string describing the CSS - border-bottom for the element. See the method - `border-native' for a description of the string. - -> set-border-bottom! :: (send an-mx-element set-border-bottom! bb) - - Sets the element's CSS border-bottom using the - list `bb'. See the method `set-border!' for a - description of the list. - -> set-border-bottom-native! :: (send an-mx-element set-border-bottom-native! bb) - - Sets the element's CSS border-bottom using the - string `bb'. See the method - `set-border-native!' for a description of the - list. - -> border-left :: (send an-mx-element border-left) - - Retrieves a list describing the CSS border-left - for the element. See the method `border' for a - description of the list. - -> border-left-native :: (send an-mx-element border-left-native) - - Retrieves a string describing the CSS - border-left for the element. See the method - `border-native' for a description of the string. - -> set-border-left! :: (send an-mx-element set-border-left! bl) - - Sets the element's CSS border-left using the - list `bl'. See the method `set-border!' for a - description of the list. - -> set-border-left-native! :: (send an-mx-element set-border-left-native! bl) - - Sets the element's CSS border-left using the - string `bl'. See the method - `set-border-native!' for a description of the - list. - -> border-right :: (send an-mx-element border-right) - - Retrieves a list describing the CSS border-right - for the element. See the method `border' for a - description of the list. - -> border-right-native :: (send an-mx-element border-right-native) - - Retrieves a string describing the CSS - border-right for the element. See the method - `border-native' for a description of the string. - -> set-border-right! :: (send an-mx-element set-border-right! br) - - Sets the element's CSS border-right using the - list `br'. See the method `set-border!' for a - description of the list. - -> set-border-right-native! :: (send an-mx-element set-border-right-native! br) - - Sets the element's CSS border-right using the - string `br'. See the method - `set-border-native!' for a description of the - list. - -> border-color :: (send an-mx-element border-color) - - Retrieves a list of one to four elements in - which each element is either a symbol indicating - an HTML color or an RGB string. If the list - contains just one element, it applies to all - four sides. If there are two, the first is for - top and bottom, the other for left and right. - If there are three, they are for top, left and - right, and bottom. - -> border-color-native :: (send an-mx-element border-color-native) - - Retrieves a string in which describing the CSS - border-color for the element. The string - contains one to four space-separated substrings - indicating a color. If there is just one color, - it applies to all four sides. If there are two, - the first is for top and bottom, the other for - left and right. If there are three, they are - for top, left and right, and bottom. - -> set-border-color! :: (send an-mx-element set-border-color! bc) - - Sets the element's CSS border-color using the - list `bc', which has one to four elements, each - of which is either a symbol indicating an HTML - color, or an RGB string. If there is just one - element, it applies to all four sides. If there - are two, the first is for top and bottom, the - second for left and right. If there are three, - they are for top, left and right, and bottom. - -> set-border-color-native! :: (send an-mx-element set-border-color-native! bc) - - Sets the element's CSS border-color using the - string `bc', which consists of one to four HTML - colors, separated by spaces. If there is just - one color, it applies to all four sides. If - there are two, the first is for top and bottom, - the second for left and right. If there are - three, they are for top, left and right, and - bottom. - -> border-width :: (send an-mx-element border-width) - - Retrieves a list of one to four elements, each - of which is either a css-length, or a symbol - from '(medium thin thick). If only one width is - given, it applies to all four sides. If two are - given, the first is for top and bottom, the - second for left and right. If three are given, - the first is for top, the second for left and - right, the third for bottom. - -> border-width-native :: (send an-mx-element border-width-native) - - Retrieves a string describing the CSS - border-width for the element. The string - contains one to four substrings, each of which - is either a CSS length, or a string from - '("medium" "thin" "thick"). If only one width - is given, it applies to all four sides. If two - are given, the first is for top and bottom, the - second for left and right. If three are given, - the first is for top, the second for left and - right, the third for bottom. - -> set-border-width! :: (send an-mx-element set-border-width! bw) - - Sets the element's CSS border-color using the - list `bw', which may contain one to four - elements, each of which is either a css-length, - or a symbol from '(thin medium thick). If only - one width is given, it applies to all four - sides. If two are given, the first is for top - and bottom, the second for left and right. If - three are given, the first is for top, the - second for left and right, the third for bottom. - -> set-border-width-native! :: (send an-mx-element set-border-width-native! bw) - - Sets the element's CSS border-color using the - string `bw', which consists of one to four - space-separated substrings, each of which is - either a CSS length or a string from '("thin" - "medium" "thick"). If only one width is given, - it applies to all four sides. If two are given, - the first is for top and bottom, the second for - left and right. If three are given, the first - is for top, the second for left and right, the - third for bottom. - -> border-style :: (send an-mx-element border-style) - - Retrieves a symbol describing the CSS - border-style for the element. The symbol is - from '(none dotted dashed solid double groove - ridge inset outset). - -> border-style-native :: (send an-mx-element border-style-native) - - Retrieves a string describing the CSS - border-style for the element. The string is - from '("none" "dotted" "dashed" "solid" "double" - "groove" "ridge" "inset" "outset"). - -> set-border-style! :: (send an-mx-element set-border-style! bs) - - Sets the element's CSS border-style using the - symbol `bs', which is from '(none dotted dashed - solid double groove ridge inset outset). - -> set-border-style-native! :: (send an-mx-element set-border-style-native! bs) - - Sets the element's CSS border-style using the - string `bs', which is from '("none" "dotted" - "dashed" "solid" "double" "groove" "ridge" - "inset" "outset"). - -> border-top-style :: (send an-mx-element border-top-style) - - Retrieves a symbol describing the CSS - border-top-style for the element. See - border-style for possible values. - -> border-top-style-native :: (send an-mx-element border-top-style-native) - - Retrieves a string describing the CSS - border-top-style for the element. See - border-style-native for possible values. - -> set-border-top-style! :: (send an-mx-element set-border-top-style! bts) - - Sets the element's CSS border-top-style using - the symbol `bts'. See set-border-style! for - possible values. - -> set-border-top-style-native! :: (send an-mx-element set-border-top-style-native! bts) - - Sets the element's CSS border-top-style using - the string `bts'. See set-border-style-native! - for possible values. - -> border-bottom-style :: (send an-mx-element border-bottom-style) - - Retrieves a symbol describing the CSS - border-bottom-style for the element. See - border-style for possible values. - -> border-bottom-style-native :: (send an-mx-element border-bottom-style-native) - - Retrieves a string describing the CSS - border-bottom-style for the element. See - border-style-native for possible values. - -> set-border-bottom-style! :: (send an-mx-element set-border-bottom-style! bbs) - - Sets the element's CSS border-bottom-style using - the symbol `bbs'. See set-border-style! for - possible values. - -> set-border-bottom-style-native! :: (send an-mx-element set-border-bottom-style-native! bbs) - - Sets the element's CSS border-bottom-style using - the string `bbs'. See set-border-style-native! - for possible values. - -> border-left-style :: (send an-mx-element border-left-style) - - Retrieves a symbol describing the CSS - border-left-style for the element. See - border-style for possible values. - -> border-left-style-native :: (send an-mx-element border-left-style-native) - - Retrieves a string describing the CSS - border-left-style for the element. See - border-style-native for possible values. - -> set-border-left-style! :: (send an-mx-element set-border-left-style! bls) - - Sets the element's CSS border-left-style using - the string `bls'. See set-border-style! for - possible values. - -> set-border-left-style-native! :: (send an-mx-element set-border-left-style-native! bls) - - Sets the element's CSS border-left-style using - the string `bls'. See set-border-style-native! - for possible values. - -> border-right-style :: (send an-mx-element border-right-style) - - Retrieves a symbol describing the CSS - border-right-style for the element. See - border-style for possible values. - -> border-right-style-native :: (send an-mx-element border-right-style-native) - - Retrieves a string describing the CSS - border-right-style for the element. See - border-style-native for possible values. - -> set-border-right-style! :: (send an-mx-element set-border-right-style! brs) - - Sets the element's CSS border-right-style using - the symbol `brs'. See set-border-style! for - possible values. - -> set-border-right-style! :: (send an-mx-element set-border-right-style! brs) - - Sets the element's CSS border-right-style using - the string `brs'. See set-border-style-native! - for possible values. - -> style-float :: (send an-mx-element style-float) - - Retrieves a symbol describing the CSS - style-float for the element, one of '(none left - right). - -> style-float-native :: (send an-mx-element style-float-native) - - Retrieves a string describing the CSS - style-float for the element, one of '("none" - "left" "right"). - -> set-style-float! :: (send an-mx-element set-style-float! sf) - - Sets the element's CSS style-float using the - symbol `sf', which is one of '(none left right). - -> set-style-float-native! :: (send an-mx-element set-style-float-native! sf) - - Sets the element's CSS style-float using the - string `sf', which is one of '("none" "left" - "right"). - -> clear :: (send an-mx-element clear) - - Retrieves a symbol describing the CSS clear for - the element, which is one of '(none left right - both). - -> clear-native :: (send an-mx-element clear-native) - - Retrieves a string describing the CSS clear for - the element, which is one of '("none" "left" - "right" "both"). - -> set-clear! :: (send an-mx-element set-clear! clr) - - Sets the element's CSS clear using the symbol - `clr', which is one of '(none left right both). - -> set-clear-native! :: (send an-mx-element set-clear-native! clr) - - Sets the element's CSS clear using the string - `clr', which is one of '("none" "left" "right" - "both"). - -> display :: (send an-mx-element display) - - Retrieves a symbol describing the CSS clear for - the element, which is one of '(block none inline - list-item table-header-group - table-footer-group). - -> display-native :: (send an-mx-element display-native) - - Retrieves a string describing the CSS clear for - the element, which is one of '("block" "none" - "inline" "list-item" "table-header-group" - "table-footer-group"). - -> set-display! :: (send an-mx-element set-display! dpy) - - Sets the element's CSS display using the symbol - `dpy', which is one of '(block none inline - list-item table-header-group - table-footer-group). - -> set-display-native! :: (send an-mx-element set-display-native! dpy) - - Sets the element's CSS display using the string - `dpy', which is one of '("block" "none" "inline" - "list-item" "table-header-group" - "table-footer-group"). - -> visibility :: (send an-mx-element visibility) - - Retrieves a symbol describing the CSS visibility - for the element, which is one of '(inherit - visible hidden). - -> visibility-native :: (send an-mx-element visibility-native) - - Retrieves a string describing the CSS visibility - for the element, which is one of '("inherit" - "visible" "hidden"). - -> set-visibility! :: (send an-mx-element set-visibility! vis) - - Sets the element's CSS visibility using the - symbol `vis', which is one of '(inherit visible - hidden). - -> set-visibility-native! :: (send an-mx-element set-visibility-native! vis) - - Sets the element's CSS visibility using the - string `vis', which is one of '("inherit" - "visible" "hidden"). - -> list-style-type :: (send an-mx-element list-style-type) - - Retrieves a symbol describing the CSS - list-style-type for the element, one of '(disc - circle square decimal lower-roman upper-roman - lower-alpha upper-alpha none). - -> list-style-type-native :: (send an-mx-element list-style-type-native) - - Retrieves a string describing the CSS - list-style-type for the element, one of '("disc" - "circle" "square" "decimal" "lower-roman" - "upper-roman" "lower-alpha" "upper-alpha" - "none"). - -> set-list-style-type! :: (send an-mx-element set-list-style-type! sty) - - Sets the element's CSS list-style-type using the - symbol `sty', which is one of '(disc circle - square decimal lower-roman upper-roman - lower-alpha upper-alpha none). - -> set-list-style-type-native! :: (send an-mx-element set-list-style-type-native! lst) - - Sets the element's CSS list-style-type using the - string `sty', which is one of '("disc" "circle" - "square" "decimal" "lower-roman" "upper-roman" - "lower-alpha" "upper-alpha" "none"). - -> list-style-position :: (send an-mx-element list-style-position) - - Retrieves a symbol describing the CSS - list-style-position for the element, one of - '(outside inside). - -> list-style-position-native :: (send an-mx-element list-style-position-native) - - Retrieves a string describing the CSS - list-style-position for the element, one of - '("outside" "inside"). - -> set-list-style-position! :: (send an-mx-element set-list-style-position! pos) - - Sets the element's CSS list-style-position using - the symbol `pos', which is one of '(outside - inside). - -> set-list-style-position-native! :: (send an-mx-element set-list-style-position-native! pos) - - Sets the element's CSS list-style-position using - the string `pos', which is one of '("outside" - "inside"). - -> list-style-image :: (send an-mx-element list-style-image) - - Retrieves a string describing the CSS - list-style-image for the element, which is - either "none" or a URL. - -> list-style-image-native :: (send an-mx-element list-style-image-native) - - Retrieves a string describing the CSS - list-style-image for the element, which is - either "none" or of the form "url(url-string)". - -> set-list-style-image! :: (send an-mx-element set-list-style-image! image) - - Sets the element's CSS list-style-image using - the string `image', which is either "none" or a - URL. - -> set-list-style-image-native! :: (send an-mx-element set-list-style-image-native! image) - - Sets the element's CSS list-style-image using - the string `image', which is either "none" or of - the form "url(url-string)". - -> list-style :: (send an-mx-element list-style) - - Retrieves a list of one to three values - describing the CSS list-style for the element. - Each value in the list is as the values returned - by the methods list-style-type, - list-style-position, and list-style-image. The - values may appear in any order. - -> list-style-native :: (send an-mx-element list-style-native) - - Retrieves a string with one to three substrings - describing the CSS list-style for the element. - Each substring is of the form of the strings - returned by the methods list-style-type-native, - list-style-position-native, and - list-style-image-native. The substrings may - appear in any order. - -> set-list-style! :: (send an-mx-element set-list-style! ls) - - Sets the element's CSS list-style using the list - `ls', which contains one to three elements, each - of which is of the form of the possible - arguments to set-list-style-type!, - set-list-style-image!, and - set-list-style-position!. - -> set-list-style-native! :: (send an-mx-element set-list-style-native! ls) - - Sets the element's CSS list-style using the - string `ls', which contains one to three - space-separated substrings. Each substring is - of the form of the possible arguments to - set-list-style-type-native!, - set-list-style-image-native!, and - set-list-style-position-native!. - -> position :: (send an-mx-element position) - - Retrieves a symbol describing the CSS position - for the element, which is one of '(absolute - relative static). - -> position-native :: (send an-mx-element position-native) - - Retrieves a string describing the CSS position - for the element, which is one of '("absolute" - "relative" "static"). - -> overflow :: (send an-mx-element overflow) - - Retrieves a symbol describing the CSS overflow - for the element, which is one of '(visible - scroll hidden auto). - -> overflow-native :: (send an-mx-element overflow-native) - - Retrieves a string describing the CSS overflow - for the element, which is one of '("visible" - "scroll" "hidden" "auto"). - -> set-overflow! :: (send an-mx-element set-overflow! of) - - Sets the element's CSS overflow using the symbol - `of', which is one of '(visible scroll hidden - auto). - -> set-overflow-native! :: (send an-mx-element set-overflow-native! of) - - Sets the element's CSS overflow using the string - `of', which is one of '("visible" "scroll" - "hidden" "auto"). - -> pagebreak-before :: (send an-mx-element pagebreak-before) - - Retrieves a symbol describing the CSS - pagebreak-before for the element, which is one - of '(always auto none). - -> pagebreak-before-native :: (send an-mx-element pagebreak-before-native) - - Retrieves a string describing the CSS - pagebreak-before for the element, which is one - of '("always" "auto" ""). Note that unlike most - other "-native" properties, the empty string - does not mean the property has not been set. - -> set-pagebreak-before! :: (send an-mx-element set-pagebreak-before! pbb) - - Sets the element's CSS pagebreak-before using - the symbol `pbb', which is one of '(always auto - none). - -> set-pagebreak-before-native! :: (send an-mx-element set-pagebreak-before-native! pbb) - - Sets the element's CSS pagebreak-before using - the string `pbb', which is one of '("always" - "auto" ""). Note that the empty string is a - valid value. - -> pagebreak-after :: (send an-mx-element pagebreak-after) - - Retrieves a symbol describing the CSS - pagebreak-after for the element, which is one of - '(always auto none). - -> pagebreak-after-native :: (send an-mx-element pagebreak-after-native) - - Retrieves a string describing the CSS - pagebreak-after for the element, which is one of - '("always" "auto" ""). Note that unlike most - other "-native" properties, the empty string - does not mean the property has not been set. - -> set-pagebreak-after! :: (send an-mx-element set-pagebreak-after! pba) - - Sets the element's CSS pagebreak-after using the - symbol `pbb', which is one of '(always auto - none). - -> set-pagebreak-after-native! :: (send an-mx-element set-pagebreak-after-native! pba) - - Sets the element's CSS pagebreak-after using the - string `pbb', which is one of '("always" "auto" - ""). Note that the empty string is a valid - value. - -> css-text-native :: (send an-mx-element css-text-native) - - Retrieves a string describing the CSS text for - the element. - -> set-css-text-native! :: (send an-mx-element set-css-text-native! txt) - - Sets the element's CSS text using the string - `txt'. - -> cursor :: (send an-mx-element cursor) - - Retrieves a symbol describing the CSS cursor for - the element, one of '(auto crosshair default - hand move n-resize ne-resize nw-resize s-resize - se-resize sw-resize e-resize w-resize text wait - help). - -> cursor-native :: (send an-mx-element cursor-native) - - Retrieves a string describing the CSS cursor for - the element, one of '("auto" "crosshair" - "default" "hand" "move" "n-resize" "ne-resize" - "nw-resize" "s-resize" "se-resize" "sw-resize" - "e-resize" "w-resize" "text" "wait" "help"). - -> set-cursor! :: (send an-mx-element set-cursor! csr) - - Sets the element's CSS cursor using the symbol - `csr', which is one of '(auto crosshair default - hand move n-resize ne-resize nw-resize s-resize - se-resize sw-resize e-resize w-resize text wait - help). - -> set-cursor-native! :: (send an-mx-element set-cursor-native! csr) - - Sets the element's CSS cursor using the string - `csr', which is one of '("auto" "crosshair" - "default" "hand" "move" "n-resize" "ne-resize" - "nw-resize" "s-resize" "se-resize" "sw-resize" - "e-resize" "w-resize" "text" "wait" "help"). - -> clip :: (send an-mx-element clip) - - Retrieves a value describing the CSS clip for - the element. The value is either 'auto, or a - list of four values for the top, right, bottom, - and left edges. In the list, each value is - either 'auto or a css-length. - -> clip-native :: (send an-mx-element clip-native) - - Retrieves a string describing the CSS clip for - the element. The string is either "auto" or of - the form "rect(top right bottom left)", where - the edges are either "auto" or CSS lengths. - -> set-clip! :: (send an-mx-element set-clip! clp) - - Sets the element's CSS clip using the value - `clp'. The value is either 'auto, or a list of - four values for the top, right, bottom, and left - edges. In the list, each value is either 'auto - or a css-length. - -> set-clip-native! :: (send an-mx-element set-clip-native! clp) - - Sets the element's CSS clip using the string - `clp'. The string is either "auto" or of the - form "rect(top right bottom left)", where the - edges are either "auto" or CSS lengths. - -> filter :: (send an-mx-element filter) - - Retrieves a list describing the CSS filter for - the element. The list is of the form - (filter-name (opt val) ...). See the method - set-filter! for the filters and their options. - -> filter-native :: (send an-mx-element filter-native) - - Retrieves a string describing the CSS filter for - the element. The string is of the form - "filter-name(opt=val,...)" or simply - "filter-name". See the Internet Explorer SDK - for more information about filters and their - options. - -> set-filter! :: (send an-mx-element set-filter! flt opt ...) - - Sets the element's CSS filter using the `flt', - which is a symbol. Each option `opt' is a pair - consisting of a symbol and a value. For all filters, - any of its options may be omitted. The filters and - their options are - - filter option value - ----- ------ ----- - alpha enabled boolean - finish-opacity n exact, 0 <= n <= 100 - opacity n exact, 0 <= n <= 100 - start-x exact number - start-y exact number - finish-x exact number - finish-y exact number - style in '(uniform linear - radial rectangular) - blend-trans enable boolean - duration number - status in '(stopped applied playing) - blur add boolean - enabled boolean - direction in '(0 45 90 135 180 - 225 270 315) - strength exact n, 1 <= n <= 100 - chroma enabled boolean - color RGB string - drop-shadow enabled boolean - off-x exact number - off-y exact number - flip-horizontal enabled boolean - flip-vertical enabled boolean - glow enabled boolean - color RGB string - strength exact n, 1 <= n <= 100 - gray enabled boolean - invert enabled boolean - light enabled boolean - mask enabled boolean - color RGB string - redirect enabled boolean - reveal-trans enabled boolean - duration number - status in '(stopped applied playing) - shadow enabled boolean - color RGB string - direction in '(0 45 90 135 180 - 225 270 315) - wave enabled boolean - freq number n, n >= 0 - light-strength exact n, 1 <= n <= 100 - x-ray enabled boolean - -> set-filter-native! :: (send an-mx-element set-filter-native! flt) - - Sets the element's CSS filter using the string - `flt'. The string is of the form - "filter-name(opt=val,...)" or simply - "filter-name". See the Internet Explorer SDK - for more information on filters and their - options. - -> style-string :: (send an-mx-element style-string) - - Retrieves a string describing the complete CSS - description for the element. - -> text-decoration-none :: (send an-mx-element text-decoration-none) - - Retrieves the CSS text-decoration-none, a - boolean value, for the element. - -> set-text-decoration-none! :: (send an-mx-element set-text-decoration-none! tdn) - - Sets the element's CSS text-decoration-none - using `tdn'. If `tdn' is @scheme[#f], the value is - false, otherwise it is considered true. - -> text-decoration-underline :: (send an-mx-element text-decoration-underline) - - Retrieves the CSS text-decoration-underline, a - boolean value, for the element. - -> set-text-decoration-underline! :: (send an-mx-element set-text-decoration-underline! tdu) - - Sets the element's CSS text-decoration-underline - using `tdu'. If `tdn' is @scheme[#f], the value is - false, otherwise it is considered true. - -> text-decoration-overline :: (send an-mx-element text-decoration-overline) - - Retrieves the CSS text-decoration-overline, a - boolean value, for the element. - -> set-text-decoration-overline! :: (send an-mx-element set-text-decoration-overline! tdo) - - Sets the element's CSS text-decoration-overline - using `tdo'. If `tdn' is @scheme[#f], the value is - false, otherwise it is considered true. - -> text-decoration-linethrough :: (send an-mx-element text-decoration-linethrough) - - Retrieves the CSS text-decoration-linethrough, a - boolean value, for the element. - -> set-text-decoration-linethrough! :: (send an-mx-element set-text-decoration-linethrough! tdlt) - - Sets the element's CSS - text-decoration-linethrough using `tdlt'. If - `tdn' is @scheme[#f], the value is false, otherwise it is - considered true. - -> text-decoration-blink :: (send an-mx-element text-decoration-blink) - - Retrieves the CSS text-decoration-blink, a - boolean value, for the element. - -> set-text-decoration-blink! :: (send an-mx-element set-text-decoration-blink! bl) - - Sets the element's CSS text-decoration-blink - using `bl'. If `tdn' is @scheme[#f], the value is false, - otherwise it is considered true. - -> pixel-top :: (send an-mx-element pixel-top) - - Retrieves the CSS pixel-top, an integer, for the - element. - -> set-pixel-top! :: (send an-mx-element set-pixel-top! pt) - - Sets the element's CSS pixel-top using `pt', - which is an integer. - -> pixel-left :: (send an-mx-element pixel-left) - - Retrieves the CSS pixel-left, an integer, for - the element. - -> set-pixel-left! :: (send an-mx-element set-pixel-left! pl) - - Sets the element's CSS pixel-left using `pl', - which is an integer. - -> pixel-width :: (send an-mx-element pixel-width) - - Retrieves the CSS pixel-width, an integer, for - the element. - -> set-pixel-width! :: (send an-mx-element set-pixel-width! pw) - - Sets the element's CSS pixel-width using `pw', - which is an integer. - -> pixel-height :: (send an-mx-element pixel-height) - - Retrieves the CSS pixel-height, an integer, for - the element. - -> set-pixel-height! :: (send an-mx-element set-pixel-height! ph) - - Sets the element's CSS pixel-height using `ph', - which is an integer. - -> pos-top :: (send an-mx-element pos-top) - - Retrieves the CSS pos-top, an inexact number, - for the element. - -> set-pos-top! :: (send an-mx-element set-pos-top! pt) - - Sets the element's CSS pos-top using `pt', which - is an inexact number. - -> pos-left :: (send an-mx-element pos-left) - - Retrieves the CSS pos-left, an inexact number, - for the element. - -> set-pos-left! :: (send an-mx-element set-pos-left! pl) - - Sets the element's CSS pos-left using `pl', - which is an inexact number. - -> pos-width :: (send an-mx-element pos-width) - - Retrieves the CSS pos-width, an inexact number, - for the element. - -> set-pos-width! :: (send an-mx-element set-pos-width! pw) - - Sets the element's CSS pos-width using `pw', - which is an inexact number. - -> pos-height :: (send an-mx-element pos-height) - - Retrieves the CSS pos-height, an inexact number, - for the element. - -> set-pos-height! :: (send an-mx-element set-pos-height! ph) - - Sets the element's CSS pos-height using `ph', - which is an inexact number. - -> color :: (send an-mx-element color) - - Retrieves the CSS color for the element, either - a symbol indicating the name of a color, or an - RGB string. - -> color-native :: (send an-mx-element color-native) - - Retrieves a string indicating the CSS color for - the element. The string either names a color or - is an RGB string. - -> set-color! :: (send an-mx-element set-color! col) - - Sets the element's CSS color using `col', which - may be a string indicating a color name, an - integer describing an RGB value, or a string - encoding an RGB value. - -> set-color-native! :: (send an-mx-element set-color-native! col) - - Sets the element's CSS color using the string - `col', which may be a color name or an RGB - string. - -> background-color :: (send an-mx-element background-color) - - Retrieves a string indicating the CSS - background-color for the element. The string - either names a color or is an RGB string. - -> background-color-native :: (send an-mx-element background-color-native) - - Retrieves a string indicating the CSS - background-color for the element. The string - either names a color or is an RGB string. - -> set-background-color! :: (send an-mx-element set-background-color! bc) - - Sets the element's CSS background-color using - `bc', which may be a string indicating a color - name, an integer describing an RGB value, or a - string encoding an RGB value. - -> set-background-color-native! :: (send an-mx-element set-background-color-native! bc) - - Sets the element's CSS background-color using - the string `bc', which may be a color name or an - RGB string. - -> background-position-x :: (send an-mx-element background-position-x) - - Retrieves the CSS background-position-x for the - element. The value is either a css-length, a - css-percentage, or a symbol in '(left center - right). - -> background-position-x-native :: (send an-mx-element background-position-x-native) - - Retrieves the CSS background-position-x for the - element, a string which is either a CSS length, - a CSS percentage, or in '("left" "center" - "right"). - -> set-background-position-x! :: (send an-mx-element set-background-position-x! bpx) - - Sets the element's background-position-x using - `bpx', which is either a css-length, a - css-percentage, or a symbol in '(left center - right). - -> set-background-position-x-native! :: (send an-mx-element set-background-position-x-native! bpx) - - Sets the element's background-position-x using - the string `bpx', which is either a CSS length, - a CSS percentage, or one of '("left" "center" - "right"). - -> background-position-y :: (send an-mx-element background-position-y) - - Retrieves the CSS background-position-y for the - element. The value is either a css-length, a - css-percentage, or a symbol in '(top center - bottom). - -> background-position-y-native :: (send an-mx-element background-position-y-native) - - Retrieves the CSS background-position-y for the - element, a string which is either a CSS length, - a CSS percentage, or in '("top" "center" - "bottom"). - -> set-background-position-y! :: (send an-mx-element set-background-position-y! bpy) - - Sets the element's background-position-y using - `bpy', which is either a css-length, a - css-percentage, or a symbol in '(top center - bottom). - -> set-background-position-y-native! :: (send an-mx-element set-background-position-y-native! bpy) - - Sets the element's background-position-y using - the string `bpy', which is either a CSS length, - a CSS percentage, or one of '("top" "center" - "bottom"). - -> letter-spacing :: (send an-mx-element letter-spacing) - - Retrieves the CSS letter-spacing for the - element, either a css-length or 'normal. - -> letter-spacing-native :: (send an-mx-element letter-spacing-native) - - Retrieves the CSS letter-spacing for the - element. The value is a string that is either a - CSS length or "normal". - -> set-letter-spacing! :: (send an-mx-element set-letter-spacing! ls) - - Sets the element's letter-spacing using `ls', - which is either a css-length or 'normal. - -> set-letter-spacing-native! :: (send an-mx-element set-letter-spacing-native! ls) - - Sets the element's letter-spacing using the - string `ls', which is either a CSS length or - "normal". - -> vertical-align :: (send an-mx-element vertical-align) - - Retrieves the CSS vertical-align for the - element. The value is a symbol in '(baseline - sub super top middle bottom text-top text-bottom - ). - -> vertical-align-native :: (send an-mx-element vertical-align-native) - - Retrieves the CSS vertical-align for the - element. The value is a string in '("baseline" - "sub" "super" "top" "middle" "bottom" "text-top" - "text-bottom"). - -> set-vertical-align! :: (send an-mx-element set-vertical-align! va) - - Sets the element's CSS vertical-align using - `va', which is a symbol in '(baseline sub super - top middle bottom text-top text-bottom ). - -> set-vertical-align-native! :: (send an-mx-element set-vertical-align-native! va) - - Sets the element's letter-spacing using `va', - which is a string in '("baseline" "sub" "super" - "top" "middle" "bottom" "text-top" - "text-bottom"). - -> text-indent :: (send an-mx-element text-indent) - - Retrieves the CSS text-indent for the element. - The value is either a css-length or a - css-percentage. - -> text-indent-native :: (send an-mx-element text-indent-native) - - Retrieves the CSS text-indent for the element. - The value is a string that is either a CSS - length or a CSS percentage. - -> set-text-indent! :: (send an-mx-element set-text-indent! ti) - - Sets the element's text-indent using `ti', which - is either a css-length a css-percentage. - -> set-text-indent-native! :: (send an-mx-element set-text-indent-native! ti) - - Sets the element's text-indent using the string - `ti', which is either a CSS length or a CSS - percentage. - -> line-height :: (send an-mx-element line-height) - - Retrieves the CSS line-height for the element. - The value is either a css-length, a - css-percentage, or 'normal. - -> line-height-native :: (send an-mx-element line-height-native) - - Retrieves the CSS line-height for the element. - The value is a string that is either a CSS - length, a CSS percentage, or "normal". - -> set-line-height! :: (send an-mx-element set-line-height! lh) - - Sets the element's line-height using `lh', which - is either a css-length, a css-percentage, or - 'normal. - -> set-line-height-native! :: (send an-mx-element set-line-height-native! lh) - - Sets the element's line-height using the string - `lh', which is either a CSS length, a CSS - percentage, or "normal". - -> margin-top :: (send an-mx-element margin-top) - - Retrieves the CSS margin-top for the element. - The value is a css-length, a css-percentage, or - 'auto. - -> margin-top-native :: (send an-mx-element margin-top-native) - - Retrieves the CSS margin-top for the element. - The value is a string that is a CSS length, a - CSS percentage, or "auto". - -> set-margin-top! :: (send an-mx-element set-margin-top! mt) - - Sets the element's margin-top using `mt', which - is a css-length, a css-percentage, or 'auto. - -> set-margin-top-native! :: (send an-mx-element set-margin-top-native! mt) - - Sets the element's margin-top using the string - `mt', which is a CSS length, a CSS percentage, - or "auto". - -> margin-bottom :: (send an-mx-element margin-bottom) - - Retrieves the CSS margin-bottom for the element. - The value is a css-length, a css-percentage, or - 'auto. - -> margin-bottom-native :: (send an-mx-element margin-bottom-native) - - Retrieves the CSS margin-bottom for the element. - The value is a string that is a CSS length, a - CSS percentage, or "auto". - -> set-margin-bottom! :: (send an-mx-element set-margin-bottom! mb) - - Sets the element's margin-bottom using `mb', - which is a css-length, a css-percentage, or - 'auto. - -> set-margin-bottom-native! :: (send an-mx-element set-margin-bottom-native! mb) - - Sets the element's margin-bottom using the - string `mb', which is a CSS length, a CSS - percentage, or "auto". - -> margin-left :: (send an-mx-element margin-left) - - Retrieves the CSS margin-left for the element. - The value is a css-length, a css-percentage, or - 'auto. - -> margin-left-native :: (send an-mx-element margin-left-native) - - Retrieves the CSS margin-left for the element. - The value is a string that is a CSS length, a - CSS percentage, or "auto". - -> set-margin-left! :: (send an-mx-element set-margin-left! ml) - - Sets the element's margin-left using `ml', which - is a css-length, a css-percentage, or 'auto. - -> set-margin-left-native! :: (send an-mx-element set-margin-left-native! ml) - - Sets the element's margin-left using the string - `ml', which is a CSS length, a CSS percentage, - or "auto". - -> margin-right :: (send an-mx-element margin-right) - - Retrieves the CSS margin-right for the element. - The value is a css-length, a css-percentage, or - 'auto. - -> margin-right-native :: (send an-mx-element margin-right-native) - - Retrieves the CSS margin-right for the element. - The value is a string that is a CSS length, a - CSS percentage, or "auto". - -> set-margin-right! :: (send an-mx-element set-margin-right! mr) - - Sets the element's margin-right using `mr', - which is a css-length, a css-percentage, or - 'auto. - -> set-margin-right-native! :: (send an-mx-element set-margin-right-native! mr) - - Sets the element's margin-right using the string - `mr', which is a CSS length, a CSS percentage, - or "auto". - -> padding-top :: (send an-mx-element padding-top) - - Retrieves the CSS padding-top for the element. - The value is a css-length or css-percentage. - -> padding-top-native :: (send an-mx-element padding-top-native) - - Retrieves the CSS padding-top for the element. - The value is a string that is a CSS length or - CSS percentage. - -> set-padding-top! :: (send an-mx-element set-padding-top! pt) - - Sets the element's padding-top using `pt', which - is either a css-length or a css-percentage. - -> set-padding-top-native! :: (send an-mx-element set-padding-top-native! pt) - - Sets the element's padding-top using `pt', a - string that is either a CSS length or a CSS - percentage. - -> padding-bottom :: (send an-mx-element padding-bottom) - - Retrieves the CSS padding-bottom for the - element. The value is a css-length or a - css-percentage. - -> padding-bottom-native :: (send an-mx-element padding-bottom-native) - - Retrieves the CSS padding-bottom for the - element. The value is a string that is a CSS - length or a CSS percentage. - -> set-padding-bottom! :: (send an-mx-element set-padding-bottom! pb) - - Sets the element's padding-bottom using `pb', - which is either a css-length or a - css-percentage. - -> set-padding-bottom-native! :: (send an-mx-element set-padding-bottom-native! pb) - - Sets the element's padding-bottom using `pb', a - string that is either a CSS length or a CSS - percentage. - -> padding-left :: (send an-mx-element padding-left) - - Retrieves the CSS padding-left for the element. - The value is a css-length or a css-percentage. - -> padding-left-native :: (send an-mx-element padding-left-native) - - Retrieves the CSS padding-left for the element. - The value is a string that is a CSS length or a - CSS percentage. - -> set-padding-left! :: (send an-mx-element set-padding-left! pl) - - Sets the element's padding-left using `pl', - which is either a css-length or a - css-percentage. - -> set-padding-left-native! :: (send an-mx-element set-padding-left-native! pl) - - Sets the element's padding-left using `pl', a - string that is either a CSS length or a CSS - percentage. - -> padding-right :: (send an-mx-element padding-right) - - Retrieves the CSS padding-right for the element. - The value is a css-length or a css-percentage. - -> padding-right-native :: (send an-mx-element padding-right-native) - - Retrieves the CSS padding-right for the element. - The value is a string that is a CSS length or a - CSS percentage. - -> set-padding-right! :: (send an-mx-element set-padding-right! pr) - - Sets the element's padding-right using `pr', - which is either a css-length or a - css-percentage. - -> set-padding-right-native! :: (send an-mx-element set-padding-right-native! pr) - - Sets the element's padding-right using `pr', - which is either a CSS length or a CSS - percentage. - -> border-top-color :: (send an-mx-element border-top-color) - - Retrieves the CSS border-top-color for the - element. The value is either a symbol - indicating a color name or an RGB string. - -> border-top-color-native :: (send an-mx-element border-top-color-native) - - Retrieves a string indicating the CSS - border-top-color for the element. The string is - either the name of a color or an RGB string. - -> set-border-top-color! :: (send an-mx-element set-border-top-color! btc) - - Sets the element's border-top-color using the - string `btc', which is either a symbol - indicating the name of a color or an RGB string. - -> set-border-top-color-native! :: (send an-mx-element set-border-top-color-native! btc) - - Sets the element's border-top-color using the - string `btc', which is either the name of a - color or an RGB string. - -> border-bottom-color :: (send an-mx-element border-bottom-color) - - Retrieves the CSS border-bottom-color for the - element. The value is either a symbol - indicating a color name or an RGB string. - -> border-bottom-color-native :: (send an-mx-element border-bottom-color-native) - - Retrieves the CSS border-bottom-color for the - element. The value is a string that is either a - color name or an RGB string. - -> set-border-bottom-color! :: (send an-mx-element set-border-bottom-color! btc) - - Sets the element's border-bottom-color using - `btc', which either a symbol indicating a color - name, or an RGB string. - -> set-border-bottom-color-native! :: (send an-mx-element set-border-bottom-color-native! btc) - - Sets the element's border-bottom-color using - `btc', a string that is either a color name or - an RGB string. - -> border-left-color :: (send an-mx-element border-left-color) - - Retrieves the CSS border-left-color for the - element. The value is either a symbol - indicating a color name or an RGB string. - -> border-left-color-native :: (send an-mx-element border-left-color-native) - - Retrieves the CSS border-left-color for the - element. The value is a string that is either a - color name or RGB string. - -> set-border-left-color! :: (send an-mx-element set-border-left-color! btc) - - Sets the element's border-left-color using - `btc', which is either a symbol indicating a - color name or an RGB string. - -> set-border-left-color-native! :: (send an-mx-element set-border-left-color-native! btc) - - Sets the element's border-left-color using the - string `btc', which is either a color name or - RGB string. - -> border-right-color :: (send an-mx-element border-right-color) - - Retrieves the CSS border-right-color for the - element. The value is either a symbol - indicating a color name or an RGB string. - -> border-right-color-native :: (send an-mx-element border-right-color-native) - - Retrieves the CSS border-right-color for the - element. The value is a string indicating a - color name or an RGB string. - -> set-border-right-color! :: (send an-mx-element set-border-right-color! btc) - - Sets the element's border-right-color using - `btc', which is either a symbol indicating a - color name or an RGB string. - -> set-border-right-color-native! :: (send an-mx-element set-border-right-color-native! btc) - - Sets the element's border-right-color using the - string `btc', which is either a color name or - RGB string. - -> border-top-width :: (send an-mx-element border-top-width) - - Retrieves a value describing the CSS - border-top-width for the element. The value is - either a css-length or a symbol, one of '(medium - thin thick). - -> border-top-width-native :: (send an-mx-element border-top-width-native) - - Retrieves a string describing the CSS - border-top-width for the element. The string is - either a CSS length or one of '("medium" "thin" - "thick"). - -> set-border-top-width! :: (send an-mx-element set-border-top-width! btw) - - Sets the element's CSS border-top-width using - `btw', which is either a css-length, or a symbol - in '(thin medium thick). - -> set-border-top-width-native! :: (send an-mx-element set-border-top-width-native! btw) - - Sets the element's CSS border-top-width using - the string `btw', which is either a CSS length, - or in '("thin" "medium" "thick"). - -> border-bottom-width :: (send an-mx-element border-bottom-width) - - Retrieves a value describing the CSS - border-bottom-width for the element. The value - is either a css-length or a symbol in '(medium - thin thick). - -> border-bottom-width-native :: (send an-mx-element border-bottom-width-native) - - Retrieves a string describing the CSS - border-bottom-width for the element. The string - is either a CSS length or in '("thin" "medium" - "thick"). - -> set-border-bottom-width! :: (send an-mx-element set-border-bottom-width! bbw) - - Sets the element's CSS border-bottom-width using - the value `bbw', which is either a css-length, - or a symbol in '(thin medium thick). - -> set-border-bottom-width-native! :: (send an-mx-element set-border-bottom-width-native! bbw) - - Sets the element's CSS border-bottom-width using - the string `bbw', which is either a CSS length - or in '("thin" "medium" "thick"). - -> border-left-width :: (send an-mx-element border-left-width) - - Retrieves a value describing the CSS - border-left-width for the element. The value is - either a css-length or a symbol in '(thin medium - thick). - -> border-left-width-native :: (send an-mx-element border-left-width-native) - - Retrieves a string describing the CSS - border-left-width for the element. The string - is either a CSS length or in '("thin" "medium" - "thick"). - -> set-border-left-width! :: (send an-mx-element set-border-left-width! blw) - - Sets the element's CSS border-left-width using - `blw', which is either a css-length or a symbol - in '(thin medium thick). - -> set-border-left-width-native! :: (send an-mx-element set-border-left-width-native! blw) - - Sets the element's CSS border-left-width using - the string `blw', which is either a CSS length - or in '("thin" "medium" "thick"). - -> border-right-width :: (send an-mx-element border-right-width) - - Retrieves a value describing the CSS - border-right-width for the element. The value - is either a css-length or a symbol in '(thin - medium thick). - -> border-right-width-native :: (send an-mx-element border-right-width-native) - - Retrieves a string describing the CSS - border-right-width for the element. The string - is either a CSS length or in '("thin" "medium" - "thick"). - -> set-border-right-width! :: (send an-mx-element set-border-right-width! brw) - - Sets the element's CSS border-right-width using - `brw', which is either a css-length or a symbol - in '(thin medium thick). - -> set-border-right-width-native! :: (send an-mx-element set-border-right-width-native! brw) - - Sets the element's CSS border-right-width using - the string `brw', which is either a CSS length - or in '("thin" "medium" "thick"). - -> width :: (send an-mx-element width) - - Retrieves a value describing the CSS width for - the element. The value is a css-length, a - css-percentage, or 'auto. - -> width-native :: (send an-mx-element width-native) - - Retrieves a string describing the CSS width for - the element. The string is a CSS length, a CSS - percentage, or "auto". - -> set-width! :: (send an-mx-element set-width! w) - - Sets the element's CSS width using `w', which - may be a css-length, a css-percentage, or 'auto. - -> set-width-native! :: (send an-mx-element set-width-native! w) - - Sets the element's CSS width using `w', which - may be a CSS length, a CSS percentage, or - "auto". - -> height :: (send an-mx-element height) - - Retrieves a value describing the CSS height for - the element. The value is a css-length, a - css-percentage, or 'auto. - -> height-native :: (send an-mx-element height-native) - - Retrieves a string describing the CSS height for - the element. The string is a CSS length, a CSS - percentage, or "auto". - -> set-height! :: (send an-mx-element set-height! h) - - Sets the element's CSS height using `h', which - may be css-length, a css-percentage, or 'auto. - -> set-height-native! :: (send an-mx-element set-height-native! h) - - Sets the element's CSS height using `h', which - may be CSS length, a CSS percentage, or "auto". - -> top :: (send an-mx-element top) - - Retrieves a value describing the CSS topt for - the element. The value is a css-length, a - css-percentage, or 'auto. - -> top-native :: (send an-mx-element top-native) - - Retrieves a string describing the CSS top for - the element. The string is a CSS length, a CSS - percentage, or "auto". - -> set-top! :: (send an-mx-element set-top! t) - - Sets the element's CSS top using `t', which may - be css-length, a css-percentage, or 'auto. - -> set-top-native! :: (send an-mx-element set-top-native! t) - - Sets the element's CSS top using `t', which may - be CSS length, a CSS percentage, or "auto". - -> left :: (send an-mx-element left) - - Retrieves a string describing the CSS left for - the element. The string is a CSS length, a CSS - percentage, or "auto". - -> left-native :: (send an-mx-element left-native) - - Retrieves a string describing the CSS left for - the element. The string is a CSS length, a CSS - percentage, or "auto". - -> set-left! :: (send an-mx-element set-left! l) - - Sets the element's CSS left using `l', which may - be css-length, a css-percentage, or 'auto. - -> set-left-native! :: (send an-mx-element set-left-native! l) - - Sets the element's CSS left using `l', which may - be CSS length, a CSS percentage, or "auto". - -> z-index :: (send an-mx-element z-index) - - Retrieves a value describing the CSS z-index for - the element. The value is either an integer or - 'auto. - -> z-index-native :: (send an-mx-element z-index-native) - - Retrieves a value describing the CSS z-index for - the element. The value is either an integer or - "auto". - -> set-z-index! :: (send an-mx-element set-z-index! zi) - - Sets the element's CSS z-index using `zi', which - may be either an integer or 'auto. - -> set-z-index-native! :: (send an-mx-element set-z-index-native! zi) - - Sets the element's CSS z-index using `zi', which - may be either an integer or "auto". - -} \ No newline at end of file +@include-section["com-events.scrbl"] +@include-section["types.scrbl"] +@include-section["html.scrbl"] diff --git a/collects/mysterx/scribblings/types.scrbl b/collects/mysterx/scribblings/types.scrbl new file mode 100644 index 0000000000..5f3530ad77 --- /dev/null +++ b/collects/mysterx/scribblings/types.scrbl @@ -0,0 +1,68 @@ +#lang scribble/doc +@(require "common.ss") + +@title[#:tag "types"]{MysterX Types} + + There are a few special types that appear in the + types of COM component methods and properties. + We describe those types and, in some cases, operations + involving those types. + +@defproc[(com-currency? [v any/c]) boolean?]{ + + Returns @scheme[#t] if @scheme[v] is a COM currency value, + @scheme[#f] otherwise.} + +@defproc[(com-currency->number [curr com-currency?]) real?]{ + + Returns a number for @scheme[curr].} + +@defproc[(number->com-currency [n real?]) com-currency?]{ + + Converts a number to a COM currency value. A currency value is + repsented with a 64-bit two's-complement integer, though @scheme[n] + may contain decimal digits. If @scheme[n] is too large, an + exception is raised.} + +@defproc[(com-date? [v any/c]) boolean?]{ + + Returns @scheme[#t] if @scheme[v] is a COM date value, @scheme[#f] + otherwise.} + +@defproc[(com-date->date [d com-date?]) date?]{ + + Converts a COM date to an instance of the @scheme[date] structure + type. In the result, the @scheme[dst?] field is always @scheme[#f], + and the @scheme[time-zone-offset] field is @scheme[0].} + +@defproc[(date->com-date [d date?]) com-date?]{ + + Converts a @scheme[date] instance to a COM date value.} + +@defproc[(com-scode? [v any/c]) boolean?]{ + + Returns @scheme[#t] if @scheme[v] is a COM scode value, @scheme[#f] + otherwise.} + +@defproc[(com-scode->number [sc com-scode?]) integer?]{ + + Converts a COM scode value to an integer.} + +@defproc[(number->com-scode [n integer?]) com-scode?]{ + + Converts a number to a COM scode value. The number must be + representable as a 32-bit two's-complement number, otherwise an + exception is raised.} + +@defproc[(com-iunknown? [v any/c]) boolean?]) + + Returns @scheme[#t] if @scheme[v] is a COM IUnknown value, + @scheme[#f] otherwise.} + +@defproc[(mx-any? [v any/c]) boolean?]{ + + Returns @scheme[#t] if @scheme[v] is a character, real number, + string, boolean, COM currency (as in @scheme[com-currency?]), COM + date (as in @scheme[com-date?]), COM scode value (as in + @scheme[com-scode?]), COM IUnknown value (as in + @scheme[com-iunknown?], or COM object (as in @scheme[com-object?]).} diff --git a/collects/scribble/bnf.ss b/collects/scribble/bnf.ss index 1d124ebc14..4edf12906a 100644 --- a/collects/scribble/bnf.ss +++ b/collects/scribble/bnf.ss @@ -8,7 +8,7 @@ (provide BNF nonterm BNF-seq - BNF-alt ; single-lie alternatives + BNF-alt BNF-alt/close ; single-line alternatives BNF-etc BNF-group optional kleenestar kleeneplus kleenerange) @@ -47,6 +47,9 @@ (define (BNF-alt . l) (interleave l alt)) + (define (BNF-alt/close . l) + (interleave l " | ")) + (define BNF-etc "...") (define/kw (nonterm #:body s) diff --git a/collects/scribble/manual.ss b/collects/scribble/manual.ss index 17628cfa0c..d7fcf2ea10 100644 --- a/collects/scribble/manual.ss +++ b/collects/scribble/manual.ss @@ -2296,6 +2296,15 @@ [(_ super) null])) + (define (flatten-splices l) + (let loop ([l l]) + (cond + [(null? l) null] + [(splice? (car l)) + (append (splice-run (car l)) + (loop (cdr l)))] + [else (cons (car l) (loop (cdr l)))]))) + (define-syntax *defclass (syntax-rules () [(_ *include-class name super (intf ...) body ...) @@ -2315,7 +2324,7 @@ null whole-page? make-class-index-desc))) - (list body ...))))])) + (flatten-splices (list body ...)))))])) (define-syntax defclass (syntax-rules ()