author | Stefan Vogel <sv@exept.de> |
Tue, 15 Apr 2003 13:59:47 +0200 | |
changeset 3858 | ecbaa5d75c70 |
parent 3680 | 4c096f11e018 |
child 3888 | 1e06f949dc58 |
permissions | -rw-r--r-- |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
1 |
" |
267 | 2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
3 |
All Rights Reserved |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
4 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
5 |
This software is furnished under a license and may be used |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
10 |
hereby transferred. |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
11 |
" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
12 |
|
3450 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
15 |
WindowSensor subclass:#SynchronousWindowSensor |
730 | 16 |
instanceVariableNames:'' |
598 | 17 |
classVariableNames:'' |
18 |
poolDictionaries:'' |
|
19 |
category:'Interface-Support' |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
20 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
21 |
|
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
22 |
!SynchronousWindowSensor class methodsFor:'documentation'! |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
23 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
24 |
copyright |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
25 |
" |
267 | 26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
27 |
All Rights Reserved |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
28 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
29 |
This software is furnished under a license and may be used |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
30 |
only in accordance with the terms of that license and with the |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
31 |
inclusion of the above copyright notice. This software may not |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
32 |
be provided or otherwise made available to, or used by, any |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
33 |
other person. No title to or ownership of the software is |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
34 |
hereby transferred. |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
35 |
" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
36 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
37 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
38 |
documentation |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
39 |
" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
40 |
in contrast to a regular windowSensor, instances of SynchronousWindowSensor |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
41 |
do NOT put events into a queue and do NOT wakeup any windowGroup process. |
266
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
42 |
Instead, the underlying view is notified synchronously (via a message send) |
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
43 |
about the event. |
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
44 |
|
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
45 |
These are used for only one single situation: |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
46 |
when a modal debugger is open |
266
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
47 |
(i.e. one that is debugging the scheduler or event-dispatcher). |
267 | 48 |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
49 |
This debuggers windowGroup is augmented with a synchronous Sensor, in order |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
50 |
to prevent the event handling code from suspending any process |
266
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
51 |
(you cannot suspend the scheduler; you should not suspend the event dispatcher). |
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
52 |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
53 |
This is pretty tricky and magic - you dont have to understand this. |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
54 |
(consider this system internal code) |
267 | 55 |
These sensors are not used with regular views. |
612 | 56 |
|
57 |
[author:] |
|
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
58 |
Claus Gittinger |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
59 |
" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
60 |
! ! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
61 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
62 |
!SynchronousWindowSensor methodsFor:'event handling'! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
63 |
|
1299 | 64 |
addDamage:aRectangle view:aView wakeup:doWakeup |
65 |
"forward as an expose for some view" |
|
66 |
||
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
67 |
aView |
3680 | 68 |
dispatchEvent:#exposeX:y:width:height: |
69 |
arguments:(Array with:aRectangle left |
|
70 |
with:aRectangle top |
|
71 |
with:aRectangle width |
|
72 |
with:aRectangle height) |
|
1299 | 73 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
74 |
"/ WindowEvent |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
75 |
"/ sendEvent:#exposeX:y:width:height: |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
76 |
"/ arguments:(Array with:aRectangle left |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
77 |
"/ with:aRectangle top |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
78 |
"/ with:aRectangle width |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
79 |
"/ with:aRectangle height) |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
80 |
"/ view:aView |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
81 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
82 |
"Modified: / 20.5.1998 / 22:55:37 / cg" |
1299 | 83 |
! |
84 |
||
3450 | 85 |
buttonMotion:buttonAndModifierState x:x y:y view:aView |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
86 |
"forward a button-motion for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
87 |
|
3680 | 88 |
|buttonState ev| |
3450 | 89 |
|
90 |
"/ in the following, we are only interested in the buttons (i.e. mask out the modifiers) |
|
91 |
buttonState := buttonAndModifierState bitAnd:(aView device anyButtonStateMask). |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
92 |
|
3680 | 93 |
ev := WindowEvent buttonMotion:buttonState x:x y:y view:aView. |
94 |
self sendEvent:ev to:aView. |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
95 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
96 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
97 |
buttonMultiPress:button x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
98 |
"forward a button-multi-press event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
99 |
|
3680 | 100 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
101 |
|
3680 | 102 |
ev := WindowEvent buttonMultiPress:button x:x y:y view:aView. |
103 |
self sendEvent:ev to:aView. |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
104 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
105 |
"Created: / 24.11.1995 / 19:14:14 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
106 |
"Modified: / 20.5.1998 / 22:56:07 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
107 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
108 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
109 |
buttonPress:button x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
110 |
"forward a button-press event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
111 |
|
3680 | 112 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
113 |
|
3680 | 114 |
ev := WindowEvent buttonPress:button x:x y:y view:aView. |
115 |
self sendEvent:ev to:aView. |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
116 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
117 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
118 |
buttonRelease:button x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
119 |
"forward a button-release event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
120 |
|
3680 | 121 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
122 |
|
3680 | 123 |
ev := WindowEvent buttonRelease:button x:x y:y view:aView. |
124 |
self sendEvent:ev to:aView. |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
125 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
126 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
127 |
configureX:x y:y width:w height:h view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
128 |
"forward a configure for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
129 |
|
3680 | 130 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
131 |
|
3680 | 132 |
ev := WindowEvent configureX:x y:y width:w height:h view:aView. |
133 |
aView dispatchEvent:ev |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
134 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
135 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
136 |
coveredBy:otherView view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
137 |
"forward a covered for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
138 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
139 |
aView coveredBy:otherView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
140 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
141 |
"Created: 24.11.1995 / 19:15:11 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
142 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
143 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
144 |
destroyedView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
145 |
"forward a destroyed event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
146 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
147 |
aView destroyed |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
148 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
149 |
"Created: 24.11.1995 / 19:15:22 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
150 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
151 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
152 |
exposeX:x y:y width:w height:h view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
153 |
"forward an expose for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
154 |
|
3594
76381e75d9d2
Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents:
3450
diff
changeset
|
155 |
ignoreExposeEvents ~~ true ifTrue:[ |
76381e75d9d2
Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents:
3450
diff
changeset
|
156 |
aView |
76381e75d9d2
Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents:
3450
diff
changeset
|
157 |
dispatchEvent:#exposeX:y:width:height: |
76381e75d9d2
Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents:
3450
diff
changeset
|
158 |
arguments:(Array with:x with:y with:w with:h) |
76381e75d9d2
Handle lastEventQuerySignal (for exclusive debugger)
Stefan Vogel <sv@exept.de>
parents:
3450
diff
changeset
|
159 |
] |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
160 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
161 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
162 |
focusInView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
163 |
"forward a focusIn event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
164 |
|
3680 | 165 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
166 |
|
3680 | 167 |
ev := WindowEvent focusInView:aView. |
168 |
aView dispatchEvent:ev |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
169 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
170 |
"Created: / 24.11.1995 / 19:16:11 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
171 |
"Modified: / 20.5.1998 / 22:57:04 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
172 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
173 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
174 |
focusOutView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
175 |
"forward a focusOut event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
176 |
|
3680 | 177 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
178 |
|
3680 | 179 |
ev := WindowEvent focusOutView:aView. |
180 |
aView dispatchEvent:ev |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
181 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
182 |
"Created: / 24.11.1995 / 19:16:24 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
183 |
"Modified: / 20.5.1998 / 22:57:16 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
184 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
185 |
|
1295
ef93ded3c030
renamed graphicExpose -> graphicsExpose;
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
186 |
graphicsExposeX:x y:y width:w height:h final:final view:aView |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
187 |
"forward a graphic expose for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
188 |
|
1299 | 189 |
"/ this is a possible response to a scroll operation |
1244
d3182558fc9d
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1243
diff
changeset
|
190 |
"/ (if an expose is pending) |
d3182558fc9d
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1243
diff
changeset
|
191 |
|
1295
ef93ded3c030
renamed graphicExpose -> graphicsExpose;
Claus Gittinger <cg@exept.de>
parents:
1250
diff
changeset
|
192 |
final ifTrue:[ |
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
193 |
(catchExpose includes:aView) ifTrue:[ |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
194 |
gotExpose add:aView. |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
195 |
] |
1244
d3182558fc9d
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1243
diff
changeset
|
196 |
]. |
d3182558fc9d
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1243
diff
changeset
|
197 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
198 |
aView |
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
199 |
dispatchEvent:#graphicsExposeX:y:width:height:final: |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
200 |
arguments:(Array with:x with:y with:w with:h with:final) |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
201 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
202 |
"Created: / 24.11.1995 / 19:16:38 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
203 |
"Modified: / 20.5.1998 / 22:57:32 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
204 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
205 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
206 |
keyPress:untranslatedKey x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
207 |
"forward a key-press event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
208 |
|
3680 | 209 |
|xlatedKey ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
210 |
|
266
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
211 |
self key:untranslatedKey state:true. |
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
212 |
|
2141 | 213 |
xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView. |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
214 |
xlatedKey notNil ifTrue:[ |
3680 | 215 |
ev := WindowEvent |
216 |
keyPress:xlatedKey |
|
217 |
rawKey:untranslatedKey |
|
218 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
219 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
220 |
x:x y:y view:aView. |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
221 |
|
3680 | 222 |
self sendEvent:ev to:aView. |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
223 |
] |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
224 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
225 |
"Created: / 24.11.1995 / 19:17:23 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
226 |
"Modified: / 20.5.1998 / 22:57:52 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
227 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
228 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
229 |
keyRelease:untranslatedKey x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
230 |
"forward a key-release event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
231 |
|
3680 | 232 |
|xlatedKey ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
233 |
|
266
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
234 |
self key:untranslatedKey state:false. |
1e234d542ef9
oops - forgot modifier key processing (altDown, shiftDown etc.)
Claus Gittinger <cg@exept.de>
parents:
264
diff
changeset
|
235 |
|
2141 | 236 |
xlatedKey := aView graphicsDevice translateKey:untranslatedKey forView:aView. |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
237 |
xlatedKey notNil ifTrue:[ |
3680 | 238 |
ev := WindowEvent |
239 |
keyRelease:xlatedKey |
|
240 |
rawKey:untranslatedKey |
|
241 |
hasShift:shiftDown ctrl:ctrlDown alt:altDown meta:metaDown |
|
242 |
button1:leftButtonDown button2:middleButtonDown button3:rightButtonDown |
|
243 |
x:x y:y view:aView. |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
244 |
|
3680 | 245 |
self sendEvent:ev to:aView. |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
246 |
] |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
247 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
248 |
"Created: / 24.11.1995 / 19:17:50 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
249 |
"Modified: / 20.5.1998 / 22:58:05 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
250 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
251 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
252 |
mappedView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
253 |
"forward a mapped event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
254 |
|
3680 | 255 |
|ev| |
256 |
||
257 |
ev := WindowEvent mappedView:aView. |
|
258 |
aView dispatchEvent:ev |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
259 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
260 |
"Created: 24.11.1995 / 19:18:01 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
261 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
262 |
|
2733
5af2417bc450
pass x/y with mouseWheel event
Claus Gittinger <cg@exept.de>
parents:
2718
diff
changeset
|
263 |
mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView |
2699 | 264 |
"forward a wheel-motion for some view" |
265 |
||
3680 | 266 |
|ev| |
267 |
||
268 |
ev := WindowEvent mouseWheelMotion:buttonState x:x y:y amount:amount deltaTime:dTime view:aView. |
|
269 |
self sendEvent:ev to:aView. |
|
2699 | 270 |
|
271 |
"Created: / 21.5.1999 / 13:07:51 / cg" |
|
272 |
! |
|
273 |
||
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
274 |
noExposeView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
275 |
"forward a noExpose event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
276 |
|
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
277 |
catchExpose isNil ifTrue:[ |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
278 |
'SWSensor [info]: noExpose but not catching' infoPrintCR. |
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
279 |
]. |
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
280 |
|
1299 | 281 |
(catchExpose includes:aView) ifTrue:[ |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
282 |
gotExpose add:aView. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
283 |
catchExpose remove:aView. |
1299 | 284 |
]. |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
285 |
aView noExpose. |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
286 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
287 |
"Created: 24.11.1995 / 19:18:10 / cg" |
1299 | 288 |
"Modified: 29.1.1997 / 20:46:47 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
289 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
290 |
|
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
291 |
pasteFromClipBoard:s view:aView |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
292 |
|
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
293 |
^ aView pasteFromClipBoard:s |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
294 |
! |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
295 |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
296 |
pointerEnter:buttonState x:x y:y view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
297 |
"forward a pointer enter for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
298 |
|
3680 | 299 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
300 |
|
3680 | 301 |
ev := WindowEvent pointerEnter:buttonState x:x y:y view:aView. |
302 |
aView dispatchEvent:ev |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
303 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
304 |
"Created: / 24.11.1995 / 19:18:20 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
305 |
"Modified: / 20.5.1998 / 22:58:20 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
306 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
307 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
308 |
pointerLeave:buttonState view:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
309 |
"forward a pointer leave for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
310 |
|
3680 | 311 |
|ev| |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
312 |
|
3680 | 313 |
ev := WindowEvent pointerLeave:buttonState view:aView. |
314 |
aView dispatchEvent:ev |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
315 |
|
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
316 |
"Created: / 24.11.1995 / 19:18:30 / cg" |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
1872
diff
changeset
|
317 |
"Modified: / 20.5.1998 / 22:58:35 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
318 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
319 |
|
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
320 |
pushUserEvent:selector for:anyObject withArguments:argList |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
321 |
|
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
322 |
^ anyObject perform:selector withArguments:argList. |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
323 |
! |
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
324 |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
325 |
saveAndTerminateView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
326 |
"forward a saveAndTerminate event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
327 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
328 |
aView saveAndTerminate |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
329 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
330 |
"Created: 24.11.1995 / 19:18:38 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
331 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
332 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
333 |
terminateView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
334 |
"forward a terminate event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
335 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
336 |
aView terminate |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
337 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
338 |
"Created: 24.11.1995 / 19:18:48 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
339 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
340 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
341 |
unmappedView:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
342 |
"forward an unmapped event for some view" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
343 |
|
3680 | 344 |
|ev| |
345 |
||
346 |
ev := WindowEvent unmappedView:aView. |
|
347 |
aView dispatchEvent:ev |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
348 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
349 |
"Created: 24.11.1995 / 19:18:59 / cg" |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
350 |
! ! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
351 |
|
3680 | 352 |
!SynchronousWindowSensor methodsFor:'private'! |
353 |
||
354 |
sendEvent:anEvent to:aView |
|
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
355 |
|
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
356 |
WindowGroup lastEventQuerySignal answer:anEvent do:[ |
3680 | 357 |
aView dispatchEvent:anEvent |
358 |
]. |
|
359 |
! ! |
|
360 |
||
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
361 |
!SynchronousWindowSensor methodsFor:'specials'! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
362 |
|
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
363 |
catchExposeFor:aView |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
364 |
"start catching noExpose events (must be done BEFORE a bitblt)." |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
365 |
|
1299 | 366 |
catchExpose notEmpty ifTrue:[ |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
367 |
'SWSensor [warning]: already catching in catchExpose' errorPrintCR. |
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
368 |
]. |
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
369 |
|
1299 | 370 |
gotOtherEvent remove:aView ifAbsent:nil. |
371 |
gotExpose remove:aView ifAbsent:nil. |
|
372 |
catchExpose add:aView. |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
373 |
|
1299 | 374 |
"Modified: 29.1.1997 / 20:43:44 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
375 |
! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
376 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
377 |
waitForExposeFor:aView |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
378 |
"wait until a graphicsExpose or a noExpose arrives (after a bitblt)." |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
379 |
|
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
380 |
|device windowId stopPoll endPollTime| |
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
381 |
|
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
382 |
device := aView graphicsDevice. |
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
383 |
|
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
384 |
"/ this is only needed for X ... |
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
385 |
device scrollsAsynchronous ifTrue:[ |
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
386 |
windowId := aView id. |
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
387 |
|
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
388 |
"/ |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
389 |
"/ cannot suspend, I am a synchronous-modal sensor |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
390 |
"/ must poll for the event |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
391 |
"/ |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
392 |
endPollTime := AbsoluteTime now addSeconds:10. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
393 |
stopPoll := false. |
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
394 |
|
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
395 |
[(gotExpose includes:aView) or:[stopPoll]] whileFalse:[ |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
396 |
(device exposeEventPendingFor:windowId withSync:true) ifTrue:[ |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
397 |
device dispatchExposeEventFor:windowId. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
398 |
]. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
399 |
stopPoll := (AbsoluteTime now > endPollTime). |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
400 |
Processor yield. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
401 |
]. |
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
402 |
|
2718
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
403 |
stopPoll ifTrue:[ |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
404 |
'SyncWindowSensor [warning]: lost expose event' errorPrintCR. |
85d77ac33019
deltaTime arg in mouseWheelMotion
Claus Gittinger <cg@exept.de>
parents:
2699
diff
changeset
|
405 |
] |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
406 |
]. |
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
407 |
|
1299 | 408 |
catchExpose remove:aView ifAbsent:nil. |
409 |
gotExpose remove:aView ifAbsent:nil. |
|
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
410 |
|
1872
2a10e693d93f
break non-windowGroup expose-poll loop after a while (10 seconds)
Claus Gittinger <cg@exept.de>
parents:
1299
diff
changeset
|
411 |
"Modified: 19.8.1997 / 17:25:09 / cg" |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
412 |
! ! |
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
413 |
|
1243
0c33cb7f8458
hopefully fixed the 'lost expose' bug
Claus Gittinger <cg@exept.de>
parents:
1012
diff
changeset
|
414 |
!SynchronousWindowSensor class methodsFor:'documentation'! |
264
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
415 |
|
fc9ecf4814a0
use another (synchronous) type of sensor while in a modal debugger.
Claus Gittinger <cg@exept.de>
parents:
diff
changeset
|
416 |
version |
3858
ecbaa5d75c70
Use SynchronousWindowSensor if no windowGroup
Stefan Vogel <sv@exept.de>
parents:
3680
diff
changeset
|
417 |
^ '$Header: /cvs/stx/stx/libview/SynchronousWindowSensor.st,v 1.24 2003-04-15 11:59:37 stefan Exp $' |
615 | 418 |
! ! |