*** empty log message ***
authorclaus
Wed, 08 Feb 1995 04:18:36 +0100
changeset 94 8931597dfa3c
parent 93 92f1ec8b419e
child 95 47ac85948d38
*** empty log message ***
DevWorkst.st
DeviceWorkstation.st
Make.proto
StandardSystemView.st
StdSysV.st
View.st
--- a/DevWorkst.st	Tue Feb 07 16:31:23 1995 +0100
+++ b/DevWorkst.st	Wed Feb 08 04:18:36 1995 +0100
@@ -34,7 +34,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.23 1995-02-06 00:36:13 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.24 1995-02-08 03:18:30 claus Exp $
 '!
 
 !DeviceWorkstation class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.23 1995-02-06 00:36:13 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/DevWorkst.st,v 1.24 1995-02-08 03:18:30 claus Exp $
 "
 !
 
@@ -1285,19 +1285,20 @@
 	inputSema := Semaphore new.
 	p := [
 	    [dispatching] whileTrue:[
-		self eventPending ifFalse:[
-		    Processor activeProcess setStateTo:#ioWait if:#active.
-		    inputSema wait.
-		].
-
-		self dispatchPendingEvents.
-		self checkForEndOfDispatch.
-
-		dispatching ifFalse:[
-		    Processor disableSemaphore:inputSema.
-		    inputSema := nil
+		AbortSignal handle:[:ex |
+		    ex return
+		] do:[
+		    self eventPending ifFalse:[
+			Processor activeProcess setStateTo:#ioWait if:#active.
+			inputSema wait.
+		    ].
+
+		    self dispatchPendingEvents.
+		    self checkForEndOfDispatch.
 		]
-	    ]
+	    ].
+	    Processor disableSemaphore:inputSema.
+	    inputSema := nil
 	] forkAt:(Processor userInterruptPriority).
 	"
 	 give the process a nice name
--- a/DeviceWorkstation.st	Tue Feb 07 16:31:23 1995 +0100
+++ b/DeviceWorkstation.st	Wed Feb 08 04:18:36 1995 +0100
@@ -34,7 +34,7 @@
 COPYRIGHT (c) 1993 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.23 1995-02-06 00:36:13 claus Exp $
+$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.24 1995-02-08 03:18:30 claus Exp $
 '!
 
 !DeviceWorkstation class methodsFor:'documentation'!
@@ -55,7 +55,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.23 1995-02-06 00:36:13 claus Exp $
+$Header: /cvs/stx/stx/libview/DeviceWorkstation.st,v 1.24 1995-02-08 03:18:30 claus Exp $
 "
 !
 
@@ -1285,19 +1285,20 @@
 	inputSema := Semaphore new.
 	p := [
 	    [dispatching] whileTrue:[
-		self eventPending ifFalse:[
-		    Processor activeProcess setStateTo:#ioWait if:#active.
-		    inputSema wait.
-		].
-
-		self dispatchPendingEvents.
-		self checkForEndOfDispatch.
-
-		dispatching ifFalse:[
-		    Processor disableSemaphore:inputSema.
-		    inputSema := nil
+		AbortSignal handle:[:ex |
+		    ex return
+		] do:[
+		    self eventPending ifFalse:[
+			Processor activeProcess setStateTo:#ioWait if:#active.
+			inputSema wait.
+		    ].
+
+		    self dispatchPendingEvents.
+		    self checkForEndOfDispatch.
 		]
-	    ]
+	    ].
+	    Processor disableSemaphore:inputSema.
+	    inputSema := nil
 	] forkAt:(Processor userInterruptPriority).
 	"
 	 give the process a nice name
--- a/Make.proto	Tue Feb 07 16:31:23 1995 +0100
+++ b/Make.proto	Wed Feb 08 04:18:36 1995 +0100
@@ -105,17 +105,18 @@
 	    -rm -f *.c *.H classList.stc abbrev.stc
 
 tar:
-	rm -f $(TOP)/DISTRIB/libview.tar*
 	(cd $(TOP); tar cvf DISTRIB/libview.tar \
 				libview/*.st \
 				libview/Make.proto \
 				libview/styles \
 				libview/resources)
-	gzip $(TOP)/DISTRIB/libview.tar
 
 uutar:
 	$(MAKE) tar
+	gzip $(TOP)/DISTRIB/libview.tar
+	-rm $(TOP)/DISTRIB/libview.tar
 	(cd $(TOP)/DISTRIB; uuencode libview.tar.gz libview.tar.gz > libview.tar.gz.uue)
+	-rm $(TOP)/DISTRIB/libview.tar.gz
 
 
 #
--- a/StandardSystemView.st	Tue Feb 07 16:31:23 1995 +0100
+++ b/StandardSystemView.st	Wed Feb 08 04:18:36 1995 +0100
@@ -22,7 +22,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.15 1995-02-06 00:37:53 claus Exp $
+$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.16 1995-02-08 03:18:34 claus Exp $
 '!
 
 !StandardSystemView class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.15 1995-02-06 00:37:53 claus Exp $
+$Header: /cvs/stx/stx/libview/StandardSystemView.st,v 1.16 1995-02-08 03:18:34 claus Exp $
 "
 !
 
@@ -326,15 +326,17 @@
     "when we come up on a smaller display, 
      make certain, that the receiver is visible"
 
-    |dX dY|
+    |dX dY limitRight limitBottom|
 
     dX := (device horizontalPixelPerMillimeter * 20) rounded.
     dY := (device verticalPixelPerMillimeter * 20) rounded.
 
-    ((self left > (device width - dX)) or:[
-      self top > (device height - dY)]) ifTrue:[
-	'moving view into visible area' errorPrintNewline.
-	self origin:(device width - dX) @ (device height - dY)
+    limitRight := device width - dX.
+    limitBottom := device height - dY.
+    ((self left > limitRight) or:[
+      self top > limitBottom]) ifTrue:[
+	'moving view into visible area' errorPrintNL.
+	self origin:limitRight @ limitBottom
     ]
 !
 
@@ -463,6 +465,14 @@
 
     self extent:anExtent.
     self open
+!
+
+openWithPriority:aPriority
+    "open the view, run the windowgroup process at
+     other than UserScehdulingPriority"
+
+    self open.
+    windowGroup process priority:aPriority.
 ! !
 
 !StandardSystemView methodsFor:'misc'!
--- a/StdSysV.st	Tue Feb 07 16:31:23 1995 +0100
+++ b/StdSysV.st	Wed Feb 08 04:18:36 1995 +0100
@@ -22,7 +22,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.15 1995-02-06 00:37:53 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.16 1995-02-08 03:18:34 claus Exp $
 '!
 
 !StandardSystemView class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.15 1995-02-06 00:37:53 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/StdSysV.st,v 1.16 1995-02-08 03:18:34 claus Exp $
 "
 !
 
@@ -326,15 +326,17 @@
     "when we come up on a smaller display, 
      make certain, that the receiver is visible"
 
-    |dX dY|
+    |dX dY limitRight limitBottom|
 
     dX := (device horizontalPixelPerMillimeter * 20) rounded.
     dY := (device verticalPixelPerMillimeter * 20) rounded.
 
-    ((self left > (device width - dX)) or:[
-      self top > (device height - dY)]) ifTrue:[
-	'moving view into visible area' errorPrintNewline.
-	self origin:(device width - dX) @ (device height - dY)
+    limitRight := device width - dX.
+    limitBottom := device height - dY.
+    ((self left > limitRight) or:[
+      self top > limitBottom]) ifTrue:[
+	'moving view into visible area' errorPrintNL.
+	self origin:limitRight @ limitBottom
     ]
 !
 
@@ -463,6 +465,14 @@
 
     self extent:anExtent.
     self open
+!
+
+openWithPriority:aPriority
+    "open the view, run the windowgroup process at
+     other than UserScehdulingPriority"
+
+    self open.
+    windowGroup process priority:aPriority.
 ! !
 
 !StandardSystemView methodsFor:'misc'!
--- a/View.st	Tue Feb 07 16:31:23 1995 +0100
+++ b/View.st	Wed Feb 08 04:18:36 1995 +0100
@@ -45,7 +45,7 @@
 COPYRIGHT (c) 1989 by Claus Gittinger
 	      All Rights Reserved
 
-$Header: /cvs/stx/stx/libview/View.st,v 1.26 1995-02-06 00:38:04 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.27 1995-02-08 03:18:36 claus Exp $
 '!
 
 "this flag controls (globally) how views look - it will vanish"
@@ -70,7 +70,7 @@
 
 version
 "
-$Header: /cvs/stx/stx/libview/View.st,v 1.26 1995-02-06 00:38:04 claus Exp $
+$Header: /cvs/stx/stx/libview/View.st,v 1.27 1995-02-08 03:18:36 claus Exp $
 "
 !
 
@@ -2412,11 +2412,15 @@
     newWidth := extent x.
     newHeight := extent y.
 
-    newWidth < 0 ifTrue:[
-	newWidth := 0.
+    "
+     X complains badly if you try to create/resize a view with
+     a dimension <= 0 ... (although I think that 0 maks sense ...)
+    "
+    newWidth < 1 ifTrue:[
+	newWidth := 1.
     ].
-    newHeight < 0 ifTrue:[
-	newHeight := 0
+    newHeight < 1 ifTrue:[
+	newHeight := 1
     ].
 
     ((newWidth == width) and:[newHeight == height]) ifTrue:[
@@ -2962,86 +2966,75 @@
      realizing is done very late (after layout is fixed) to avoid
      visible rearranging of windows on the screen"
 
+    self realizeLeavingGroup:false
+!
+
+realizeInGroup
+    "special realize - leave windowgroup as is; 
+     This allows a view to be realized in any windowgroup; 
+     for special applications, like the kill button in the Filebrowser which has
+     another windowGroup as its superview and is handled as a separate process."
+
+    self realizeLeavingGroup:true
+!
+
+realizeLeavingGroup:leaveGroupAsIs 
+    "common helper for realize and realizeInGroup"
+
     |superGroup groupChange|
 
     drawableId isNil ifTrue:[
 	self create.
     ].
 
-    "
-     put myself into superviews windowgroup if there is a superview
-    "
-    groupChange := false.
-    superView notNil ifTrue:[
-	windowGroup notNil ifTrue:[
-"/            'oops - wgroup change on realize' printNewline.
-	    windowGroup removeView:self.
-	    windowGroup := nil
-	].
-	superGroup := superView windowGroup.
-	superGroup ~~ windowGroup ifTrue:[
-	    groupChange := true.
-	    windowGroup := superGroup.
-	    windowGroup notNil ifTrue:[
-		windowGroup addView:self.
-	    ]
-	]
-    ].
-
-    hidden ifTrue:[
-	^ self
-    ].
-
-"/    realized ifFalse:[
-    (originChanged or:[extentChanged]) ifTrue:[self fixSize].
-
-    (realized not or:[groupChange]) ifTrue:[
-	subViews notNil ifTrue:[
-	    subViews do:[:subView |
-		subView realize
+    leaveGroupAsIs ifFalse:[
+	"
+	 put myself into superviews windowgroup if there is a superview
+	"
+	groupChange := false.
+	superView notNil ifTrue:[
+	    superGroup := superView windowGroup.
+	    (windowGroup notNil and:[superGroup ~~ windowGroup]) ifTrue:[
+		"
+		 mhmh - seems that the windowgroup has changed ....
+		"
+"/                'oops - wgroup change on realize' printNewline.
+		windowGroup removeView:self.
+		windowGroup := nil
+	    ].
+	    superGroup ~~ windowGroup ifTrue:[
+		groupChange := true.
+		windowGroup := superGroup.
+		windowGroup notNil ifTrue:[
+		    windowGroup addView:self.
+		]
 	    ]
 	].
     ].
-    self setInnerClip.
-
-    realized ifFalse:[
-	"
-	 now, make the view visible
-	"
-	device mapWindow:drawableId.
-	realized := true
-    ]
-!
-
-realizeInGroup
-    "special realize - leave windowgroup as is; for special applications"
-
-    drawableId isNil ifTrue:[
-	self create.
+
+    hidden ifFalse:[
+	(originChanged or:[extentChanged]) ifTrue:[self fixSize].
+
+	(realized not or:[groupChange]) ifTrue:[
+	    subViews notNil ifTrue:[
+		subViews do:[:subView |
+		    subView realize
+		]
+	    ].
+	].
+	self setInnerClip.
+
+	realized ifFalse:[
+	    "
+	     now, make the view visible
+	    "
+	    device mapWindow:drawableId.
+	    realized := true
+	]
     ].
 
-    hidden ifTrue:[
-	^ self
-    ].
-
-"/    realized ifFalse:[
-    (originChanged or:[extentChanged]) ifTrue:[self fixSize].
-
-    (realized not) ifTrue:[
-	subViews notNil ifTrue:[
-	    subViews do:[:subView |
-		subView realize
-	    ]
-	].
-    ].
-    self setInnerClip.
-
-    realized ifFalse:[
-	"
-	 now, make the view visible
-	"
-	device mapWindow:drawableId.
-	realized := true
+    controller notNil ifTrue:[
+	controller startUp
     ]
 !