author | Claus Gittinger <cg@exept.de> |
Sat, 21 Feb 1998 17:08:20 +0100 | |
changeset 2063 | 1c05343eab43 |
parent 1934 | fe7d73fe0df4 |
child 2096 | f3f0d358239f |
permissions | -rw-r--r-- |
0 | 1 |
" |
6 | 2 |
COPYRIGHT (c) 1992 by Claus Gittinger |
80 | 3 |
All Rights Reserved |
0 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
1934 | 13 |
'From Smalltalk/X, Version:3.2.1 on 23-oct-1997 at 4:39:37 pm' ! |
1929 | 14 |
|
0 | 15 |
Object subclass:#Cursor |
577 | 16 |
instanceVariableNames:'shape sourceForm maskForm hotX hotY device cursorId' |
17 |
classVariableNames:'Lobby DefaultFgColor DefaultBgColor NormalCursor HandCursor |
|
18 |
ArrowCursor WaitCursor CrossHairCursor OriginCursor CornerCursor |
|
19 |
SquareCursor FourWayCursor UpDownArrowCursor LeftRightArrowCursor |
|
20 |
ThumbsUpCursor ThumbsDownCursor ReadCursor WriteCursor XeqCursor |
|
21 |
StopCursor EyeCursor BlankCursor MarkerCursor UpCursor DownCursor |
|
2063 | 22 |
LeftCursor RightCursor XMarkerCursor CaretCursor UpRightHandCursor' |
577 | 23 |
poolDictionaries:'' |
24 |
category:'Graphics-Support' |
|
0 | 25 |
! |
26 |
||
1140 | 27 |
!Cursor class methodsFor:'documentation'! |
0 | 28 |
|
46 | 29 |
copyright |
30 |
" |
|
31 |
COPYRIGHT (c) 1992 by Claus Gittinger |
|
80 | 32 |
All Rights Reserved |
46 | 33 |
|
34 |
This software is furnished under a license and may be used |
|
35 |
only in accordance with the terms of that license and with the |
|
36 |
inclusion of the above copyright notice. This software may not |
|
37 |
be provided or otherwise made available to, or used by, any |
|
38 |
other person. No title to or ownership of the software is |
|
39 |
hereby transferred. |
|
40 |
" |
|
41 |
! |
|
42 |
||
0 | 43 |
documentation |
38 | 44 |
" |
45 |
I represents cursors in a device independent manner. |
|
144 | 46 |
Normally, cursors are defined at view creation time, |
601 | 47 |
via |
1929 | 48 |
'aView cursor:aCursor'. |
601 | 49 |
|
50 |
[Instance variables:] |
|
0 | 51 |
|
1929 | 52 |
shape <Symbol> a shape (i.e. #arrow, #hand, ...) or nil |
53 |
sourceForm <Form> if shape is nil, the source bits |
|
54 |
maskForm <Form> if shape is nil, the mask bits |
|
55 |
hotX <SmallInteger> if shape is nil, the hotSpot x of the cursor |
|
56 |
hotY <SmallInteger> if shape is nil, the hotSpot y of the cursor |
|
57 |
device <aDevice> the device, if associated to one |
|
58 |
cursorId <anObject> the device-specific id if device is nonNil |
|
0 | 59 |
|
601 | 60 |
[class variables:] |
61 |
||
1929 | 62 |
Lobby <Registry> keeps track of known device cursors |
63 |
(dont use it: this will be moved to the device) |
|
601 | 64 |
|
1929 | 65 |
DefaultFgColor <Color> default foreground color for cursors (usually black) |
66 |
DefaultBgColor <Color> default background color for cursors (usually white) |
|
0 | 67 |
|
1929 | 68 |
NormalCursor <Cursor> cached instance of normal (arrow) cursor |
69 |
... |
|
0 | 70 |
|
601 | 71 |
[see also:] |
1929 | 72 |
DeviceWorkstation |
73 |
DisplaySurface |
|
74 |
Font Color Image Form |
|
75 |
( introduction to view programming :html: programming/viewintro.html#CURSOR ) |
|
611 | 76 |
|
77 |
[author:] |
|
1929 | 78 |
Claus Gittinger |
38 | 79 |
" |
144 | 80 |
! |
81 |
||
82 |
examples |
|
83 |
" |
|
84 |
get a standard cursor: |
|
85 |
||
1929 | 86 |
Cursor wait |
87 |
Cursor stop |
|
88 |
Cursor normal |
|
144 | 89 |
|
90 |
create a custom cursor: |
|
91 |
||
1929 | 92 |
Cursor extent:16@16 |
93 |
fromArray:#[ 2r00000000 2r00000000 |
|
94 |
2r00000000 2r00000000 |
|
95 |
2r00000000 2r00000000 |
|
96 |
2r11111111 2r11111111 |
|
97 |
2r11111111 2r11111111 |
|
98 |
2r00000000 2r00000000 |
|
99 |
2r00000000 2r00000000 |
|
100 |
2r11111111 2r11111111 |
|
101 |
2r11111111 2r11111111 |
|
102 |
2r00000000 2r00000000 |
|
103 |
2r00000000 2r00000000 |
|
104 |
2r11111111 2r11111111 |
|
105 |
2r11111111 2r11111111 |
|
106 |
2r00000000 2r00000000 |
|
107 |
2r00000000 2r00000000 |
|
108 |
2r00000000 2r00000000] |
|
1934 | 109 |
offset:-8 @ -8 |
619 | 110 |
|
111 |
||
144 | 112 |
|
113 |
define a cursor for a view: |
|
1929 | 114 |
[exBegin] |
115 |
|v| |
|
144 | 116 |
|
1929 | 117 |
v := StandardSystemView extent:100@100. |
118 |
v cursor:Cursor stop. |
|
119 |
v open. |
|
120 |
[exEnd] |
|
619 | 121 |
|
144 | 122 |
|
123 |
with above custom cursor: |
|
1929 | 124 |
[exBegin] |
125 |
|v| |
|
126 |
||
127 |
v := StandardSystemView extent:100@100. |
|
128 |
v cursor:( |
|
129 |
Cursor extent:16@16 |
|
130 |
fromArray:#[ 2r00000000 2r00000000 |
|
131 |
2r00000000 2r00000000 |
|
132 |
2r00000000 2r00000000 |
|
133 |
2r11111111 2r11111111 |
|
134 |
2r11111111 2r11111111 |
|
135 |
2r00000000 2r00000000 |
|
136 |
2r00000000 2r00000000 |
|
137 |
2r11111111 2r11111111 |
|
138 |
2r11111111 2r11111111 |
|
139 |
2r00000000 2r00000000 |
|
140 |
2r00000000 2r00000000 |
|
141 |
2r11111111 2r11111111 |
|
142 |
2r11111111 2r11111111 |
|
143 |
2r00000000 2r00000000 |
|
144 |
2r00000000 2r00000000 |
|
145 |
2r00000000 2r00000000] |
|
1934 | 146 |
offset:-8 @ -8). |
1929 | 147 |
v open. |
148 |
[exEnd] |
|
149 |
||
150 |
||
151 |
a custom cursor with mask: |
|
152 |
[exBegin] |
|
153 |
|v| |
|
144 | 154 |
|
1929 | 155 |
v := StandardSystemView extent:100@100. |
156 |
v cursor:( |
|
157 |
Cursor |
|
158 |
extent:16@16 |
|
159 |
sourceArray:#[ |
|
160 |
2r00000000 2r00000000 |
|
161 |
2r00000000 2r00000000 |
|
162 |
2r00000000 2r00000000 |
|
163 |
2r11111111 2r11111111 |
|
164 |
2r11111111 2r11111111 |
|
165 |
2r00000000 2r00000000 |
|
166 |
2r00000000 2r00000000 |
|
167 |
2r00000000 2r00000000 |
|
168 |
2r00000000 2r00000000 |
|
169 |
2r00000000 2r00000000 |
|
170 |
2r00000000 2r00000000 |
|
171 |
2r11111111 2r11111111 |
|
172 |
2r11111111 2r11111111 |
|
173 |
2r00000000 2r00000000 |
|
174 |
2r00000000 2r00000000 |
|
175 |
2r00000000 2r00000000] |
|
176 |
maskArray:#[ |
|
177 |
2r00000000 2r00000000 |
|
178 |
2r00000000 2r00000000 |
|
179 |
2r11111111 2r11111111 |
|
180 |
2r11111111 2r11111111 |
|
181 |
2r11111111 2r11111111 |
|
182 |
2r11111111 2r11111111 |
|
183 |
2r00000000 2r00000000 |
|
184 |
2r00000000 2r00000000 |
|
185 |
2r00000000 2r00000000 |
|
186 |
2r00000000 2r00000000 |
|
187 |
2r11111111 2r11111111 |
|
188 |
2r11111111 2r11111111 |
|
189 |
2r11111111 2r11111111 |
|
190 |
2r11111111 2r11111111 |
|
191 |
2r00000000 2r00000000 |
|
192 |
2r00000000 2r00000000] |
|
1934 | 193 |
offset:-8 @ -8). |
1929 | 194 |
v open. |
195 |
[exEnd] |
|
196 |
||
197 |
||
198 |
a cursor from an image read from a file: |
|
199 |
[exBegin] |
|
200 |
|v img| |
|
201 |
||
202 |
v := StandardSystemView extent:100@100. |
|
203 |
img := Image fromFile:'bitmaps/xpmBitmaps/cursors/mouse.xpm'. |
|
204 |
v cursor:(Cursor fromImage:img). |
|
205 |
v open. |
|
206 |
[exEnd] |
|
619 | 207 |
|
144 | 208 |
|
209 |
with multiple views: |
|
1929 | 210 |
[exBegin] |
211 |
|v1 v2 top| |
|
144 | 212 |
|
1929 | 213 |
top := StandardSystemView new. |
214 |
top extent:300@300. |
|
215 |
v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
216 |
v1 viewBackground:(Color grey:75). |
|
217 |
v1 cursor:Cursor thumbsUp. |
|
218 |
v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top. |
|
219 |
v2 viewBackground:(Color white). |
|
220 |
v2 cursor:Cursor wait. |
|
221 |
top open. |
|
222 |
[exEnd] |
|
144 | 223 |
|
224 |
||
702 | 225 |
show a cursor (in the active ST/X view) for a while: |
1929 | 226 |
[exBegin] |
619 | 227 |
|
1929 | 228 |
Cursor wait |
229 |
showWhile:[ |
|
230 |
Delay waitForSeconds:5 |
|
231 |
] |
|
232 |
[exEnd] |
|
144 | 233 |
|
234 |
||
151 | 235 |
show a cursor in all views belonging to a windowGroup: |
236 |
(have to wait until top is visible to access windowGroup) |
|
1929 | 237 |
[exBegin] |
238 |
|v1 v2 top| |
|
151 | 239 |
|
1929 | 240 |
top := StandardSystemView new. |
241 |
top extent:300@300. |
|
242 |
v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
243 |
v1 viewBackground:(Color grey:75). |
|
244 |
v1 cursor:(Cursor normal). |
|
702 | 245 |
|
1929 | 246 |
v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top. |
247 |
v2 viewBackground:(Color white). |
|
248 |
v2 cursor:(Cursor crossHair). |
|
249 |
top openAndWait. |
|
151 | 250 |
|
1929 | 251 |
Delay waitForSeconds:3. |
151 | 252 |
|
1929 | 253 |
top windowGroup |
254 |
withCursor:Cursor wait |
|
255 |
do:[ |
|
256 |
Delay waitForSeconds:5 |
|
257 |
] |
|
258 |
[exEnd] |
|
151 | 259 |
|
260 |
||
144 | 261 |
show a cursor in a single view for a while: |
1929 | 262 |
[exBegin] |
263 |
|v1 v2 top| |
|
144 | 264 |
|
1929 | 265 |
top := StandardSystemView new. |
266 |
top extent:300@300. |
|
267 |
v1 := View origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
268 |
v1 viewBackground:(Color grey:75). |
|
269 |
v1 cursor:(Cursor normal). |
|
702 | 270 |
|
1929 | 271 |
v2 := View origin:0.0@0.5 corner:1.0@1.0 in:top. |
272 |
v2 viewBackground:(Color white). |
|
273 |
v2 cursor:(Cursor crossHair). |
|
702 | 274 |
|
1929 | 275 |
top openAndWait. |
702 | 276 |
|
1929 | 277 |
Delay waitForSeconds:3. |
144 | 278 |
|
1929 | 279 |
v1 withCursor:Cursor wait |
280 |
do:[ |
|
281 |
Delay waitForSeconds:5 |
|
282 |
] |
|
283 |
[exEnd] |
|
144 | 284 |
" |
0 | 285 |
! ! |
286 |
||
1140 | 287 |
!Cursor class methodsFor:'initialization'! |
0 | 288 |
|
289 |
flushDeviceCursors |
|
290 |
"unassign all cursors from their device" |
|
291 |
||
223 | 292 |
Lobby notNil ifTrue:[ |
499 | 293 |
Lobby do:[:aCursor | |
223 | 294 |
aCursor restored. |
295 |
Lobby registerChange:aCursor |
|
499 | 296 |
] |
0 | 297 |
] |
298 |
! |
|
299 |
||
577 | 300 |
initialize |
301 |
Lobby isNil ifTrue:[ |
|
302 |
Lobby := Registry new. |
|
303 |
||
304 |
"want to be informed when returning from snapshot" |
|
305 |
ObjectMemory addDependent:self |
|
306 |
] |
|
307 |
! |
|
308 |
||
1495 | 309 |
initializeNewCursors |
1564 | 310 |
"Create the new cursors |
1934 | 311 |
Cursor blank |
312 |
Cursor down |
|
313 |
Cursor execute |
|
314 |
Cursor left |
|
315 |
Cursor marker |
|
316 |
Cursor normal |
|
317 |
Cursor read |
|
318 |
Cursor right |
|
319 |
Cursor square |
|
320 |
Cursor up |
|
321 |
Cursor wait |
|
322 |
Cursor write |
|
323 |
Cursor thumbsUp |
|
324 |
Cursor thumbsDown |
|
325 |
Cursor xMarker |
|
326 |
Cursor caret |
|
327 |
Cursor stop |
|
328 |
Cursor eye" |
|
1495 | 329 |
|
1564 | 330 |
|device builtIn| |
1495 | 331 |
|
1564 | 332 |
device := Display. |
333 |
builtIn := device builtInCursorShapes. |
|
1495 | 334 |
|
1564 | 335 |
(builtIn includes:#origin) ifFalse:[ |
1934 | 336 |
OriginCursor := |
337 |
(Cursor |
|
338 |
extent: 16@16 |
|
339 |
sourceArray: #( |
|
340 |
2r0000000000000000 |
|
341 |
2r0111111111111111 |
|
342 |
2r0111111111111111 |
|
343 |
2r0110000000000000 |
|
344 |
2r0110000000000000 |
|
345 |
2r0110000000000000 |
|
346 |
2r0110000000000000 |
|
347 |
2r0110000000000000 |
|
348 |
2r0110000000000000 |
|
349 |
2r0110000000000000 |
|
350 |
2r0110000000000000 |
|
351 |
2r0110000000000000 |
|
352 |
2r0110000000000000 |
|
353 |
2r0110000000000000 |
|
354 |
2r0110000000000000 |
|
355 |
2r0110000000000000) |
|
356 |
maskArray: #( |
|
357 |
2r1111111111111111 |
|
358 |
2r1111111111111111 |
|
359 |
2r1111111111111111 |
|
360 |
2r1111111111111111 |
|
361 |
2r1111000000000000 |
|
362 |
2r1111000000000000 |
|
363 |
2r1111000000000000 |
|
364 |
2r1111000000000000 |
|
365 |
2r1111000000000000 |
|
366 |
2r1111000000000000 |
|
367 |
2r1111000000000000 |
|
368 |
2r1111000000000000 |
|
369 |
2r1111000000000000 |
|
370 |
2r1111000000000000 |
|
371 |
2r1111000000000000 |
|
372 |
2r1111000000000000) |
|
373 |
offset: -1@ -1). |
|
1564 | 374 |
]. |
1495 | 375 |
|
1564 | 376 |
(builtIn includes:#corner) ifFalse:[ |
1934 | 377 |
CornerCursor := |
378 |
(Cursor |
|
379 |
extent: 16@16 |
|
380 |
sourceArray: #( |
|
381 |
2r0000000000000110 |
|
382 |
2r0000000000000110 |
|
383 |
2r0000000000000110 |
|
384 |
2r0000000000000110 |
|
385 |
2r0000000000000110 |
|
386 |
2r0000000000000110 |
|
387 |
2r0000000000000110 |
|
388 |
2r0000000000000110 |
|
389 |
2r0000000000000110 |
|
390 |
2r0000000000000110 |
|
391 |
2r0000000000000110 |
|
392 |
2r0000000000000110 |
|
393 |
2r0000000000000110 |
|
394 |
2r1111111111111110 |
|
395 |
2r1111111111111110 |
|
396 |
2r0000000000000000) |
|
397 |
maskArray: #( |
|
398 |
2r0000000000001111 |
|
399 |
2r0000000000001111 |
|
400 |
2r0000000000001111 |
|
401 |
2r0000000000001111 |
|
402 |
2r0000000000001111 |
|
403 |
2r0000000000001111 |
|
404 |
2r0000000000001111 |
|
405 |
2r0000000000001111 |
|
406 |
2r0000000000001111 |
|
407 |
2r0000000000001111 |
|
408 |
2r0000000000001111 |
|
409 |
2r0000000000001111 |
|
410 |
2r1111111111111111 |
|
411 |
2r1111111111111111 |
|
412 |
2r1111111111111111 |
|
413 |
2r1111111111111111) |
|
414 |
offset: -14@ -14). |
|
1564 | 415 |
]. |
1495 | 416 |
|
1564 | 417 |
(builtIn includes:#read) ifFalse:[ |
1934 | 418 |
ReadCursor := (Cursor |
419 |
extent: 16@16 |
|
420 |
sourceArray: #( |
|
421 |
2r0 |
|
422 |
2r0000110000000110 |
|
423 |
2r0001001000001001 |
|
424 |
2r0001001000001001 |
|
425 |
2r0010000000010000 |
|
426 |
2r0100000000100000 |
|
427 |
2r1111101111100000 |
|
428 |
2r1000010000100000 |
|
429 |
2r1000010000100000 |
|
430 |
2r1011010110100000 |
|
431 |
2r0111101111000000 |
|
432 |
2r0000000000000000 |
|
433 |
2r0000000000000000 |
|
434 |
2r0000000000000000 |
|
435 |
2r0000000000000000 |
|
436 |
2r0000000000000000) |
|
437 |
maskArray: #( |
|
438 |
2r0001111000001111 |
|
439 |
2r0001111000011111 |
|
440 |
2r0011111000011111 |
|
441 |
2r0011100000111100 |
|
442 |
2r0111000000111000 |
|
443 |
2r1111111111110000 |
|
444 |
2r1111111111110000 |
|
445 |
2r1111111111110000 |
|
446 |
2r1111111111110000 |
|
447 |
2r1111111111110000 |
|
448 |
2r1111111111100000 |
|
449 |
2r0111111111000000 |
|
450 |
2r0000000000000000 |
|
451 |
2r0000000000000000 |
|
452 |
2r0000000000000000 |
|
453 |
2r0000000000000000) |
|
454 |
offset: -5 @ -7). |
|
1564 | 455 |
]. |
1495 | 456 |
|
1564 | 457 |
(builtIn includes:#write) ifFalse:[ |
1934 | 458 |
WriteCursor := (Cursor |
459 |
extent: 16@16 |
|
460 |
sourceArray: #( |
|
461 |
2r0000000000000110 |
|
462 |
2r0000000000001111 |
|
463 |
2r0000000000010110 |
|
464 |
2r0000000000100100 |
|
465 |
2r0000000001001000 |
|
466 |
2r0000000010010000 |
|
467 |
2r0000000100100000 |
|
468 |
2r0000001001000011 |
|
469 |
2r0000010010000010 |
|
470 |
2r0000100100000110 |
|
471 |
2r0001001000001000 |
|
472 |
2r0010010000001000 |
|
473 |
2r0111100001001000 |
|
474 |
2r0101000010111000 |
|
475 |
2r0110000110000000 |
|
476 |
2r1111111100000000) |
|
477 |
maskArray: #( |
|
478 |
2r0000000000000111 |
|
479 |
2r0000000000001111 |
|
480 |
2r0000000000011110 |
|
481 |
2r0000000000111100 |
|
482 |
2r0000000001111000 |
|
483 |
2r0000000011110000 |
|
484 |
2r0000000111100001 |
|
485 |
2r0000001111000110 |
|
486 |
2r0000011110000110 |
|
487 |
2r0000111100001110 |
|
488 |
2r0001111000001100 |
|
489 |
2r0011110001001100 |
|
490 |
2r0111100011111000 |
|
491 |
2r0111000110111000 |
|
492 |
2r0111111110000000 |
|
493 |
2r1111111100000000) |
|
494 |
offset: 0@ -15). |
|
1564 | 495 |
]. |
1495 | 496 |
|
1564 | 497 |
(builtIn includes:#wait) ifFalse:[ |
1934 | 498 |
WaitCursor := |
499 |
(Cursor |
|
500 |
extent: 16@16 |
|
501 |
sourceArray: #( |
|
502 |
2r1111111111111111 |
|
503 |
2r1000000000000001 |
|
504 |
2r0100000000000010 |
|
505 |
2r0010000000000100 |
|
506 |
2r0001110000111000 |
|
507 |
2r0000111101110000 |
|
508 |
2r0000011011100000 |
|
509 |
2r0000001111000000 |
|
510 |
2r0000001111000000 |
|
511 |
2r0000010110100000 |
|
512 |
2r0000100010010000 |
|
513 |
2r0001000110001000 |
|
514 |
2r0010001101000100 |
|
515 |
2r0100111111110010 |
|
516 |
2r1011111111111101 |
|
517 |
2r1111111111111111) |
|
518 |
maskArray: #( |
|
519 |
2r1111111111111111 |
|
520 |
2r1111111111111111 |
|
521 |
2r1111111111111111 |
|
522 |
2r0111111111111110 |
|
523 |
2r0011111111111100 |
|
524 |
2r0001111111111000 |
|
525 |
2r0000111111110000 |
|
526 |
2r0000011111100000 |
|
527 |
2r0000011111100000 |
|
528 |
2r0000111111110000 |
|
529 |
2r0001111111111000 |
|
530 |
2r0011111111111100 |
|
531 |
2r0111111111111110 |
|
532 |
2r1111111111111111 |
|
533 |
2r1111111111111111 |
|
534 |
2r1111111111111111) |
|
535 |
offset: -8@ -8). |
|
1564 | 536 |
]. |
1495 | 537 |
|
1934 | 538 |
(builtIn includes:#blank) ifFalse:[ |
539 |
BlankCursor := |
|
540 |
(Cursor |
|
541 |
extent: 16@16 |
|
542 |
fromArray: #( |
|
543 |
2r0000000000000000 |
|
544 |
2r0000000000000000 |
|
545 |
2r0000000000000000 |
|
546 |
2r0000000000000000 |
|
547 |
2r0000000000000000 |
|
548 |
2r0000000000000000 |
|
549 |
2r0000000000000000 |
|
550 |
2r0000000000000000 |
|
551 |
2r0000000000000000 |
|
552 |
2r0000000000000000 |
|
553 |
2r0000000000000000 |
|
554 |
2r0000000000000000 |
|
555 |
2r0000000000000000 |
|
556 |
2r0000000000000000 |
|
557 |
2r0000000000000000 |
|
558 |
2r0000000000000000) |
|
559 |
offset: 0@0). |
|
560 |
]. |
|
1495 | 561 |
|
1564 | 562 |
(builtIn includes:#execute) ifFalse:[ |
1934 | 563 |
XeqCursor := |
564 |
(Cursor |
|
565 |
extent: 16@16 |
|
566 |
sourceArray: #( |
|
567 |
2r1000000000010000 |
|
568 |
2r1100000000010000 |
|
569 |
2r1110000000111000 |
|
570 |
2r1111000111111111 |
|
571 |
2r1111100011000110 |
|
572 |
2r1111110001000100 |
|
573 |
2r1111111001111100 |
|
574 |
2r1111000001101100 |
|
575 |
2r1101100011000110 |
|
576 |
2r1001100010000010 |
|
577 |
2r0000110000000000 |
|
578 |
2r0000110000000000 |
|
579 |
2r0000011000000000 |
|
580 |
2r0000011000000000 |
|
581 |
2r0000001100000000 |
|
582 |
2r0000001100000000) |
|
583 |
maskArray: #( |
|
584 |
2r1100000000111000 |
|
585 |
2r1110000000111000 |
|
586 |
2r1111000111111111 |
|
587 |
2r1111100111111111 |
|
588 |
2r1111110011111111 |
|
589 |
2r1111111001111110 |
|
590 |
2r1111111101111100 |
|
591 |
2r1111100001111110 |
|
592 |
2r1101110011100111 |
|
593 |
2r1001110011000010 |
|
594 |
2r0000111000000000 |
|
595 |
2r0000111000000000 |
|
596 |
2r0000011100000000 |
|
597 |
2r0000011100000000 |
|
598 |
2r0000001110000000 |
|
599 |
2r0000001110000000) |
|
600 |
offset: 0@0). |
|
1564 | 601 |
]. |
1495 | 602 |
|
1564 | 603 |
(builtIn includes:#square) ifFalse:[ |
1934 | 604 |
SquareCursor := |
605 |
(Cursor |
|
606 |
extent: 16@16 |
|
607 |
fromArray: #( |
|
608 |
2r0000000000000000 |
|
609 |
2r0000000000000000 |
|
610 |
2r0000000000000000 |
|
611 |
2r0000000000000000 |
|
612 |
2r0000000000000000 |
|
613 |
2r0000001111000000 |
|
614 |
2r0000001111000000 |
|
615 |
2r0000001111000000 |
|
616 |
2r0000001111000000 |
|
617 |
2r0000000000000000 |
|
618 |
2r0000000000000000 |
|
619 |
2r0000000000000000 |
|
620 |
2r0000000000000000 |
|
621 |
2r0000000000000000 |
|
622 |
2r0000000000000000 |
|
623 |
2r0000000000000000) |
|
624 |
offset: -8@ -8). |
|
1564 | 625 |
]. |
1495 | 626 |
|
1564 | 627 |
(builtIn includes:#upLeftArrow) ifFalse:[ |
1934 | 628 |
NormalCursor := |
629 |
(Cursor |
|
630 |
extent: 16@16 |
|
631 |
sourceArray: #( |
|
632 |
2r1000000000000000 |
|
633 |
2r1100000000000000 |
|
634 |
2r1110000000000000 |
|
635 |
2r1111000000000000 |
|
636 |
2r1111100000000000 |
|
637 |
2r1111110000000000 |
|
638 |
2r1111111000000000 |
|
639 |
2r1111100000000000 |
|
640 |
2r1111100000000000 |
|
641 |
2r1001100000000000 |
|
642 |
2r0000110000000000 |
|
643 |
2r0000110000000000 |
|
644 |
2r0000011000000000 |
|
645 |
2r0000011000000000 |
|
646 |
2r0000001100000000 |
|
647 |
2r0000001100000000) |
|
648 |
maskArray: #( |
|
649 |
2r1100000000000000 |
|
650 |
2r1110000000000000 |
|
651 |
2r1111000000000000 |
|
652 |
2r1111100000000000 |
|
653 |
2r1111110000000000 |
|
654 |
2r1111111000000000 |
|
655 |
2r1111111100000000 |
|
656 |
2r1111110000000000 |
|
657 |
2r1111110000000000 |
|
658 |
2r1001110000000000 |
|
659 |
2r0000111000000000 |
|
660 |
2r0000111000000000 |
|
661 |
2r0000011100000000 |
|
662 |
2r0000011100000000 |
|
663 |
2r0000001110000000 |
|
664 |
2r0000001110000000) |
|
665 |
offset: 0@0). |
|
1564 | 666 |
]. |
1495 | 667 |
|
668 |
||
1564 | 669 |
(builtIn includes:#crossHair) ifFalse:[ |
1934 | 670 |
CrossHairCursor := |
671 |
(Cursor |
|
672 |
extent: 16@16 |
|
673 |
sourceArray: #( |
|
674 |
2r0000000100000000 |
|
675 |
2r0000000100000000 |
|
676 |
2r0000000100000000 |
|
677 |
2r0000000100000000 |
|
678 |
2r0000000100000000 |
|
679 |
2r0000000100000000 |
|
680 |
2r0000000100000000 |
|
681 |
2r1111111111111110 |
|
682 |
2r0000000100000000 |
|
683 |
2r0000000100000000 |
|
684 |
2r0000000100000000 |
|
685 |
2r0000000100000000 |
|
686 |
2r0000000100000000 |
|
687 |
2r0000000100000000 |
|
688 |
2r0000000100000000 |
|
689 |
2r0) |
|
690 |
maskArray: #( |
|
691 |
2r0000000110000000 |
|
692 |
2r0000000110000000 |
|
693 |
2r0000000110000000 |
|
694 |
2r0000000110000000 |
|
695 |
2r0000000110000000 |
|
696 |
2r0000000110000000 |
|
697 |
2r0000000110000000 |
|
698 |
2r1111111111111110 |
|
699 |
2r1111111111111110 |
|
700 |
2r0000000110000000 |
|
701 |
2r0000000110000000 |
|
702 |
2r0000000110000000 |
|
703 |
2r0000000110000000 |
|
704 |
2r0000000110000000 |
|
705 |
2r0000000110000000 |
|
706 |
2r0) |
|
707 |
offset: -7@ -7). |
|
1564 | 708 |
]. |
1495 | 709 |
|
1564 | 710 |
(builtIn includes:#scrollMarkerH) ifFalse:[ |
1934 | 711 |
MarkerCursor := |
712 |
Cursor |
|
713 |
extent: 16@16 |
|
714 |
sourceArray: #( |
|
715 |
2r0000000000000000 |
|
716 |
2r0000000000000000 |
|
717 |
2r0000000000000000 |
|
718 |
2r0000001000000000 |
|
719 |
2r0000001110000000 |
|
720 |
2r0000001111100000 |
|
721 |
2r0111111111111000 |
|
722 |
2r0111111111111110 |
|
723 |
2r0111111111111000 |
|
724 |
2r0000001111100000 |
|
725 |
2r0000001110000000 |
|
726 |
2r0000001000000000 |
|
727 |
2r0000000000000000 |
|
728 |
2r0000000000000000 |
|
729 |
2r0000000000000000 |
|
730 |
2r0000000000000000) |
|
731 |
maskArray: #( |
|
732 |
2r0000000000000000 |
|
733 |
2r0000000000000000 |
|
734 |
2r0000000000000000 |
|
735 |
2r0000011100000000 |
|
736 |
2r0000011111000000 |
|
737 |
2r1111111111110000 |
|
738 |
2r1111111111111100 |
|
739 |
2r1111111111111111 |
|
740 |
2r1111111111111100 |
|
741 |
2r1111111111110000 |
|
742 |
2r0000011111000000 |
|
743 |
2r0000011100000000 |
|
744 |
2r0000011000000000 |
|
745 |
2r0000000000000000 |
|
746 |
2r0000000000000000 |
|
747 |
2r0000000000000000) |
|
748 |
offset: -14@ -7. |
|
1564 | 749 |
]. |
1495 | 750 |
|
1564 | 751 |
(builtIn includes:#scrollUp) ifFalse:[ |
1934 | 752 |
UpCursor := |
753 |
Cursor |
|
754 |
extent: 16@16 |
|
755 |
sourceArray: #( |
|
756 |
2r0000000000000000 |
|
757 |
2r0100000000000000 |
|
758 |
2r0110000000000000 |
|
759 |
2r0111000000000000 |
|
760 |
2r0111100000000000 |
|
761 |
2r0111110000000000 |
|
762 |
2r0111111000000000 |
|
763 |
2r0110000000000000 |
|
764 |
2r0110000000000000 |
|
765 |
2r0110000000000000 |
|
766 |
2r0110000000000000 |
|
767 |
2r0110000000000000 |
|
768 |
2r0110000000000000 |
|
769 |
2r0110000000000000 |
|
770 |
2r0110000000000000 |
|
771 |
2r0000000000000000) |
|
772 |
maskArray: #( |
|
773 |
2r1100000000000000 |
|
774 |
2r1110000000000000 |
|
775 |
2r1111000000000000 |
|
776 |
2r1111100000000000 |
|
777 |
2r1111110000000000 |
|
778 |
2r1111111000000000 |
|
779 |
2r1111111100000000 |
|
780 |
2r1111111100000000 |
|
781 |
2r1111000000000000 |
|
782 |
2r1111000000000000 |
|
783 |
2r1111000000000000 |
|
784 |
2r1111000000000000 |
|
785 |
2r1111000000000000 |
|
786 |
2r1111000000000000 |
|
787 |
2r1111000000000000 |
|
788 |
2r1111000000000000) |
|
789 |
offset: -1@ -1. |
|
1564 | 790 |
]. |
1495 | 791 |
|
1564 | 792 |
(builtIn includes:#scrollDown) ifFalse:[ |
1934 | 793 |
DownCursor := |
794 |
Cursor |
|
795 |
extent: 16@16 |
|
796 |
sourceArray: #( |
|
797 |
2r0000000000000000 |
|
798 |
2r0000011000000000 |
|
799 |
2r0000011000000000 |
|
800 |
2r0000011000000000 |
|
801 |
2r0000011000000000 |
|
802 |
2r0000011000000000 |
|
803 |
2r0000011000000000 |
|
804 |
2r0000011000000000 |
|
805 |
2r0000011000000000 |
|
806 |
2r0111111000000000 |
|
807 |
2r0011111000000000 |
|
808 |
2r0001111000000000 |
|
809 |
2r0000111000000000 |
|
810 |
2r0000011000000000 |
|
811 |
2r0000001000000000 |
|
812 |
2r0000000000000000) |
|
813 |
maskArray: #( |
|
814 |
2r0000111100000000 |
|
815 |
2r0000111100000000 |
|
816 |
2r0000111100000000 |
|
817 |
2r0000111100000000 |
|
818 |
2r0000111100000000 |
|
819 |
2r0000111100000000 |
|
820 |
2r0000111100000000 |
|
821 |
2r0000111100000000 |
|
822 |
2r1111111100000000 |
|
823 |
2r1111111100000000 |
|
824 |
2r0111111100000000 |
|
825 |
2r0011111100000000 |
|
826 |
2r0001111100000000 |
|
827 |
2r0000111100000000 |
|
828 |
2r0000011100000000 |
|
829 |
2r0000001100000000) |
|
830 |
offset: -7@ -15. |
|
1564 | 831 |
]. |
1495 | 832 |
|
1564 | 833 |
(builtIn includes:#scrollLeft) ifFalse:[ |
1934 | 834 |
LeftCursor := |
835 |
Cursor |
|
836 |
extent: 16@16 |
|
837 |
sourceArray: #( |
|
838 |
2r0000000000000000 |
|
839 |
2r0111111111111110 |
|
840 |
2r0011111111111110 |
|
841 |
2r0001111000000000 |
|
842 |
2r0000111000000000 |
|
843 |
2r0000011000000000 |
|
844 |
2r0000001000000000 |
|
845 |
2r0000000000000000 |
|
846 |
2r0000000000000000 |
|
847 |
2r0000000000000000 |
|
848 |
2r0000000000000000 |
|
849 |
2r0000000000000000 |
|
850 |
2r0000000000000000 |
|
851 |
2r0000000000000000 |
|
852 |
2r0000000000000000 |
|
853 |
2r0000000000000000) |
|
854 |
maskArray: #( |
|
855 |
2r1111111111111111 |
|
856 |
2r1111111111111111 |
|
857 |
2r0111111111111111 |
|
858 |
2r0011111111111111 |
|
859 |
2r0001111100000000 |
|
860 |
2r0000111100000000 |
|
861 |
2r0000011100000000 |
|
862 |
2r0000001100000000 |
|
863 |
2r0000000000000000 |
|
864 |
2r0000000000000000 |
|
865 |
2r0000000000000000 |
|
866 |
2r0000000000000000 |
|
867 |
2r0000000000000000 |
|
868 |
2r0000000000000000 |
|
869 |
2r0000000000000000 |
|
870 |
2r0000000000000000) |
|
871 |
offset: -1 @ -1. |
|
1564 | 872 |
]. |
1495 | 873 |
|
1564 | 874 |
(builtIn includes:#scrollRight) ifFalse:[ |
1934 | 875 |
RightCursor := |
876 |
Cursor |
|
877 |
extent: 16@16 |
|
878 |
sourceArray: #( |
|
879 |
2r0000000000000000 |
|
880 |
2r0000000001000000 |
|
881 |
2r0000000001100000 |
|
882 |
2r0000000001110000 |
|
883 |
2r0000000001111000 |
|
884 |
2r0111111111111100 |
|
885 |
2r0111111111111110 |
|
886 |
2r0000000000000000 |
|
887 |
2r0000000000000000 |
|
888 |
2r0000000000000000 |
|
889 |
2r0000000000000000 |
|
890 |
2r0000000000000000 |
|
891 |
2r0000000000000000 |
|
892 |
2r0000000000000000 |
|
893 |
2r0000000000000000 |
|
894 |
2r0000000000000000) |
|
895 |
maskArray: #( |
|
896 |
2r0000000011000000 |
|
897 |
2r0000000011100000 |
|
898 |
2r0000000011110000 |
|
899 |
2r0000000011111000 |
|
900 |
2r1111111111111100 |
|
901 |
2r1111111111111110 |
|
902 |
2r1111111111111111 |
|
903 |
2r1111111111111111 |
|
904 |
2r0000000000000000 |
|
905 |
2r0000000000000000 |
|
906 |
2r0000000000000000 |
|
907 |
2r0000000000000000 |
|
908 |
2r0000000000000000 |
|
909 |
2r0000000000000000 |
|
910 |
2r0000000000000000 |
|
911 |
2r0000000000000000) |
|
912 |
offset: -15@ -6. |
|
1564 | 913 |
]. |
914 |
||
915 |
(builtIn includes:#scrollMarkerV) ifFalse:[ |
|
1934 | 916 |
XMarkerCursor := |
917 |
Cursor |
|
918 |
extent: 16@16 |
|
919 |
sourceArray: #( |
|
920 |
2r0000000000000000 |
|
921 |
2r0000000100000000 |
|
922 |
2r0000000100000000 |
|
923 |
2r0000001110000000 |
|
924 |
2r0000001110000000 |
|
925 |
2r0000011111000000 |
|
926 |
2r0000011111000000 |
|
927 |
2r0000111111100000 |
|
928 |
2r0000111111100000 |
|
929 |
2r0001111111110000 |
|
930 |
2r0000001110000000 |
|
931 |
2r0000001110000000 |
|
932 |
2r0000001110000000 |
|
933 |
2r0000001110000000 |
|
934 |
2r0000001110000000 |
|
935 |
2r0000000000000000) |
|
936 |
maskArray: #( |
|
937 |
2r0000000100000000 |
|
938 |
2r0000001110000000 |
|
939 |
2r0000001110000000 |
|
940 |
2r0000011111000000 |
|
941 |
2r0000011111000000 |
|
942 |
2r0000111111100000 |
|
943 |
2r0000111111100000 |
|
944 |
2r0001111111110000 |
|
945 |
2r0001111111110000 |
|
946 |
2r0011111111111000 |
|
947 |
2r0011111111111000 |
|
948 |
2r0000011111000000 |
|
949 |
2r0000011111000000 |
|
950 |
2r0000011111000000 |
|
951 |
2r0000011111000000 |
|
952 |
2r0000011111000000) |
|
953 |
offset: -7@ -1. |
|
1564 | 954 |
]. |
1495 | 955 |
|
1564 | 956 |
(builtIn includes:#fourWay) ifFalse:[ |
1934 | 957 |
FourWayCursor := |
958 |
Cursor |
|
959 |
extent: 16@16 |
|
960 |
sourceArray: #( |
|
961 |
2r0000000100000000 |
|
962 |
2r0000001110000000 |
|
963 |
2r0000011111000000 |
|
964 |
2r0000111111100000 |
|
965 |
2r0001001110010000 |
|
966 |
2r0011001110011000 |
|
967 |
2r0111111111111100 |
|
968 |
2r1111111111111110 |
|
969 |
2r0111111111111100 |
|
970 |
2r0011001110011000 |
|
971 |
2r0001001110010000 |
|
972 |
2r0000111111100000 |
|
973 |
2r0000011111000000 |
|
974 |
2r0000001110000000 |
|
975 |
2r0000000100000000 |
|
976 |
2r0000000000000000) |
|
977 |
maskArray: #( |
|
978 |
2r0000001110000000 |
|
979 |
2r0000011111000000 |
|
980 |
2r0000111111100000 |
|
981 |
2r0001111111110000 |
|
982 |
2r0010111111101000 |
|
983 |
2r0111111111111100 |
|
984 |
2r1111111111111110 |
|
985 |
2r1111111111111110 |
|
986 |
2r1111111111111110 |
|
987 |
2r0111111111111100 |
|
988 |
2r0010111111101000 |
|
989 |
2r0001111111110000 |
|
990 |
2r0000111111100000 |
|
991 |
2r0000011111000000 |
|
992 |
2r0000001110000000 |
|
993 |
2r0000000000000000) |
|
994 |
offset: -7@ -7. |
|
1564 | 995 |
]. |
1495 | 996 |
|
1564 | 997 |
(builtIn includes:#thumbsUp) ifFalse:[ |
1934 | 998 |
ThumbsUpCursor := (Cursor |
999 |
extent: 16@16 |
|
1000 |
sourceArray: #( |
|
1001 |
2r0000000000100000 |
|
1002 |
2r0000000001010000 |
|
1003 |
2r0000000010010000 |
|
1004 |
2r0000000011110000 |
|
1005 |
2r0000000100010000 |
|
1006 |
2r0000000100010000 |
|
1007 |
2r0001111100011000 |
|
1008 |
2r0010000100000110 |
|
1009 |
2r0100000000000000 |
|
1010 |
2r0111111000000000 |
|
1011 |
2r0100000000000000 |
|
1012 |
2r0111111000000000 |
|
1013 |
2r0100000000000000 |
|
1014 |
2r0011111000001110 |
|
1015 |
2r0001000000010000 |
|
1016 |
2r0001111111100000) |
|
1017 |
maskArray: #( |
|
1018 |
2r0000000000100000 |
|
1019 |
2r0000000001110000 |
|
1020 |
2r0000000011110000 |
|
1021 |
2r0000000011110000 |
|
1022 |
2r0000000111110000 |
|
1023 |
2r0000000111110000 |
|
1024 |
2r0001111111111000 |
|
1025 |
2r0011111111111110 |
|
1026 |
2r0111111111111110 |
|
1027 |
2r0111111111111110 |
|
1028 |
2r0111111111111110 |
|
1029 |
2r0111111111111110 |
|
1030 |
2r0111111111111110 |
|
1031 |
2r0011111111111110 |
|
1032 |
2r0001111111110000 |
|
1033 |
2r0001111111100000) |
|
1034 |
offset: -8@ 0). |
|
1564 | 1035 |
]. |
1495 | 1036 |
|
1564 | 1037 |
(builtIn includes:#caret) ifFalse:[ |
1934 | 1038 |
CaretCursor := (Cursor |
1039 |
extent: 16@16 |
|
1040 |
sourceArray: #( |
|
1041 |
2r0000000000000000 |
|
1042 |
2r0000000110000000 |
|
1043 |
2r0000000110000000 |
|
1044 |
2r0000001111000000 |
|
1045 |
2r0000011111100000 |
|
1046 |
2r0000011001100000 |
|
1047 |
2r0000000000000000 |
|
1048 |
2r0000000000000000 |
|
1049 |
2r0000000000000000 |
|
1050 |
2r0000000000000000 |
|
1051 |
2r0000000000000000 |
|
1052 |
2r0000000000000000 |
|
1053 |
2r0000000000000000 |
|
1054 |
2r0000000000000000 |
|
1055 |
2r0000000000000000 |
|
1056 |
2r0000000000000000) |
|
1057 |
maskArray: #( |
|
1058 |
2r0000000110000000 |
|
1059 |
2r0000001111000000 |
|
1060 |
2r0000001111100000 |
|
1061 |
2r0000011111100000 |
|
1062 |
2r0000111111110000 |
|
1063 |
2r0000111111110000 |
|
1064 |
2r0000011001100000 |
|
1065 |
2r0000000000000000 |
|
1066 |
2r0000000000000000 |
|
1067 |
2r0000000000000000 |
|
1068 |
2r0000000000000000 |
|
1069 |
2r0000000000000000 |
|
1070 |
2r0000000000000000 |
|
1071 |
2r0000000000000000 |
|
1072 |
2r0000000000000000 |
|
1073 |
2r0000000000000000) |
|
1074 |
offset: -8@0). |
|
1564 | 1075 |
]. |
1495 | 1076 |
|
1564 | 1077 |
(builtIn includes:#thumbsDown) ifFalse:[ |
1934 | 1078 |
ThumbsDownCursor := (Cursor |
1079 |
extent: 16@16 |
|
1080 |
sourceArray: #( |
|
1081 |
2r0001111111100000 |
|
1082 |
2r0001000000010000 |
|
1083 |
2r0011111000001110 |
|
1084 |
2r0100000000000000 |
|
1085 |
2r0111111000000000 |
|
1086 |
2r0100000000000000 |
|
1087 |
2r0111111000000000 |
|
1088 |
2r0100000000000000 |
|
1089 |
2r0010000100000110 |
|
1090 |
2r0001111100011000 |
|
1091 |
2r0000000100010000 |
|
1092 |
2r0000000100010000 |
|
1093 |
2r0000000011110000 |
|
1094 |
2r0000000010010000 |
|
1095 |
2r0000000001010000 |
|
1096 |
2r0000000000100000) |
|
1097 |
||
1098 |
maskArray: #( |
|
1099 |
2r0001111111100000 |
|
1100 |
2r0001111111110000 |
|
1101 |
2r0011111111111110 |
|
1102 |
2r0111111111111110 |
|
1103 |
2r0111111111111110 |
|
1104 |
2r0111111111111110 |
|
1105 |
2r0111111111111110 |
|
1106 |
2r0111111111111110 |
|
1107 |
2r0011111111111110 |
|
1108 |
2r0001111111111000 |
|
1109 |
2r0000000111110000 |
|
1110 |
2r0000000111110000 |
|
1111 |
2r0000000011110000 |
|
1112 |
2r0000000011110000 |
|
1113 |
2r0000000001110000 |
|
1114 |
2r0000000000100000) |
|
1115 |
offset: -8@ -16). |
|
1564 | 1116 |
]. |
1495 | 1117 |
|
1564 | 1118 |
(builtIn includes:#stop) ifFalse:[ |
1934 | 1119 |
StopCursor := (Cursor |
1120 |
extent: 16@16 |
|
1121 |
sourceArray: #( |
|
1122 |
2r0000000000000000 |
|
1123 |
2r0000011111000000 |
|
1124 |
2r0001111111110000 |
|
1125 |
2r0011111111111000 |
|
1126 |
2r0011111111111000 |
|
1127 |
2r0111111111111100 |
|
1128 |
2r0111111111111100 |
|
1129 |
2r0100000000000100 |
|
1130 |
2r0100000000000100 |
|
1131 |
2r0111111111111100 |
|
1132 |
2r0111111111111100 |
|
1133 |
2r0011111111111000 |
|
1134 |
2r0011111111111000 |
|
1135 |
2r0001111111110000 |
|
1136 |
2r0000011111000000 |
|
1137 |
2r0000000000000000 |
|
1138 |
) |
|
1139 |
maskArray: #( |
|
1140 |
2r0000011111000000 |
|
1141 |
2r0001111111110000 |
|
1142 |
2r0011111111111000 |
|
1143 |
2r0111111111111100 |
|
1144 |
2r0111111111111100 |
|
1145 |
2r1111111111111110 |
|
1146 |
2r1111111111111110 |
|
1147 |
2r1111111111111110 |
|
1148 |
2r1111111111111110 |
|
1149 |
2r1111111111111110 |
|
1150 |
2r1111111111111110 |
|
1151 |
2r0111111111111100 |
|
1152 |
2r0111111111111100 |
|
1153 |
2r0011111111111000 |
|
1154 |
2r0001111111110000 |
|
1155 |
2r0000011111000000 |
|
1156 |
) |
|
1157 |
offset: -8 @ -8). |
|
1564 | 1158 |
]. |
1495 | 1159 |
|
1564 | 1160 |
(builtIn includes:#eyeBullet) ifFalse:[ |
1934 | 1161 |
EyeCursor := (Cursor |
1162 |
extent: 16@16 |
|
1163 |
sourceArray: #( |
|
1164 |
2r0000000000000000 |
|
1165 |
2r0000000000000000 |
|
1166 |
2r0000000000000000 |
|
1167 |
2r0000011111000000 |
|
1168 |
2r0001111111110000 |
|
1169 |
2r0011000000011000 |
|
1170 |
2r0110001110001100 |
|
1171 |
2r1100011111000110 |
|
1172 |
2r1100011111000110 |
|
1173 |
2r0110001110001100 |
|
1174 |
2r0011000000011000 |
|
1175 |
2r0001111111110000 |
|
1176 |
2r0000011111000000 |
|
1177 |
2r0000000000000000 |
|
1178 |
2r0000000000000000 |
|
1179 |
2r0000000000000000 |
|
1180 |
) |
|
1181 |
maskArray: #( |
|
1182 |
2r0000000000000000 |
|
1183 |
2r0000000000000000 |
|
1184 |
2r0000000000000000 |
|
1185 |
2r0000011111000000 |
|
1186 |
2r0001111111110000 |
|
1187 |
2r0011111111111000 |
|
1188 |
2r0111111111111100 |
|
1189 |
2r1111111111111110 |
|
1190 |
2r1111111111111110 |
|
1191 |
2r0111111111111100 |
|
1192 |
2r0011111111111000 |
|
1193 |
2r0001111111110000 |
|
1194 |
2r0000011111000000 |
|
1195 |
2r0000000000000000 |
|
1196 |
2r0000000000000000 |
|
1197 |
2r0000000000000000 |
|
1198 |
) |
|
1199 |
offset: -8 @ -8). |
|
1564 | 1200 |
]. |
1495 | 1201 |
|
1564 | 1202 |
FourWayCursor notNil ifTrue:[FourWayCursor := FourWayCursor onDevice:device]. |
1203 |
LeftCursor notNil ifTrue:[LeftCursor := LeftCursor onDevice:device]. |
|
1204 |
RightCursor notNil ifTrue:[RightCursor := RightCursor onDevice:device]. |
|
1205 |
XMarkerCursor notNil ifTrue:[XMarkerCursor := XMarkerCursor onDevice:device]. |
|
1495 | 1206 |
|
1564 | 1207 |
OriginCursor notNil ifTrue:[OriginCursor := OriginCursor onDevice:device]. |
1208 |
CornerCursor notNil ifTrue:[CornerCursor := CornerCursor onDevice:device]. |
|
1495 | 1209 |
|
1564 | 1210 |
ReadCursor notNil ifTrue:[ReadCursor := ReadCursor onDevice:device]. |
1211 |
WriteCursor notNil ifTrue:[WriteCursor := WriteCursor onDevice:device]. |
|
1212 |
WaitCursor notNil ifTrue:[WaitCursor := WaitCursor onDevice:device]. |
|
1213 |
XeqCursor notNil ifTrue:[XeqCursor := XeqCursor onDevice:device]. |
|
1495 | 1214 |
|
1564 | 1215 |
SquareCursor notNil ifTrue:[SquareCursor := SquareCursor onDevice:device]. |
1216 |
||
1217 |
NormalCursor notNil ifTrue:[NormalCursor := NormalCursor onDevice:device]. |
|
1495 | 1218 |
|
1564 | 1219 |
CrossHairCursor notNil ifTrue:[CrossHairCursor := CrossHairCursor onDevice:device]. |
1495 | 1220 |
|
1564 | 1221 |
MarkerCursor notNil ifTrue:[MarkerCursor := MarkerCursor onDevice:device]. |
1222 |
UpCursor notNil ifTrue:[UpCursor := UpCursor onDevice:device]. |
|
1223 |
DownCursor notNil ifTrue:[DownCursor := DownCursor onDevice:device]. |
|
1224 |
LeftCursor notNil ifTrue:[LeftCursor := LeftCursor onDevice:device]. |
|
1225 |
RightCursor notNil ifTrue:[RightCursor := RightCursor onDevice:device]. |
|
1226 |
XMarkerCursor notNil ifTrue:[XMarkerCursor := XMarkerCursor onDevice:device]. |
|
1227 |
CaretCursor notNil ifTrue:[CaretCursor := CaretCursor onDevice:device]. |
|
1495 | 1228 |
|
1564 | 1229 |
ThumbsUpCursor notNil ifTrue:[ThumbsUpCursor := ThumbsUpCursor onDevice:device]. |
1230 |
ThumbsDownCursor notNil ifTrue:[ThumbsDownCursor := ThumbsDownCursor onDevice:device]. |
|
1231 |
StopCursor notNil ifTrue:[StopCursor := StopCursor onDevice:device]. |
|
1232 |
EyeCursor notNil ifTrue:[EyeCursor := EyeCursor onDevice:device]. |
|
1495 | 1233 |
|
1564 | 1234 |
" |
1235 |
Cursor initializeNewCursors |
|
1236 |
" |
|
1495 | 1237 |
|
1934 | 1238 |
"Modified: 23.10.1997 / 04:37:51 / cg" |
1495 | 1239 |
! |
1240 |
||
864 | 1241 |
update:something with:aParameter from:changedObject |
0 | 1242 |
"sent when restarted after a snapIn" |
1243 |
||
1244 |
(something == #restarted) ifTrue:[ |
|
974 | 1245 |
self flushDeviceCursors |
0 | 1246 |
] |
864 | 1247 |
|
1248 |
"Created: 15.6.1996 / 15:18:47 / cg" |
|
0 | 1249 |
! ! |
1250 |
||
1140 | 1251 |
!Cursor class methodsFor:'instance creation'! |
0 | 1252 |
|
1253 |
extent:extent fromArray:array offset:offset |
|
1934 | 1254 |
"ST-80 compatibility |
1255 |
create a new bitmap cursor from bits in the array argument. |
|
1256 |
Here, the offset argument defines the hotSpot, but is given |
|
1257 |
as the negative of the hotSpot coordinate within the cursor (sigh - ST80 compatibility)." |
|
1258 |
||
1259 |
^ self |
|
1260 |
extent:extent sourceArray:array maskArray:array offset:offset |
|
1261 |
||
1262 |
"Modified: 22.10.1997 / 23:59:41 / cg" |
|
0 | 1263 |
! |
1264 |
||
1265 |
extent:extent sourceArray:sourceArray maskArray:maskArray offset:offset |
|
1266 |
"create a new bitmap cursor with mask from bits in sourceArray and |
|
1934 | 1267 |
maskArray. |
1268 |
The offset argument defines the hotSpot, but is given as the negative |
|
1269 |
of the hotSpots coordinate within the cursor (sigh - ST80 compatibility)" |
|
0 | 1270 |
|
1271 |
|sourceForm maskForm| |
|
1272 |
||
1273 |
sourceForm := Form extent:extent fromArray:sourceArray offset:offset. |
|
1934 | 1274 |
sourceArray ~~ maskArray ifTrue:[ |
1275 |
maskForm := Form extent:extent fromArray:maskArray offset:offset. |
|
1276 |
] ifFalse:[ |
|
1277 |
maskForm := sourceForm |
|
1278 |
]. |
|
0 | 1279 |
^ self sourceForm:sourceForm maskForm:maskForm hotSpot:(offset negated) |
1934 | 1280 |
|
1281 |
"Modified: 22.10.1997 / 23:58:36 / cg" |
|
0 | 1282 |
! |
1283 |
||
577 | 1284 |
fileCursorNamed:cursorName |
1285 |
"return a cursor read from the files 'cursorName_bits.bit' and |
|
1934 | 1286 |
'cursorName_mask.bit' - return nil if either file does not exist. |
1287 |
This method is going to be obsoleted in the future." |
|
1288 |
||
1289 |
|cursorBits maskBits fileNamePrefix| |
|
1290 |
||
1291 |
self obsoleteMethodWarning. |
|
1292 |
||
1293 |
fileNamePrefix := 'bitmaps/' , cursorName. |
|
1294 |
||
1295 |
cursorBits := Image fromFile:(fileNamePrefix , '_bits.bit'). |
|
577 | 1296 |
cursorBits notNil ifTrue:[ |
1934 | 1297 |
maskBits := Image fromFile:(fileNamePrefix , '_mask.bit'). |
1298 |
maskBits notNil ifTrue:[ |
|
1299 |
^ self sourceForm:cursorBits maskForm:maskBits |
|
1300 |
] |
|
577 | 1301 |
]. |
1302 |
^ nil |
|
1140 | 1303 |
|
1934 | 1304 |
"Modified: 23.10.1997 / 00:02:07 / cg" |
577 | 1305 |
! |
1306 |
||
1414 | 1307 |
fromImage:anImage |
1308 |
"return a new cursor. |
|
1309 |
Source- and (optional) mask-Bits are taken from anImage; |
|
1934 | 1310 |
The cursors hotSpot is the center of the image." |
1311 |
||
1312 |
^ self |
|
1313 |
fromImage:anImage hotSpot:(anImage center) |
|
1414 | 1314 |
|
1315 |
" |
|
1316 |
|i c| |
|
1317 |
||
1318 |
i := Image fromFile:'bitmaps/xpmBitmaps/cursors/ul_br_arrow.xpm'. |
|
1319 |
c := Cursor fromImage:i. |
|
1320 |
WindowGroup activeGroup |
|
1934 | 1321 |
withCursor:c |
1322 |
do:[(Delay forSeconds:5)wait] |
|
1414 | 1323 |
" |
1324 |
||
1934 | 1325 |
"Modified: 22.10.1997 / 23:55:01 / cg" |
1326 |
! |
|
1327 |
||
1328 |
fromImage:anImage hotSpot:aPoint |
|
1329 |
"return a new cursor. |
|
1330 |
Source- and (optional) mask-Bits are taken from anImage; |
|
1331 |
The cursors hotSpot is given as an offset from the top-left." |
|
1332 |
||
1333 |
|mask sourceForm maskForm| |
|
1334 |
||
1335 |
sourceForm := anImage asMonochromeFormOn:Screen current. |
|
1336 |
||
1337 |
mask := anImage mask. |
|
1338 |
mask isNil ifTrue:[ |
|
1339 |
maskForm := sourceForm |
|
1340 |
] ifFalse:[ |
|
1341 |
maskForm := mask asMonochromeFormOn:Screen current. |
|
1342 |
]. |
|
1343 |
^ self sourceForm:sourceForm |
|
1344 |
maskForm:maskForm |
|
1345 |
hotX:(aPoint x) |
|
1346 |
hotY:(aPoint y) |
|
1347 |
||
1348 |
" |
|
1349 |
|i c| |
|
1350 |
||
1351 |
i := Image fromFile:'bitmaps/xpmBitmaps/cursors/ul_br_arrow.xpm'. |
|
1352 |
c := Cursor fromImage:i hotSpot:(i center). |
|
1353 |
WindowGroup activeGroup |
|
1354 |
withCursor:c |
|
1355 |
do:[(Delay forSeconds:5)wait] |
|
1356 |
" |
|
1357 |
||
1358 |
"Modified: 22.10.1997 / 23:49:00 / cg" |
|
1359 |
"Created: 22.10.1997 / 23:51:32 / cg" |
|
1414 | 1360 |
! |
1361 |
||
577 | 1362 |
imageArray:imageBits maskArray:maskBits |
1363 |
"ST-80 compatible cursor creation - the extent is fixed to 16@16" |
|
1364 |
||
1934 | 1365 |
^ self |
1366 |
imageArray:imageBits |
|
1367 |
maskArray:maskBits |
|
1368 |
hotSpot:8@8 |
|
1369 |
||
1370 |
" |
|
1371 |
|cursor| |
|
1372 |
||
1373 |
cursor := Cursor |
|
1374 |
imageArray: #( |
|
1375 |
2r0000000000000000 |
|
1376 |
2r0000000100001110 |
|
1377 |
2r0000000100001110 |
|
1378 |
2r0000000100001110 |
|
1379 |
2r0000000100000000 |
|
1380 |
2r0000000100000000 |
|
1381 |
2r0000000100000000 |
|
1382 |
2r0111111111111110 |
|
1383 |
2r0000000100000000 |
|
1384 |
2r0000000100000000 |
|
1385 |
2r0000000100000000 |
|
1386 |
2r0000000100000000 |
|
1387 |
2r0000000100000000 |
|
1388 |
2r0000000100000000 |
|
1389 |
2r0000000100000000 |
|
1390 |
2r0000000000000000) |
|
1391 |
maskArray: #( |
|
1392 |
2r0000001110011111 |
|
1393 |
2r0000001110011111 |
|
1394 |
2r0000001110011111 |
|
1395 |
2r0000001110011111 |
|
1396 |
2r0000001110011111 |
|
1397 |
2r0000001110000000 |
|
1398 |
2r1111111111111111 |
|
1399 |
2r1111111111111111 |
|
1400 |
2r1111111111111111 |
|
1401 |
2r0000001110000000 |
|
1402 |
2r0000001110000000 |
|
1403 |
2r0000001110000000 |
|
1404 |
2r0000001110000000 |
|
1405 |
2r0000001110000000 |
|
1406 |
2r0000001110000000 |
|
1407 |
2r0000001110000000). |
|
1408 |
||
1409 |
cursor showWhile:[ |
|
1410 |
(Delay forSeconds:10) wait |
|
1411 |
] |
|
1412 |
" |
|
1413 |
||
1414 |
"Modified: 23.10.1997 / 00:06:09 / cg" |
|
577 | 1415 |
! |
1416 |
||
1417 |
imageArray:imageBits maskArray:maskBits hotSpot:hot |
|
1418 |
"ST-80 compatible cursor creation - the extent is fixed to 16@16" |
|
1419 |
||
1420 |
^ self |
|
1421 |
extent:16@16 |
|
1422 |
sourceArray:imageBits |
|
1423 |
maskArray:maskBits |
|
1424 |
offset:hot negated |
|
1425 |
||
1426 |
" |
|
1427 |
|cursor| |
|
1428 |
||
1429 |
cursor := Cursor |
|
1430 |
imageArray: #( |
|
1431 |
2r0000000000000000 |
|
1432 |
2r0000000100001110 |
|
1433 |
2r0000000100001110 |
|
1434 |
2r0000000100001110 |
|
1435 |
2r0000000100000000 |
|
1436 |
2r0000000100000000 |
|
1437 |
2r0000000100000000 |
|
1438 |
2r0111111111111110 |
|
1439 |
2r0000000100000000 |
|
1440 |
2r0000000100000000 |
|
1441 |
2r0000000100000000 |
|
1442 |
2r0000000100000000 |
|
1443 |
2r0000000100000000 |
|
1444 |
2r0000000100000000 |
|
1445 |
2r0000000100000000 |
|
1446 |
2r0000000000000000) |
|
1447 |
maskArray: #( |
|
1448 |
2r0000001110011111 |
|
1449 |
2r0000001110011111 |
|
1450 |
2r0000001110011111 |
|
1451 |
2r0000001110011111 |
|
1452 |
2r0000001110011111 |
|
1453 |
2r0000001110000000 |
|
1454 |
2r1111111111111111 |
|
1455 |
2r1111111111111111 |
|
1456 |
2r1111111111111111 |
|
1457 |
2r0000001110000000 |
|
1458 |
2r0000001110000000 |
|
1459 |
2r0000001110000000 |
|
1460 |
2r0000001110000000 |
|
1461 |
2r0000001110000000 |
|
1462 |
2r0000001110000000 |
|
1463 |
2r0000001110000000) |
|
1464 |
hotSpot: 8@8. |
|
1465 |
||
1466 |
WindowGroup activeGroup |
|
1467 |
withCursor:cursor |
|
1468 |
do:[(Delay forSeconds:10)wait] |
|
1469 |
" |
|
1470 |
! |
|
1471 |
||
1472 |
imageArray:imageBits maskArray:maskBits hotSpot:hot name:aString |
|
1473 |
"ST-80 compatible cursor creation - the extent is fixed to 16@16" |
|
1474 |
||
1475 |
"name is ignored ..." |
|
1476 |
||
1477 |
^ self imageArray:imageBits maskArray:maskBits hotSpot:hot |
|
1478 |
! |
|
1479 |
||
1480 |
shape:aShape |
|
1481 |
"return one of the standard cursors. |
|
1482 |
Each display may offer different shapes - see for example XWorkstation |
|
1483 |
for details (however a basic minimum set should be supported by all)" |
|
1484 |
||
1485 |
|newCursor| |
|
1486 |
||
1487 |
"first look if not already known" |
|
1488 |
Lobby isNil ifTrue:[ |
|
1489 |
self initialize |
|
1490 |
]. |
|
1491 |
Lobby do:[:aCursor | |
|
1492 |
(aCursor shape == aShape) ifTrue:[ |
|
1493 |
^ aCursor |
|
1494 |
] |
|
1495 |
]. |
|
1496 |
newCursor := self basicNew setShape:aShape. |
|
1497 |
Lobby register:newCursor. |
|
1498 |
^ newCursor |
|
1499 |
! |
|
1500 |
||
1501 |
shape:aShape on:aDevice |
|
1502 |
"return one of the standard cursors already associated to aDevice. |
|
1503 |
This is the same as '(Cursor shape:aShape) on:aDevice' but somwehat faster." |
|
1504 |
||
1505 |
|newCursor oldCursor| |
|
1506 |
||
1507 |
"first look if not already known" |
|
1508 |
Lobby isNil ifTrue:[ |
|
974 | 1509 |
self initialize |
577 | 1510 |
]. |
1511 |
Lobby do:[:aCursor | |
|
974 | 1512 |
(aCursor shape == aShape) ifTrue:[ |
1513 |
(aCursor graphicsDevice == aDevice) ifTrue:[^ aCursor]. |
|
1514 |
oldCursor := aCursor |
|
1515 |
]. |
|
577 | 1516 |
]. |
1517 |
||
1518 |
"found one with same shape, but different device" |
|
1519 |
oldCursor notNil ifTrue:[ |
|
974 | 1520 |
^ oldCursor newOn:aDevice |
577 | 1521 |
]. |
1522 |
||
1523 |
newCursor := self basicNew setShape:aShape. |
|
1524 |
Lobby register:newCursor. |
|
1525 |
^ newCursor |
|
927
c4bc2a7ff733
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
864
diff
changeset
|
1526 |
|
c4bc2a7ff733
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
864
diff
changeset
|
1527 |
"Modified: 5.7.1996 / 17:58:06 / cg" |
577 | 1528 |
! |
1529 |
||
0 | 1530 |
sourceForm:aForm |
1531 |
"return a new cursor. |
|
1532 |
Source- and mask-Bits are taken from aForm; hotSpot is center" |
|
1533 |
||
1934 | 1534 |
^ self sourceForm:aForm maskForm:aForm |
1535 |
||
1536 |
"Modified: 23.10.1997 / 00:08:37 / cg" |
|
0 | 1537 |
! |
1538 |
||
1539 |
sourceForm:sourceForm maskForm:maskForm |
|
1540 |
"return a new cursor. hotSpot is center" |
|
1541 |
||
1542 |
^ self sourceForm:sourceForm |
|
80 | 1543 |
maskForm:maskForm |
1544 |
hotX:(sourceForm width // 2) |
|
1545 |
hotY:(sourceForm height // 2) |
|
0 | 1546 |
! |
1547 |
||
1548 |
sourceForm:sourceForm maskForm:maskForm hotSpot:aPoint |
|
1549 |
"return a new cursor" |
|
1550 |
||
1551 |
^ self sourceForm:sourceForm |
|
80 | 1552 |
maskForm:maskForm |
1553 |
hotX:(aPoint x) |
|
1554 |
hotY:(aPoint y) |
|
0 | 1555 |
! |
1556 |
||
1557 |
sourceForm:sourceForm maskForm:maskForm hotX:hotX hotY:hotY |
|
1558 |
"return a new cursor" |
|
1559 |
||
1560 |
|newCursor| |
|
1561 |
||
1562 |
"first look if not already known" |
|
223 | 1563 |
Lobby isNil ifTrue:[ |
499 | 1564 |
self initialize |
223 | 1565 |
]. |
115 | 1566 |
Lobby do:[:aCursor | |
80 | 1567 |
(aCursor sourceForm == sourceForm) ifTrue:[ |
1568 |
(aCursor maskForm == maskForm) ifTrue:[ |
|
1569 |
(aCursor hotX == hotX) ifTrue:[ |
|
1570 |
(aCursor hotY == hotY) ifTrue:[ |
|
1571 |
^ aCursor |
|
1572 |
] |
|
1573 |
] |
|
1574 |
] |
|
1575 |
] |
|
0 | 1576 |
]. |
35 | 1577 |
(sourceForm isNil or:[maskForm isNil]) ifTrue:[^ nil]. |
1578 |
||
2 | 1579 |
newCursor := self basicNew setSourceForm:sourceForm |
80 | 1580 |
maskForm:maskForm |
1581 |
hotX:hotX |
|
1582 |
hotY:hotY. |
|
23 | 1583 |
Lobby register:newCursor. |
0 | 1584 |
^ newCursor |
577 | 1585 |
! ! |
1586 |
||
1224
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1587 |
!Cursor class methodsFor:'cleanup'! |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1588 |
|
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1589 |
releaseResourcesOnDevice:aDevice |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1590 |
"this is sent when a display connection is closed, |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1591 |
to release all cached Cursors from that device" |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1592 |
|
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1593 |
Lobby unregisterAllForWhich:[:aCursor | aCursor graphicsDevice == aDevice] |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1594 |
|
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1595 |
"Created: 16.1.1997 / 16:43:59 / cg" |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1596 |
! ! |
2a2270ec4236
added #releaseResourcesOnDevice:, to allow cleanup when
Claus Gittinger <cg@exept.de>
parents:
1188
diff
changeset
|
1597 |
|
1140 | 1598 |
!Cursor class methodsFor:'default access'! |
577 | 1599 |
|
1600 |
defaultFgColor:fgColor defaultBgColor:bgColor |
|
1601 |
"set the default colors used for cursors" |
|
1602 |
||
1603 |
DefaultFgColor := fgColor. |
|
1604 |
DefaultBgColor := bgColor |
|
0 | 1605 |
! ! |
1606 |
||
1140 | 1607 |
!Cursor class methodsFor:'standard cursors'! |
0 | 1608 |
|
1609 |
arrow |
|
1610 |
"return an arrow (up-left-arrow) cursor" |
|
1611 |
||
71 | 1612 |
^ self shape:#upLeftArrow on:Display |
1934 | 1613 |
|
1614 |
" |
|
1615 |
Cursor arrow |
|
1616 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1617 |
" |
|
1618 |
||
1619 |
"Modified: 23.10.1997 / 00:28:28 / cg" |
|
0 | 1620 |
! |
1621 |
||
577 | 1622 |
blank |
1934 | 1623 |
"Answer the instance of me that is an invisible cursor." |
1624 |
||
1625 |
^ BlankCursor |
|
1626 |
||
1627 |
" |
|
1628 |
Cursor blank |
|
1629 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1630 |
" |
|
1631 |
||
1632 |
"Modified: 23.10.1997 / 00:27:39 / cg" |
|
1633 |
! |
|
80 | 1634 |
|
1635 |
bottomLeft |
|
1636 |
"return a bottom-left corner cursor" |
|
1637 |
||
1638 |
^ self shape:#bottomLeft on:Display |
|
1934 | 1639 |
|
1640 |
" |
|
1641 |
Cursor bottomLeft |
|
1642 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1643 |
" |
|
1644 |
||
1645 |
"Modified: 23.10.1997 / 00:27:12 / cg" |
|
80 | 1646 |
! |
1647 |
||
1648 |
bottomRight |
|
1649 |
"return a bottom-right corner cursor" |
|
1650 |
||
1651 |
^ self corner |
|
1934 | 1652 |
|
1653 |
" |
|
1654 |
Cursor bottomRight |
|
1655 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1656 |
" |
|
1657 |
||
1658 |
"Modified: 23.10.1997 / 00:27:02 / cg" |
|
80 | 1659 |
! |
1660 |
||
577 | 1661 |
caret |
1934 | 1662 |
"return a caret cursor" |
1663 |
||
1664 |
^ CaretCursor |
|
1665 |
||
1666 |
" |
|
1667 |
Cursor caret |
|
1668 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1669 |
" |
|
1670 |
||
1671 |
"Modified: 23.10.1997 / 00:27:08 / cg" |
|
1672 |
! |
|
577 | 1673 |
|
1674 |
corner |
|
1934 | 1675 |
"return a corner (bottom-right) cursor" |
80 | 1676 |
|
577 | 1677 |
CornerCursor isNil ifTrue:[ |
1934 | 1678 |
CornerCursor := self shape:#corner on:Display |
577 | 1679 |
]. |
1680 |
^ CornerCursor |
|
1934 | 1681 |
|
1682 |
" |
|
1683 |
Cursor corner |
|
1684 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1685 |
" |
|
1686 |
||
1687 |
"Modified: 23.10.1997 / 00:26:53 / cg" |
|
577 | 1688 |
! |
1689 |
||
1690 |
cross |
|
1691 |
"return a cross cursor" |
|
1692 |
||
1693 |
^ self shape:#cross on:Display |
|
1934 | 1694 |
|
1695 |
" |
|
1696 |
Cursor cross |
|
1697 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1698 |
" |
|
1699 |
||
1700 |
"Modified: 23.10.1997 / 00:26:49 / cg" |
|
80 | 1701 |
! |
1702 |
||
0 | 1703 |
crossHair |
1704 |
"return a crossHair cursor" |
|
1705 |
||
1706 |
CrossHairCursor isNil ifTrue:[ |
|
1934 | 1707 |
CrossHairCursor := self shape:#crossHair on:Display |
0 | 1708 |
]. |
1709 |
^ CrossHairCursor |
|
1934 | 1710 |
|
1711 |
" |
|
1712 |
Cursor crossHair |
|
1713 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1714 |
" |
|
1715 |
||
1716 |
"Modified: 23.10.1997 / 00:26:42 / cg" |
|
0 | 1717 |
! |
1718 |
||
577 | 1719 |
down |
1934 | 1720 |
"Answer the instance of me that is the shape of a down-arrow." |
1721 |
||
1722 |
^ DownCursor |
|
1723 |
||
1724 |
" |
|
1725 |
Cursor down |
|
1726 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1727 |
" |
|
1728 |
||
1729 |
"Modified: 23.10.1997 / 00:26:34 / cg" |
|
1730 |
! |
|
0 | 1731 |
|
577 | 1732 |
downLimitArrow |
1733 |
"return a down-arrow-to-limit cursor" |
|
0 | 1734 |
|
577 | 1735 |
^ self shape:#downLimitArrow on:Display |
1934 | 1736 |
|
1737 |
" |
|
1738 |
Cursor downLimitArrow |
|
1739 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1740 |
" |
|
1741 |
||
1742 |
"Modified: 23.10.1997 / 00:26:29 / cg" |
|
0 | 1743 |
! |
1744 |
||
1745 |
execute |
|
157 | 1746 |
"return a execute cursor - (the default here is a wait-cursor)" |
0 | 1747 |
|
157 | 1748 |
XeqCursor notNil ifTrue:[ |
1934 | 1749 |
^ XeqCursor |
157 | 1750 |
]. |
71 | 1751 |
^ self wait |
1934 | 1752 |
|
1753 |
" |
|
1754 |
Cursor execute |
|
1755 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1756 |
" |
|
1757 |
||
1758 |
"Modified: 23.10.1997 / 00:26:19 / cg" |
|
56 | 1759 |
! |
1760 |
||
577 | 1761 |
eye |
1934 | 1762 |
"return an eye cursor" |
1763 |
||
1764 |
^ EyeCursor |
|
1765 |
||
1766 |
" |
|
1767 |
Cursor eye |
|
1768 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1769 |
" |
|
1770 |
||
1771 |
"Modified: 23.10.1997 / 00:26:06 / cg" |
|
577 | 1772 |
! |
1773 |
||
1774 |
fourWay |
|
1775 |
"return a four-way arrow cursor" |
|
1776 |
||
1777 |
FourWayCursor isNil ifTrue:[ |
|
1934 | 1778 |
FourWayCursor := self shape:#fourWay on:Display |
577 | 1779 |
]. |
1780 |
^ FourWayCursor |
|
1934 | 1781 |
|
1782 |
" |
|
1783 |
Cursor fourWay |
|
1784 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1785 |
" |
|
1786 |
||
1787 |
"Modified: 23.10.1997 / 00:25:34 / cg" |
|
577 | 1788 |
! |
1789 |
||
1790 |
hand |
|
1791 |
"return a hand cursor" |
|
1792 |
||
1793 |
HandCursor isNil ifTrue:[ |
|
2063 | 1794 |
HandCursor := self shape:#upRightHand on:Display. |
1795 |
HandCursor isNil ifTrue:[ |
|
1796 |
HandCursor := self normal. |
|
1797 |
] |
|
577 | 1798 |
]. |
1799 |
^ HandCursor |
|
1934 | 1800 |
|
1801 |
" |
|
1802 |
Cursor hand |
|
1803 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1804 |
" |
|
1805 |
||
1806 |
"Modified: 23.10.1997 / 00:25:07 / cg" |
|
577 | 1807 |
! |
1808 |
||
1809 |
left |
|
1934 | 1810 |
"Answer the instance of me that is the shape of an arrow facing to the left." |
1811 |
||
1812 |
^ LeftCursor |
|
1813 |
||
1814 |
" |
|
1815 |
Cursor left |
|
1816 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1817 |
" |
|
1818 |
||
1819 |
"Modified: 23.10.1997 / 00:24:51 / cg" |
|
1820 |
! |
|
577 | 1821 |
|
1822 |
leftHand |
|
1823 |
"return a left-hand cursor" |
|
1824 |
||
1825 |
^ self shape:#leftHand |
|
1934 | 1826 |
|
1827 |
" |
|
1828 |
Cursor leftHand |
|
1829 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1830 |
" |
|
1831 |
||
1832 |
"Modified: 23.10.1997 / 00:24:31 / cg" |
|
577 | 1833 |
! |
1834 |
||
1835 |
leftLimitArrow |
|
1836 |
"return a left-arrow-to-limit cursor" |
|
1837 |
||
1838 |
^ self shape:#leftLimitArrow on:Display |
|
1934 | 1839 |
|
1840 |
" |
|
1841 |
Cursor leftLimitArrow |
|
1842 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1843 |
" |
|
1844 |
||
1845 |
"Modified: 23.10.1997 / 00:24:14 / cg" |
|
577 | 1846 |
! |
1847 |
||
1848 |
leftRightArrow |
|
1849 |
"return a left-right-arrow cursor" |
|
1850 |
||
1851 |
LeftRightArrowCursor isNil ifTrue:[ |
|
1934 | 1852 |
LeftRightArrowCursor := self shape:#leftRightArrow on:Display |
577 | 1853 |
]. |
1854 |
^ LeftRightArrowCursor |
|
1934 | 1855 |
|
1856 |
" |
|
1857 |
Cursor leftRightArrow |
|
1858 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1859 |
" |
|
1860 |
||
1861 |
"Modified: 23.10.1997 / 00:23:59 / cg" |
|
577 | 1862 |
! |
1863 |
||
1864 |
marker |
|
1934 | 1865 |
"Answer the instance of me that is the shape of a horizontal arrow." |
1866 |
||
1867 |
^ MarkerCursor |
|
1868 |
||
1869 |
" |
|
1870 |
Cursor marker |
|
1871 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1872 |
" |
|
1873 |
||
1874 |
"Modified: 23.10.1997 / 00:23:33 / cg" |
|
1875 |
! |
|
56 | 1876 |
|
577 | 1877 |
normal |
1878 |
"return the normal cursor; an arrow. |
|
1879 |
for ST-80 compatibility" |
|
1880 |
||
1881 |
NormalCursor isNil ifTrue:[ |
|
1934 | 1882 |
NormalCursor := self arrow |
577 | 1883 |
]. |
1884 |
^ NormalCursor |
|
1568 | 1885 |
|
1934 | 1886 |
|
1887 |
" |
|
1888 |
Cursor normal |
|
1889 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1890 |
" |
|
1891 |
||
1892 |
"Modified: 23.10.1997 / 00:23:12 / cg" |
|
577 | 1893 |
! |
1894 |
||
1895 |
origin |
|
1896 |
"return an origin cursor" |
|
1897 |
||
1898 |
OriginCursor isNil ifTrue:[ |
|
1934 | 1899 |
OriginCursor := self shape:#origin on:Display |
157 | 1900 |
]. |
577 | 1901 |
^ OriginCursor |
1934 | 1902 |
|
1903 |
" |
|
1904 |
Cursor origin |
|
1905 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1906 |
" |
|
1907 |
||
1908 |
"Modified: 23.10.1997 / 00:22:58 / cg" |
|
577 | 1909 |
! |
1910 |
||
1911 |
questionMark |
|
1912 |
"return a question-mark cursor" |
|
1913 |
||
1914 |
^ self shape:#questionMark on:Display |
|
1934 | 1915 |
|
1916 |
" |
|
1917 |
Cursor questionMark |
|
1918 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1919 |
" |
|
1920 |
||
1921 |
"Modified: 23.10.1997 / 00:22:39 / cg" |
|
577 | 1922 |
! |
1923 |
||
1924 |
read |
|
1925 |
"return a reading-file cursor (the default here is a wait-cursor)" |
|
1926 |
||
1927 |
ReadCursor notNil ifTrue:[ |
|
1934 | 1928 |
^ ReadCursor |
577 | 1929 |
]. |
1930 |
^ self wait |
|
1934 | 1931 |
|
1932 |
" |
|
1933 |
Cursor read |
|
1934 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1935 |
" |
|
1936 |
||
1937 |
"Modified: 23.10.1997 / 00:22:23 / cg" |
|
577 | 1938 |
! |
1939 |
||
1940 |
right |
|
1934 | 1941 |
"Answer the instance of me that is the shape of an arrow facing to the right." |
1942 |
||
1943 |
^ RightCursor |
|
1944 |
||
1945 |
" |
|
1946 |
Cursor right |
|
1947 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1948 |
" |
|
1949 |
||
1950 |
"Modified: 23.10.1997 / 00:22:05 / cg" |
|
1951 |
! |
|
1952 |
||
1953 |
rightLimitArrow |
|
577 | 1954 |
"return a right-arrow-to-limit cursor" |
1955 |
||
1956 |
^ self shape:#rightLimitArrow on:Display |
|
1934 | 1957 |
|
1958 |
||
1959 |
" |
|
1960 |
Cursor rightLimitArrow |
|
1961 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1962 |
" |
|
1963 |
||
1964 |
"Modified: 23.10.1997 / 00:15:12 / cg" |
|
1965 |
"Created: 23.10.1997 / 00:21:21 / cg" |
|
577 | 1966 |
! |
1967 |
||
1968 |
stop |
|
1969 |
"return a stop cursor (the default here is a wait-cursor)" |
|
1970 |
||
1971 |
StopCursor notNil ifTrue:[ |
|
1934 | 1972 |
^ StopCursor |
577 | 1973 |
]. |
1974 |
^ self wait |
|
1934 | 1975 |
|
1976 |
" |
|
1977 |
Cursor stop |
|
1978 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1979 |
" |
|
1980 |
||
1981 |
"Modified: 23.10.1997 / 00:20:52 / cg" |
|
577 | 1982 |
! |
1983 |
||
1984 |
text |
|
1985 |
"return a text-cursor" |
|
1986 |
||
1987 |
^ self shape:#text on:Display |
|
1934 | 1988 |
|
1989 |
" |
|
1990 |
Cursor text |
|
1991 |
showWhile:[ Delay waitForSeconds:3 ] |
|
1992 |
" |
|
1993 |
||
1994 |
"Modified: 23.10.1997 / 00:20:37 / cg" |
|
56 | 1995 |
! |
1996 |
||
1997 |
thumbsDown |
|
1998 |
"return a hand cursor - ST-80 compatibility" |
|
1999 |
||
157 | 2000 |
ThumbsDownCursor notNil ifTrue:[ |
1934 | 2001 |
^ ThumbsDownCursor |
157 | 2002 |
]. |
56 | 2003 |
^ self hand |
1934 | 2004 |
|
2005 |
" |
|
2006 |
Cursor thumbsDown |
|
2007 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2008 |
" |
|
2009 |
||
2010 |
"Modified: 23.10.1997 / 00:20:20 / cg" |
|
577 | 2011 |
! |
2012 |
||
2013 |
thumbsUp |
|
2014 |
"return a hand cursor - ST-80 compatibility" |
|
2015 |
||
2016 |
ThumbsUpCursor notNil ifTrue:[ |
|
1934 | 2017 |
^ ThumbsUpCursor |
577 | 2018 |
]. |
2019 |
^ self hand |
|
1934 | 2020 |
|
2021 |
" |
|
2022 |
Cursor thumbsUp |
|
2023 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2024 |
" |
|
2025 |
||
2026 |
"Modified: 23.10.1997 / 00:20:04 / cg" |
|
577 | 2027 |
! |
2028 |
||
2029 |
topLeft |
|
2030 |
"return a top-left corner cursor" |
|
0 | 2031 |
|
577 | 2032 |
^ self origin |
1934 | 2033 |
|
2034 |
" |
|
2035 |
Cursor topLeft |
|
2036 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2037 |
" |
|
2038 |
||
2039 |
"Modified: 23.10.1997 / 00:19:50 / cg" |
|
577 | 2040 |
! |
2041 |
||
2042 |
topRight |
|
2043 |
"return a top-right corner cursor" |
|
2044 |
||
2045 |
^ self shape:#topRight on:Display |
|
1934 | 2046 |
|
2047 |
" |
|
2048 |
Cursor topRight |
|
2049 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2050 |
" |
|
2051 |
||
2052 |
"Modified: 23.10.1997 / 00:19:33 / cg" |
|
577 | 2053 |
! |
2054 |
||
2055 |
up |
|
1934 | 2056 |
"Answer the instance of me that is the shape of an up-arrow." |
2057 |
||
2058 |
^ UpCursor |
|
2059 |
||
2060 |
" |
|
2061 |
Cursor up |
|
2062 |
showWhile:[ Delay waitForSeconds:5 ] |
|
2063 |
" |
|
2064 |
||
2065 |
"Modified: 23.10.1997 / 00:19:14 / cg" |
|
2066 |
! |
|
71 | 2067 |
|
577 | 2068 |
upDownArrow |
2069 |
"return an up-down-arrow cursor" |
|
2070 |
||
2071 |
UpDownArrowCursor isNil ifTrue:[ |
|
1934 | 2072 |
UpDownArrowCursor := self shape:#upDownArrow on:Display |
577 | 2073 |
]. |
2074 |
^ UpDownArrowCursor |
|
1934 | 2075 |
|
2076 |
" |
|
2077 |
Cursor upDownArrow |
|
2078 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2079 |
" |
|
2080 |
||
2081 |
"Modified: 23.10.1997 / 00:18:53 / cg" |
|
577 | 2082 |
! |
2083 |
||
2084 |
upLeftArrow |
|
2085 |
"return an up-right-arrow cursor" |
|
2086 |
||
2087 |
^ self shape:#upLeftArrow on:Display |
|
1934 | 2088 |
|
2089 |
" |
|
2090 |
Cursor upLeftArrow |
|
2091 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2092 |
" |
|
2093 |
||
2094 |
"Modified: 23.10.1997 / 00:18:37 / cg" |
|
577 | 2095 |
! |
71 | 2096 |
|
577 | 2097 |
upLimitArrow |
2098 |
"return an up-arrow-to-limit cursor" |
|
2099 |
||
2100 |
^ self shape:#upLimitArrow on:Display |
|
1934 | 2101 |
|
2102 |
" |
|
2103 |
Cursor upLimitArrow |
|
2104 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2105 |
" |
|
2106 |
||
2107 |
"Modified: 23.10.1997 / 00:18:19 / cg" |
|
577 | 2108 |
! |
0 | 2109 |
|
577 | 2110 |
upRightArrow |
2111 |
"return an up-right-arrow cursor" |
|
2112 |
||
2113 |
^ self shape:#upRightArrow on:Display |
|
1934 | 2114 |
|
2115 |
" |
|
2116 |
Cursor upRightArrow |
|
2117 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2118 |
" |
|
2119 |
||
2120 |
"Modified: 23.10.1997 / 00:18:03 / cg" |
|
577 | 2121 |
! |
2122 |
||
2123 |
upRightHand |
|
2124 |
"return an up-right-hand cursor" |
|
2125 |
||
2063 | 2126 |
UpRightHandCursor isNil ifTrue:[ |
2127 |
UpRightHandCursor := self shape:#upRightHand on:Display. |
|
2128 |
UpRightHandCursor isNil ifTrue:[ |
|
2129 |
UpRightHandCursor := self normal |
|
2130 |
] |
|
2131 |
]. |
|
2132 |
^ UpRightHandCursor |
|
1934 | 2133 |
|
2134 |
" |
|
2135 |
Cursor upRightHand |
|
2136 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2137 |
" |
|
2138 |
||
2139 |
"Modified: 23.10.1997 / 00:17:46 / cg" |
|
71 | 2140 |
! |
2141 |
||
577 | 2142 |
wait |
2143 |
"return a wait cursor" |
|
2144 |
||
2145 |
WaitCursor isNil ifTrue:[ |
|
1934 | 2146 |
WaitCursor := self shape:#wait on:Display |
577 | 2147 |
]. |
2148 |
^ WaitCursor |
|
1934 | 2149 |
|
2150 |
" |
|
2151 |
Cursor wait |
|
2152 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2153 |
" |
|
2154 |
||
2155 |
"Modified: 23.10.1997 / 00:17:32 / cg" |
|
577 | 2156 |
! |
2157 |
||
2158 |
write |
|
2159 |
"return a writing-file cursor (the default here is a wait-cursor)" |
|
0 | 2160 |
|
577 | 2161 |
WriteCursor notNil ifTrue:[ |
1934 | 2162 |
^ WriteCursor |
577 | 2163 |
]. |
2164 |
^ self wait |
|
1934 | 2165 |
|
2166 |
" |
|
2167 |
Cursor write |
|
2168 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2169 |
" |
|
2170 |
||
2171 |
"Modified: 23.10.1997 / 00:17:22 / cg" |
|
577 | 2172 |
! |
2173 |
||
2174 |
xMarker |
|
1934 | 2175 |
"Answer the instance of me that is displayed when thumb-scrolling on the x-axis." |
2176 |
||
2177 |
^ XMarkerCursor |
|
2178 |
||
2179 |
" |
|
2180 |
Cursor xMarker |
|
2181 |
showWhile:[ Delay waitForSeconds:3 ] |
|
2182 |
" |
|
2183 |
||
2184 |
"Modified: 23.10.1997 / 00:16:44 / cg" |
|
2185 |
! ! |
|
577 | 2186 |
|
2187 |
!Cursor methodsFor:'ST-80 displaying'! |
|
2188 |
||
2189 |
displayOn:aGC at:origin clippingBox:aRectangle rule:aRule mask:aMask |
|
2190 |
"ST-80 compatibility; |
|
2191 |
limited functionality: can only display bitmap cursors (yet)" |
|
2192 |
||
2193 |
sourceForm notNil ifTrue:[ |
|
2194 |
sourceForm displayOn:aGC at:origin clippingBox:aRectangle |
|
2195 |
rule:aRule mask:aMask |
|
0 | 2196 |
] |
2 | 2197 |
! |
2198 |
||
577 | 2199 |
show |
2200 |
"ST-80 mimicri: change cursors in active groups views to the receiver." |
|
2 | 2201 |
|
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2202 |
|wg| |
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2203 |
|
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2204 |
(wg := WindowGroup activeGroup) notNil ifTrue:[ |
1698 | 2205 |
wg showCursor:self |
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2206 |
] |
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2207 |
|
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2208 |
"Modified: 13.1.1997 / 20:10:01 / cg" |
577 | 2209 |
! |
2210 |
||
2211 |
showIn:aView |
|
2212 |
"ST-80 mimicri: install the receiver as aViews cursor" |
|
2213 |
||
2214 |
aView cursor:self |
|
2 | 2215 |
! |
2216 |
||
577 | 2217 |
showIn:aView while:aBlock |
2218 |
"ST-80 mimicri: change aViews cursors to the receiver, while evaluationg aBlock. |
|
2219 |
Return the value as returned by aBlock." |
|
2220 |
||
2221 |
|savedCursor| |
|
2222 |
||
2223 |
savedCursor := aView cursor. |
|
2224 |
aView cursor:self. |
|
2225 |
^ aBlock valueNowOrOnUnwindDo:[aView cursor:savedCursor] |
|
2226 |
! |
|
2 | 2227 |
|
577 | 2228 |
showWhile:aBlock |
2229 |
"ST-80 mimicri: change all views cursors to the receiver. |
|
2230 |
Return the value as returned by aBlock." |
|
2231 |
||
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2232 |
|wg| |
577 | 2233 |
|
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2234 |
(wg := WindowGroup activeGroup) notNil ifTrue:[ |
1698 | 2235 |
^ wg withCursor:self do:aBlock |
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2236 |
] ifFalse:[ |
1698 | 2237 |
aBlock value |
1188
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2238 |
] |
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2239 |
|
2a4d644e8828
care for nil-windowGroup in #show and #showWhile:
Claus Gittinger <cg@exept.de>
parents:
1181
diff
changeset
|
2240 |
"Modified: 13.1.1997 / 20:10:25 / cg" |
2 | 2241 |
! ! |
2242 |
||
0 | 2243 |
!Cursor methodsFor:'accessing'! |
2244 |
||
577 | 2245 |
device |
2246 |
"return the device I am associated with" |
|
2247 |
||
2248 |
^ device |
|
2249 |
! |
|
2250 |
||
2251 |
foreground:fgColor background:bgColor |
|
2252 |
"set the cursor colors" |
|
2253 |
||
2254 |
device colorCursor:cursorId foreground:fgColor background:bgColor |
|
2255 |
! |
|
2256 |
||
733 | 2257 |
graphicsDevice |
2258 |
"same as #device, for ST-80 compatibility naming. |
|
2259 |
Return the device I am associated with." |
|
2260 |
||
2261 |
^ device |
|
2262 |
||
2263 |
"Created: 28.5.1996 / 18:39:01 / cg" |
|
2264 |
! |
|
2265 |
||
577 | 2266 |
hotX |
2267 |
"return the hotspots x-coordinate of the receiver" |
|
2268 |
||
2269 |
^ hotX |
|
2270 |
! |
|
2271 |
||
2272 |
hotY |
|
2273 |
"return the hotspots y-coordinate of the receiver" |
|
2274 |
||
2275 |
^ hotY |
|
2276 |
! |
|
2277 |
||
0 | 2278 |
id |
2279 |
"return the cursors deviceId" |
|
2280 |
||
2281 |
^ cursorId |
|
2282 |
! |
|
2283 |
||
577 | 2284 |
maskForm |
2285 |
"return the mask-form of the receiver" |
|
0 | 2286 |
|
577 | 2287 |
^ maskForm |
2288 |
! |
|
2289 |
||
2290 |
maskForm:aForm |
|
2291 |
"set the mask-form of the receiver" |
|
2292 |
||
2293 |
maskForm := aForm |
|
0 | 2294 |
! |
2295 |
||
2296 |
shape |
|
2297 |
"return the shape" |
|
2298 |
||
2299 |
^ shape |
|
2300 |
! |
|
2301 |
||
2302 |
sourceForm |
|
2303 |
"return the source-form of the receiver" |
|
2304 |
||
2305 |
^ sourceForm |
|
2306 |
! |
|
2307 |
||
2308 |
sourceForm:aForm |
|
2309 |
"set the source-form of the receiver" |
|
2310 |
||
2311 |
sourceForm := aForm |
|
577 | 2312 |
! ! |
0 | 2313 |
|
577 | 2314 |
!Cursor methodsFor:'copying'! |
0 | 2315 |
|
577 | 2316 |
postCopy |
2317 |
sourceForm := sourceForm copy. |
|
2318 |
maskForm := maskForm copy. |
|
2319 |
device := cursorId := nil |
|
0 | 2320 |
! ! |
2321 |
||
2322 |
!Cursor methodsFor:'creating a device cursor'! |
|
2323 |
||
2324 |
on:aDevice |
|
2325 |
"create a new Cursor representing the same cursor as |
|
2326 |
myself on aDevice; if one already exists, return the one" |
|
2327 |
||
1741 | 2328 |
"/ send out a warning: #on: is typically used to create viewa |
2329 |
"/ operating on a model. |
|
2330 |
"/ Please use #onDevice: to avoid confusion. |
|
2331 |
||
1494
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2332 |
self obsoleteMethodWarning:'use #onDevice:'. |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2333 |
^ self onDevice:aDevice |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2334 |
|
1741 | 2335 |
"Modified: 5.6.1997 / 21:04:35 / cg" |
1494
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2336 |
! |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2337 |
|
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2338 |
onDevice:aDevice |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2339 |
"create a new Cursor representing the same cursor as |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2340 |
myself on aDevice; if one already exists, return the one" |
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2341 |
|
0 | 2342 |
aDevice isNil ifTrue:[ |
1698 | 2343 |
"this may not happen" |
2344 |
self error:'nil device' |
|
0 | 2345 |
]. |
2346 |
||
71 | 2347 |
"if I am already assigned to that device ..." |
0 | 2348 |
(device == aDevice) ifTrue:[^ self]. |
2349 |
||
2350 |
"first look if not already there" |
|
115 | 2351 |
Lobby do:[:aCursor | |
1698 | 2352 |
(aCursor graphicsDevice == aDevice) ifTrue:[ |
2353 |
shape notNil ifTrue:[ |
|
2354 |
(aCursor shape == shape) ifTrue:[ |
|
2355 |
^ aCursor |
|
2356 |
] |
|
2357 |
] ifFalse:[ |
|
2358 |
(aCursor sourceForm == sourceForm) ifTrue:[ |
|
2359 |
(aCursor maskForm == maskForm) ifTrue:[ |
|
2360 |
(aCursor hotX == hotX) ifTrue:[ |
|
2361 |
(aCursor hotY == hotY) ifTrue:[ |
|
2362 |
^ aCursor |
|
2363 |
] |
|
2364 |
] |
|
2365 |
] |
|
2366 |
] |
|
2367 |
] |
|
2368 |
] |
|
0 | 2369 |
]. |
71 | 2370 |
^ self newOn:aDevice |
927
c4bc2a7ff733
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
864
diff
changeset
|
2371 |
|
c4bc2a7ff733
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
864
diff
changeset
|
2372 |
"Modified: 5.7.1996 / 17:58:00 / cg" |
1494
4faf11deec70
cursor #on: is obsoleted by #onDevice:.
Claus Gittinger <cg@exept.de>
parents:
1414
diff
changeset
|
2373 |
"Created: 28.3.1997 / 13:46:38 / cg" |
71 | 2374 |
! ! |
2375 |
||
577 | 2376 |
!Cursor methodsFor:'instance release'! |
2377 |
||
2378 |
disposed |
|
1698 | 2379 |
"some Cursor has been collected - tell it to the display" |
577 | 2380 |
|
2381 |
cursorId notNil ifTrue:[ |
|
2382 |
device destroyCursor:cursorId. |
|
1698 | 2383 |
cursorId := nil. |
577 | 2384 |
] |
2385 |
! |
|
2386 |
||
2387 |
shallowCopyForFinalization |
|
2388 |
"redefined to return a lightweight copy |
|
2389 |
- all we need is the device handle" |
|
2390 |
||
2391 |
^ self class basicNew setDevice:device id:cursorId |
|
2392 |
||
2393 |
"Modified: 20.4.1996 / 23:23:19 / cg" |
|
2394 |
! ! |
|
2395 |
||
71 | 2396 |
!Cursor methodsFor:'private'! |
2397 |
||
577 | 2398 |
device:aDevice |
1698 | 2399 |
"set the cursors device" |
2400 |
||
577 | 2401 |
device := aDevice |
2402 |
! |
|
2403 |
||
2404 |
id:anId |
|
1698 | 2405 |
"set the cursors id" |
577 | 2406 |
|
2407 |
cursorId := anId |
|
2408 |
! |
|
2409 |
||
71 | 2410 |
newOn:aDevice |
2411 |
"create a new Cursor representing the same cursor as |
|
2412 |
myself on aDevice. Dont search the lobby." |
|
2413 |
||
974 | 2414 |
|newCursor id sF mF w h| |
0 | 2415 |
|
2416 |
"ask that device for the cursor" |
|
2417 |
shape notNil ifTrue:[ |
|
1698 | 2418 |
id := aDevice createCursorShape:shape. |
2419 |
id isNil ifTrue:[ |
|
2420 |
'Cursor [warning]: no cursor with shape:' errorPrint. shape errorPrintCR. |
|
2421 |
^ self |
|
2422 |
]. |
|
0 | 2423 |
] ifFalse:[ |
1698 | 2424 |
aDevice needDeviceFormsForCursor ifTrue:[ |
2425 |
sourceForm notNil ifTrue:[ |
|
2426 |
sF := sourceForm asFormOn:aDevice. |
|
2427 |
]. |
|
2428 |
maskForm notNil ifTrue:[ |
|
2429 |
mF := maskForm asFormOn:aDevice. |
|
2430 |
] ifFalse:[ |
|
2431 |
mF := sF |
|
2432 |
]. |
|
2433 |
(sF notNil and:[mF notNil]) ifTrue:[ |
|
2434 |
sourceForm := sF. |
|
2435 |
maskForm := mF. |
|
2436 |
]. |
|
2437 |
] ifFalse:[ |
|
2438 |
sourceForm notNil ifTrue:[ |
|
2439 |
sF := sourceForm bits |
|
2440 |
]. |
|
2441 |
maskForm notNil ifTrue:[ |
|
2442 |
mF := maskForm bits. |
|
2443 |
] ifFalse:[ |
|
2444 |
mF := sF |
|
2445 |
]. |
|
2446 |
]. |
|
2447 |
(sF isNil or:[mF isNil]) ifTrue:[ |
|
2448 |
'Cursor [warning]: cursor has no form' errorPrintCR. |
|
2449 |
^ self |
|
2450 |
]. |
|
2451 |
w := sourceForm width. |
|
2452 |
h := sourceForm height. |
|
133 | 2453 |
|
1698 | 2454 |
id := aDevice createCursorSourceForm:sF |
2455 |
maskForm:mF |
|
2456 |
hotX:hotX |
|
2457 |
hotY:hotY |
|
2458 |
width:w |
|
2459 |
height:h. |
|
2460 |
id isNil ifTrue:[ |
|
2461 |
'Cursor [warning]: cannot create pixmap cursor' errorPrintCR. |
|
2462 |
^ self |
|
2463 |
]. |
|
0 | 2464 |
]. |
2465 |
||
2466 |
"goody for IRIXs red cursor" |
|
2467 |
DefaultFgColor notNil ifTrue:[ |
|
1698 | 2468 |
aDevice colorCursor:id foreground:DefaultFgColor |
2469 |
background:DefaultBgColor |
|
0 | 2470 |
]. |
2471 |
||
2472 |
device isNil ifTrue:[ |
|
1698 | 2473 |
"receiver was not associated - do it now" |
2474 |
device := aDevice. |
|
2475 |
cursorId := id. |
|
0 | 2476 |
|
1698 | 2477 |
"must re-register, the old registration had a nil cursorId in it" |
2478 |
Lobby registerChange:self. |
|
2479 |
^ self |
|
0 | 2480 |
]. |
2481 |
||
2482 |
"receiver was already associated to another device - need a new cursor" |
|
2 | 2483 |
newCursor := self class basicNew. |
0 | 2484 |
shape notNil ifTrue:[ |
1698 | 2485 |
newCursor setShape:shape. |
0 | 2486 |
] ifFalse:[ |
1698 | 2487 |
newCursor setSourceForm:sourceForm |
2488 |
maskForm:maskForm |
|
2489 |
hotX:hotX |
|
2490 |
hotY:hotY |
|
0 | 2491 |
]. |
2 | 2492 |
newCursor setDevice:aDevice id:id. |
23 | 2493 |
Lobby register:newCursor. |
0 | 2494 |
^ newCursor |
1140 | 2495 |
|
1181 | 2496 |
"Modified: 10.1.1997 / 19:08:20 / cg" |
71 | 2497 |
! |
0 | 2498 |
|
2 | 2499 |
restored |
0 | 2500 |
"set both device and id" |
2501 |
||
2502 |
device := nil. |
|
2503 |
cursorId := nil |
|
2504 |
! ! |
|
2505 |
||
577 | 2506 |
!Cursor methodsFor:'private accessing'! |
0 | 2507 |
|
577 | 2508 |
setDevice:aDevice id:anId |
2509 |
"set the device and deviceId of the receiver" |
|
160 | 2510 |
|
577 | 2511 |
device := aDevice. |
2512 |
cursorId := anId |
|
0 | 2513 |
! |
2514 |
||
577 | 2515 |
setShape:aShapeSymbol |
2516 |
"set the shape" |
|
160 | 2517 |
|
577 | 2518 |
shape := aShapeSymbol. |
0 | 2519 |
! |
2520 |
||
577 | 2521 |
setSourceForm:sForm maskForm:mForm hotX:hx hotY:hy |
2522 |
"set the forms and hotspot" |
|
0 | 2523 |
|
577 | 2524 |
sourceForm := sForm. |
2525 |
maskForm := mForm. |
|
2526 |
hotX := hx. |
|
2527 |
hotY := hy. |
|
2528 |
! ! |
|
157 | 2529 |
|
1811 | 2530 |
!Cursor methodsFor:'queries'! |
2531 |
||
2532 |
isAnimatedCursor |
|
2533 |
^ false |
|
2534 |
||
2535 |
"Created: 26.6.1997 / 11:12:48 / cg" |
|
2536 |
! ! |
|
2537 |
||
1140 | 2538 |
!Cursor class methodsFor:'documentation'! |
0 | 2539 |
|
577 | 2540 |
version |
2063 | 2541 |
^ '$Header: /cvs/stx/stx/libview/Cursor.st,v 1.56 1998-02-21 16:08:20 cg Exp $' |
0 | 2542 |
! ! |
577 | 2543 |
Cursor initialize! |