.
--- a/Cursor.st Fri Jul 28 04:58:06 1995 +0200
+++ b/Cursor.st Thu Aug 03 03:33:27 1995 +0200
@@ -31,7 +31,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Cursor.st,v 1.20 1995-07-23 02:25:38 claus Exp $
+$Header: /cvs/stx/stx/libview/Cursor.st,v 1.21 1995-08-03 01:31:34 claus Exp $
'!
!Cursor class methodsFor:'documentation'!
@@ -52,7 +52,7 @@
version
"
-$Header: /cvs/stx/stx/libview/Cursor.st,v 1.20 1995-07-23 02:25:38 claus Exp $
+$Header: /cvs/stx/stx/libview/Cursor.st,v 1.21 1995-08-03 01:31:34 claus Exp $
"
!
@@ -925,37 +925,39 @@
!Cursor methodsFor:'ST-80 displaying'!
showIn:aView
+ "ST-80 mimicri: install the receiver as aViews cursor"
+
aView cursor:self
!
showIn:aView while:aBlock
+ "ST-80 mimicri: change aViews cursors to the receiver, while evaluationg aBlock.
+ Return the value as returned by aBlock."
+
|savedCursor|
savedCursor := aView cursor.
aView cursor:self.
- [
- aBlock value.
- ] valueNowOrOnUnwindDo:[
- aView cursor:savedCursor
- ]
+ ^ aBlock valueNowOrOnUnwindDo:[aView cursor:savedCursor]
!
showWhile:aBlock
- "change all views cursors to the receiver.
- In X this seems to be very slow"
+ "ST-80 mimicri: change all views cursors to the receiver.
+ Return the value as returned by aBlock."
- |v|
+ ^ WindowGroup activeGroup withCursor:self do:aBlock
- Display setCursors:self.
- v := aBlock valueNowOrOnUnwindDo:[
- Display restoreCursors.
- ].
- ^ v
+"/ |v|
+"/
+"/ Display setCursors:self.
+"/ v := aBlock valueNowOrOnUnwindDo:[
+"/ Display restoreCursors.
+"/ ].
+"/ ^ v
!
show
- "change cursors in active groups views to the receiver.
- In X this seems to be very slow"
+ "ST-80 mimicri: change cursors in active groups views to the receiver."
WindowGroup activeGroup showCursor:self
!
--- a/PseudoV.st Fri Jul 28 04:58:06 1995 +0200
+++ b/PseudoV.st Thu Aug 03 03:33:27 1995 +0200
@@ -26,7 +26,7 @@
COPYRIGHT (c) 1992 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.38 1995-06-06 04:08:08 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.39 1995-08-03 01:32:32 claus Exp $
'!
!PseudoView class methodsFor:'documentation'!
@@ -47,7 +47,7 @@
version
"
-$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.38 1995-06-06 04:08:08 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/PseudoV.st,v 1.39 1995-08-03 01:32:32 claus Exp $
"
!
@@ -377,16 +377,18 @@
!
withCursor:aCursor do:aBlock
- "evaluate aBlock showing aCursor until ready; then restore the old cursor.
- Notice, that this method only changes the cursor for a single (sub-)view.
- Most applications want to have the cursor changed in all views of an
- application. Use WindowGroup>>withCursor:do: to acomplish this."
+ "evaluate aBlock showing aCursor until ready; then restore the old cursor
+ and return the value as returned by aBlock.
+
+ Notice, that this method only changes the cursor for a SINGLE (sub-)view.
+ Most applications want to have the cursor changed in all views of its
+ application. Use 'aView windowGroup withCursor:do:' to acomplish this."
|savedCursor|
savedCursor := cursor.
self cursor:aCursor.
- aBlock valueNowOrOnUnwindDo:[self cursor:savedCursor]
+ ^ aBlock valueNowOrOnUnwindDo:[self cursor:savedCursor]
! !
!PseudoView methodsFor:'accessing-hierarchy'!
--- a/SimpleView.st Fri Jul 28 04:58:06 1995 +0200
+++ b/SimpleView.st Thu Aug 03 03:33:27 1995 +0200
@@ -44,7 +44,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.12 1995-07-23 02:28:23 claus Exp $
+$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.13 1995-08-03 01:32:43 claus Exp $
'!
!SimpleView class methodsFor:'documentation'!
@@ -65,7 +65,7 @@
version
"
-$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.12 1995-07-23 02:28:23 claus Exp $
+$Header: /cvs/stx/stx/libview/SimpleView.st,v 1.13 1995-08-03 01:32:43 claus Exp $
"
!
@@ -2756,7 +2756,7 @@
positive makes it smaller, negative makes it larger"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:1 put:aNumber.
insets at:3 put:aNumber.
@@ -2774,7 +2774,7 @@
positive makes it smaller, negative makes it larger"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:2 put:aNumber.
insets at:4 put:aNumber.
@@ -2793,7 +2793,7 @@
negative to the right (becomes larger)"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:3 put:aNumber.
@@ -2811,7 +2811,7 @@
negative to the left (becomes larger)"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:1 put:aNumber.
@@ -2829,7 +2829,7 @@
negative to the top (becomes larger)"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:2 put:aNumber.
@@ -2847,7 +2847,7 @@
negative to the bottom (becomes larger)"
insets isNil ifTrue:[
- insets := Array new:4 withAll:0.
+ insets := Array with:0 with:0 with:0 with:0
].
insets at:4 put:aNumber.
@@ -3393,8 +3393,8 @@
].
"/ controller notNil ifTrue:[
-"/ controller release.
-"/ controller := nil.
+"/ controller release.
+"/ controller := nil.
"/ ].
subs := subViews.
--- a/TopView.st Fri Jul 28 04:58:06 1995 +0200
+++ b/TopView.st Thu Aug 03 03:33:27 1995 +0200
@@ -21,7 +21,7 @@
COPYRIGHT (c) 1995 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/TopView.st,v 1.5 1995-07-23 02:28:44 claus Exp $
+$Header: /cvs/stx/stx/libview/TopView.st,v 1.6 1995-08-03 01:33:00 claus Exp $
'!
!TopView class methodsFor:'documentation'!
@@ -42,7 +42,7 @@
version
"
-$Header: /cvs/stx/stx/libview/TopView.st,v 1.5 1995-07-23 02:28:44 claus Exp $
+$Header: /cvs/stx/stx/libview/TopView.st,v 1.6 1995-08-03 01:33:00 claus Exp $
"
!
@@ -137,19 +137,20 @@
!TopView methodsFor:'misc'!
withWaitCursorDo:aBlock
- "evaluate aBlock while showing a waitCursor in all my views"
+ "evaluate aBlock while showing a waitCursor in all my views.
+ Return the value as returned by aBlock."
- self withCursor:(Cursor wait) do:aBlock
+ ^ self withCursor:(Cursor wait) do:aBlock
!
withCursor:aCursor do:aBlock
- "evaluate aBlock while showing aCursor in all my views"
+ "evaluate aBlock while showing aCursor in all my views.
+ Return the value as returned by aBlock."
windowGroup notNil ifTrue:[
- windowGroup withCursor:aCursor do:aBlock
- ] ifFalse:[
- super withCursor:aCursor do:aBlock
- ]
+ ^ windowGroup withCursor:aCursor do:aBlock
+ ].
+ ^ super withCursor:aCursor do:aBlock
!
raiseDeiconified
--- a/WGroup.st Fri Jul 28 04:58:06 1995 +0200
+++ b/WGroup.st Thu Aug 03 03:33:27 1995 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.29 1995-07-27 23:53:45 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.30 1995-08-03 01:33:11 claus Exp $
'!
!WindowGroup class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
version
"
-$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.29 1995-07-27 23:53:45 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/WGroup.st,v 1.30 1995-08-03 01:33:11 claus Exp $
"
!
@@ -375,7 +375,8 @@
withCursor:aCursor do:aBlock
"evaluate aBlock while showing aCursor in all
- my views (used to show wait-cursor while doing something)"
+ my views (used to show wait-cursor while doing something).
+ Return the result as returned by aBlock."
|oldCursors|
@@ -388,7 +389,7 @@
aView cursor:aCursor
].
- aBlock valueNowOrOnUnwindDo:[
+ ^ aBlock valueNowOrOnUnwindDo:[
"
restore cursors from the mapping
"
--- a/WindowGroup.st Fri Jul 28 04:58:06 1995 +0200
+++ b/WindowGroup.st Thu Aug 03 03:33:27 1995 +0200
@@ -22,7 +22,7 @@
COPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.29 1995-07-27 23:53:45 claus Exp $
+$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.30 1995-08-03 01:33:11 claus Exp $
'!
!WindowGroup class methodsFor:'documentation'!
@@ -43,7 +43,7 @@
version
"
-$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.29 1995-07-27 23:53:45 claus Exp $
+$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.30 1995-08-03 01:33:11 claus Exp $
"
!
@@ -375,7 +375,8 @@
withCursor:aCursor do:aBlock
"evaluate aBlock while showing aCursor in all
- my views (used to show wait-cursor while doing something)"
+ my views (used to show wait-cursor while doing something).
+ Return the result as returned by aBlock."
|oldCursors|
@@ -388,7 +389,7 @@
aView cursor:aCursor
].
- aBlock valueNowOrOnUnwindDo:[
+ ^ aBlock valueNowOrOnUnwindDo:[
"
restore cursors from the mapping
"
--- a/XWorkstat.st Fri Jul 28 04:58:06 1995 +0200
+++ b/XWorkstat.st Thu Aug 03 03:33:27 1995 +0200
@@ -35,7 +35,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.51 1995-07-27 23:54:05 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.52 1995-08-03 01:33:27 claus Exp $
'!
!XWorkstation class methodsFor:'documentation'!
@@ -56,7 +56,7 @@
version
"
-$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.51 1995-07-27 23:54:05 claus Exp $
+$Header: /cvs/stx/stx/libview/Attic/XWorkstat.st,v 1.52 1995-08-03 01:33:27 claus Exp $
"
!
@@ -4878,7 +4878,7 @@
getPixelX:x y:y from:aDrawableId
"return the pixel value at x/y; coordinates start at 0/0 for the upper left."
-%{ /* NOCONTEXT */
+%{ /* UNLIMITEDSTACK NOCONTEXT */
Window win = _WindowVal(aDrawableId);
XImage *img;
@@ -4896,9 +4896,7 @@
XDestroyImage(img);
RETURN ( _MKSMALLINT(ret) );
}
-%}
-.
- self primitiveFailed.
+%}.
^ nil
!
@@ -4921,6 +4919,10 @@
with:nil "bytes_per_line"
with:nil "byte_order".
+ "/ had to extract the getPixel call into a separate method, to specify
+ "/ unlimitedStack (some implementations use alloca and require huge amounts
+ "/ of temporary stack space
+
(self primGetBitsFrom:aDrawableId x:srcx y:srcy width:w height:h into:imageBits infoInfo:info) ifTrue:[
^ info
].
--- a/XWorkstation.st Fri Jul 28 04:58:06 1995 +0200
+++ b/XWorkstation.st Thu Aug 03 03:33:27 1995 +0200
@@ -35,7 +35,7 @@
COPYRIGHT (c) 1989 by Claus Gittinger
All Rights Reserved
-$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.51 1995-07-27 23:54:05 claus Exp $
+$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.52 1995-08-03 01:33:27 claus Exp $
'!
!XWorkstation class methodsFor:'documentation'!
@@ -56,7 +56,7 @@
version
"
-$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.51 1995-07-27 23:54:05 claus Exp $
+$Header: /cvs/stx/stx/libview/XWorkstation.st,v 1.52 1995-08-03 01:33:27 claus Exp $
"
!
@@ -4878,7 +4878,7 @@
getPixelX:x y:y from:aDrawableId
"return the pixel value at x/y; coordinates start at 0/0 for the upper left."
-%{ /* NOCONTEXT */
+%{ /* UNLIMITEDSTACK NOCONTEXT */
Window win = _WindowVal(aDrawableId);
XImage *img;
@@ -4896,9 +4896,7 @@
XDestroyImage(img);
RETURN ( _MKSMALLINT(ret) );
}
-%}
-.
- self primitiveFailed.
+%}.
^ nil
!
@@ -4921,6 +4919,10 @@
with:nil "bytes_per_line"
with:nil "byte_order".
+ "/ had to extract the getPixel call into a separate method, to specify
+ "/ unlimitedStack (some implementations use alloca and require huge amounts
+ "/ of temporary stack space
+
(self primGetBitsFrom:aDrawableId x:srcx y:srcy width:w height:h into:imageBits infoInfo:info) ifTrue:[
^ info
].