allow #f as the min-width / min-height init arg to area-containers
This commit is contained in:
parent
ef3dff1cec
commit
15408f0c7b
|
@ -41,8 +41,8 @@
|
|||
[stretchable-width no-val]
|
||||
[stretchable-height no-val])
|
||||
(let ([cwho '(iconstructor area)])
|
||||
(unless (eq? min-width no-val) (check-non#f-dimension cwho min-width))
|
||||
(unless (eq? min-height no-val) (check-non#f-dimension cwho min-height)))
|
||||
(unless (eq? min-width no-val) (check-dimension cwho min-width))
|
||||
(unless (eq? min-height no-val) (check-dimension cwho min-height)))
|
||||
(mismatches)
|
||||
(define get-wx-outer-panel get-outer-wx-pan)
|
||||
(define parent prnt)
|
||||
|
@ -64,8 +64,8 @@
|
|||
(send wx get-hard-minimum-size))))])
|
||||
(define wx (mk-wx))
|
||||
(super-make-object wx)
|
||||
(unless (eq? min-width no-val) (minw min-width))
|
||||
(unless (eq? min-height no-val) (minh min-height))
|
||||
(unless (eq? min-width no-val) (when min-width (minw min-width)))
|
||||
(unless (eq? min-height no-val) (when min-height (minh min-height)))
|
||||
(unless (eq? stretchable-width no-val) (sw stretchable-width))
|
||||
(unless (eq? stretchable-height no-val) (sh stretchable-height))))
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ Whenever a button is clicked by the user, the button's callback
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #f]
|
||||
[stretchable-height any/c #f])]{
|
||||
|
||||
|
|
|
@ -20,8 +20,8 @@ A @racket[canvas%] object is a general-purpose window for drawing and
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 0]
|
||||
[horiz-margin (integer-in 0 1000) 0]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ Whenever a check box is clicked by the user, the check box's value is
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #f]
|
||||
[stretchable-height any/c #f])]{
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ See also @racket[list-box%].
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #f]
|
||||
[stretchable-height any/c #f])]{
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ A @racket[combo-field%] object is a @racket[text-field%]
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #f])]{
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ A dialog is a top-level window that is @defterm{modal}: while the
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@ An @racket[editor-canvas%] object manages and displays a
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 0]
|
||||
[horiz-margin (integer-in 0 1000) 0]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ A frame is a top-level container window. It has a title bar (which
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -24,8 +24,8 @@ of the gauge.
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c (memq 'horizontal style)]
|
||||
[stretchable-height any/c (memq 'vertical style)])]{
|
||||
|
||||
|
|
|
@ -26,8 +26,8 @@ Unlike most panel classes, a group-box panel's horizontal and vertical
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -15,8 +15,8 @@ A horizontal pane arranges its subwindows in a single row. See also
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(left center)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -19,8 +19,8 @@ A horizontal panel arranges its subwindows in a single row. See also
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(left center)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ See also @racket[choice%].
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t]
|
||||
[columns (cons/c label-string? (listof label-string?))
|
||||
|
|
|
@ -19,8 +19,8 @@ A message control is a static line of text or a static bitmap. The
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #f]
|
||||
[stretchable-height any/c #f]
|
||||
[auto-resize any/c #f])]{
|
||||
|
|
|
@ -24,8 +24,8 @@ See also @racket[grow-box-spacer-pane%].
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -30,8 +30,8 @@ A @racket[panel%] object has a degenerate placement strategy for
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center center)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -35,8 +35,8 @@ Whenever the user changes the selected radio button, the radio box's
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #f]
|
||||
[stretchable-height any/c #f])]{
|
||||
|
||||
|
|
|
@ -31,8 +31,8 @@ Whenever the user changes the value of a slider, its callback
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c (memq 'horizontal style)]
|
||||
[stretchable-height any/c (memq 'vertical style)])]{
|
||||
|
||||
|
|
|
@ -33,8 +33,8 @@ The @racket[tab-panel%] class does not implement the virtual
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -53,8 +53,8 @@ The keymap for the text field's editor is initialized by calling the
|
|||
[enabled any/c #t]
|
||||
[vert-margin (integer-in 0 1000) 2]
|
||||
[horiz-margin (integer-in 0 1000) 2]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c (memq 'multiple style)])]{
|
||||
|
||||
|
|
|
@ -17,8 +17,8 @@ A vertical pane arranges its subwindows in a single column. See also @racket[pan
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
|
@ -22,8 +22,8 @@ A vertical panel arranges its subwindows in a single column. See
|
|||
[alignment (list/c (or/c 'left 'center 'right)
|
||||
(or/c 'top 'center 'bottom))
|
||||
'(center top)]
|
||||
[min-width (integer-in 0 10000) _graphical-minimum-width]
|
||||
[min-height (integer-in 0 10000) _graphical-minimum-height]
|
||||
[min-width (or/c (integer-in 0 10000) #f) #f]
|
||||
[min-height (or/c (integer-in 0 10000) #f) #f]
|
||||
[stretchable-width any/c #t]
|
||||
[stretchable-height any/c #t])]{
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user