racket/draw, racket/gui: modernize contracts, mostly in documentation
Use `or/c' instead of `one-of/c', `#f' instead of `false/c'. original commit: 2bdcdbb1970bc65625be295eac1f510b97d3df10
This commit is contained in:
parent
4bee9aeb19
commit
dfeb8956ed
|
@ -39,7 +39,7 @@ See @|geomdiscuss| for more information. Note that the return value
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-parent)
|
@defmethod[(get-parent)
|
||||||
(or/c (is-a?/c area-container<%>) false/c)]{
|
(or/c (is-a?/c area-container<%>) #f)]{
|
||||||
|
|
||||||
Returns the area's parent. A top-level window may have no parent (in
|
Returns the area's parent. A top-level window may have no parent (in
|
||||||
which case @racket[#f] is returned), or it may have another top-level
|
which case @racket[#f] is returned), or it may have another top-level
|
||||||
|
|
|
@ -11,11 +11,11 @@ Whenever a button is clicked by the user, the button's callback
|
||||||
(is-a?/c bitmap%)
|
(is-a?/c bitmap%)
|
||||||
(list/c (is-a?/c bitmap%)
|
(list/c (is-a?/c bitmap%)
|
||||||
label-string?
|
label-string?
|
||||||
(one-of/c 'left 'top 'right 'bottom)))]
|
(or/c 'left 'top 'right 'bottom)))]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c button%) (is-a?/c control-event%) . -> . any) (lambda (b e) (void))]
|
[callback ((is-a?/c button%) (is-a?/c control-event%) . -> . any) (lambda (b e) (void))]
|
||||||
[style (listof (one-of/c 'border 'deleted)) null]
|
[style (listof (or/c 'border 'deleted)) null]
|
||||||
[font (is-a?/c font%) normal-control-font]
|
[font (is-a?/c font%) normal-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[vert-margin (integer-in 0 1000) 2]
|
[vert-margin (integer-in 0 1000) 2]
|
||||||
|
|
|
@ -10,13 +10,13 @@ A @racket[canvas%] object is a general-purpose window for drawing and
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'border 'control-border 'combo
|
[style (listof (or/c 'border 'control-border 'combo
|
||||||
'vscroll 'hscroll 'resize-corner
|
'vscroll 'hscroll 'resize-corner
|
||||||
'gl 'no-autoclear 'transparent
|
'gl 'no-autoclear 'transparent
|
||||||
'no-focus 'deleted)) null]
|
'no-focus 'deleted)) null]
|
||||||
[paint-callback ((is-a?/c canvas%) (is-a?/c dc<%>) . -> . any) void]
|
[paint-callback ((is-a?/c canvas%) (is-a?/c dc<%>) . -> . any) void]
|
||||||
[label (or/c label-string? false/c) #f]
|
[label (or/c label-string? #f) #f]
|
||||||
[gl-config (or/c (is-a?/c gl-config%) false/c) #f]
|
[gl-config (or/c (is-a?/c gl-config%) #f) #f]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[vert-margin (integer-in 0 1000) 0]
|
[vert-margin (integer-in 0 1000) 0]
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
|
@ -100,7 +100,7 @@ The @racket[gl-config] argument determines properties of an OpenGL
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-scroll-page [which (one-of/c 'horizontal 'vertical)])
|
@defmethod[(get-scroll-page [which (or/c 'horizontal 'vertical)])
|
||||||
(integer-in 1 1000000)]{
|
(integer-in 1 1000000)]{
|
||||||
|
|
||||||
Get the current page step size of a manual scrollbar. The result is
|
Get the current page step size of a manual scrollbar. The result is
|
||||||
|
@ -115,7 +115,7 @@ See also
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-scroll-pos [which (one-of/c 'horizontal 'vertical)])
|
@defmethod[(get-scroll-pos [which (or/c 'horizontal 'vertical)])
|
||||||
(integer-in 0 1000000)]{
|
(integer-in 0 1000000)]{
|
||||||
|
|
||||||
Gets the current value of a manual scrollbar. The result is always
|
Gets the current value of a manual scrollbar. The result is always
|
||||||
|
@ -130,7 +130,7 @@ See also
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-scroll-range [which (one-of/c 'horizontal 'vertical)])
|
@defmethod[(get-scroll-range [which (or/c 'horizontal 'vertical)])
|
||||||
(integer-in 0 1000000)]{
|
(integer-in 0 1000000)]{
|
||||||
|
|
||||||
Gets the current maximum value of a manual scrollbar. The result is
|
Gets the current maximum value of a manual scrollbar. The result is
|
||||||
|
@ -173,8 +173,8 @@ Gets the size in device units of the scrollable canvas area (as
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(init-auto-scrollbars [horiz-pixels (or/c (integer-in 1 1000000) false/c)]
|
@defmethod[(init-auto-scrollbars [horiz-pixels (or/c (integer-in 1 1000000) #f)]
|
||||||
[vert-pixels (or/c (integer-in 1 1000000) false/c)]
|
[vert-pixels (or/c (integer-in 1 1000000) #f)]
|
||||||
[h-value (real-in 0.0 1.0)]
|
[h-value (real-in 0.0 1.0)]
|
||||||
[v-value (real-in 0.0 1.0)])
|
[v-value (real-in 0.0 1.0)])
|
||||||
void?]{
|
void?]{
|
||||||
|
@ -218,8 +218,8 @@ See also
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(init-manual-scrollbars [h-length (or/c (integer-in 0 1000000) false/c)]
|
@defmethod[(init-manual-scrollbars [h-length (or/c (integer-in 0 1000000) #f)]
|
||||||
[v-length (or/c (integer-in 0 1000000) false/c)]
|
[v-length (or/c (integer-in 0 1000000) #f)]
|
||||||
[h-page (integer-in 1 1000000)]
|
[h-page (integer-in 1 1000000)]
|
||||||
[v-page (integer-in 1 1000000)]
|
[v-page (integer-in 1 1000000)]
|
||||||
[h-value (integer-in 0 1000000)]
|
[h-value (integer-in 0 1000000)]
|
||||||
|
@ -312,8 +312,8 @@ flushing is enabled, and if @racket[flush?] is true, then
|
||||||
@method[canvas<%> flush] is called immediately.}
|
@method[canvas<%> flush] is called immediately.}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(scroll [h-value (or/c (real-in 0.0 1.0) false/c)]
|
@defmethod[(scroll [h-value (or/c (real-in 0.0 1.0) #f)]
|
||||||
[v-value (or/c (real-in 0.0 1.0) false/c)])
|
[v-value (or/c (real-in 0.0 1.0) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the values of automatic scrollbars. (This method has no effect on
|
Sets the values of automatic scrollbars. (This method has no effect on
|
||||||
|
@ -337,7 +337,7 @@ See also
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-scroll-page [which (one-of/c 'horizontal 'vertical)]
|
@defmethod[(set-scroll-page [which (or/c 'horizontal 'vertical)]
|
||||||
[value (integer-in 1 1000000)])
|
[value (integer-in 1 1000000)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ See also
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-scroll-pos [which (one-of/c 'horizontal 'vertical)]
|
@defmethod[(set-scroll-pos [which (or/c 'horizontal 'vertical)]
|
||||||
[value (integer-in 0 1000000)])
|
[value (integer-in 0 1000000)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
@ -374,7 +374,7 @@ See also
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-scroll-range [which (one-of/c 'horizontal 'vertical)]
|
@defmethod[(set-scroll-range [which (or/c 'horizontal 'vertical)]
|
||||||
[value (integer-in 0 1000000)])
|
[value (integer-in 0 1000000)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ Like @racket[flush-display], but constrained if possible to the canvas.}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-canvas-background)
|
@defmethod[(get-canvas-background)
|
||||||
(or/c (is-a?/c color%) false/c)]{
|
(or/c (is-a?/c color%) #f)]{
|
||||||
Returns the color currently used to ``erase'' the canvas content before
|
Returns the color currently used to ``erase'' the canvas content before
|
||||||
@method[canvas<%> on-paint] is called. See also
|
@method[canvas<%> on-paint] is called. See also
|
||||||
@method[canvas<%> set-canvas-background].
|
@method[canvas<%> set-canvas-background].
|
||||||
|
|
|
@ -16,8 +16,9 @@ Whenever a check box is clicked by the user, the check box's value is
|
||||||
@defconstructor[([label (or/c label-string? (is-a?/c bitmap%))]
|
@defconstructor[([label (or/c label-string? (is-a?/c bitmap%))]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c check-box%) (is-a?/c control-event%) . -> . any) (lambda (c e) (void))]
|
[callback ((is-a?/c check-box%) (is-a?/c control-event%)
|
||||||
[style (listof (one-of/c 'deleted)) null]
|
. -> . any) (lambda (c e) (void))]
|
||||||
|
[style (listof (or/c 'deleted)) null]
|
||||||
[value any/c #f]
|
[value any/c #f]
|
||||||
[font (is-a?/c font%) normal-control-font]
|
[font (is-a?/c font%) normal-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
|
|
@ -11,14 +11,15 @@ A @racket[checkable-menu-item%] is a string-labelled menu item that
|
||||||
|
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
|
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
|
||||||
[callback ((is-a?/c checkable-menu-item%) (is-a?/c control-event%) . -> . any)
|
[callback ((is-a?/c checkable-menu-item%) (is-a?/c control-event%)
|
||||||
|
. -> . any)
|
||||||
(lambda (i e) (void))]
|
(lambda (i e) (void))]
|
||||||
[shortcut (or/c char? symbol? false/c) #f]
|
[shortcut (or/c char? symbol? #f) #f]
|
||||||
[help-string (or/c label-string? false/c) #f]
|
[help-string (or/c label-string? #f) #f]
|
||||||
[demand-callback ((is-a?/c menu-item%) . -> . any)
|
[demand-callback ((is-a?/c menu-item%) . -> . any)
|
||||||
(lambda (i) (void))]
|
(lambda (i) (void))]
|
||||||
[checked any/c #f]
|
[checked any/c #f]
|
||||||
[shortcut-prefix (listof (one-of/c 'alt 'cmd 'meta 'ctl
|
[shortcut-prefix (listof (or/c 'alt 'cmd 'meta 'ctl
|
||||||
'shift 'option))
|
'shift 'option))
|
||||||
(get-default-shortcut-prefix)])]{
|
(get-default-shortcut-prefix)])]{
|
||||||
|
|
||||||
|
|
|
@ -15,13 +15,13 @@ Whenever the selection of a choice item is changed by the user, the
|
||||||
See also @racket[list-box%].
|
See also @racket[list-box%].
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[choices (listof label-string?)]
|
[choices (listof label-string?)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c choice%) (is-a?/c control-event%) . -> . any)
|
[callback ((is-a?/c choice%) (is-a?/c control-event%) . -> . any)
|
||||||
(lambda (c e) (void))]
|
(lambda (c e) (void))]
|
||||||
[style (listof (one-of/c 'horizontal-label 'vertical-label
|
[style (listof (or/c 'horizontal-label 'vertical-label
|
||||||
'deleted))
|
'deleted))
|
||||||
null]
|
null]
|
||||||
[selection exact-nonnegative-integer? 0]
|
[selection exact-nonnegative-integer? 0]
|
||||||
|
|
|
@ -33,7 +33,7 @@ The @racket[format] string is typically four capital letters. (On
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-data [format string?])
|
@defmethod[(get-data [format string?])
|
||||||
(or/c bytes? string? false/c)]{
|
(or/c bytes? string? #f)]{
|
||||||
|
|
||||||
Called when a process requests clipboard data while this client is the
|
Called when a process requests clipboard data while this client is the
|
||||||
current one for the clipboard. The requested format is passed to the
|
current one for the clipboard. The requested format is passed to the
|
||||||
|
|
|
@ -7,7 +7,7 @@ A @racket[column-control-event%] object contains information about a
|
||||||
event on an @racket[list-box%] column header.
|
event on an @racket[list-box%] column header.
|
||||||
|
|
||||||
@defconstructor[([column exact-nonnegative-integer?]
|
@defconstructor[([column exact-nonnegative-integer?]
|
||||||
[event-type (one-of/c 'list-box-column)]
|
[event-type (or/c 'list-box-column)]
|
||||||
[time-stamp exact-integer? 0])]{
|
[time-stamp exact-integer? 0])]{
|
||||||
|
|
||||||
The @racket[column] argument indicates the column that was clicked.
|
The @racket[column] argument indicates the column that was clicked.
|
||||||
|
|
|
@ -12,14 +12,15 @@ A @racket[combo-field%] object is a @racket[text-field%]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[choices (listof label-string?)]
|
[choices (listof label-string?)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c combo-field%) (is-a?/c control-event%) . -> . any)
|
[callback ((is-a?/c combo-field%) (is-a?/c control-event%)
|
||||||
|
. -> . any)
|
||||||
(lambda (c e) (void))]
|
(lambda (c e) (void))]
|
||||||
[init-value string ""]
|
[init-value string ""]
|
||||||
[style (listof (one-of/c 'horizontal-label 'vertical-label
|
[style (listof (or/c 'horizontal-label 'vertical-label
|
||||||
'deleted))
|
'deleted))
|
||||||
null]
|
null]
|
||||||
[font (is-a?/c font%) normal-control-font]
|
[font (is-a?/c font%) normal-control-font]
|
||||||
|
|
|
@ -7,7 +7,7 @@ A @racket[control-event%] object contains information about a
|
||||||
control event. An instance of @racket[control-event%] is always
|
control event. An instance of @racket[control-event%] is always
|
||||||
provided to a control or menu item callback procedure.
|
provided to a control or menu item callback procedure.
|
||||||
|
|
||||||
@defconstructor[([event-type (one-of/c 'button 'check-box 'choice
|
@defconstructor[([event-type (or/c 'button 'check-box 'choice
|
||||||
'list-box 'list-box-dclick 'list-box-column
|
'list-box 'list-box-dclick 'list-box-column
|
||||||
'text-field 'text-field-enter
|
'text-field 'text-field-enter
|
||||||
'menu 'slider 'radio-box 'tab-panel
|
'menu 'slider 'radio-box 'tab-panel
|
||||||
|
@ -43,7 +43,7 @@ See @method[event% get-time-stamp] for information about
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-event-type)
|
@defmethod[(get-event-type)
|
||||||
(one-of/c 'button 'check-box 'choice
|
(or/c 'button 'check-box 'choice
|
||||||
'list-box 'list-box-dclick 'text-field
|
'list-box 'list-box-dclick 'text-field
|
||||||
'text-field-enter 'menu 'slider 'radio-box
|
'text-field-enter 'menu 'slider 'radio-box
|
||||||
'menu-popdown 'menu-popdown-none 'tab-panel)]{
|
'menu-popdown 'menu-popdown-none 'tab-panel)]{
|
||||||
|
@ -53,7 +53,7 @@ Returns the type of the control event. See
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-event-type
|
@defmethod[(set-event-type
|
||||||
[type (one-of/c 'button 'check-box 'choice
|
[type (or/c 'button 'check-box 'choice
|
||||||
'list-box 'list-box-dclick 'text-field
|
'list-box 'list-box-dclick 'text-field
|
||||||
'text-field-enter 'menu 'slider 'radio-box
|
'text-field-enter 'menu 'slider 'radio-box
|
||||||
'menu-popdown 'menu-popdown-none 'tab-panel)])
|
'menu-popdown 'menu-popdown-none 'tab-panel)])
|
||||||
|
|
|
@ -18,7 +18,7 @@ A cursor is assigned to each window (or the window may use its
|
||||||
[mask (is-a?/c bitmap%)]
|
[mask (is-a?/c bitmap%)]
|
||||||
[hot-spot-x (integer-in 0 15) 0]
|
[hot-spot-x (integer-in 0 15) 0]
|
||||||
[hot-spot-y (integer-in 0 15) 0])
|
[hot-spot-y (integer-in 0 15) 0])
|
||||||
([id (one-of/c 'arrow 'bullseye 'cross 'hand 'ibeam 'watch 'blank
|
([id (or/c 'arrow 'bullseye 'cross 'hand 'ibeam 'watch 'blank
|
||||||
'size-n/s 'size-e/w 'size-ne/sw 'size-nw/se)]))]{
|
'size-n/s 'size-e/w 'size-ne/sw 'size-nw/se)]))]{
|
||||||
|
|
||||||
The first case creates a cursor using an image bitmap and a mask
|
The first case creates a cursor using an image bitmap and a mask
|
||||||
|
|
|
@ -8,19 +8,19 @@ A dialog is a top-level window that is @defterm{modal}: while the
|
||||||
all other top-level windows in the dialog's eventspace.
|
all other top-level windows in the dialog's eventspace.
|
||||||
|
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c) #f]
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f) #f]
|
||||||
[width (or/c (integer-in 0 10000) false/c) #f]
|
[width (or/c (integer-in 0 10000) #f) #f]
|
||||||
[height (or/c (integer-in 0 10000) false/c) #f]
|
[height (or/c (integer-in 0 10000) #f) #f]
|
||||||
[x (or/c (integer-in 0 10000) false/c) #f]
|
[x (or/c (integer-in 0 10000) #f) #f]
|
||||||
[y (or/c (integer-in 0 10000) false/c) #f]
|
[y (or/c (integer-in 0 10000) #f) #f]
|
||||||
[style (listof (one-of/c 'no-caption 'resize-border
|
[style (listof (or/c 'no-caption 'resize-border
|
||||||
'no-sheet 'close-button))
|
'no-sheet 'close-button))
|
||||||
null]
|
null]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -23,9 +23,9 @@ Creates a (useless) editor administrator.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-dc [x (or/c (box/c real?) false/c) #f]
|
@defmethod[(get-dc [x (or/c (box/c real?) #f) #f]
|
||||||
[y (or/c (box/c real?) false/c) #f])
|
[y (or/c (box/c real?) #f) #f])
|
||||||
(or/c (is-a?/c dc<%>) false/c)]{
|
(or/c (is-a?/c dc<%>) #f)]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
Returns either the drawing context into which the editor is displayed,
|
Returns either the drawing context into which the editor is displayed,
|
||||||
|
@ -52,10 +52,10 @@ Fills all boxes with @racket[0.0] and returns @racket[#f].
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(get-max-view [x (or/c (box/c real?) false/c)]
|
@defmethod[(get-max-view [x (or/c (box/c real?) #f)]
|
||||||
[y (or/c (box/c real?) false/c)]
|
[y (or/c (box/c real?) #f)]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[h (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[h (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[full? any/c #f])
|
[full? any/c #f])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
@ -75,10 +75,10 @@ Fills all boxes with @racket[0.0].
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-view [x (or/c (box/c real?) false/c)]
|
@defmethod[(get-view [x (or/c (box/c real?) #f)]
|
||||||
[y (or/c (box/c real?) false/c)]
|
[y (or/c (box/c real?) #f)]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[h (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[h (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[full? any/c #f])
|
[full? any/c #f])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
@ -122,7 +122,7 @@ Fills all boxes with @racket[0.0].
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(grab-caret [domain (one-of/c 'immediate 'display 'global) 'global])
|
@defmethod[(grab-caret [domain (or/c 'immediate 'display 'global) 'global])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -245,7 +245,7 @@ Does nothing.
|
||||||
[w (and/c real? (not/c negative?))]
|
[w (and/c real? (not/c negative?))]
|
||||||
[h (and/c real? (not/c negative?))]
|
[h (and/c real? (not/c negative?))]
|
||||||
[refresh? any/c #t]
|
[refresh? any/c #t]
|
||||||
[bias (one-of/c 'start 'end 'none) 'none])
|
[bias (or/c 'start 'end 'none) 'none])
|
||||||
boolean?]{
|
boolean?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
|
|
@ -9,17 +9,17 @@ An @racket[editor-canvas%] object manages and displays a
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[editor (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c) #f]
|
[editor (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) #f) #f]
|
||||||
[style (listof (one-of/c 'no-border 'control-border 'combo
|
[style (listof (or/c 'no-border 'control-border 'combo
|
||||||
'no-hscroll 'no-vscroll
|
'no-hscroll 'no-vscroll
|
||||||
'hide-hscroll 'hide-vscroll
|
'hide-hscroll 'hide-vscroll
|
||||||
'auto-vscroll 'auto-hscroll
|
'auto-vscroll 'auto-hscroll
|
||||||
'resize-corner 'no-focus 'deleted
|
'resize-corner 'no-focus 'deleted
|
||||||
'transparent)) null]
|
'transparent)) null]
|
||||||
[scrolls-per-page (integer-in 1 10000) 100]
|
[scrolls-per-page (integer-in 1 10000) 100]
|
||||||
[label (or/c label-string? false/c) #f]
|
[label (or/c label-string? #f) #f]
|
||||||
[wheel-step (or/c (integer-in 1 10000) false/c) 3]
|
[wheel-step (or/c (integer-in 1 10000) #f) 3]
|
||||||
[line-count (or/c (integer-in 1 1000) false/c) #f]
|
[line-count (or/c (integer-in 1 1000) #f) #f]
|
||||||
[horizontal-inset (integer-in 0 1000) 5]
|
[horizontal-inset (integer-in 0 1000) 5]
|
||||||
[vertical-inset (integer-in 0 1000) 5]
|
[vertical-inset (integer-in 0 1000) 5]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
@ -165,7 +165,7 @@ Enables or disables force-focus mode. In force-focus mode, the caret
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-editor)
|
@defmethod[(get-editor)
|
||||||
(or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)]{
|
(or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) #f)]{
|
||||||
|
|
||||||
Returns the editor currently displayed by this canvas, or @racket[#f]
|
Returns the editor currently displayed by this canvas, or @racket[#f]
|
||||||
if the canvas does not have an editor.
|
if the canvas does not have an editor.
|
||||||
|
@ -174,7 +174,7 @@ Returns the editor currently displayed by this canvas, or @racket[#f]
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-line-count)
|
@defmethod[(get-line-count)
|
||||||
(or/c (integer-in 1 1000) false/c)]{
|
(or/c (integer-in 1 1000) #f)]{
|
||||||
|
|
||||||
Returns a line count installed with @method[editor-canvas%
|
Returns a line count installed with @method[editor-canvas%
|
||||||
set-line-count], or @racket[#f] if no minimum line count is set.
|
set-line-count], or @racket[#f] if no minimum line count is set.
|
||||||
|
@ -270,7 +270,7 @@ on-display-size] method is called.
|
||||||
[w (and/c real? (not/c negative?))]
|
[w (and/c real? (not/c negative?))]
|
||||||
[h (and/c real? (not/c negative?))]
|
[h (and/c real? (not/c negative?))]
|
||||||
[refresh? any/c]
|
[refresh? any/c]
|
||||||
[bias (one-of/c 'start 'end 'none) 'none])
|
[bias (or/c 'start 'end 'none) 'none])
|
||||||
boolean?]{
|
boolean?]{
|
||||||
|
|
||||||
Requests scrolling so that the given region in the currently displayed
|
Requests scrolling so that the given region in the currently displayed
|
||||||
|
@ -323,7 +323,7 @@ Enables or disables bottom-base scrolling, or gets the current enable
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-editor [edit (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)]
|
@defmethod[(set-editor [edit (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) #f)]
|
||||||
[redraw? any/c #t])
|
[redraw? any/c #t])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
@ -342,7 +342,7 @@ If the canvas has a line count installed with @method[editor-canvas%
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-line-count [count (or/c (integer-in 1 1000) false/c)])
|
@defmethod[(set-line-count [count (or/c (integer-in 1 1000) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the canvas's graphical minimum height to display a particular
|
Sets the canvas's graphical minimum height to display a particular
|
||||||
|
@ -370,8 +370,8 @@ Gets or sets the number of pixels within the canvas reserved above
|
||||||
|
|
||||||
|
|
||||||
@defmethod*[([(wheel-step)
|
@defmethod*[([(wheel-step)
|
||||||
(or/c (integer-in 1 10000) false/c)]
|
(or/c (integer-in 1 10000) #f)]
|
||||||
[(wheel-step [step (or/c (integer-in 1 10000) false/c)])
|
[(wheel-step [step (or/c (integer-in 1 10000) #f)])
|
||||||
void?])]{
|
void?])]{
|
||||||
|
|
||||||
Gets or sets the number of vertical scroll steps taken for one click
|
Gets or sets the number of vertical scroll steps taken for one click
|
||||||
|
|
|
@ -22,7 +22,7 @@ internal use.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(read [f (is-a?/c editor-stream-in%)])
|
@defmethod[(read [f (is-a?/c editor-stream-in%)])
|
||||||
(or/c (is-a?/c editor-data%) false/c)]{
|
(or/c (is-a?/c editor-data%) #f)]{
|
||||||
|
|
||||||
Reads a new data object from the given stream, returning @racket[#f] if
|
Reads a new data object from the given stream, returning @racket[#f] if
|
||||||
there is an error.
|
there is an error.
|
||||||
|
|
|
@ -18,7 +18,7 @@ exists in the list, this one will not be added.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(find [name string?])
|
@defmethod[(find [name string?])
|
||||||
(or/c (is-a?/c snip-class%) false/c)]{
|
(or/c (is-a?/c snip-class%) #f)]{
|
||||||
Finds a snip data class from the list with the given name, returning
|
Finds a snip data class from the list with the given name, returning
|
||||||
@racket[#f] if none can be found.
|
@racket[#f] if none can be found.
|
||||||
|
|
||||||
|
@ -31,7 +31,7 @@ Returns an index into the list for the specified class.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(nth [n exact-nonnegative-integer?])
|
@defmethod[(nth [n exact-nonnegative-integer?])
|
||||||
(or/c (is-a?/c editor-data-class%) false/c)]{
|
(or/c (is-a?/c editor-data-class%) #f)]{
|
||||||
Returns the @racket[n]th class in the list (counting from 0), returning
|
Returns the @racket[n]th class in the list (counting from 0), returning
|
||||||
@racket[#f] if the list has @racket[n] or less classes.
|
@racket[#f] if the list has @racket[n] or less classes.
|
||||||
|
|
||||||
|
|
|
@ -16,12 +16,12 @@ to @racket[#f].
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-dataclass)
|
@defmethod[(get-dataclass)
|
||||||
(or/c (is-a?/c editor-data-class%) false/c)]{
|
(or/c (is-a?/c editor-data-class%) #f)]{
|
||||||
Gets the class for this data.
|
Gets the class for this data.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-next)
|
@defmethod[(get-next)
|
||||||
(or/c (is-a?/c editor-data%) false/c)]{
|
(or/c (is-a?/c editor-data%) #f)]{
|
||||||
Gets the next editor data element in a list of editor data elements.
|
Gets the next editor data element in a list of editor data elements.
|
||||||
A @racket[#f] terminates the list.
|
A @racket[#f] terminates the list.
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ A @racket[#f] terminates the list.
|
||||||
void?]{Sets the class for this data.
|
void?]{Sets the class for this data.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-next [v (or/c (is-a?/c editor-data%) false/c)])
|
@defmethod[(set-next [v (or/c (is-a?/c editor-data%) #f)])
|
||||||
void?]{Sets the next editor data element in a list of editor data elements.
|
void?]{Sets the next editor data element in a list of editor data elements.
|
||||||
A @racket[#f] terminates the list.
|
A @racket[#f] terminates the list.
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,7 @@ An @racket[editor-snip%] object is a @racket[snip%] object that
|
||||||
another editor.
|
another editor.
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([editor (or/c (is-a?/c editor<%>) false/c) #f]
|
@defconstructor[([editor (or/c (is-a?/c editor<%>) #f) #f]
|
||||||
[with-border? any/c #t]
|
[with-border? any/c #t]
|
||||||
[left-margin exact-nonnegative-integer? 5]
|
[left-margin exact-nonnegative-integer? 5]
|
||||||
[top-margin exact-nonnegative-integer? 5]
|
[top-margin exact-nonnegative-integer? 5]
|
||||||
|
@ -19,10 +19,10 @@ An @racket[editor-snip%] object is a @racket[snip%] object that
|
||||||
[top-inset exact-nonnegative-integer? 1]
|
[top-inset exact-nonnegative-integer? 1]
|
||||||
[right-inset exact-nonnegative-integer? 1]
|
[right-inset exact-nonnegative-integer? 1]
|
||||||
[bottom-inset exact-nonnegative-integer? 1]
|
[bottom-inset exact-nonnegative-integer? 1]
|
||||||
[min-width (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
|
[min-width (or/c (and/c real? (not/c negative?)) 'none) 'none]
|
||||||
[max-width (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
|
[max-width (or/c (and/c real? (not/c negative?)) 'none) 'none]
|
||||||
[min-height (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none]
|
[min-height (or/c (and/c real? (not/c negative?)) 'none) 'none]
|
||||||
[max-height (or/c (and/c real? (not/c negative?)) (one-of/c 'none)) 'none])]{
|
[max-height (or/c (and/c real? (not/c negative?)) 'none) 'none])]{
|
||||||
|
|
||||||
If @racket[editor] is non-@racket[#f], then it will be used as the
|
If @racket[editor] is non-@racket[#f], then it will be used as the
|
||||||
editor contained by the snip. See also @method[editor-snip%
|
editor contained by the snip. See also @method[editor-snip%
|
||||||
|
@ -46,7 +46,7 @@ get-margin] for information about the inset and margin arguments.
|
||||||
[editorx real?]
|
[editorx real?]
|
||||||
[editory real?]
|
[editory real?]
|
||||||
[event (is-a?/c mouse-event%)])
|
[event (is-a?/c mouse-event%)])
|
||||||
(or/c (is-a?/c cursor%) false/c)]{
|
(or/c (is-a?/c cursor%) #f)]{
|
||||||
|
|
||||||
Gets a cursor from the embedded editor by calling its
|
Gets a cursor from the embedded editor by calling its
|
||||||
@method[editor<%> adjust-cursor] method.
|
@method[editor<%> adjust-cursor] method.
|
||||||
|
@ -77,7 +77,7 @@ See also @method[editor-snip% set-align-top-line].
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-editor)
|
@defmethod[(get-editor)
|
||||||
(or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)]{
|
(or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) #f)]{
|
||||||
|
|
||||||
Returns the editor contained by the snip, or @racket[#f] is there is
|
Returns the editor contained by the snip, or @racket[#f] is there is
|
||||||
no editor.
|
no editor.
|
||||||
|
@ -88,12 +88,12 @@ Returns the editor contained by the snip, or @racket[#f] is there is
|
||||||
(get-extent [dc (is-a?/c dc<%>)]
|
(get-extent [dc (is-a?/c dc<%>)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?]
|
[y real?]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[h (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[h (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[descent (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[descent (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[space (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[space (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[lspace (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[lspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[rspace (or/c (box/c (and/c real? (not/c negative?))) false/c) #f])
|
[rspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Calls its editor's @method[editor<%> get-extent] method, then adds the
|
Calls its editor's @method[editor<%> get-extent] method, then adds the
|
||||||
|
@ -156,7 +156,7 @@ snip.
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-max-height)
|
@defmethod[(get-max-height)
|
||||||
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
|
(or/c (and/c real? (not/c negative?)) 'none)]{
|
||||||
|
|
||||||
Gets the maximum display height of the snip; zero or @racket['none]
|
Gets the maximum display height of the snip; zero or @racket['none]
|
||||||
indicates that there is no maximum.
|
indicates that there is no maximum.
|
||||||
|
@ -165,7 +165,7 @@ Gets the maximum display height of the snip; zero or @racket['none]
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-max-width)
|
@defmethod[(get-max-width)
|
||||||
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
|
(or/c (and/c real? (not/c negative?)) 'none)]{
|
||||||
|
|
||||||
Gets the maximum display width of the snip; zero or @racket['none]
|
Gets the maximum display width of the snip; zero or @racket['none]
|
||||||
indicates that there is no maximum.
|
indicates that there is no maximum.
|
||||||
|
@ -173,7 +173,7 @@ Gets the maximum display width of the snip; zero or @racket['none]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-min-height)
|
@defmethod[(get-min-height)
|
||||||
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
|
(or/c (and/c real? (not/c negative?)) 'none)]{
|
||||||
|
|
||||||
Gets the minimum display height of the snip; zero or @racket['none]
|
Gets the minimum display height of the snip; zero or @racket['none]
|
||||||
indicates that there is no minimum.
|
indicates that there is no minimum.
|
||||||
|
@ -181,7 +181,7 @@ Gets the minimum display height of the snip; zero or @racket['none]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-min-width)
|
@defmethod[(get-min-width)
|
||||||
(or/c (and/c real? (not/c negative?)) (one-of/c 'none))]{
|
(or/c (and/c real? (not/c negative?)) 'none)]{
|
||||||
|
|
||||||
Gets the minimum display width of the snip; zero or @racket['none]
|
Gets the minimum display width of the snip; zero or @racket['none]
|
||||||
indicates that there is no minimum.
|
indicates that there is no minimum.
|
||||||
|
@ -226,7 +226,7 @@ See also @method[editor-snip% get-align-top-line].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-editor [editor (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) false/c)])
|
@defmethod[(set-editor [editor (or/c (or/c (is-a?/c text%) (is-a?/c pasteboard%)) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the editor contained by the snip, releasing the old editor in the
|
Sets the editor contained by the snip, releasing the old editor in the
|
||||||
|
@ -268,7 +268,7 @@ Sets the current margins for the snip. The margin sets how much space
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
|
@defmethod[(set-max-height [h (or/c (and/c real? (not/c negative?)) 'none)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
@edsnipmax[@racket[height]]
|
@edsnipmax[@racket[height]]
|
||||||
|
@ -277,7 +277,7 @@ Zero or @racket['none] disables the limit.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
|
@defmethod[(set-max-width [w (or/c (and/c real? (not/c negative?)) 'none)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
@edsnipmax[@racket[width]] The contained editor's width limits are not
|
@edsnipmax[@racket[width]] The contained editor's width limits are not
|
||||||
|
@ -287,7 +287,7 @@ Zero or @racket['none] disables the limit.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
|
@defmethod[(set-min-height [h (or/c (and/c real? (not/c negative?)) 'none)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
@edsnipmin[@racket[height] @elem{top}]
|
@edsnipmin[@racket[height] @elem{top}]
|
||||||
|
@ -296,7 +296,7 @@ Zero or @racket['none] disables the limit.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) (one-of/c 'none))])
|
@defmethod[(set-min-width [w (or/c (and/c real? (not/c negative?)) 'none)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
@edsnipmin[@racket[width] @elem{left}] The contained editor's width
|
@edsnipmin[@racket[width] @elem{left}] The contained editor's width
|
||||||
|
|
|
@ -30,8 +30,8 @@ Reading from a bad stream always gives @racket[0].
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f])
|
@defmethod[(get-bytes [len (or/c (box/c exact-nonnegative-integer?) #f) #f])
|
||||||
(or/c bytes? false/c)]{
|
(or/c bytes? #f)]{
|
||||||
|
|
||||||
Like @method[editor-stream-in% get-unterminated-bytes], but the last
|
Like @method[editor-stream-in% get-unterminated-bytes], but the last
|
||||||
read byte is assumed to be a nul terminator and discarded. Use this
|
read byte is assumed to be a nul terminator and discarded. Use this
|
||||||
|
@ -75,8 +75,8 @@ Returns the next floating-point value in the stream.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-unterminated-bytes [len (or/c (box/c exact-nonnegative-integer?) false/c) #f])
|
@defmethod[(get-unterminated-bytes [len (or/c (box/c exact-nonnegative-integer?) #f) #f])
|
||||||
(or/c bytes? false/c)]{
|
(or/c bytes? #f)]{
|
||||||
|
|
||||||
Returns the next byte string from the stream. This is
|
Returns the next byte string from the stream. This is
|
||||||
the recommended way to read bytes back in from a stream;
|
the recommended way to read bytes back in from a stream;
|
||||||
|
|
|
@ -43,7 +43,7 @@ All ASCII alpha-numeric characters are initialized with
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-map [char char?])
|
@defmethod[(get-map [char char?])
|
||||||
(listof (one-of/c 'caret 'line 'selection 'user1 'user2))]{
|
(listof (or/c 'caret 'line 'selection 'user1 'user2))]{
|
||||||
|
|
||||||
Gets the mapping value for @racket[char]. See
|
Gets the mapping value for @racket[char]. See
|
||||||
@racket[editor-wordbreak-map%] for more information.
|
@racket[editor-wordbreak-map%] for more information.
|
||||||
|
@ -51,7 +51,7 @@ Gets the mapping value for @racket[char]. See
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-map [char char?]
|
@defmethod[(set-map [char char?]
|
||||||
[value (listof (one-of/c 'caret 'line 'selection 'user1 'user2))])
|
[value (listof (or/c 'caret 'line 'selection 'user1 'user2))])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -77,7 +77,7 @@ Returns a list of visible top-level frames and dialogs in the current
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(get-top-level-focus-window)
|
@defproc[(get-top-level-focus-window)
|
||||||
(or/c (is-a?/c frame%) (is-a?/c dialog%) false/c)]{
|
(or/c (is-a?/c frame%) (is-a?/c dialog%) #f)]{
|
||||||
Returns the top level window in the current eventspace that has the
|
Returns the top level window in the current eventspace that has the
|
||||||
keyboard focus (or contains the window with the keyboard focus), or
|
keyboard focus (or contains the window with the keyboard focus), or
|
||||||
@racket[#f] if no window in the current eventspace has the focus.
|
@racket[#f] if no window in the current eventspace has the focus.
|
||||||
|
@ -85,7 +85,7 @@ Returns the top level window in the current eventspace that has the
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(get-top-level-edit-target-window)
|
@defproc[(get-top-level-edit-target-window)
|
||||||
(or/c (is-a?/c frame%) (is-a?/c dialog%) false/c)]{
|
(or/c (is-a?/c frame%) (is-a?/c dialog%) #f)]{
|
||||||
Returns the top level window in the current eventspace that is visible
|
Returns the top level window in the current eventspace that is visible
|
||||||
and most recently had the keyboard focus (or contains the window that
|
and most recently had the keyboard focus (or contains the window that
|
||||||
had the keyboard focus), or @racket[#f] if there is no visible window
|
had the keyboard focus), or @racket[#f] if there is no visible window
|
||||||
|
@ -145,7 +145,7 @@ A second (optional) boolean argument indicates whether the callback
|
||||||
|
|
||||||
@defproc*[([(yield)
|
@defproc*[([(yield)
|
||||||
boolean?]
|
boolean?]
|
||||||
[(yield [v (or/c (one-of/c 'wait) evt?)])
|
[(yield [v (or/c 'wait evt?)])
|
||||||
any/c])]{
|
any/c])]{
|
||||||
@;@index{pause}@index{wait}
|
@;@index{pause}@index{wait}
|
||||||
Yields control to event dispatching. See
|
Yields control to event dispatching. See
|
||||||
|
|
|
@ -8,19 +8,19 @@ A frame is a top-level container window. It has a title bar (which
|
||||||
status line.
|
status line.
|
||||||
|
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c frame%) false/c) #f]
|
[parent (or/c (is-a?/c frame%) #f) #f]
|
||||||
[width (or/c (integer-in 0 10000) false/c) #f]
|
[width (or/c (integer-in 0 10000) #f) #f]
|
||||||
[height (or/c (integer-in 0 10000) false/c) #f]
|
[height (or/c (integer-in 0 10000) #f) #f]
|
||||||
[x (or/c (integer-in -10000 10000) false/c) #f]
|
[x (or/c (integer-in -10000 10000) #f) #f]
|
||||||
[y (or/c (integer-in -10000 10000) false/c) #f]
|
[y (or/c (integer-in -10000 10000) #f) #f]
|
||||||
[style (listof (one-of/c 'no-resize-border 'no-caption
|
[style (listof (or/c 'no-resize-border 'no-caption
|
||||||
'no-system-menu 'hide-menu-bar
|
'no-system-menu 'hide-menu-bar
|
||||||
'toolbar-button 'float 'metal)) null]
|
'toolbar-button 'float 'metal)) null]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
@ -108,7 +108,7 @@ See also @method[frame% set-status-text].
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-menu-bar)
|
@defmethod[(get-menu-bar)
|
||||||
(or/c (is-a?/c menu-bar%) false/c)]{
|
(or/c (is-a?/c menu-bar%) #f)]{
|
||||||
|
|
||||||
Returns the frame's menu bar, or @racket[#f] if none has been created
|
Returns the frame's menu bar, or @racket[#f] if none has been created
|
||||||
for the frame.
|
for the frame.
|
||||||
|
|
|
@ -10,11 +10,11 @@ range, inclusive. Use @method[gauge% set-value] to set the value
|
||||||
of the gauge.
|
of the gauge.
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[range (integer-in 1 1000000)]
|
[range (integer-in 1 1000000)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'horizontal 'vertical
|
[style (listof (or/c 'horizontal 'vertical
|
||||||
'vertical-label 'horizontal-label
|
'vertical-label 'horizontal-label
|
||||||
'deleted))
|
'deleted))
|
||||||
'(horizontal)]
|
'(horizontal)]
|
||||||
|
|
|
@ -14,15 +14,15 @@ Unlike most panel classes, a group-box panel's horizontal and vertical
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'deleted)) null]
|
[style (listof (or/c 'deleted)) null]
|
||||||
[font (is-a?/c font%) small-control-font]
|
[font (is-a?/c font%) small-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[vert-margin (integer-in 0 1000) 2]
|
[vert-margin (integer-in 0 1000) 2]
|
||||||
[horiz-margin (integer-in 0 1000) 2]
|
[horiz-margin (integer-in 0 1000) 2]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -12,8 +12,8 @@ A horizontal pane arranges its subwindows in a single row. See also
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(left center)]
|
'(left center)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -8,7 +8,7 @@ A horizontal panel arranges its subwindows in a single row. See also
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'border 'deleted
|
[style (listof (or/c 'border 'deleted
|
||||||
'hscroll 'auto-hscroll
|
'hscroll 'auto-hscroll
|
||||||
'vscroll 'auto-vscroll)) null]
|
'vscroll 'auto-vscroll)) null]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
@ -16,8 +16,8 @@ A horizontal panel arranges its subwindows in a single row. See also
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(left center)]
|
'(left center)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -9,7 +9,7 @@ An @racket[image-snip%] is a snip that can display bitmap images
|
||||||
|
|
||||||
|
|
||||||
@defconstructor*/make[(([file (or/c path-string? input-port? #f) #f]
|
@defconstructor*/make[(([file (or/c path-string? input-port? #f) #f]
|
||||||
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
[kind (or/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask 'gif/alpha
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask 'png/alpha
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
'xbm 'xpm 'bmp 'pict) 'unknown]
|
'xbm 'xpm 'bmp 'pict) 'unknown]
|
||||||
|
@ -74,7 +74,7 @@ relative to the owning editor's path}]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-filetype)
|
@defmethod[(get-filetype)
|
||||||
(one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
(or/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask 'gif/alpha
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask 'png/alpha
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
'xbm 'xpm 'bmp 'pict)]{
|
'xbm 'xpm 'bmp 'pict)]{
|
||||||
|
@ -86,7 +86,7 @@ Returns the kind used to load the currently loaded, non-inlined file,
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(load-file [file (or/c path-string? input-port? #f)]
|
@defmethod[(load-file [file (or/c path-string? input-port? #f)]
|
||||||
[kind (one-of/c 'unknown 'unknown/mask 'unknown/alpha
|
[kind (or/c 'unknown 'unknown/mask 'unknown/alpha
|
||||||
'gif 'gif/mask 'gif/alpha
|
'gif 'gif/mask 'gif/alpha
|
||||||
'jpeg 'png 'png/mask 'png/alpha
|
'jpeg 'png 'png/mask 'png/alpha
|
||||||
'xbm 'xpm 'bmp 'pict) 'unknown]
|
'xbm 'xpm 'bmp 'pict) 'unknown]
|
||||||
|
|
|
@ -205,28 +205,28 @@ Returns @racket[#t] if the Meta (Unix), Alt (Windows), or Command (Mac OS
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-other-altgr-key-code)
|
@defmethod[(get-other-altgr-key-code)
|
||||||
(or/c char? key-code-symbol? false/c)]{
|
(or/c char? key-code-symbol? #f)]{
|
||||||
|
|
||||||
See @method[key-event% get-other-shift-key-code].
|
See @method[key-event% get-other-shift-key-code].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-other-caps-key-code)
|
@defmethod[(get-other-caps-key-code)
|
||||||
(or/c char? key-code-symbol? false/c)]{
|
(or/c char? key-code-symbol? #f)]{
|
||||||
|
|
||||||
See @method[key-event% get-other-shift-key-code].
|
See @method[key-event% get-other-shift-key-code].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-other-shift-altgr-key-code)
|
@defmethod[(get-other-shift-altgr-key-code)
|
||||||
(or/c char? key-code-symbol? false/c)]{
|
(or/c char? key-code-symbol? #f)]{
|
||||||
|
|
||||||
See @method[key-event% get-other-shift-key-code].
|
See @method[key-event% get-other-shift-key-code].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-other-shift-key-code)
|
@defmethod[(get-other-shift-key-code)
|
||||||
(or/c char? key-code-symbol? false/c)]{
|
(or/c char? key-code-symbol? #f)]{
|
||||||
|
|
||||||
Since keyboard mappings vary, it is sometimes useful in key mappings
|
Since keyboard mappings vary, it is sometimes useful in key mappings
|
||||||
for a program to know the result that the keyboard would have
|
for a program to know the result that the keyboard would have
|
||||||
|
@ -338,7 +338,7 @@ Sets whether the Meta (Unix), Alt (Windows), or Command (Mac OS X) key
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-other-altgr-key-code [code (or/c char? key-code-symbol? false/c)])
|
@defmethod[(set-other-altgr-key-code [code (or/c char? key-code-symbol? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the key code produced by @method[key-event%
|
Sets the key code produced by @method[key-event%
|
||||||
|
@ -346,7 +346,7 @@ get-other-altgr-key-code].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-other-caps-key-code [code (or/c char? key-code-symbol? false/c)])
|
@defmethod[(set-other-caps-key-code [code (or/c char? key-code-symbol? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the key code produced by @method[key-event%
|
Sets the key code produced by @method[key-event%
|
||||||
|
@ -354,7 +354,7 @@ Sets the key code produced by @method[key-event%
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-other-shift-altgr-key-code [code (or/c char? key-code-symbol? false/c)])
|
@defmethod[(set-other-shift-altgr-key-code [code (or/c char? key-code-symbol? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the key code produced by @method[key-event%
|
Sets the key code produced by @method[key-event%
|
||||||
|
@ -362,7 +362,7 @@ Sets the key code produced by @method[key-event%
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-other-shift-key-code [code (or/c char? key-code-symbol? false/c)])
|
@defmethod[(set-other-shift-key-code [code (or/c char? key-code-symbol? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the key code produced by @method[key-event%
|
Sets the key code produced by @method[key-event%
|
||||||
|
|
|
@ -22,7 +22,7 @@ Enables or disables the menu item. If the item is a submenu (or menu
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-help-string)
|
@defmethod[(get-help-string)
|
||||||
(or/c label-string? false/c)]{
|
(or/c label-string? #f)]{
|
||||||
|
|
||||||
Returns the help string for the menu item, or @racket[#f] if the item
|
Returns the help string for the menu item, or @racket[#f] if the item
|
||||||
has no help string.
|
has no help string.
|
||||||
|
@ -85,7 +85,7 @@ Calls the @racket[demand-callback] procedure that was provided when the
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(set-help-string [help (or/c label-string? false/c)])
|
@defmethod[(set-help-string [help (or/c label-string? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the help string for the menu item. Use @racket[#f] to remove the
|
Sets the help string for the menu item. Use @racket[#f] to remove the
|
||||||
|
|
|
@ -29,19 +29,20 @@ A list box can have multiple columns with optional column headers. An
|
||||||
See also @racket[choice%].
|
See also @racket[choice%].
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[choices (listof label-string?)]
|
[choices (listof label-string?)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c list-box%) (is-a?/c control-event%) . -> . any)
|
[callback ((is-a?/c list-box%) (is-a?/c control-event%)
|
||||||
|
. -> . any)
|
||||||
(lambda (c e) (void))]
|
(lambda (c e) (void))]
|
||||||
[style (listof (one-of/c 'single 'multiple 'extended
|
[style (listof (or/c 'single 'multiple 'extended
|
||||||
'vertical-label 'horizontal-label
|
'vertical-label 'horizontal-label
|
||||||
'variable-columns 'column-headers
|
'variable-columns 'column-headers
|
||||||
'clickable-headers 'reorderable-headers
|
'clickable-headers 'reorderable-headers
|
||||||
'deleted))
|
'deleted))
|
||||||
'(single)]
|
'(single)]
|
||||||
[selection (or/c exact-nonnegative-integer? false/c) #f]
|
[selection (or/c exact-nonnegative-integer? #f) #f]
|
||||||
[font (is-a?/c font%) view-control-font]
|
[font (is-a?/c font%) view-control-font]
|
||||||
[label-font (is-a?/c font%) normal-control-font]
|
[label-font (is-a?/c font%) normal-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
|
|
@ -37,7 +37,7 @@ Removes all user-selectable items from the control.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(find-string [s string?])
|
@defmethod[(find-string [s string?])
|
||||||
(or/c exact-nonnegative-integer? false/c)]{
|
(or/c exact-nonnegative-integer? #f)]{
|
||||||
Finds a user-selectable item matching the given string. If no matching
|
Finds a user-selectable item matching the given string. If no matching
|
||||||
choice is found, @racket[#f] is returned, otherwise the index of the
|
choice is found, @racket[#f] is returned, otherwise the index of the
|
||||||
matching choice is returned (items are indexed from @racket[0]).
|
matching choice is returned (items are indexed from @racket[0]).
|
||||||
|
@ -52,7 +52,7 @@ Returns the number of user-selectable items in the control (which is
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-selection)
|
@defmethod[(get-selection)
|
||||||
(or/c exact-nonnegative-integer? false/c)]{
|
(or/c exact-nonnegative-integer? #f)]{
|
||||||
Returns the index of the currently selected item (items are indexed
|
Returns the index of the currently selected item (items are indexed
|
||||||
from @racket[0]). If the choice item currently contains no choices or no
|
from @racket[0]). If the choice item currently contains no choices or no
|
||||||
selections, @racket[#f] is returned. If multiple selections are
|
selections, @racket[#f] is returned. If multiple selections are
|
||||||
|
@ -71,7 +71,7 @@ Returns the item for the given index (items are indexed from
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-string-selection)
|
@defmethod[(get-string-selection)
|
||||||
(or/c (and/c immutable? label-string?) false/c)]{
|
(or/c (and/c immutable? label-string?) #f)]{
|
||||||
Returns the currently selected item. If the control currently
|
Returns the currently selected item. If the control currently
|
||||||
contains no choices, @racket[#f] is returned. If multiple selections
|
contains no choices, @racket[#f] is returned. If multiple selections
|
||||||
are allowed and multiple items are selected, the first selection is
|
are allowed and multiple items are selected, the first selection is
|
||||||
|
|
|
@ -10,7 +10,7 @@ A @racket[menu-bar%] object is created for a particular
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (one-of/c 'root))]
|
@defconstructor[([parent (or/c (is-a?/c frame%) 'root)]
|
||||||
[demand-callback ((is-a?/c menu-bar%) . -> . any) (lambda (m) (void))])]{
|
[demand-callback ((is-a?/c menu-bar%) . -> . any) (lambda (m) (void))])]{
|
||||||
|
|
||||||
Creates a menu bar in the specified frame. The menu bar is initially
|
Creates a menu bar in the specified frame. The menu bar is initially
|
||||||
|
|
|
@ -11,7 +11,7 @@ A @racket[menu%] object is a submenu within a @racket[menu%] or
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%)
|
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%)
|
||||||
(is-a?/c menu-bar%))]
|
(is-a?/c menu-bar%))]
|
||||||
[help-string (or/c label-string? false/c) #f]
|
[help-string (or/c label-string? #f) #f]
|
||||||
[demand-callback ((is-a?/c menu%) . -> . any) (lambda (m) (void))])]{
|
[demand-callback ((is-a?/c menu%) . -> . any) (lambda (m) (void))])]{
|
||||||
|
|
||||||
Creates a new menu with the given label.
|
Creates a new menu with the given label.
|
||||||
|
|
|
@ -11,11 +11,11 @@ A @racket[menu-item%] is a plain string-labelled menu item. Its
|
||||||
@defconstructor[([label label-string?]
|
@defconstructor[([label label-string?]
|
||||||
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
|
[parent (or/c (is-a?/c menu%) (is-a?/c popup-menu%))]
|
||||||
[callback ((is-a?/c menu-item%) (is-a?/c control-event%) . -> . any)]
|
[callback ((is-a?/c menu-item%) (is-a?/c control-event%) . -> . any)]
|
||||||
[shortcut (or/c char? symbol? false/c) #f]
|
[shortcut (or/c char? symbol? #f) #f]
|
||||||
[help-string (or/c label-string? false/c) #f]
|
[help-string (or/c label-string? #f) #f]
|
||||||
[demand-callback ((is-a?/c menu-item%) . -> . any)
|
[demand-callback ((is-a?/c menu-item%) . -> . any)
|
||||||
(lambda (i) (void))]
|
(lambda (i) (void))]
|
||||||
[shortcut-prefix (listof (one-of/c 'alt 'cmd 'meta 'ctl
|
[shortcut-prefix (listof (or/c 'alt 'cmd 'meta 'ctl
|
||||||
'shift 'option))
|
'shift 'option))
|
||||||
(get-default-shortcut-prefix)])]{
|
(get-default-shortcut-prefix)])]{
|
||||||
|
|
||||||
|
|
|
@ -9,10 +9,10 @@ A message control is a static line of text or a static bitmap. The
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? (is-a?/c bitmap%)
|
@defconstructor[([label (or/c label-string? (is-a?/c bitmap%)
|
||||||
(one-of/c 'app 'caution 'stop))]
|
(or/c 'app 'caution 'stop))]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'deleted)) null]
|
[style (listof (or/c 'deleted)) null]
|
||||||
[font (is-a?/c font%) normal-control-font]
|
[font (is-a?/c font%) normal-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[vert-margin (integer-in 0 1000) 2]
|
[vert-margin (integer-in 0 1000) 2]
|
||||||
|
|
|
@ -53,7 +53,7 @@ The get operation always returns @racket[#"????"] and @racket[#"????"] for
|
||||||
Windows.
|
Windows.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defproc[(find-graphical-system-path [what (one-of/c 'init-file 'x-display)])
|
@defproc[(find-graphical-system-path [what (or/c 'init-file 'x-display)])
|
||||||
(or/c path? #f)]{
|
(or/c path? #f)]{
|
||||||
|
|
||||||
Finds a platform-specific (and possibly user- or machine-specific)
|
Finds a platform-specific (and possibly user- or machine-specific)
|
||||||
|
@ -88,7 +88,7 @@ The result depends on @racket[what], and a @racket[#f] result is only
|
||||||
|
|
||||||
|
|
||||||
@defproc[(get-default-shortcut-prefix)
|
@defproc[(get-default-shortcut-prefix)
|
||||||
(listof (one-of/c 'alt 'cmd 'meta 'ctl 'shift 'option))]{
|
(listof (or/c 'alt 'cmd 'meta 'ctl 'shift 'option))]{
|
||||||
Returns an immutable list specifying the default prefix for menu
|
Returns an immutable list specifying the default prefix for menu
|
||||||
shortcuts. See also
|
shortcuts. See also
|
||||||
@xmethod[selectable-menu-item<%> get-shortcut-prefix].
|
@xmethod[selectable-menu-item<%> get-shortcut-prefix].
|
||||||
|
|
|
@ -21,8 +21,8 @@ See also @racket[grow-box-spacer-pane%].
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -17,7 +17,7 @@ A @racket[panel%] object has a degenerate placement strategy for
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'border 'deleted
|
[style (listof (or/c 'border 'deleted
|
||||||
'hscroll 'auto-hscroll
|
'hscroll 'auto-hscroll
|
||||||
'vscroll 'auto-vscroll)) null]
|
'vscroll 'auto-vscroll)) null]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
@ -25,8 +25,8 @@ A @racket[panel%] object has a degenerate placement strategy for
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center center)]
|
'(center center)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -62,7 +62,7 @@ Does nothing.
|
||||||
|
|
||||||
@defmethod[#:mode pubment
|
@defmethod[#:mode pubment
|
||||||
(after-insert [snip (is-a?/c snip%)]
|
(after-insert [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)]
|
[before (or/c (is-a?/c snip%) #f)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?])
|
[y real?])
|
||||||
void?]{
|
void?]{
|
||||||
|
@ -272,7 +272,7 @@ Returns @racket[#t].
|
||||||
|
|
||||||
@defmethod[#:mode pubment
|
@defmethod[#:mode pubment
|
||||||
(can-insert? [snip (is-a?/c snip%)]
|
(can-insert? [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)]
|
[before (or/c (is-a?/c snip%) #f)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?])
|
[y real?])
|
||||||
boolean?]{
|
boolean?]{
|
||||||
|
@ -580,8 +580,8 @@ See also @method[pasteboard% delete].
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(find-next-selected-snip [start (or/c (is-a?/c snip%) false/c)])
|
@defmethod[(find-next-selected-snip [start (or/c (is-a?/c snip%) #f)])
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
Returns the next selected snip in the editor, starting the search
|
Returns the next selected snip in the editor, starting the search
|
||||||
after @racket[start]. (@|seesniporderdiscuss|) If @racket[start] is @racket[#f],
|
after @racket[start]. (@|seesniporderdiscuss|) If @racket[start] is @racket[#f],
|
||||||
|
@ -595,8 +595,8 @@ Returns the next selected snip in the editor, starting the search
|
||||||
|
|
||||||
@defmethod[(find-snip [x real?]
|
@defmethod[(find-snip [x real?]
|
||||||
[y real?]
|
[y real?]
|
||||||
[after (or/c (is-a?/c snip%) false/c) #f])
|
[after (or/c (is-a?/c snip%) #f) #f])
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
Finds the frontmost snip (after a given snip) that intersects a given
|
Finds the frontmost snip (after a given snip) that intersects a given
|
||||||
@techlink{location}. @|seesniporderdiscuss|
|
@techlink{location}. @|seesniporderdiscuss|
|
||||||
|
@ -655,7 +655,7 @@ Returns whether selection dots are drawn around the edge of selected
|
||||||
([(insert [snip (is-a?/c snip%)])
|
([(insert [snip (is-a?/c snip%)])
|
||||||
void?]
|
void?]
|
||||||
[(insert [snip (is-a?/c snip%)]
|
[(insert [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)]
|
[before (or/c (is-a?/c snip%) #f)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?])
|
[y real?])
|
||||||
void?]
|
void?]
|
||||||
|
@ -664,7 +664,7 @@ Returns whether selection dots are drawn around the edge of selected
|
||||||
[y real?])
|
[y real?])
|
||||||
void?]
|
void?]
|
||||||
[(insert [snip (is-a?/c snip%)]
|
[(insert [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)])
|
[before (or/c (is-a?/c snip%) #f)])
|
||||||
void?])]{
|
void?])]{
|
||||||
|
|
||||||
Inserts @racket[snip] at @techlink{location} @math{(@racket[x],
|
Inserts @racket[snip] at @techlink{location} @math{(@racket[x],
|
||||||
|
@ -873,7 +873,7 @@ If @racket[snip] accepts events, it is designated as the caret owner
|
||||||
|
|
||||||
@defmethod[#:mode pubment
|
@defmethod[#:mode pubment
|
||||||
(on-insert [snip (is-a?/c snip%)]
|
(on-insert [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)]
|
[before (or/c (is-a?/c snip%) #f)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?])
|
[y real?])
|
||||||
void?]{
|
void?]{
|
||||||
|
@ -1099,7 +1099,7 @@ Attempts to resize a given snip. If the snip allows resizing,
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-after [snip (is-a?/c snip%)]
|
@defmethod[(set-after [snip (is-a?/c snip%)]
|
||||||
[after (or/c (is-a?/c snip%) false/c)])
|
[after (or/c (is-a?/c snip%) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Changes the depth of @racket[snip] moving it just behind
|
Changes the depth of @racket[snip] moving it just behind
|
||||||
|
@ -1113,7 +1113,7 @@ See also @method[pasteboard% raise], @method[pasteboard% lower], and
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-before [snip (is-a?/c snip%)]
|
@defmethod[(set-before [snip (is-a?/c snip%)]
|
||||||
[before (or/c (is-a?/c snip%) false/c)])
|
[before (or/c (is-a?/c snip%) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Changes the depth of @racket[snip] moving it just in front of
|
Changes the depth of @racket[snip] moving it just in front of
|
||||||
|
|
|
@ -13,7 +13,7 @@ however, displays a single value that the user selects from a popup
|
||||||
control, and it is not accessible to the programmer.
|
control, and it is not accessible to the programmer.
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([title (or/c label-string? false/c) #f]
|
@defconstructor[([title (or/c label-string? #f) #f]
|
||||||
[popdown-callback ((is-a?/c popup-menu%) (is-a?/c control-event%)
|
[popdown-callback ((is-a?/c popup-menu%) (is-a?/c control-event%)
|
||||||
. -> . any)
|
. -> . any)
|
||||||
(lambda (p e) (void))]
|
(lambda (p e) (void))]
|
||||||
|
@ -55,7 +55,7 @@ Returns the font used for the popup menu's items, which is optionally
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-popup-target)
|
@defmethod[(get-popup-target)
|
||||||
(or/c (is-a?/c window<%>) (is-a?/c editor<%>) false/c)]{
|
(or/c (is-a?/c window<%>) (is-a?/c editor<%>) #f)]{
|
||||||
|
|
||||||
Returns the context in which the popup menu is currently displayed, or
|
Returns the context in which the popup menu is currently displayed, or
|
||||||
@racket[#f] if it is not popped up in any window.
|
@racket[#f] if it is not popped up in any window.
|
||||||
|
|
|
@ -20,7 +20,7 @@ When a @racket[printer-dc%] object is created, the user gets
|
||||||
If the user cancels the dialog, the @method[dc<%> ok?] method
|
If the user cancels the dialog, the @method[dc<%> ok?] method
|
||||||
of the object returns @racket[#f].
|
of the object returns @racket[#f].
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) false/c) #f])]{
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%) #f) #f])]{
|
||||||
|
|
||||||
If @racket[parent] is not @racket[#f], it is used as the parent window
|
If @racket[parent] is not @racket[#f], it is used as the parent window
|
||||||
of the configuration dialog.
|
of the configuration dialog.
|
||||||
|
|
|
@ -17,14 +17,14 @@ Whenever the user changes the selected radio button, the radio box's
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[choices (or/c (listof label-string?) (listof (is-a?/c bitmap%)))]
|
[choices (or/c (listof label-string?) (listof (is-a?/c bitmap%)))]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c radio-box%) (is-a?/c control-event%)
|
[callback ((is-a?/c radio-box%) (is-a?/c control-event%)
|
||||||
. -> . any)
|
. -> . any)
|
||||||
(lambda (r e) (void))]
|
(lambda (r e) (void))]
|
||||||
[style (listof (one-of/c 'horizontal 'vertical
|
[style (listof (or/c 'horizontal 'vertical
|
||||||
'vertical-label 'horizontal-label
|
'vertical-label 'horizontal-label
|
||||||
'deleted))
|
'deleted))
|
||||||
'(vertical)]
|
'(vertical)]
|
||||||
|
|
|
@ -18,9 +18,9 @@ Since @racket[read] and @racket[read-syntax] build on
|
||||||
containing the snip.
|
containing the snip.
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
The arguments are the same as the arguments to a procedure returned by
|
The arguments are the same as the arguments to a procedure returned by
|
||||||
|
|
|
@ -13,10 +13,10 @@ See
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([event-type (one-of/c 'top 'bottom 'line-up 'line-down
|
@defconstructor[([event-type (or/c 'top 'bottom 'line-up 'line-down
|
||||||
'page-up 'page-down 'thumb)
|
'page-up 'page-down 'thumb)
|
||||||
'thumb]
|
'thumb]
|
||||||
[direction (one-of/c 'horizontal 'vertical) 'vertical]
|
[direction (or/c 'horizontal 'vertical) 'vertical]
|
||||||
[position (integer-in 0 10000) 0]
|
[position (integer-in 0 10000) 0]
|
||||||
[time-stamp exact-integer? 0])]{
|
[time-stamp exact-integer? 0])]{
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ See the corresponding @racket[get-] and @racket[set-] methods for
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-direction)
|
@defmethod[(get-direction)
|
||||||
(one-of/c 'horizontal 'vertical)]{
|
(or/c 'horizontal 'vertical)]{
|
||||||
|
|
||||||
Gets the identity of the scrollbar that was modified by the event,
|
Gets the identity of the scrollbar that was modified by the event,
|
||||||
either the horizontal scrollbar or the vertical scrollbar, as
|
either the horizontal scrollbar or the vertical scrollbar, as
|
||||||
|
@ -37,7 +37,8 @@ Gets the identity of the scrollbar that was modified by the event,
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-event-type)
|
@defmethod[(get-event-type)
|
||||||
(one-of/c 'top 'bottom 'line-up 'line-down 'page-up 'page-down 'thumb)]{
|
(or/c 'top 'bottom 'line-up 'line-down
|
||||||
|
'page-up 'page-down 'thumb)]{
|
||||||
|
|
||||||
Returns the type of the event, one of the following:
|
Returns the type of the event, one of the following:
|
||||||
|
|
||||||
|
@ -61,7 +62,7 @@ Returns the position of the scrollbar after the action triggering the
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-direction [direction (one-of/c 'horizontal 'vertical)])
|
@defmethod[(set-direction [direction (or/c 'horizontal 'vertical)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the identity of the scrollbar that was modified by the event,
|
Sets the identity of the scrollbar that was modified by the event,
|
||||||
|
@ -71,7 +72,7 @@ Sets the identity of the scrollbar that was modified by the event,
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-event-type [type (one-of/c 'top 'bottom 'line-up 'line-down
|
@defmethod[(set-event-type [type (or/c 'top 'bottom 'line-up 'line-down
|
||||||
'page-up 'page-down 'thumb)])
|
'page-up 'page-down 'thumb)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ Invokes the menu item's callback procedure, which is supplied when an
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-shortcut)
|
@defmethod[(get-shortcut)
|
||||||
(or/c char? symbol? false/c)]{
|
(or/c char? symbol? #f)]{
|
||||||
|
|
||||||
Gets the keyboard shortcut character or virtual key for the menu
|
Gets the keyboard shortcut character or virtual key for the menu
|
||||||
item. This character or key is combined with the shortcut prefix,
|
item. This character or key is combined with the shortcut prefix,
|
||||||
|
@ -43,7 +43,7 @@ For a list of allowed key symbols, see @xmethod[key-event%
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-shortcut-prefix)
|
@defmethod[(get-shortcut-prefix)
|
||||||
(listof (one-of/c 'alt 'cmd 'meta 'ctl 'shift 'option))]{
|
(listof (or/c 'alt 'cmd 'meta 'ctl 'shift 'option))]{
|
||||||
|
|
||||||
Returns a list of symbols that indicates the keyboard prefix used for the menu
|
Returns a list of symbols that indicates the keyboard prefix used for the menu
|
||||||
item's keyboard shortcut. The allowed symbols for the list are the following:
|
item's keyboard shortcut. The allowed symbols for the list are the following:
|
||||||
|
@ -88,7 +88,7 @@ An empty list can be used for a shortcut prefix. However, the default
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-shortcut [shortcut (or/c char? symbol? false/c)])
|
@defmethod[(set-shortcut [shortcut (or/c char? symbol? #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the keyboard shortcut character for the menu item. See
|
Sets the keyboard shortcut character for the menu item. See
|
||||||
|
@ -99,7 +99,7 @@ keyboard shortcut.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(set-shortcut-prefix [prefix (listof (one-of/c 'alt 'cmd 'meta 'ctl 'shift 'option))])
|
@defmethod[(set-shortcut-prefix [prefix (listof (or/c 'alt 'cmd 'meta 'ctl 'shift 'option))])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets a list of symbols to indicates the keyboard prefix used for the
|
Sets a list of symbols to indicates the keyboard prefix used for the
|
||||||
|
|
|
@ -14,14 +14,14 @@ Whenever the user changes the value of a slider, its callback
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[min-value (integer-in -10000 10000)]
|
[min-value (integer-in -10000 10000)]
|
||||||
[max-value (integer-in -10000 10000)]
|
[max-value (integer-in -10000 10000)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c slider%) (is-a?/c control-event%) . -> . any) (lambda (b e) (void))]
|
[callback ((is-a?/c slider%) (is-a?/c control-event%) . -> . any) (lambda (b e) (void))]
|
||||||
[init-value (integer-in -10000 10000) min-value]
|
[init-value (integer-in -10000 10000) min-value]
|
||||||
[style (listof (one-of/c 'horizontal 'vertical 'plain
|
[style (listof (or/c 'horizontal 'vertical 'plain
|
||||||
'vertical-label 'horizontal-label
|
'vertical-label 'horizontal-label
|
||||||
'deleted))
|
'deleted))
|
||||||
'(horizontal)]
|
'(horizontal)]
|
||||||
|
|
|
@ -27,7 +27,7 @@ Creates a (useless) editor administrator.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-dc)
|
@defmethod[(get-dc)
|
||||||
(or/c (is-a?/c dc<%>) false/c)]{
|
(or/c (is-a?/c dc<%>) #f)]{
|
||||||
|
|
||||||
Gets a drawing context suitable for determining display size
|
Gets a drawing context suitable for determining display size
|
||||||
information. If the snip is not displayed, @racket[#f] is returned.
|
information. If the snip is not displayed, @racket[#f] is returned.
|
||||||
|
@ -42,11 +42,11 @@ Returns the editor that this administrator reports to (directly or
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-view [x (or/c (box/c real?) false/c)]
|
@defmethod[(get-view [x (or/c (box/c real?) #f)]
|
||||||
[y (or/c (box/c real?) false/c)]
|
[y (or/c (box/c real?) #f)]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[h (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
[h (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[snip (or/c (is-a?/c snip%) false/c) #f])
|
[snip (or/c (is-a?/c snip%) #f) #f])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -78,8 +78,8 @@ Fills all boxes with @racket[0.0].
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(get-view-size [h (or/c (box/c (and/c real? (not/c negative?))) false/c)]
|
@defmethod[(get-view-size [h (or/c (box/c (and/c real? (not/c negative?))) #f)]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c)])
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
@methspec{
|
@methspec{
|
||||||
|
@ -243,7 +243,7 @@ Does nothing.
|
||||||
[w (and/c real? (not/c negative?))]
|
[w (and/c real? (not/c negative?))]
|
||||||
[h (and/c real? (not/c negative?))]
|
[h (and/c real? (not/c negative?))]
|
||||||
[refresh? any/c]
|
[refresh? any/c]
|
||||||
[bias (one-of/c 'start 'end 'none) 'none])
|
[bias (or/c 'start 'end 'none) 'none])
|
||||||
boolean?]{
|
boolean?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -283,7 +283,7 @@ Returns @racket[#f].
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(set-caret-owner [snip (is-a?/c snip%)]
|
@defmethod[(set-caret-owner [snip (is-a?/c snip%)]
|
||||||
[domain (one-of/c 'immediate 'display 'global)])
|
[domain (or/c 'immediate 'display 'global)])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ Returns the version of this snip class. When attempting to load a file
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(read [f (is-a?/c editor-stream-in%)])
|
@defmethod[(read [f (is-a?/c editor-stream-in%)])
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,7 @@ Adds a snip class to the list. If a class with the same name already
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(find [name string?])
|
@defmethod[(find [name string?])
|
||||||
(or/c (is-a?/c snip-class%) false/c)]{
|
(or/c (is-a?/c snip-class%) #f)]{
|
||||||
|
|
||||||
Finds a snip class from the list with the given name, returning
|
Finds a snip class from the list with the given name, returning
|
||||||
@racket[#f] if none is found.
|
@racket[#f] if none is found.
|
||||||
|
@ -34,7 +34,7 @@ Returns an index into the list for the specified class.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(nth [n exact-nonnegative-integer?])
|
@defmethod[(nth [n exact-nonnegative-integer?])
|
||||||
(or/c (is-a?/c snip-class%) false/c)]{
|
(or/c (is-a?/c snip-class%) #f)]{
|
||||||
|
|
||||||
Returns the @racket[n]th class in the list, or @racket[#f] if
|
Returns the @racket[n]th class in the list, or @racket[#f] if
|
||||||
the list has @racket[n] classes or less.
|
the list has @racket[n] classes or less.
|
||||||
|
|
|
@ -90,7 +90,7 @@ Creates a plain snip of length 1 with the @racket["Basic"] style of
|
||||||
[editorx real?]
|
[editorx real?]
|
||||||
[editory real?]
|
[editory real?]
|
||||||
[event (is-a?/c mouse-event%)])
|
[event (is-a?/c mouse-event%)])
|
||||||
(or/c (is-a?/c cursor%) false/c)]{
|
(or/c (is-a?/c cursor%) #f)]{
|
||||||
|
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -122,7 +122,7 @@ The drawing context and snip's @techlink{location}s in drawing context
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(can-do-edit-operation? [op (one-of/c 'undo 'redo 'clear 'cut 'copy
|
@defmethod[(can-do-edit-operation? [op (or/c 'undo 'redo 'clear 'cut 'copy
|
||||||
'paste 'kill 'select-all
|
'paste 'kill 'select-all
|
||||||
'insert-text-box 'insert-pasteboard-box
|
'insert-text-box 'insert-pasteboard-box
|
||||||
'insert-image)]
|
'insert-image)]
|
||||||
|
@ -147,7 +147,7 @@ Creates and returns a copy of this snip. The @method[snip% copy]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(do-edit-operation [op (one-of/c 'undo 'redo 'clear 'cut 'copy
|
@defmethod[(do-edit-operation [op (or/c 'undo 'redo 'clear 'cut 'copy
|
||||||
'paste 'kill 'select-all
|
'paste 'kill 'select-all
|
||||||
'insert-text-box 'insert-pasteboard-box
|
'insert-text-box 'insert-pasteboard-box
|
||||||
'insert-image)]
|
'insert-image)]
|
||||||
|
@ -265,7 +265,7 @@ Returns @racket[0].
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(get-admin)
|
@defmethod[(get-admin)
|
||||||
(or/c (is-a?/c snip-admin%) false/c)]{
|
(or/c (is-a?/c snip-admin%) #f)]{
|
||||||
|
|
||||||
Returns the administrator for this snip. (The administrator can be
|
Returns the administrator for this snip. (The administrator can be
|
||||||
@racket[#f] even if the snip is owned but not visible in the editor.)
|
@racket[#f] even if the snip is owned but not visible in the editor.)
|
||||||
|
@ -283,12 +283,12 @@ Returns the snip's @techlink{count} (i.e., number of @techlink{item}s
|
||||||
@defmethod[(get-extent [dc (is-a?/c dc<%>)]
|
@defmethod[(get-extent [dc (is-a?/c dc<%>)]
|
||||||
[x real?]
|
[x real?]
|
||||||
[y real?]
|
[y real?]
|
||||||
[w (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[w (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[h (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[h (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[descent (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[descent (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[space (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[space (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[lspace (or/c (box/c (and/c real? (not/c negative?))) false/c) #f]
|
[lspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f]
|
||||||
[rspace (or/c (box/c (and/c real? (not/c negative?))) false/c) #f])
|
[rspace (or/c (box/c (and/c real? (not/c negative?))) #f) #f])
|
||||||
void?]{
|
void?]{
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ Returns @racket[#t] if the @racket[snip] and @this-obj[] are from the
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(merge-with [prev (is-a?/c snip%)])
|
@defmethod[(merge-with [prev (is-a?/c snip%)])
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
@methspec{
|
@methspec{
|
||||||
|
|
||||||
|
@ -557,7 +557,7 @@ Returns @racket[#f].
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(next)
|
@defmethod[(next)
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
Returns the next snip in the editor owning this snip, or @racket[#f]
|
Returns the next snip in the editor owning this snip, or @racket[#f]
|
||||||
if this is the last snip.
|
if this is the last snip.
|
||||||
|
@ -677,7 +677,7 @@ Returns @racket[0.0].
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(previous)
|
@defmethod[(previous)
|
||||||
(or/c (is-a?/c snip%) false/c)]{
|
(or/c (is-a?/c snip%) #f)]{
|
||||||
|
|
||||||
Returns the previous snip in the editor owning this snip, or @racket[#f] if this
|
Returns the previous snip in the editor owning this snip, or @racket[#f] if this
|
||||||
is the first snip.
|
is the first snip.
|
||||||
|
@ -727,7 +727,7 @@ Returns @racket[#f].
|
||||||
}}
|
}}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-admin [admin (or/c (is-a?/c snip-admin%) false/c)])
|
@defmethod[(set-admin [admin (or/c (is-a?/c snip-admin%) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the snip's administrator. Only an administrator should call this
|
Sets the snip's administrator. Only an administrator should call this
|
||||||
|
|
|
@ -219,7 +219,7 @@ Gets the multiplicative color shift for the background (applied before
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-face)
|
@defmethod[(get-face)
|
||||||
(or/c string? false/c)]{
|
(or/c string? #f)]{
|
||||||
|
|
||||||
Gets the delta's font face string. If this string is @racket[#f] and the
|
Gets the delta's font face string. If this string is @racket[#f] and the
|
||||||
family is @indexed-racket['base] when the delta is applied to a style,
|
family is @indexed-racket['base] when the delta is applied to a style,
|
||||||
|
@ -486,7 +486,7 @@ For the case that a string color name is supplied, see
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(set-face [v (or/c string? false/c)])
|
@defmethod[(set-face [v (or/c string? #f)])
|
||||||
void?]{See
|
void?]{See
|
||||||
@method[style-delta% get-face]. See also
|
@method[style-delta% get-face]. See also
|
||||||
@method[style-delta% set-delta-face].
|
@method[style-delta% set-delta-face].
|
||||||
|
|
|
@ -12,7 +12,7 @@ See also @|stylediscuss|.
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-alignment)
|
@defmethod[(get-alignment)
|
||||||
(one-of/c 'top 'center 'bottom)]{
|
(or/c 'top 'center 'bottom)]{
|
||||||
|
|
||||||
Returns the style's alignment: @racket['top], @racket['center], or
|
Returns the style's alignment: @racket['top], @racket['center], or
|
||||||
@racket['bottom].
|
@racket['bottom].
|
||||||
|
@ -29,7 +29,7 @@ Returns the style's background color.
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-base-style)
|
@defmethod[(get-base-style)
|
||||||
(or/c (is-a?/c style<%>) false/c)]{
|
(or/c (is-a?/c style<%>) #f)]{
|
||||||
|
|
||||||
Returns the style's base style. See @|stylediscuss| for more
|
Returns the style's base style. See @|stylediscuss| for more
|
||||||
information. The return value is @racket[#f] only for the basic style
|
information. The return value is @racket[#f] only for the basic style
|
||||||
|
@ -46,7 +46,7 @@ Mutates @racket[delta], changing it to match the style's delta, if the style is
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-face)
|
@defmethod[(get-face)
|
||||||
(or/c string? false/c)]{
|
(or/c string? #f)]{
|
||||||
|
|
||||||
Returns the style's face name. See @racket[font%].
|
Returns the style's face name. See @racket[font%].
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Returns the style's face name. See @racket[font%].
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(get-family)
|
@defmethod[(get-family)
|
||||||
(one-of/c 'default 'decorative 'roman 'script
|
(or/c 'default 'decorative 'roman 'script
|
||||||
'swiss 'modern 'symbol 'system)]{
|
'swiss 'modern 'symbol 'system)]{
|
||||||
|
|
||||||
Returns the style's font family. See @racket[font%].
|
Returns the style's font family. See @racket[font%].
|
||||||
|
@ -76,7 +76,7 @@ Returns the style's foreground color.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-name)
|
@defmethod[(get-name)
|
||||||
(or/c string? false/c)]{
|
(or/c string? #f)]{
|
||||||
|
|
||||||
Returns the style's name, or @racket[#f] if it is unnamed. Style names
|
Returns the style's name, or @racket[#f] if it is unnamed. Style names
|
||||||
are only set through the style's @racket[style-list%] object.
|
are only set through the style's @racket[style-list%] object.
|
||||||
|
@ -107,14 +107,14 @@ Returns @racket[#t] if the style size is in pixels, instead of points,
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-smoothing)
|
@defmethod[(get-smoothing)
|
||||||
(one-of/c 'default 'partly-smoothed 'smoothed 'unsmoothed)]{
|
(or/c 'default 'partly-smoothed 'smoothed 'unsmoothed)]{
|
||||||
|
|
||||||
Returns the style's font smoothing. See @racket[font%].
|
Returns the style's font smoothing. See @racket[font%].
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-style)
|
@defmethod[(get-style)
|
||||||
(one-of/c 'normal 'italic 'slant)]{
|
(or/c 'normal 'italic 'slant)]{
|
||||||
|
|
||||||
Returns the style's font style. See @racket[font%].
|
Returns the style's font style. See @racket[font%].
|
||||||
|
|
||||||
|
@ -166,7 +166,7 @@ Returns @racket[#t] if the style is underlined or @racket[#f]
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-weight)
|
@defmethod[(get-weight)
|
||||||
(one-of/c 'normal 'bold 'light)]{
|
(or/c 'normal 'bold 'light)]{
|
||||||
|
|
||||||
Returns the style's font weight. See @racket[font%].
|
Returns the style's font weight. See @racket[font%].
|
||||||
|
|
||||||
|
@ -205,7 +205,7 @@ the style's font, etc. See @|stylediscuss| for more information.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(switch-to [dc (is-a?/c dc<%>)]
|
@defmethod[(switch-to [dc (is-a?/c dc<%>)]
|
||||||
[old-style (or/c (is-a?/c style<%>) false/c)])
|
[old-style (or/c (is-a?/c style<%>) #f)])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the font, pen color, etc. of the given drawing context. If
|
Sets the font, pen color, etc. of the given drawing context. If
|
||||||
|
|
|
@ -47,7 +47,7 @@ a new style in this list.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(find-named-style [name string?])
|
@defmethod[(find-named-style [name string?])
|
||||||
(or/c (is-a?/c style<%>) false/c)]{
|
(or/c (is-a?/c style<%>) #f)]{
|
||||||
|
|
||||||
Finds a style by name. If no such style can be found, @racket[#f] is
|
Finds a style by name. If no such style can be found, @racket[#f] is
|
||||||
returned.
|
returned.
|
||||||
|
@ -97,7 +97,7 @@ notify-on-change].
|
||||||
|
|
||||||
|
|
||||||
@defmethod[(index-to-style [i exact-nonnegative-integer?])
|
@defmethod[(index-to-style [i exact-nonnegative-integer?])
|
||||||
(or/c (is-a?/c style<%>) false/c)]{
|
(or/c (is-a?/c style<%>) #f)]{
|
||||||
|
|
||||||
Returns the style associated with the given index, or @racket[#f] for
|
Returns the style associated with the given index, or @racket[#f] for
|
||||||
a bad index. See also @method[style-list% style-to-index].
|
a bad index. See also @method[style-list% style-to-index].
|
||||||
|
@ -158,7 +158,7 @@ Like @method[style-list% new-named-style], except that if the name is
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(style-to-index [style (is-a?/c style<%>)])
|
@defmethod[(style-to-index [style (is-a?/c style<%>)])
|
||||||
(or/c exact-nonnegative-integer? false/c)]{
|
(or/c exact-nonnegative-integer? #f)]{
|
||||||
|
|
||||||
Returns the index for a particular style. The index for a style's base
|
Returns the index for a particular style. The index for a style's base
|
||||||
style (and shift style, if it is a join style) is guaranteed to be
|
style (and shift style, if it is a join style) is guaranteed to be
|
||||||
|
|
|
@ -87,8 +87,8 @@ or has no effect (when called with a handler).
|
||||||
|
|
||||||
|
|
||||||
@defproc*[([(application-preferences-handler)
|
@defproc*[([(application-preferences-handler)
|
||||||
(or/c (-> any) false/c)]
|
(or/c (-> any) #f)]
|
||||||
[(application-preferences-handler [handler-thunk (or/c (-> any) false/c)])
|
[(application-preferences-handler [handler-thunk (or/c (-> any) #f)])
|
||||||
void?])]{
|
void?])]{
|
||||||
When the current eventspace is the initial eventspace, this procedure
|
When the current eventspace is the initial eventspace, this procedure
|
||||||
retrieves or installs a thunk that is called when the user selects
|
retrieves or installs a thunk that is called when the user selects
|
||||||
|
|
|
@ -21,15 +21,15 @@ The @racket[tab-panel%] class does not implement the virtual
|
||||||
[callback ((is-a?/c tab-panel%) (is-a?/c control-event%)
|
[callback ((is-a?/c tab-panel%) (is-a?/c control-event%)
|
||||||
. -> . any)
|
. -> . any)
|
||||||
(lambda (b e) (void))]
|
(lambda (b e) (void))]
|
||||||
[style (listof (one-of/c 'no-border 'deleted)) null]
|
[style (listof (or/c 'no-border 'deleted)) null]
|
||||||
[font (is-a?/c font%) normal-control-font]
|
[font (is-a?/c font%) normal-control-font]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
[vert-margin (integer-in 0 1000) 0]
|
[vert-margin (integer-in 0 1000) 0]
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
@ -91,7 +91,7 @@ Returns the number of tabs on the panel.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-selection)
|
@defmethod[(get-selection)
|
||||||
(or/c exact-nonnegative-integer? false/c)]{
|
(or/c exact-nonnegative-integer? #f)]{
|
||||||
|
|
||||||
Returns the index (counting from 0) of the currently selected tab. If
|
Returns the index (counting from 0) of the currently selected tab. If
|
||||||
the panel has no tabs, the result is @racket[#f].
|
the panel has no tabs, the result is @racket[#f].
|
||||||
|
|
|
@ -36,14 +36,14 @@ The keymap for the text field's editor is initialized by calling the
|
||||||
@racket[current-text-keymap-initializer] parameter.
|
@racket[current-text-keymap-initializer] parameter.
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([label (or/c label-string? false/c)]
|
@defconstructor[([label (or/c label-string? #f)]
|
||||||
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
[parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[callback ((is-a?/c text-field%) (is-a?/c control-event%)
|
[callback ((is-a?/c text-field%) (is-a?/c control-event%)
|
||||||
. -> . any)
|
. -> . any)
|
||||||
(lambda (t e) (void))]
|
(lambda (t e) (void))]
|
||||||
[init-value string? ""]
|
[init-value string? ""]
|
||||||
[style (listof (one-of/c 'single 'multiple 'hscroll 'password
|
[style (listof (or/c 'single 'multiple 'hscroll 'password
|
||||||
'vertical-label 'horizontal-label
|
'vertical-label 'horizontal-label
|
||||||
'deleted))
|
'deleted))
|
||||||
'(single)]
|
'(single)]
|
||||||
|
|
|
@ -23,7 +23,7 @@ See @secref["eventspaceinfo"] for more information about event
|
||||||
|
|
||||||
|
|
||||||
@defconstructor[([notify-callback (-> any) void]
|
@defconstructor[([notify-callback (-> any) void]
|
||||||
[interval (or/c (integer-in 0 1000000000) false/c) #f]
|
[interval (or/c (integer-in 0 1000000000) #f) #f]
|
||||||
[just-once? any/c #f])]{
|
[just-once? any/c #f])]{
|
||||||
|
|
||||||
The @racket[notify-callback] thunk is called by the default
|
The @racket[notify-callback] thunk is called by the default
|
||||||
|
|
|
@ -34,7 +34,7 @@ Calls @method[top-level-window<%> can-close?] and returns the result.
|
||||||
|
|
||||||
}}
|
}}
|
||||||
|
|
||||||
@defmethod[(center [direction (one-of/c 'horizontal 'vertical 'both) 'both])
|
@defmethod[(center [direction (or/c 'horizontal 'vertical 'both) 'both])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Centers the window on the screen if it has no parent. If it has a
|
Centers the window on the screen if it has no parent. If it has a
|
||||||
|
@ -48,7 +48,7 @@ If @racket[direction] is @racket['horizontal], the window is centered
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-edit-target-object)
|
@defmethod[(get-edit-target-object)
|
||||||
(or/c (or/c (is-a?/c window<%>) (is-a?/c editor<%>)) false/c)]{
|
(or/c (or/c (is-a?/c window<%>) (is-a?/c editor<%>)) #f)]{
|
||||||
|
|
||||||
@index['("keyboard focus" "last active")]{Like}
|
@index['("keyboard focus" "last active")]{Like}
|
||||||
@method[top-level-window<%> get-edit-target-window], but if an editor
|
@method[top-level-window<%> get-edit-target-window], but if an editor
|
||||||
|
@ -61,7 +61,7 @@ See also @method[top-level-window<%> get-focus-object].
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-edit-target-window)
|
@defmethod[(get-edit-target-window)
|
||||||
(or/c (is-a?/c window<%>) false/c)]{
|
(or/c (is-a?/c window<%>) #f)]{
|
||||||
|
|
||||||
@index['("keyboard focus" "last active")]{Returns} the window that
|
@index['("keyboard focus" "last active")]{Returns} the window that
|
||||||
most recently had the keyboard focus, either the top-level window or
|
most recently had the keyboard focus, either the top-level window or
|
||||||
|
@ -81,7 +81,7 @@ Returns the window's eventspace.
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-focus-object)
|
@defmethod[(get-focus-object)
|
||||||
(or/c (or/c (is-a?/c window<%>) (is-a?/c editor<%>)) false/c)]{
|
(or/c (or/c (is-a?/c window<%>) (is-a?/c editor<%>)) #f)]{
|
||||||
|
|
||||||
@index["keyboard focus"]{Like} @method[top-level-window<%>
|
@index["keyboard focus"]{Like} @method[top-level-window<%>
|
||||||
get-focus-window], but if an editor canvas has the focus and it also
|
get-focus-window], but if an editor canvas has the focus and it also
|
||||||
|
@ -94,7 +94,7 @@ See also @method[top-level-window<%> get-edit-target-object].
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(get-focus-window)
|
@defmethod[(get-focus-window)
|
||||||
(or/c (is-a?/c window<%>) false/c)]{
|
(or/c (is-a?/c window<%>) #f)]{
|
||||||
|
|
||||||
@index["keyboard focus"]{Returns} the window that has the keyboard
|
@index["keyboard focus"]{Returns} the window that has the keyboard
|
||||||
focus, either the top-level window or one of its children. If neither
|
focus, either the top-level window or one of its children. If neither
|
||||||
|
@ -315,7 +315,7 @@ Sets the size of the window (in pixels), but only if the given size is
|
||||||
|
|
||||||
@defmethod[(set-icon [icon (is-a?/c bitmap%)]
|
@defmethod[(set-icon [icon (is-a?/c bitmap%)]
|
||||||
[mask (is-a?/c bitmap%) #f]
|
[mask (is-a?/c bitmap%) #f]
|
||||||
[which (one-of/c 'small 'large 'both) 'both])
|
[which (or/c 'small 'large 'both) 'both])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Sets the large or small icon bitmap for the window. Future changes to
|
Sets the large or small icon bitmap for the window. Future changes to
|
||||||
|
|
|
@ -14,8 +14,8 @@ A vertical pane arranges its subwindows in a single column. See also @racket[pan
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -11,7 +11,7 @@ A vertical panel arranges its subwindows in a single column. See
|
||||||
|
|
||||||
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
@defconstructor[([parent (or/c (is-a?/c frame%) (is-a?/c dialog%)
|
||||||
(is-a?/c panel%) (is-a?/c pane%))]
|
(is-a?/c panel%) (is-a?/c pane%))]
|
||||||
[style (listof (one-of/c 'border 'deleted
|
[style (listof (or/c 'border 'deleted
|
||||||
'hscroll 'auto-hscroll
|
'hscroll 'auto-hscroll
|
||||||
'vscroll 'auto-vscroll)) null]
|
'vscroll 'auto-vscroll)) null]
|
||||||
[enabled any/c #t]
|
[enabled any/c #t]
|
||||||
|
@ -19,8 +19,8 @@ A vertical panel arranges its subwindows in a single column. See
|
||||||
[horiz-margin (integer-in 0 1000) 0]
|
[horiz-margin (integer-in 0 1000) 0]
|
||||||
[border (integer-in 0 1000) 0]
|
[border (integer-in 0 1000) 0]
|
||||||
[spacing (integer-in 0 1000) 0]
|
[spacing (integer-in 0 1000) 0]
|
||||||
[alignment (list/c (one-of/c 'left 'center 'right)
|
[alignment (list/c (or/c 'left 'center 'right)
|
||||||
(one-of/c 'top 'center 'bottom))
|
(or/c 'top 'center 'bottom))
|
||||||
'(center top)]
|
'(center top)]
|
||||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||||
|
|
|
@ -160,10 +160,10 @@ See also
|
||||||
@defmethod[(get-label)
|
@defmethod[(get-label)
|
||||||
(or/c label-string?
|
(or/c label-string?
|
||||||
(is-a?/c bitmap%)
|
(is-a?/c bitmap%)
|
||||||
(one-of/c 'app 'caution 'stop)
|
(or/c 'app 'caution 'stop)
|
||||||
(list/c (is-a?/c bitmap%)
|
(list/c (is-a?/c bitmap%)
|
||||||
label-string?
|
label-string?
|
||||||
(one-of/c 'left 'top 'right 'bottom))
|
(or/c 'left 'top 'right 'bottom))
|
||||||
#f)]{
|
#f)]{
|
||||||
|
|
||||||
Gets a window's label, if any. Control windows generally display their
|
Gets a window's label, if any. Control windows generally display their
|
||||||
|
|
|
@ -95,7 +95,7 @@ any) is consumed.}
|
||||||
|
|
||||||
|
|
||||||
@defproc[(register-lib-mapping! [str string?]
|
@defproc[(register-lib-mapping! [str string?]
|
||||||
[mod-path (cons/c (one-of/c 'lib) (listof string?))])
|
[mod-path (cons/c 'lib (listof string?))])
|
||||||
void?]{
|
void?]{
|
||||||
|
|
||||||
Maps a snip-class name to a quoted module path that provides a
|
Maps a snip-class name to a quoted module path that provides a
|
||||||
|
@ -106,7 +106,7 @@ contains only alpha-numeric ASCII characters, @litchar{.},
|
||||||
|
|
||||||
|
|
||||||
@defproc[(string->lib-path [str string?] [gui? any/c])
|
@defproc[(string->lib-path [str string?] [gui? any/c])
|
||||||
(cons/c (one-of/c 'lib) (listof string?))]{
|
(cons/c 'lib (listof string?))]{
|
||||||
|
|
||||||
Returns a quoted module path for @racket[str] for either
|
Returns a quoted module path for @racket[str] for either
|
||||||
@racket[editor<%>] mode when @racket[gui?] is true, or
|
@racket[editor<%>] mode when @racket[gui?] is true, or
|
||||||
|
@ -198,9 +198,9 @@ An interface to be implemented by values returned from a snip reader.
|
||||||
The only method is @method[readable<%> read-special].
|
The only method is @method[readable<%> read-special].
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Like @method[readable-snip<%> read-special], but for non-graphical
|
Like @method[readable-snip<%> read-special], but for non-graphical
|
||||||
|
@ -385,17 +385,17 @@ in case old code still needs them. In other words, the methods
|
||||||
below are provided for backwards compatibility with earlier
|
below are provided for backwards compatibility with earlier
|
||||||
verisons of Racket.
|
verisons of Racket.
|
||||||
|
|
||||||
@defmethod[(get-data) (or/c bytes? false/c)]{
|
@defmethod[(get-data) (or/c bytes? #f)]{
|
||||||
|
|
||||||
Returns bytes for a PNG, XBM,or XPM file for the image.}
|
Returns bytes for a PNG, XBM,or XPM file for the image.}
|
||||||
|
|
||||||
@defmethod[(get-w) (or/c exact-nonnegative-integer? (one-of/c -1))]{
|
@defmethod[(get-w) (or/c exact-nonnegative-integer? -1)]{
|
||||||
|
|
||||||
Returns the display width of the image, which may differ from the
|
Returns the display width of the image, which may differ from the
|
||||||
width of the actual image specified as data or by a filename; -1 means
|
width of the actual image specified as data or by a filename; -1 means
|
||||||
that the image data's width should be used.}
|
that the image data's width should be used.}
|
||||||
|
|
||||||
@defmethod[(get-h) (or/c exact-nonnegative-integer? (one-of/c -1))]{
|
@defmethod[(get-h) (or/c exact-nonnegative-integer? -1)]{
|
||||||
|
|
||||||
Returns the display height of the image, which may differ from the
|
Returns the display height of the image, which may differ from the
|
||||||
height of the actual image specified as data or by a filename; -1
|
height of the actual image specified as data or by a filename; -1
|
||||||
|
@ -430,16 +430,16 @@ A text-mode reader for comment boxes.}]
|
||||||
Instantiated for DrRacket comment boxes in a @tech{WXME} stream for
|
Instantiated for DrRacket comment boxes in a @tech{WXME} stream for
|
||||||
text mode.
|
text mode.
|
||||||
|
|
||||||
@defmethod[(get-data) false/c]{
|
@defmethod[(get-data) #f]{
|
||||||
|
|
||||||
No data is available.
|
No data is available.
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Generates a special comment using @racket[make-special-comment]. The
|
Generates a special comment using @racket[make-special-comment]. The
|
||||||
|
@ -470,9 +470,9 @@ Returns @racket[#t] if whitespace is elimited from the contained XML
|
||||||
literal, @racket[#f] otherwise.}
|
literal, @racket[#f] otherwise.}
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Generates a @racket[quasiquote] S-expression that enclosed the XML,
|
Generates a @racket[quasiquote] S-expression that enclosed the XML,
|
||||||
|
@ -504,9 +504,9 @@ Returns @racket[#t] if the box corresponds to a splicing unquote,
|
||||||
@racket[#f] for a non-splicing unquote.}
|
@racket[#f] for a non-splicing unquote.}
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Generates an S-expression for the code in the box.}
|
Generates an S-expression for the code in the box.}
|
||||||
|
@ -530,14 +530,14 @@ A text-mode reader for text boxes.}]
|
||||||
Instantiated for DrRacket text boxes in a @tech{WXME} stream for text
|
Instantiated for DrRacket text boxes in a @tech{WXME} stream for text
|
||||||
mode.
|
mode.
|
||||||
|
|
||||||
@defmethod[(get-data) false/c]{
|
@defmethod[(get-data) #f]{
|
||||||
|
|
||||||
No data is available.}
|
No data is available.}
|
||||||
|
|
||||||
@defmethod[(read-special [source any/c]
|
@defmethod[(read-special [source any/c]
|
||||||
[line (or/c exact-nonnegative-integer? false/c)]
|
[line (or/c exact-nonnegative-integer? #f)]
|
||||||
[column (or/c exact-nonnegative-integer? false/c)]
|
[column (or/c exact-nonnegative-integer? #f)]
|
||||||
[position (or/c exact-nonnegative-integer? false/c)])
|
[position (or/c exact-nonnegative-integer? #f)])
|
||||||
any/c]{
|
any/c]{
|
||||||
|
|
||||||
Generates a string containing the text.}
|
Generates a string containing the text.}
|
||||||
|
@ -612,7 +612,7 @@ generates instances of @racket[test-case%].}]
|
||||||
Instantiated for old-style DrRacket test-case boxes in a @tech{WXME}
|
Instantiated for old-style DrRacket test-case boxes in a @tech{WXME}
|
||||||
stream for text mode.
|
stream for text mode.
|
||||||
|
|
||||||
@defmethod[(get-comment) (or/c false/c input-port?)]{
|
@defmethod[(get-comment) (or/c #f input-port?)]{
|
||||||
|
|
||||||
Returns a port for the comment field, if any.}
|
Returns a port for the comment field, if any.}
|
||||||
|
|
||||||
|
@ -624,11 +624,11 @@ Returns a port for the ``test'' field.}
|
||||||
|
|
||||||
Returns a port for the ``expected'' field.}
|
Returns a port for the ``expected'' field.}
|
||||||
|
|
||||||
@defmethod[(get-should-raise) (or/c false/c input-port?)]{
|
@defmethod[(get-should-raise) (or/c #f input-port?)]{
|
||||||
|
|
||||||
Returns a port for the ``should raise'' field, if any.}
|
Returns a port for the ``should raise'' field, if any.}
|
||||||
|
|
||||||
@defmethod[(get-error-message) (or/c false/c input-port?)]{
|
@defmethod[(get-error-message) (or/c #f input-port?)]{
|
||||||
|
|
||||||
Returns a port for the ``error msg'' field, if any.}
|
Returns a port for the ``error msg'' field, if any.}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user