racket/collects/scribblings/gui/message-class.scrbl
2007-08-09 17:21:12 +00:00

54 lines
1.7 KiB
Racket

#reader(lib "defreader.ss" "scribble")
@require["common.ss"]
@defclass[message% object% (control<%>)]{
A message control is a static line of text or a static bitmap. The
text or bitmap corresponds to the message's label (see
@method[window<%> set-label]).
@defconstructor[[label {\labelstring}, @scheme[bitmap%] object, @scheme['app], @scheme['caution], or @scheme['stop]]
[parent (or/c (is-a/c frame%) (is-a/c dialog%) (is-a/c panel%) (is-a/c pane%))]
[style (symbols/c deleted) null]
[font (is-a/c font%) @scheme[normal-control-font]]
[enabled any/c #t]
[vert-margin (integer-in 0 1000) 2]
[horiz-margin (integer-in 0 1000) 2]
[min-width (integer-in 0 10000) {\rm graphical minimum width}]
[min-height (integer-in 0 10000) {\rm graphical minimum height}]
[stretchable-width any/c #f]
[stretchable-height any/c #f]]{
Creates a string or bitmap message initially showing @scheme[label].
@bitmaplabeluse[label] An @indexed-scheme['app], @indexed-scheme['caution],
or @indexed-scheme['stop] symbol for @scheme[label] indicates an icon;
@scheme['app] is the application icon (Windows and Mac OS X) or a
generic ``info'' icon (X), @scheme['caution] is a caution-sign icon,
and @scheme['stop] a stop-sign icon.
@labelstripped[(scheme label) @elem{message}]
\DeletedStyleNote{message}
@FontKWs[] @WindowKWs[] @SubareaKWs[] @AreaKWs[]
}
@defmethod[#:mode 'add
(set-label [label (is-a/c bitmap%)])
void?]{
@impl{
Sets the bitmap label for a bitmap message.
@bitmaplabeluseisbm[label] @|bitmapiforiglabel|
}}}