StandardSystemView.st
changeset 2651 8f800d7bcee3
parent 2644 bb15778539af
child 2694 cd43c17060af
--- a/StandardSystemView.st	Thu May 06 16:38:00 1999 +0200
+++ b/StandardSystemView.st	Thu May 06 17:10:54 1999 +0200
@@ -14,7 +14,7 @@
 	instanceVariableNames:'label icon iconView iconLabel minExtent maxExtent sizeFixed
 		application windowEventsForApplication'
 	classVariableNames:'DefaultIcon IncludeHostNameInLabel DefaultExtent
-		WindowLabelFormat'
+		WindowLabelFormat DefaultMinExtent'
 	poolDictionaries:''
 	category:'Views-Basic'
 !
@@ -462,6 +462,18 @@
 
 !StandardSystemView methodsFor:'ST-80 compatibility'!
 
+maximumSize
+    "same as maxExtent; for ST-80 compatibility"
+
+    ^ self maxExtent
+!
+
+maximumSize:anExtent
+    "same as maxExtent; for ST-80 compatibility"
+
+    ^ self maxExtent:anExtent
+!
+
 menuBar
     "return my menuBar or nil if I have none.
      This is only valid for topViews which were built with the UIBuilder."
@@ -471,6 +483,18 @@
     "Created: / 27.10.1997 / 16:23:13 / cg"
 !
 
+minimumSize
+    "same as minExtent; for ST-80 compatibility"
+
+    ^ self minExtent
+!
+
+minimumSize:anExtent
+    "same as minExtent; for ST-80 compatibility"
+
+    ^ self minExtent:anExtent
+!
+
 quit
     "same as closeRequest 
      (but sometimes sent via the sensors event queue from VW programs)"
@@ -603,19 +627,23 @@
     "define the maximum extent the view may have -
      depends on good-will of window manager"
 
-    maxExtent := max.
-    (width notNil and:[height notNil]) ifTrue:[
-	((width > (maxExtent x)) or:
-	 [height > (maxExtent y)]) ifTrue: [
-	    self extent:maxExtent
-	]
-    ]
-!
+    maxExtent ~= max ifTrue:[
+        maxExtent := max.
+
+        drawableId notNil ifTrue:[
+            device setWindowMinExtent:nil maxExtent:max in:drawableId
+        ].
 
-maximumSize:anExtent
-    "same as maxExtent: for ST-80 compatibility"
+        "/ if my current extent is larger than the new
+        "/ maxExtent, adjust.
 
-    ^ self maxExtent:anExtent
+        (width notNil and:[height notNil]) ifTrue:[
+            ((width > (max x)) or:
+             [height > (max y)]) ifTrue: [
+                self extent:(max min:self extent)
+            ]
+        ]
+    ].
 !
 
 minExtent
@@ -628,25 +656,23 @@
     "define the minimum extent the view may have -
      depends on good-will of window manager"
 
-    minExtent := min.
-    (width notNil and:[height notNil]) ifTrue:[
-	((width < (minExtent x)) or:
-	 [height < (minExtent y)]) ifTrue: [
-	    self extent:minExtent
-	]
-    ]
-!
+    minExtent ~= min ifTrue:[
+        minExtent := min.
+        drawableId notNil ifTrue:[
+            device setWindowMinExtent:min maxExtent:nil in:drawableId
+        ].
+
+        "/ if my current extent is smaller than the new
+        "/ minExtent, adjust.
 
-minimumSize
-    "same as minExtent for ST-80 compatibility"
+        (width notNil and:[height notNil]) ifTrue:[
+            ((width < (min x)) or:
+             [height < (min y)]) ifTrue: [
+                self extent:(min max:self extent)
+            ]
+        ]
+    ]
 
-    ^ self minExtent
-!
-
-minimumSize:anExtent
-    "same as minExtent: for ST-80 compatibility"
-
-    ^ self minExtent:anExtent
 ! !
 
 !StandardSystemView methodsFor:'accessing-look'!
@@ -916,7 +942,11 @@
     super initialize.
 
     borderWidth := 2.         "- notice: many window managers ignore this"
-    minExtent := 10 @ 10.
+    device platformName = 'WIN32' ifTrue:[
+        minExtent := 0 @ 0.
+    ] ifFalse:[
+        minExtent := 10 @ 10.
+    ].
     maxExtent := device usableExtent "- (0 @ device captionHeight)".
     label isNil ifTrue:[label := self class defaultLabel].
     icon isNil ifTrue:[icon := self class defaultIcon].
@@ -1411,6 +1441,6 @@
 !StandardSystemView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.112 1999-05-06 07:49:43 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.113 1999-05-06 15:10:54 cg Exp $'
 ! !
 StandardSystemView initialize!