--- a/Cursor.st Fri Apr 26 16:57:23 1996 +0200
+++ b/Cursor.st Sat Apr 27 19:53:57 1996 +0200
@@ -68,7 +68,7 @@
[see also:]
DeviceWorkstation
PseudoView
- Font Cursor Color
+ Font Cursor Color Form
[author:]
Claus Gittinger
@@ -79,126 +79,137 @@
"
get a standard cursor:
- Cursor wait
- Cursor stop
- Cursor normal
+ Cursor wait
+ Cursor stop
+ Cursor normal
create a custom cursor:
- Cursor extent:16@16
- fromArray:#[ 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r00000000 2r00000000]
- offset:-8@-8
+ Cursor extent:16@16
+ fromArray:#[ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000]
+ offset:-8@-8
+
+
define a cursor for a view:
-
- |v|
+ [exBegin]
+ |v|
- v := View new.
- v cursor:Cursor stop.
- v open.
+ v := View new.
+ v cursor:Cursor stop.
+ v open.
+ [exEnd]
+
with above custom cursor:
-
- |v|
+ [exBegin]
+ |v|
- v := View new.
- v cursor:(
- Cursor extent:16@16
- fromArray:#[ 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r11111111 2r11111111
- 2r11111111 2r11111111
- 2r00000000 2r00000000
- 2r00000000 2r00000000
- 2r00000000 2r00000000]
- offset:-8@-8).
- v open.
+ v := View new.
+ v cursor:(
+ Cursor extent:16@16
+ fromArray:#[ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r11111111 2r11111111
+ 2r11111111 2r11111111
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000
+ 2r00000000 2r00000000]
+ offset:-8@-8).
+ v open.
+ [exEnd]
+
with multiple views:
-
- |v1 v2 top|
+ [exBegin]
+ |v1 v2 top|
- top := StandardSystemView new.
- top extent:300@300.
- v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
- v1 viewBackground:(Color grey:75).
- v1 cursor:Cursor thumbsUp.
- v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
- v2 viewBackground:(Color white).
- v2 cursor:Cursor wait.
- top open.
+ top := StandardSystemView new.
+ top extent:300@300.
+ v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
+ v1 viewBackground:(Color grey:75).
+ v1 cursor:Cursor thumbsUp.
+ v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
+ v2 viewBackground:(Color white).
+ v2 cursor:Cursor wait.
+ top open.
+ [exEnd]
- show a cursor in ALL ST/X views for a while:
-
- Cursor wait
- showWhile:[
- (Delay forSeconds:5) wait
- ]
+ show a cursor in the active ST/X view for a while:
+ [exBegin]
+
+ Cursor wait
+ showWhile:[
+ (Delay forSeconds:5) wait
+ ]
+ [exEnd]
show a cursor in all views belonging to a windowGroup:
(have to wait until top is visible to access windowGroup)
-
- |v1 v2 top|
+ [exBegin]
+ |v1 v2 top|
- top := StandardSystemView new.
- top extent:300@300.
- v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
- v1 viewBackground:(Color grey:75).
- v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
- v2 viewBackground:(Color white).
- top open.
+ top := StandardSystemView new.
+ top extent:300@300.
+ v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
+ v1 viewBackground:(Color grey:75).
+ v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
+ v2 viewBackground:(Color white).
+ top open.
- [top shown] whileFalse:[Processor yield].
+ [top shown] whileFalse:[Processor yield].
- top windowGroup
- withCursor:Cursor wait
- do:[
- (Delay forSeconds:10) wait
- ]
+ top windowGroup
+ withCursor:Cursor wait
+ do:[
+ (Delay forSeconds:10) wait
+ ]
+ [exEnd]
show a cursor in a single view for a while:
-
- |v1 v2 top|
+ [exBegin]
+ |v1 v2 top|
- top := StandardSystemView new.
- top extent:300@300.
- v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
- v1 viewBackground:(Color grey:75).
- v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
- v2 viewBackground:(Color white).
- top open.
+ top := StandardSystemView new.
+ top extent:300@300.
+ v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top.
+ v1 viewBackground:(Color grey:75).
+ v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top.
+ v2 viewBackground:(Color white).
+ top open.
- v1 withCursor:Cursor wait
- do:[
- (Delay forSeconds:10) wait
- ]
+ v1 withCursor:Cursor wait
+ do:[
+ (Delay forSeconds:10) wait
+ ]
+ [exEnd]
"
! !
@@ -1931,6 +1942,6 @@
!Cursor class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.29 1996-04-25 16:25:23 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.30 1996-04-27 17:53:34 cg Exp $'
! !
Cursor initialize!