allow #f as the min-width / min-height init arg to area-containers

This commit is contained in:
Robby Findler 2013-05-11 15:06:06 -05:00
parent ef3dff1cec
commit 15408f0c7b
23 changed files with 48 additions and 48 deletions

View File

@ -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))))

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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)])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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?))

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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])]{

View File

@ -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)])]{

View File

@ -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])]{

View File

@ -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)])]{

View File

@ -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])]{

View File

@ -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])]{