From 15408f0c7b7734506dca32700ca70e4ec1ff20a0 Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Sat, 11 May 2013 15:06:06 -0500 Subject: [PATCH] allow #f as the min-width / min-height init arg to area-containers --- collects/mred/private/mrwindow.rkt | 8 ++++---- collects/scribblings/gui/button-class.scrbl | 4 ++-- collects/scribblings/gui/canvas-class.scrbl | 4 ++-- collects/scribblings/gui/check-box-class.scrbl | 4 ++-- collects/scribblings/gui/choice-class.scrbl | 4 ++-- collects/scribblings/gui/combo-field-class.scrbl | 4 ++-- collects/scribblings/gui/dialog-class.scrbl | 4 ++-- collects/scribblings/gui/editor-canvas-class.scrbl | 4 ++-- collects/scribblings/gui/frame-class.scrbl | 4 ++-- collects/scribblings/gui/gauge-class.scrbl | 4 ++-- collects/scribblings/gui/group-box-panel-class.scrbl | 4 ++-- collects/scribblings/gui/horizontal-pane-class.scrbl | 4 ++-- collects/scribblings/gui/horizontal-panel-class.scrbl | 4 ++-- collects/scribblings/gui/list-box-class.scrbl | 4 ++-- collects/scribblings/gui/message-class.scrbl | 4 ++-- collects/scribblings/gui/pane-class.scrbl | 4 ++-- collects/scribblings/gui/panel-class.scrbl | 4 ++-- collects/scribblings/gui/radio-box-class.scrbl | 4 ++-- collects/scribblings/gui/slider-class.scrbl | 4 ++-- collects/scribblings/gui/tab-panel-class.scrbl | 4 ++-- collects/scribblings/gui/text-field-class.scrbl | 4 ++-- collects/scribblings/gui/vertical-pane-class.scrbl | 4 ++-- collects/scribblings/gui/vertical-panel-class.scrbl | 4 ++-- 23 files changed, 48 insertions(+), 48 deletions(-) diff --git a/collects/mred/private/mrwindow.rkt b/collects/mred/private/mrwindow.rkt index 022cec3558..5defb652bb 100644 --- a/collects/mred/private/mrwindow.rkt +++ b/collects/mred/private/mrwindow.rkt @@ -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)))) diff --git a/collects/scribblings/gui/button-class.scrbl b/collects/scribblings/gui/button-class.scrbl index 4521325c75..21058093d6 100644 --- a/collects/scribblings/gui/button-class.scrbl +++ b/collects/scribblings/gui/button-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/canvas-class.scrbl b/collects/scribblings/gui/canvas-class.scrbl index aae567d28b..aabb6c7f45 100644 --- a/collects/scribblings/gui/canvas-class.scrbl +++ b/collects/scribblings/gui/canvas-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/check-box-class.scrbl b/collects/scribblings/gui/check-box-class.scrbl index d4cb8ecfe4..8cd62db7f8 100644 --- a/collects/scribblings/gui/check-box-class.scrbl +++ b/collects/scribblings/gui/check-box-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/choice-class.scrbl b/collects/scribblings/gui/choice-class.scrbl index a09d1c4975..bc66094915 100644 --- a/collects/scribblings/gui/choice-class.scrbl +++ b/collects/scribblings/gui/choice-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/combo-field-class.scrbl b/collects/scribblings/gui/combo-field-class.scrbl index 31a8dd7b6d..332c51c32f 100644 --- a/collects/scribblings/gui/combo-field-class.scrbl +++ b/collects/scribblings/gui/combo-field-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/dialog-class.scrbl b/collects/scribblings/gui/dialog-class.scrbl index eb9483ba54..c5d14fc788 100644 --- a/collects/scribblings/gui/dialog-class.scrbl +++ b/collects/scribblings/gui/dialog-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/editor-canvas-class.scrbl b/collects/scribblings/gui/editor-canvas-class.scrbl index c3631babdc..19ffc27902 100644 --- a/collects/scribblings/gui/editor-canvas-class.scrbl +++ b/collects/scribblings/gui/editor-canvas-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/frame-class.scrbl b/collects/scribblings/gui/frame-class.scrbl index 56fb1d6596..57fcb113cd 100644 --- a/collects/scribblings/gui/frame-class.scrbl +++ b/collects/scribblings/gui/frame-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/gauge-class.scrbl b/collects/scribblings/gui/gauge-class.scrbl index e1e1fe942d..3bc053c1d5 100644 --- a/collects/scribblings/gui/gauge-class.scrbl +++ b/collects/scribblings/gui/gauge-class.scrbl @@ -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)])]{ diff --git a/collects/scribblings/gui/group-box-panel-class.scrbl b/collects/scribblings/gui/group-box-panel-class.scrbl index f1640fcc43..27961359d4 100644 --- a/collects/scribblings/gui/group-box-panel-class.scrbl +++ b/collects/scribblings/gui/group-box-panel-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/horizontal-pane-class.scrbl b/collects/scribblings/gui/horizontal-pane-class.scrbl index cfb7ff5f59..1a7954a9bc 100644 --- a/collects/scribblings/gui/horizontal-pane-class.scrbl +++ b/collects/scribblings/gui/horizontal-pane-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/horizontal-panel-class.scrbl b/collects/scribblings/gui/horizontal-panel-class.scrbl index 677ff8fa7a..fa01c42ee0 100644 --- a/collects/scribblings/gui/horizontal-panel-class.scrbl +++ b/collects/scribblings/gui/horizontal-panel-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/list-box-class.scrbl b/collects/scribblings/gui/list-box-class.scrbl index 1c5d438c22..f5ff28c4c9 100644 --- a/collects/scribblings/gui/list-box-class.scrbl +++ b/collects/scribblings/gui/list-box-class.scrbl @@ -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?)) diff --git a/collects/scribblings/gui/message-class.scrbl b/collects/scribblings/gui/message-class.scrbl index 38263fa797..9ecbdbee05 100644 --- a/collects/scribblings/gui/message-class.scrbl +++ b/collects/scribblings/gui/message-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/pane-class.scrbl b/collects/scribblings/gui/pane-class.scrbl index 8bd1806fef..67f4686ba6 100644 --- a/collects/scribblings/gui/pane-class.scrbl +++ b/collects/scribblings/gui/pane-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/panel-class.scrbl b/collects/scribblings/gui/panel-class.scrbl index 069a020733..549e51255f 100644 --- a/collects/scribblings/gui/panel-class.scrbl +++ b/collects/scribblings/gui/panel-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/radio-box-class.scrbl b/collects/scribblings/gui/radio-box-class.scrbl index 3ab6167a1c..8fc13e9006 100644 --- a/collects/scribblings/gui/radio-box-class.scrbl +++ b/collects/scribblings/gui/radio-box-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/slider-class.scrbl b/collects/scribblings/gui/slider-class.scrbl index 7e9c5368c5..e0d8dc42f1 100644 --- a/collects/scribblings/gui/slider-class.scrbl +++ b/collects/scribblings/gui/slider-class.scrbl @@ -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)])]{ diff --git a/collects/scribblings/gui/tab-panel-class.scrbl b/collects/scribblings/gui/tab-panel-class.scrbl index 4b6106783a..9d116468e0 100644 --- a/collects/scribblings/gui/tab-panel-class.scrbl +++ b/collects/scribblings/gui/tab-panel-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/text-field-class.scrbl b/collects/scribblings/gui/text-field-class.scrbl index 00bd859049..4f02ed13fb 100644 --- a/collects/scribblings/gui/text-field-class.scrbl +++ b/collects/scribblings/gui/text-field-class.scrbl @@ -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)])]{ diff --git a/collects/scribblings/gui/vertical-pane-class.scrbl b/collects/scribblings/gui/vertical-pane-class.scrbl index 614df98378..3daf7b277a 100644 --- a/collects/scribblings/gui/vertical-pane-class.scrbl +++ b/collects/scribblings/gui/vertical-pane-class.scrbl @@ -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])]{ diff --git a/collects/scribblings/gui/vertical-panel-class.scrbl b/collects/scribblings/gui/vertical-panel-class.scrbl index 3d538c4c83..4cded34b4d 100644 --- a/collects/scribblings/gui/vertical-panel-class.scrbl +++ b/collects/scribblings/gui/vertical-panel-class.scrbl @@ -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])]{