pass minExtent/maxExtent to mapView:...
authorClaus Gittinger <cg@exept.de>
Tue, 28 Apr 1998 16:23:35 +0200
changeset 2105 1c1277d63a2c
parent 2104 70cc06d60cd1
child 2106 8fdc7283a99f
pass minExtent/maxExtent to mapView:...
XWorkstat.st
XWorkstation.st
--- a/XWorkstat.st	Tue Apr 28 16:21:23 1998 +0200
+++ b/XWorkstat.st	Tue Apr 28 16:23:35 1998 +0200
@@ -9155,10 +9155,11 @@
     self primitiveFailed
 !
 
-mapView:aView id:aWindowId iconified:aBoolean atX:xPos y:yPos width:w height:h
+mapView:aView id:aWindowId iconified:aBoolean atX:xPos y:yPos 
+	      width:w height:h minExtent:minExt maxExtent:maxExt
     "make a window visible - either as icon or as a real view - needed for restart"
 
-    |wicon wiconId wiconView wiconViewId wlabel|
+    |wicon wiconId wiconView wiconViewId wlabel minW minH maxW maxH|
 
     aBoolean ifTrue:[
 	wicon := aView icon.
@@ -9171,6 +9172,14 @@
 	].
 	wlabel := aView label.
     ].
+    minExt notNil ifTrue:[
+	minW := minExt x.
+	minH := minExt y.
+    ].
+    maxExt notNil ifTrue:[
+	maxW := maxExt x.
+	maxH := maxExt y.
+    ].
 %{  
 
     XWMHints wmhints;
@@ -9194,6 +9203,16 @@
 	    szhints.height = __intVal(h);
 	    szhints.flags |= USSize;
 	}
+        if (__bothSmallInteger(minW, minH)) {
+            szhints.flags |= PMinSize;
+            szhints.min_width = __intVal(minW);
+            szhints.min_height = __intVal(minH);
+        }
+        if (__bothSmallInteger(maxW, maxH)) {
+            szhints.flags |= PMaxSize;
+            szhints.max_width = __intVal(maxW);
+            szhints.max_height = __intVal(maxH);
+        }
 
 	if (aBoolean == true) {
 	    char *windowName;
@@ -9882,6 +9901,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.279 1998-03-07 13:48:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.280 1998-04-28 14:23:35 cg Exp $'
 ! !
 XWorkstation initialize!
--- a/XWorkstation.st	Tue Apr 28 16:21:23 1998 +0200
+++ b/XWorkstation.st	Tue Apr 28 16:23:35 1998 +0200
@@ -9155,10 +9155,11 @@
     self primitiveFailed
 !
 
-mapView:aView id:aWindowId iconified:aBoolean atX:xPos y:yPos width:w height:h
+mapView:aView id:aWindowId iconified:aBoolean atX:xPos y:yPos 
+	      width:w height:h minExtent:minExt maxExtent:maxExt
     "make a window visible - either as icon or as a real view - needed for restart"
 
-    |wicon wiconId wiconView wiconViewId wlabel|
+    |wicon wiconId wiconView wiconViewId wlabel minW minH maxW maxH|
 
     aBoolean ifTrue:[
 	wicon := aView icon.
@@ -9171,6 +9172,14 @@
 	].
 	wlabel := aView label.
     ].
+    minExt notNil ifTrue:[
+	minW := minExt x.
+	minH := minExt y.
+    ].
+    maxExt notNil ifTrue:[
+	maxW := maxExt x.
+	maxH := maxExt y.
+    ].
 %{  
 
     XWMHints wmhints;
@@ -9194,6 +9203,16 @@
 	    szhints.height = __intVal(h);
 	    szhints.flags |= USSize;
 	}
+        if (__bothSmallInteger(minW, minH)) {
+            szhints.flags |= PMinSize;
+            szhints.min_width = __intVal(minW);
+            szhints.min_height = __intVal(minH);
+        }
+        if (__bothSmallInteger(maxW, maxH)) {
+            szhints.flags |= PMaxSize;
+            szhints.max_width = __intVal(maxW);
+            szhints.max_height = __intVal(maxH);
+        }
 
 	if (aBoolean == true) {
 	    char *windowName;
@@ -9882,6 +9901,6 @@
 !XWorkstation class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.279 1998-03-07 13:48:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.280 1998-04-28 14:23:35 cg Exp $'
 ! !
 XWorkstation initialize!