author | Claus Gittinger <cg@exept.de> |
Fri, 31 Jul 1998 20:13:08 +0200 | |
changeset 2213 | 84035dc560e0 |
parent 2172 | 6dccf11733fd |
child 2219 | 8dcff419009d |
permissions | -rw-r--r-- |
26 | 1 |
" |
2 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
72 | 3 |
All Rights Reserved |
26 | 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 |
" |
|
11 | 12 |
|
13 |
Object subclass:#WindowGroup |
|
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
14 |
instanceVariableNames:'views topViews myProcess mySensor isModal previousGroup focusView |
417 | 15 |
focusSequence preEventHook postEventHook pointerView |
16 |
isForModalSubview' |
|
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
17 |
classVariableNames:'LastActiveGroup LastActiveProcess LeaveSignal |
1110 | 18 |
WindowGroupQuerySignal LastEventQuerySignal' |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
19 |
poolDictionaries:'' |
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
20 |
category:'Interface-Support' |
11 | 21 |
! |
22 |
||
1110 | 23 |
!WindowGroup class methodsFor:'documentation'! |
46 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1993 by Claus Gittinger |
|
72 | 28 |
All Rights Reserved |
46 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
103 | 41 |
In Smalltalk/X, the known (ST-80) concept of a controller has been |
297 | 42 |
extended (split) into a WindowGroup which handles process related stuff, |
43 |
and the Controller, which only handles events for a view and defines the user interaction. |
|
44 |
All interaction is via event queues - there is no polling in controllers (not even conceptionally). |
|
103 | 45 |
|
46 |
WindowGroups are responsible to wait for and forward events for a group of |
|
297 | 47 |
windows. All views in a windowGroup share a single windowSensor which holds the |
1503 | 48 |
event queue (therefore subviews all share the same input event queue). |
144 | 49 |
|
297 | 50 |
The event queues are filled with incoming events as arriving from the physical display. |
51 |
This is done by a separate process (so called event-dispatcher) which runs at a higher |
|
52 |
priority. The event dispatcher determines the queue into which an event has to be placed |
|
53 |
by the view for which the event is destined (via the views sensor). |
|
54 |
There may be multiple event dispatchers running (to support multiple displays); |
|
55 |
see the documentation/examples in DeviceWorkstation/XWorkstation on how this is done. |
|
56 |
||
103 | 57 |
Except for modal boxes, a separate process is created for each windowGroup |
297 | 58 |
which waits for events to arrive and processes them, by sending corresponding |
144 | 59 |
event messages to the views controller or the view (*). |
297 | 60 |
The controller is determined by asking the view (for which the event is destined); |
61 |
if the returned controller is nil, the event is sent directly to the view. |
|
62 |
This allows for simple views to work without a controller. |
|
63 |
(all of this is actually done in a WindowEvent method) |
|
64 |
||
65 |
Therefore, multiple applications run pseudo parallel. |
|
66 |
Even if some window performs a long time computation, events are still received |
|
67 |
and entered into the corresponding event queues (because the event dispatcher process |
|
68 |
runs at a higher priority). However, the actual processing of the event is only |
|
69 |
possibly if no other process is busy at the same or a higher priority. |
|
70 |
It is possible to change a windowProcesses priority in order to give other windows |
|
71 |
a chance to execute (some views do this while performing longtime actions). |
|
72 |
||
103 | 73 |
Modal boxes create an extra window group for the components of the modal |
297 | 74 |
box, but execute the event-processing loop for this new group in the original process - |
144 | 75 |
therefore, the original windowgroup is blocked for the duration of the modal |
297 | 76 |
interaction. |
77 |
However, the modal-event processing loop peeks into the original groups event queue |
|
78 |
from time to time, and handles expose events. Thus, even while blocked for user input, |
|
79 |
the original group continues to get update/redraw events. |
|
103 | 80 |
|
81 |
Normally, one windowgroup is associated to each topview (StandardSystemView) |
|
144 | 82 |
and all of its subviews. However, this is not strictly required; |
83 |
it is possible to create extra windowgroups for subviews, which will let them |
|
84 |
run in parallel |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
85 |
(for example, the FileBrowsers kill-Button is created that |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
86 |
way, to allow a kill of an executing unix command, while the browser |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
87 |
itself reads the pipeStream for incoming text. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
88 |
Even if the fileBrowser is busy reading the pipe, the killButton is still |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
89 |
working and allows terminating the pipe-read action). |
144 | 90 |
|
91 |
On the other hand, multiple topviews can be placed into the same windowGroup; |
|
92 |
which allows for multiview applications, of which only one communicates with |
|
103 | 93 |
the user at a time. |
297 | 94 |
Multiple topviews within a windowGropup can be configured to behave like one |
95 |
unit with respect to iconification, deiconification and termination. |
|
96 |
This is done by creating multiple topViews in one group, and setting up a master/slave |
|
97 |
or partner relation among them (see TopView>>beSlave and TopView>>bePartner). |
|
103 | 98 |
|
109 | 99 |
WindowGroups also support a focus window: this is the one that gets the |
103 | 100 |
keyboard input - even if the cursor is located in another subview. |
512 | 101 |
The sequence is defined by the topView or its model (typically an applicationModel). |
102 |
It should return an orderedCollection of subviews when asked via #focusSequence. |
|
103 |
||
104 |
For debugging, windowGroups allow hooks to be installed around the processing of |
|
105 |
events - preEventHook is sent a #procesEvent: message before an event is processed, |
|
106 |
postEventHook is informed after the event has been processed. |
|
107 |
The preEventHook should return true - if it returns true, the event is considered |
|
108 |
being already processed by the hook and ignored. |
|
109 |
This allows for event-tracing, timing or even filtering (if preEventHook returns true). |
|
110 |
(notice: there is also an eventHook facility available in the sensor class.) |
|
103 | 111 |
|
112 |
Finally, windowgroups are the perfect place for things like defining a |
|
113 |
cursor for all associated views, flushing all input, waiting for expose |
|
114 |
events etc. |
|
115 |
||
297 | 116 |
Dont get confused: |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
117 |
You dont have to care for details in the normal case, a windowgroup is |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
118 |
created for you automatically, when a view is opened. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
119 |
All of the internals are not required to be known for most applications. |
297 | 120 |
|
103 | 121 |
|
597 | 122 |
[instance variables:] |
144 | 123 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
124 |
views collection of views of this group |
103 | 125 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
126 |
topViews collection of topviews of this group |
103 | 127 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
128 |
myProcess the process executing the events |
103 | 129 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
130 |
mySensor my input sensor |
103 | 131 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
132 |
isModal true if this is for a modal box |
103 | 133 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
134 |
previousGroup if modal, the group that started this one |
103 | 135 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
136 |
focusView the one that has the focus (or nil) |
103 | 137 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
138 |
focusSequence defines the focus sequence |
103 | 139 |
|
140 |
||
597 | 141 |
[class variables:] |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
142 |
LeaveSignal if raised, a modal box leaves (closes) |
103 | 143 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
144 |
WindowGroupQuerySignal to ask for the current windowGroup, |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
145 |
anywhere in the program, simply raise this |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
146 |
signal. The raise returns nil, for processes, |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
147 |
which are not under control of a windowGroup. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
148 |
(i.e. wg := WindowGroup windowGroupQuerySignal raise) |
1111 | 149 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
150 |
LastEventQuerySignal to ask for the event which was responsible |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
151 |
for being where you are (whereever that is). |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
152 |
The raise returns nil, if you did not arrive |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
153 |
there due to an event. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
154 |
(i.e. ev := WindowGroup lastEventQuerySignal raise) |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
155 |
The event can be asked for the view, the type |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
156 |
of event, x/y position etc. |
103 | 157 |
|
144 | 158 |
(*) |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
159 |
due to historic reasons, many views have the controller functionality |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
160 |
integrated, and handle events themself. The windowSensor takes care |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
161 |
of this, by checking if a view has a controller, and, if so, forwarding |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
162 |
the events to it. Otherwise, events are sent directly to the view. |
144 | 163 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
164 |
In the future, all views will be rewritten to actually use a controller. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
165 |
Currently (being in the middle of this migration), only some views |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
166 |
(buttons, toggles and subclasses) do so. |
144 | 167 |
|
103 | 168 |
For more information, read 'introduction to view programming' in the |
169 |
doc/online directory. |
|
597 | 170 |
|
612 | 171 |
[author:] |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
172 |
Claus Gittinger |
612 | 173 |
|
597 | 174 |
[see also:] |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
175 |
WindowSensor WindowEvent EventListener KeyboardForwarder |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
176 |
DeviceWorkstation |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
177 |
View StandardSystemView |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
178 |
ApplicationModel |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
179 |
Process ProcessorScheduler |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
180 |
(``Working with processes (programmers manual)'': programming/processes.html#VIEWSNPROCS) |
46 | 181 |
" |
182 |
! ! |
|
183 |
||
1110 | 184 |
!WindowGroup class methodsFor:'initialization'! |
46 | 185 |
|
186 |
initialize |
|
187 |
LeaveSignal isNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
188 |
LeaveSignal := (Signal new) mayProceed:true. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
189 |
LeaveSignal nameClass:self message:#leaveSignal. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
190 |
LeaveSignal notifierString:'unhandled leave signal'. |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
191 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
192 |
WindowGroupQuerySignal := QuerySignal new. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
193 |
WindowGroupQuerySignal nameClass:self message:#windowGroupQuerySignal. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
194 |
WindowGroupQuerySignal notifierString:'query for windowgroup'. |
1111 | 195 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
196 |
LastEventQuerySignal := QuerySignal new. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
197 |
LastEventQuerySignal nameClass:self message:#lastEventQuerySignal. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
198 |
LastEventQuerySignal notifierString:'query for last event'. |
54 | 199 |
]. |
46 | 200 |
|
201 |
"WindowGroup initialize" |
|
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
202 |
|
1111 | 203 |
"Modified: 9.11.1996 / 17:00:53 / cg" |
46 | 204 |
! ! |
205 |
||
1110 | 206 |
!WindowGroup class methodsFor:'instance creation'! |
244 | 207 |
|
208 |
new |
|
209 |
"create and return a new WindowGroup object" |
|
210 |
||
211 |
^ self basicNew initialize |
|
212 |
! ! |
|
213 |
||
1110 | 214 |
!WindowGroup class methodsFor:'Signal constants'! |
215 |
||
216 |
lastEventQuerySignal |
|
217 |
"return the signal which is used to query for the last event" |
|
218 |
||
219 |
^ LastEventQuerySignal |
|
220 |
||
221 |
"Created: 17.7.1996 / 20:36:04 / cg" |
|
222 |
! |
|
72 | 223 |
|
224 |
leaveSignal |
|
109 | 225 |
"return the signal which is used to exit a modal loop. |
1752 | 226 |
This private signal, is always caught while a modalbox is active. |
144 | 227 |
Raising it will exit the modal loop and return from the views #openModal |
228 |
method." |
|
109 | 229 |
|
72 | 230 |
^ LeaveSignal |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
231 |
! |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
232 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
233 |
windowGroupQuerySignal |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
234 |
"return the signal which is used to query for the windowGroup" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
235 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
236 |
^ WindowGroupQuerySignal |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
237 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
238 |
"Created: 17.7.1996 / 20:36:04 / cg" |
72 | 239 |
! ! |
240 |
||
1110 | 241 |
!WindowGroup class methodsFor:'accessing'! |
26 | 242 |
|
243 |
activeGroup |
|
180 | 244 |
"return the currently active windowGroup. |
245 |
The returned value may not be fully correct, in case the current process |
|
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
246 |
handles multiple windowGroups simultaneously. In this case, |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
247 |
(usually) the first group is returned (prefering a modal if there is one). |
180 | 248 |
(maybe we should return a collection of windowGroups here). |
249 |
||
250 |
This method is required to simulate the historic ST-80 single display |
|
251 |
behavior for Cursor>>show / Cursor>>showWhile and some others (raising the |
|
252 |
activeGroups topView when modalBoxes appear) on multiple display screens. |
|
253 |
These methods should change the cursor for the currently |
|
254 |
active windowGroup ONLY, instead of globally affecting the display or |
|
255 |
all views |
|
256 |
(since, depending on the priority, other views could be unaffacted by this |
|
257 |
and an overall cursor change does not make sense.)" |
|
258 |
||
259 |
|activeProcess groups wg| |
|
260 |
||
261 |
Processor isNil ifTrue:[^ nil]. "/ only during very early init phase |
|
26 | 262 |
|
180 | 263 |
activeProcess := Processor activeProcess. |
264 |
" caching the last value ..." |
|
565
6867f1a9a470
oops - leftover global LastActive
Claus Gittinger <cg@exept.de>
parents:
513
diff
changeset
|
265 |
activeProcess == LastActiveProcess ifTrue:[ |
2089 | 266 |
LastActiveGroup process == LastActiveProcess ifTrue:[ |
267 |
^ LastActiveGroup |
|
268 |
] |
|
180 | 269 |
]. |
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
270 |
|
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
271 |
wg := WindowGroupQuerySignal raise. |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
272 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
273 |
wg isNil ifTrue:[ |
2089 | 274 |
"/ mhmh - noone willing to answer that question ... |
275 |
"/ (how can this happen ?) |
|
276 |
groups := self scheduledWindowGroups |
|
277 |
select:[:wg | wg process == activeProcess]. |
|
278 |
groups size == 1 ifTrue:[ |
|
279 |
wg := groups anElement |
|
280 |
] ifFalse:[ |
|
281 |
wg := groups detect:[:wg | wg isModal] ifNone:nil. |
|
282 |
wg isNil ifTrue:[ |
|
283 |
wg := groups anElement |
|
284 |
] |
|
285 |
]. |
|
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
286 |
]. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
287 |
|
180 | 288 |
wg notNil ifTrue:[ |
2089 | 289 |
LastActiveProcess := activeProcess. |
290 |
LastActiveGroup := wg. |
|
180 | 291 |
]. |
292 |
^ wg |
|
293 |
||
294 |
" |
|
295 |
WindowGroup activeGroup |
|
296 |
" |
|
297 |
||
2089 | 298 |
"Modified: / 3.9.1995 / 14:49:53 / claus" |
299 |
"Modified: / 17.4.1998 / 11:49:28 / cg" |
|
54 | 300 |
! |
301 |
||
302 |
scheduledWindowGroups |
|
180 | 303 |
"return a collection of all windowGroups (possibly for different |
304 |
display devices) which are scheduled (i.e. which have a process |
|
305 |
running, handling events)." |
|
306 |
||
307 |
|set screens| |
|
308 |
||
309 |
screens := Screen allScreens. |
|
1869 | 310 |
screens size == 0 ifTrue:[^ #()]. |
180 | 311 |
|
312 |
set := IdentitySet new. |
|
313 |
screens do:[:aDevice | |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
314 |
aDevice allViewsDo:[:aView | |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
315 |
|wg| |
109 | 316 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
317 |
(wg := aView windowGroup) notNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
318 |
wg process notNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
319 |
set add:wg |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
320 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
321 |
]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
322 |
]. |
180 | 323 |
]. |
324 |
^ set asArray |
|
325 |
||
326 |
" |
|
327 |
WindowGroup scheduledWindowGroups |
|
328 |
" |
|
329 |
||
330 |
"Modified: 1.9.1995 / 13:43:09 / claus" |
|
1869 | 331 |
"Modified: 18.8.1997 / 18:44:29 / cg" |
244 | 332 |
! |
333 |
||
334 |
setActiveGroup:aGroup |
|
335 |
"set the currently active windowGroup. |
|
336 |
Temporary; do not use this interface, it will vanish." |
|
337 |
||
338 |
LastActiveProcess := Processor activeProcess. |
|
339 |
LastActiveGroup := aGroup |
|
26 | 340 |
! ! |
341 |
||
11 | 342 |
!WindowGroup methodsFor:'accessing'! |
343 |
||
512 | 344 |
device |
345 |
"return the device, we receive our events from" |
|
346 |
||
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
347 |
self obsoleteMethodWarning:'use #graphicsDevice'. |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
348 |
^ self graphicsDevice |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
349 |
|
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
350 |
"Modified: 5.7.1996 / 17:53:58 / cg" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
351 |
! |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
352 |
|
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
353 |
graphicsDevice |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
354 |
"return the device, we receive our events from" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
355 |
|
1311
0746d3fe9a62
changed (fixed ?) graphicsDevice
Claus Gittinger <cg@exept.de>
parents:
1304
diff
changeset
|
356 |
|dev| |
0746d3fe9a62
changed (fixed ?) graphicsDevice
Claus Gittinger <cg@exept.de>
parents:
1304
diff
changeset
|
357 |
|
0746d3fe9a62
changed (fixed ?) graphicsDevice
Claus Gittinger <cg@exept.de>
parents:
1304
diff
changeset
|
358 |
topViews notNil ifTrue:[ |
2170
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
359 |
topViews do:[:v | |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
360 |
|app| |
1116 | 361 |
|
2170
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
362 |
(app := v application) notNil ifTrue:[ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
363 |
"/ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
364 |
"/ ok, it has an application; |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
365 |
"/ ask it for preferences. |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
366 |
"/ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
367 |
(dev := app graphicsDevice) notNil ifTrue:[ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
368 |
^ dev |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
369 |
] |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
370 |
]. |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
371 |
(dev := v graphicsDevice) notNil ifTrue:[ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
372 |
^ dev |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
373 |
] |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
374 |
] |
512 | 375 |
]. |
1311
0746d3fe9a62
changed (fixed ?) graphicsDevice
Claus Gittinger <cg@exept.de>
parents:
1304
diff
changeset
|
376 |
views notNil ifTrue:[ |
2170
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
377 |
views do:[:v | |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
378 |
(dev := v graphicsDevice) notNil ifTrue:[ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
379 |
^ dev |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
380 |
] |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
381 |
] |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
382 |
]. |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
383 |
"/ ask the previousGroup; I could be a popUp-views group, |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
384 |
"/ which has already closed its views (and is performing its action) |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
385 |
previousGroup notNil ifTrue:[ |
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
386 |
^ previousGroup graphicsDevice |
512 | 387 |
]. |
388 |
^ nil |
|
389 |
||
2170
44b86a4cc0d5
in #graphicsDevice: if there are no views, ask previousGroup if there is one.
Claus Gittinger <cg@exept.de>
parents:
2168
diff
changeset
|
390 |
"Modified: / 9.7.1998 / 18:18:08 / cg" |
512 | 391 |
! |
392 |
||
393 |
isModal |
|
394 |
"return true, if the receiver is in a modal mode |
|
395 |
(i.e. for a modal box)" |
|
396 |
||
397 |
^ isModal |
|
398 |
||
399 |
"Modified: 7.3.1996 / 14:29:46 / cg" |
|
400 |
! |
|
401 |
||
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
402 |
isPopUp |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
403 |
"return true, if the receiver is for a popUp view" |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
404 |
|
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
405 |
isModal ifFalse:[^ false]. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
406 |
topViews isNil ifTrue:[^ true]. "/ a close popup ... |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
407 |
^ topViews first isPopUpView |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
408 |
|
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
409 |
"Created: / 9.7.1998 / 01:13:01 / cg" |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
410 |
"Modified: / 9.7.1998 / 01:17:11 / cg" |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
411 |
! |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
412 |
|
512 | 413 |
mainGroup |
414 |
"return the main windowgroup (for modal groups only) |
|
415 |
that is the top one, which is not modal. |
|
416 |
NonModal groups return themSelf. |
|
417 |
||
418 |
There is one exception to this: the debugger (which is sort of modal) |
|
419 |
returns itself as mainGroup (not its debuggee)." |
|
420 |
||
421 |
|g prev| |
|
422 |
||
423 |
g := self. |
|
424 |
[g notNil and:[g isModal and:[(prev := g previousGroup) notNil]]] whileTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
425 |
g := prev |
512 | 426 |
]. |
427 |
^ g |
|
428 |
||
429 |
"Modified: 3.9.1995 / 14:57:20 / claus" |
|
430 |
"Modified: 7.3.1996 / 14:29:28 / cg" |
|
431 |
! |
|
432 |
||
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
433 |
mainGroup:aWindowGroup |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
434 |
"set the main windowgroup (for modal/autonomous groups only) |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
435 |
Exposeevents for that windowGroup will be handled by this group |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
436 |
as well." |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
437 |
|
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
438 |
previousGroup := aWindowGroup |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
439 |
|
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
440 |
"Created: 20.8.1997 / 17:57:35 / cg" |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
441 |
! |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
442 |
|
512 | 443 |
previousGroup |
444 |
"return the windowgroup that started this group. (for modal groups only). |
|
445 |
This may be another modalGroup (for boxes opened by boxes). |
|
446 |
NonModal groups return nil." |
|
447 |
||
448 |
^ previousGroup |
|
449 |
||
450 |
"Modified: 7.3.1996 / 14:28:46 / cg" |
|
451 |
! |
|
452 |
||
453 |
process |
|
454 |
"return the windowGroups process" |
|
455 |
||
456 |
^ myProcess |
|
457 |
! |
|
458 |
||
459 |
sensor |
|
460 |
"return the windowGroups sensor. |
|
461 |
All events for any of the groups views is handled by that sensor." |
|
462 |
||
463 |
^ mySensor |
|
464 |
||
465 |
"Modified: 7.3.1996 / 14:30:21 / cg" |
|
466 |
! |
|
467 |
||
468 |
sensor:aSensor |
|
469 |
"set the windowGroups sensor" |
|
470 |
||
471 |
mySensor := aSensor |
|
472 |
! ! |
|
473 |
||
474 |
!WindowGroup methodsFor:'accessing-hook'! |
|
475 |
||
476 |
postEventHook |
|
477 |
"return the postEventHook if any" |
|
478 |
||
479 |
^ postEventHook |
|
480 |
||
481 |
"Created: 7.3.1996 / 14:42:46 / cg" |
|
482 |
! |
|
483 |
||
484 |
postEventHook:anObject |
|
485 |
"set the postEventHook - this one will get all events |
|
486 |
passed after being processed here (via #processEvent:)." |
|
487 |
||
488 |
postEventHook := anObject |
|
489 |
! |
|
490 |
||
491 |
preEventHook |
|
492 |
"return the preEventHook if any" |
|
493 |
||
494 |
^ preEventHook |
|
495 |
||
496 |
"Created: 7.3.1996 / 14:42:42 / cg" |
|
497 |
! |
|
498 |
||
499 |
preEventHook:anObject |
|
500 |
"set the preEventHook - this one will get all events |
|
501 |
passed before being processed here (via #processEvent:). |
|
502 |
If this returns true, the event is supposed to be already |
|
503 |
processed and ignored here. |
|
504 |
Otherwise, it is processed as usual." |
|
505 |
||
506 |
preEventHook := anObject |
|
507 |
! ! |
|
508 |
||
509 |
!WindowGroup methodsFor:'accessing-views'! |
|
510 |
||
244 | 511 |
addTopView:aView |
512 |
"add a topview to the group" |
|
26 | 513 |
|
244 | 514 |
topViews isNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
515 |
topViews := OrderedCollection new. |
244 | 516 |
]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
517 |
(topViews includesIdentical:aView) ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
518 |
topViews add:aView |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
519 |
] |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
520 |
|
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
521 |
"Modified: 6.3.1996 / 15:35:15 / cg" |
26 | 522 |
! |
523 |
||
11 | 524 |
addView:aView |
26 | 525 |
"add aView to the windowGroup" |
526 |
||
11 | 527 |
views isNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
528 |
views := OrderedCollection new. |
11 | 529 |
]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
530 |
(views includesIdentical:aView) ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
531 |
views add:aView |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
532 |
] |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
533 |
|
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
534 |
"Modified: 6.3.1996 / 15:35:41 / cg" |
11 | 535 |
! |
536 |
||
26 | 537 |
removeView:aView |
538 |
"remove aView from the windowGroup; |
|
539 |
if this was the last view in this group, |
|
81 | 540 |
also shut down the corresponding process |
541 |
(actually, only wake it up here - it will terminate itself |
|
542 |
when finding out that all views are gone)" |
|
11 | 543 |
|
263 | 544 |
|sema| |
545 |
||
11 | 546 |
views notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
547 |
views removeIdentical:aView ifAbsent:[]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
548 |
views isEmpty ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
549 |
views := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
550 |
] |
11 | 551 |
]. |
552 |
topViews notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
553 |
topViews removeIdentical:aView ifAbsent:[]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
554 |
topViews isEmpty ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
555 |
topViews := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
556 |
] |
11 | 557 |
]. |
54 | 558 |
" |
559 |
wakeup my process to look if last view has been |
|
262
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
560 |
removed (modalBoxes terminate their modalLoop if so) |
54 | 561 |
" |
262
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
562 |
mySensor notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
563 |
(sema := mySensor eventSemaphore) notNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
564 |
sema signal |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
565 |
] |
262
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
566 |
] |
1304 | 567 |
|
568 |
"Modified: 1.2.1997 / 12:13:26 / cg" |
|
11 | 569 |
! |
570 |
||
244 | 571 |
topViews |
572 |
"return the topviews accociated to this windowGroup" |
|
172 | 573 |
|
244 | 574 |
^ topViews |
172 | 575 |
! |
576 |
||
244 | 577 |
views |
578 |
"return the views accociated to this windowGroup" |
|
172 | 579 |
|
244 | 580 |
^ views |
54 | 581 |
! ! |
582 |
||
244 | 583 |
!WindowGroup methodsFor:'activation / deactivation'! |
584 |
||
585 |
closeDownViews |
|
586 |
"destroy all views associated to this window group" |
|
587 |
||
588 |
topViews notNil ifTrue:[ |
|
403 | 589 |
topViews do:[:aTopView | aTopView notNil ifTrue:[aTopView destroy]] |
244 | 590 |
]. |
591 |
views := nil. |
|
592 |
topViews := nil. |
|
593 |
mySensor := nil. |
|
594 |
! |
|
595 |
||
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
596 |
realizeTopViews |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
597 |
"realize all topViews associated to this windowGroup." |
244 | 598 |
|
599 |
topViews notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
600 |
topViews do:[:aView | |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
601 |
aView realize. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
602 |
]. |
244 | 603 |
]. |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
604 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
605 |
"Created: 24.7.1997 / 12:56:09 / cg" |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
606 |
! |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
607 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
608 |
rerealizeTopViews |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
609 |
"rerealize all topViews associated to this windowGroup. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
610 |
and tell topViews about it." |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
611 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
612 |
topViews notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
613 |
topViews do:[:aView | |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
614 |
aView isPopUpView |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
615 |
ifFalse: |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
616 |
[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
617 |
aView realize. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
618 |
aView restarted |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
619 |
]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
620 |
]. |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
621 |
]. |
244 | 622 |
! |
180 | 623 |
|
244 | 624 |
restart |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
625 |
"restart after a snapin. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
626 |
This reopens all views in this group." |
180 | 627 |
|
244 | 628 |
topViews notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
629 |
" |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
630 |
need a new semaphore, since obsolete processes |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
631 |
(from our previous live) may still sit on the current semaphore |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
632 |
" |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
633 |
mySensor eventSemaphore:(Semaphore new name:'WGroup eventSema'). |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
634 |
isModal ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
635 |
self startupWith:[self rerealizeTopViews]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
636 |
] |
244 | 637 |
] |
1273 | 638 |
|
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
639 |
"Modified: 24.7.1997 / 13:00:12 / cg" |
244 | 640 |
! |
180 | 641 |
|
582
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
642 |
shutDown |
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
643 |
"shutdown the window group; close all views and |
1317 | 644 |
terminate the process" |
244 | 645 |
|
646 |
|p| |
|
647 |
||
648 |
self closeDownViews. |
|
649 |
myProcess notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
650 |
p := myProcess. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
651 |
myProcess := nil. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
652 |
p terminate. |
244 | 653 |
] |
582
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
654 |
|
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
655 |
"Created: 22.4.1996 / 17:58:37 / cg" |
1317 | 656 |
"Modified: 8.2.1997 / 16:46:31 / cg" |
180 | 657 |
! |
658 |
||
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
659 |
startupModal:checkBlock |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
660 |
"startup the window-group in a modal loop |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
661 |
(i.e. under the currently running process); |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
662 |
checkBlock is evaluated and the modal loop is left, |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
663 |
whenever false is returned." |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
664 |
|
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
665 |
^ self startupModal:checkBlock forGroup:(WindowGroup activeGroup). |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
666 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
667 |
"Created: 10.12.1995 / 14:15:11 / cg" |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
668 |
"Modified: 20.8.1997 / 17:54:33 / cg" |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
669 |
! |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
670 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
671 |
startupModal:checkBlock forGroup:mainGroup |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
672 |
"startup the window-group in a modal loop |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
673 |
(i.e. under the currently running process); |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
674 |
checkBlock is evaluated and loop is left, when false is |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
675 |
returned. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
676 |
The mainGroup info is required to allow peeking into its |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
677 |
event queue in order for its expose/redraws to be handled." |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
678 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
679 |
"set previousGroup to the main (non-modal) group" |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
680 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
681 |
previousGroup := mainGroup. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
682 |
isModal := true. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
683 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
684 |
WindowGroupQuerySignal handle:[:ex | |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
685 |
ex proceedWith:self |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
686 |
] do:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
687 |
self realizeTopViews. |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
688 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
689 |
self |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
690 |
eventLoopWhile:checkBlock |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
691 |
onLeave:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
692 |
" |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
693 |
cleanup, in case of a terminate |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
694 |
" |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
695 |
previousGroup := nil. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
696 |
topViews := nil. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
697 |
views := nil. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
698 |
" |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
699 |
the following is rubbish; |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
700 |
the views could be reused .. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
701 |
" |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
702 |
|
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
703 |
"/ topViews notNil ifTrue:[ |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
704 |
"/ topViews do:[:aView | |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
705 |
"/ aView destroy |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
706 |
"/ ]. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
707 |
"/ topViews := nil. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
708 |
"/ ]. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
709 |
"/ views notNil ifTrue:[ |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
710 |
"/ views do:[:aView | |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
711 |
"/ aView destroy |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
712 |
"/ ]. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
713 |
"/ views := nil. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
714 |
"/ ]. |
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
715 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
716 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
717 |
] |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
718 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
719 |
"Created: 10.12.1995 / 14:14:26 / cg" |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
720 |
"Modified: 20.8.1997 / 18:12:20 / cg" |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
721 |
! |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
722 |
|
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
723 |
startupWith:startupAction |
244 | 724 |
"startup the window-group; |
1822
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
725 |
this creates a new window group process, which does the event processing. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
726 |
The startupAction arg is evaluated by the windowGroup process, |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
727 |
before the eventLoop is entered, and is used to realize any views. |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
728 |
[this is done to have the new process realize its views, instead of |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
729 |
the caller - which may make a difference in case of errors and/or |
38f24dca2eb2
changes to support #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1806
diff
changeset
|
730 |
blocking operations ...]" |
244 | 731 |
|
732 |
|top nm dev devNm| |
|
733 |
||
734 |
previousGroup := nil. |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
735 |
|
244 | 736 |
myProcess isNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
737 |
isModal := false. |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
738 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
739 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
740 |
"/ this is the windowGroup process; |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
741 |
"/ realize all views, then handle events forever |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
742 |
"/ (well, not really forever ... ;-) |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
743 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
744 |
myProcess := [ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
745 |
WindowGroupQuerySignal handle:[:ex | |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
746 |
ex proceedWith:self |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
747 |
] do:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
748 |
[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
749 |
startupAction value. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
750 |
self eventLoopWhile:[true] onLeave:[] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
751 |
] valueNowOrOnUnwindDo:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
752 |
self closeDownViews |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
753 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
754 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
755 |
] forkAt:(Processor userSchedulingPriority). |
180 | 756 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
757 |
(topViews size > 0) ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
758 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
759 |
"/ give the windowGroup process a user friendly name |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
760 |
"/ ask its topView for the processName, and |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
761 |
"/ optionally append the displayName (if its not the default) |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
762 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
763 |
top := topViews first. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
764 |
nm := top processName. |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
765 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
766 |
(dev := top graphicsDevice) notNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
767 |
devNm := dev displayName. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
768 |
(devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
769 |
nm := nm , ' (' , devNm , ')' |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
770 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
771 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
772 |
] ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
773 |
nm := 'window handler'. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
774 |
]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
775 |
myProcess name:nm. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
776 |
myProcess beGroupLeader. |
180 | 777 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
778 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
779 |
"/ when the process gets suspended, |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
780 |
"/ there maybe still buffered draw requests. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
781 |
"/ Arrange for them to be flushed then. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
782 |
"/ (otherwise, you would not see the output of a process, |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
783 |
"/ which suspends and waits - or we had to add buffer flushes |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
784 |
"/ all over the place) |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
785 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
786 |
myProcess addSuspendAction:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
787 |
|dev| |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
788 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
789 |
dev := self graphicsDevice. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
790 |
dev notNil ifTrue:[dev flush]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
791 |
]. |
244 | 792 |
] |
313 | 793 |
|
1965 | 794 |
"Modified: / 13.12.1995 / 14:04:53 / stefan" |
795 |
"Created: / 24.7.1997 / 12:52:04 / cg" |
|
796 |
"Modified: / 4.12.1997 / 14:13:35 / cg" |
|
180 | 797 |
! ! |
798 |
||
90 | 799 |
!WindowGroup methodsFor:'enumerating'! |
54 | 800 |
|
1117 | 801 |
allNonTopViewsDo:aBlock |
802 |
"evaluate aBlock for all nonTopviews (i.e. subviews) in this group. |
|
1334 | 803 |
This enumerates a copy of the view collection, to allow for |
1240 | 804 |
destroy and other collection changing operations to be performed in the loop." |
1117 | 805 |
|
806 |
views notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
807 |
views copy nonNilElementsDo:aBlock |
1117 | 808 |
] |
1334 | 809 |
|
810 |
"Modified: 12.2.1997 / 12:20:25 / cg" |
|
1117 | 811 |
! |
812 |
||
1153 | 813 |
allTopViewsDo:aBlock |
814 |
"evaluate aBlock for all topviews in this group. |
|
1334 | 815 |
This enumerates a copy of the view collection, to allow for |
1240 | 816 |
destroy and other collection changing operations to be performed in the loop." |
1153 | 817 |
|
818 |
topViews notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
819 |
topViews copy nonNilElementsDo:aBlock |
1153 | 820 |
] |
1334 | 821 |
|
822 |
"Modified: 12.2.1997 / 12:20:30 / cg" |
|
1153 | 823 |
! |
824 |
||
54 | 825 |
allTopViewsExcept:aView do:aBlock |
157 | 826 |
"evaluate aBlock for all topviews except aView in this group. |
1334 | 827 |
This enumerates a copy of the view collection, to allow for |
1240 | 828 |
destroy and other collection changing operations to be performed in the loop." |
157 | 829 |
|
1334 | 830 |
self allTopViewsDo:[:v | |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
831 |
v ~~ aView ifTrue:[aBlock value:v] |
157 | 832 |
]. |
1334 | 833 |
|
834 |
"Modified: 12.2.1997 / 12:22:10 / cg" |
|
157 | 835 |
! |
836 |
||
244 | 837 |
allViewsDo:aBlock |
838 |
"evaluate aBlock for all views & topviews in this group. |
|
1334 | 839 |
This enumerates a copy of the view collection, to allow for |
1240 | 840 |
destroy and other collection changing operations to be performed in the loop." |
244 | 841 |
|
1117 | 842 |
self allTopViewsDo:aBlock. |
843 |
self allNonTopViewsDo:aBlock. |
|
1334 | 844 |
|
845 |
"Modified: 12.2.1997 / 12:20:20 / cg" |
|
244 | 846 |
! |
847 |
||
848 |
partnersDo:aBlock |
|
849 |
"evaluate aBlock for all partnerViews. |
|
1334 | 850 |
This enumerates a copy of the view collection, to allow for |
1240 | 851 |
destroy and other collection changing operations to be performed in the loop." |
244 | 852 |
|
1334 | 853 |
self allTopViewsDo:[:v | |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
854 |
(v type == #partner) ifTrue:[aBlock value:v]. |
244 | 855 |
]. |
1334 | 856 |
|
857 |
"Modified: 12.2.1997 / 12:21:41 / cg" |
|
244 | 858 |
! |
859 |
||
157 | 860 |
slavesDo:aBlock |
861 |
"evaluate aBlock for all slaveViews. |
|
1334 | 862 |
This enumerates a copy of the view collection, to allow for |
1240 | 863 |
destroy and other collection changing operations to be performed in the loop." |
54 | 864 |
|
1334 | 865 |
self allTopViewsDo:[:v | |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
866 |
(v type == #slave) ifTrue:[aBlock value:v]. |
157 | 867 |
]. |
1334 | 868 |
|
869 |
"Modified: 12.2.1997 / 12:21:46 / cg" |
|
11 | 870 |
! ! |
871 |
||
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
872 |
!WindowGroup methodsFor:'event debugging'! |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
873 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
874 |
traceEvents:trueOrFalse |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
875 |
|hook| |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
876 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
877 |
trueOrFalse ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
878 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
879 |
"/ remove any eventHook on the receiver |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
880 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
881 |
self preEventHook:nil. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
882 |
"/ Transcript showCR:'removed eventHook'. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
883 |
] ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
884 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
885 |
"/ set an eventHook on its windowGroup |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
886 |
"/ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
887 |
hook := Plug new. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
888 |
hook respondTo:#processEvent: |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
889 |
with:[:ev | ev displayString printCR. false]. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
890 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
891 |
self preEventHook:hook. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
892 |
"/ Transcript showCR:'set eventHook for tracing'. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
893 |
] |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
894 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
895 |
"Created: 24.4.1996 / 10:25:21 / cg" |
698 | 896 |
"Modified: 20.5.1996 / 10:30:00 / cg" |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
897 |
! ! |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
898 |
|
19 | 899 |
!WindowGroup methodsFor:'event handling'! |
11 | 900 |
|
244 | 901 |
eventLoop |
902 |
"loop executed by windowGroup process; |
|
903 |
wait-for and process events forever" |
|
904 |
||
905 |
self eventLoopWhile:[true] onLeave:[] |
|
906 |
! |
|
907 |
||
908 |
eventLoopWhile:aBlock onLeave:cleanupActions |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
909 |
"wait-for and process events. |
244 | 910 |
Stay in this loop while there are still any views to dispatch for, |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
911 |
and aBlock evaluates to true. |
244 | 912 |
|
1752 | 913 |
Some signals are caught & handled: |
2046 | 914 |
LeaveSignal forces an exit from the eventLoop; |
915 |
AbortSignal brings us back into the loop, processing the next event; |
|
916 |
ActivityNotifications send a #showActivity: if nonModal, |
|
917 |
otherwise they are ignored." |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
918 |
|
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
919 |
|thisProcess sigs mainSema prevSema| |
244 | 920 |
|
921 |
thisProcess := Processor activeProcess. |
|
922 |
||
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
923 |
sigs := SignalSet |
2046 | 924 |
with:AbortSignal |
925 |
with:LeaveSignal |
|
926 |
with:(self class activityNotificationSignal). |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
927 |
|
244 | 928 |
[ |
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
929 |
|p g s mainGroup mySema waitSema groupForSema| |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
930 |
|
2046 | 931 |
waitSema := mySema := mySensor eventSemaphore. |
325
b24d9a1c74dc
stefans modalBox changes (no more polling)
Claus Gittinger <cg@exept.de>
parents:
324
diff
changeset
|
932 |
|
2046 | 933 |
isModal ifTrue:[ |
934 |
mainGroup := self mainGroup. |
|
935 |
mainGroup == self ifTrue:[ |
|
936 |
mainGroup := nil |
|
937 |
]. |
|
938 |
] ifFalse:[ |
|
939 |
mainGroup := previousGroup |
|
940 |
]. |
|
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
941 |
|
2046 | 942 |
mainGroup notNil ifTrue:[ |
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
943 |
mainSema := mainGroup sensor eventSemaphore. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
944 |
waitSema := SemaphoreSet with:mySema with:mainSema. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
945 |
|
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
946 |
"/ must also care for all other groups in between |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
947 |
"/ (in case its a modal dialog opened from a modal dialog) |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
948 |
|
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
949 |
g := previousGroup. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
950 |
g ~~ mainGroup ifTrue:[ |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
951 |
groupForSema := IdentityDictionary new. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
952 |
[g ~~ mainGroup] whileTrue:[ |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
953 |
s := g sensor eventSemaphore. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
954 |
waitSema add:s. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
955 |
groupForSema at:s put:g. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
956 |
g := g previousGroup. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
957 |
] |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
958 |
]. |
2046 | 959 |
]. |
244 | 960 |
|
2046 | 961 |
[aBlock value] whileTrue:[ |
962 |
LastActiveGroup := self. |
|
963 |
LastActiveProcess := thisProcess. |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
964 |
|
2046 | 965 |
(views isNil and:[topViews isNil]) ifTrue:[ |
966 |
myProcess notNil ifTrue:[ |
|
967 |
p := myProcess. |
|
968 |
myProcess := nil. |
|
969 |
p terminate. |
|
970 |
"not reached - there is no life after death" |
|
971 |
]. |
|
972 |
" |
|
973 |
this is the end of a modal loop |
|
974 |
(not having a private process ...) |
|
975 |
" |
|
976 |
^ self |
|
977 |
]. |
|
244 | 978 |
|
2046 | 979 |
sigs handle:[:ex | |
980 |
|theSig| |
|
244 | 981 |
|
2046 | 982 |
(theSig := ex signal) == AbortSignal ifTrue:[ |
983 |
"/ |
|
984 |
"/ on abort, stay in loop |
|
985 |
"/ |
|
986 |
ex return |
|
987 |
]. |
|
988 |
theSig == LeaveSignal ifTrue:[ |
|
989 |
"/ |
|
990 |
"/ on leave, exit the event loop |
|
991 |
"/ |
|
992 |
^ self |
|
993 |
]. |
|
323
619085d52522
be careful - device may be nil
Claus Gittinger <cg@exept.de>
parents:
319
diff
changeset
|
994 |
|
2046 | 995 |
"/ ActivityNotification |
996 |
"/ |
|
997 |
"/ if I am a modal-group, let it be handled |
|
998 |
"/ by the outer main-groups handler |
|
999 |
"/ otherwise show the activityMessage and continue. |
|
1000 |
"/ |
|
1001 |
isModal ifTrue:[ |
|
1002 |
ex reject |
|
1003 |
"never reached" |
|
1004 |
]. |
|
1005 |
self showActivity:(ex errorString). |
|
1006 |
ex proceed. |
|
1007 |
] do:[ |
|
1008 |
|dev gotSema mainView| |
|
429 | 1009 |
|
2046 | 1010 |
"/ Flush device output before going to sleep. |
1011 |
"/ This may produce more events to arrive. |
|
1012 |
"/ Q: is this still needed (see suspendAction) ? |
|
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
1013 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1014 |
"/ dev := self graphicsDevice. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1015 |
"/ dev notNil ifTrue:[dev flush]. |
328 | 1016 |
|
2046 | 1017 |
"/ now, wait for an event to arrive |
1018 |
thisProcess setStateTo:#eventWait if:#active. |
|
2116 | 1019 |
waitSema isNil ifTrue:[ |
1020 |
"/ oops - how can this happen .... |
|
1021 |
^ self. |
|
1022 |
]. |
|
2046 | 1023 |
gotSema := waitSema wait. |
1024 |
LastActiveGroup := self. |
|
1025 |
LastActiveProcess := thisProcess. |
|
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
1026 |
|
2046 | 1027 |
gotSema == mySema ifTrue:[ |
1028 |
"/ |
|
1029 |
"/ an event for me |
|
1030 |
"/ |
|
1031 |
self processEventsWithModalGroup:nil |
|
1032 |
] ifFalse:[ |
|
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1033 |
groupForSema notNil ifTrue:[ |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1034 |
g := groupForSema at:gotSema ifAbsent:nil. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1035 |
g := g ? mainGroup. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1036 |
] ifFalse:[ |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1037 |
g := mainGroup |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1038 |
]. |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1039 |
|
2046 | 1040 |
"/ |
1041 |
"/ an event for my mainGroup |
|
1042 |
"/ |
|
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1043 |
g topViews notNil ifTrue:[ |
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1044 |
mainView := g topViews first |
2046 | 1045 |
]. |
1046 |
mainView notNil ifTrue:[ |
|
1047 |
"/ |
|
1048 |
"/ if anything happened to the mainGroup |
|
1049 |
"/ bring my own topView back to the front |
|
1050 |
"/ This keeps modalBoxes visible |
|
1051 |
"/ |
|
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1052 |
(g sensor hasConfigureEventFor:mainView) ifTrue:[ |
2046 | 1053 |
topViews size > 0 ifTrue:[ |
1054 |
topViews first raiseDeiconified |
|
1055 |
] |
|
1056 |
] |
|
1057 |
]. |
|
1058 |
" |
|
1059 |
if modal, also check for redraw events in my maingroup |
|
1060 |
(we arrive here after we woke up on maingroup sensor eventSemaphore) |
|
1061 |
" |
|
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1062 |
g processEventsWithModalGroup:self. |
2046 | 1063 |
] |
1064 |
]. |
|
1065 |
]. |
|
244 | 1066 |
] valueNowOrOnUnwindDo:[ |
2046 | 1067 |
"/ |
1068 |
"/ perform any cleanupActions |
|
1069 |
"/ |
|
1070 |
cleanupActions notNil ifTrue:[cleanupActions value] |
|
244 | 1071 |
] |
313 | 1072 |
|
2116 | 1073 |
"Modified: / 14.12.1995 / 11:12:24 / stefan" |
2168
83571b3cde37
fixed modal group handling when started from another modal group
Claus Gittinger <cg@exept.de>
parents:
2154
diff
changeset
|
1074 |
"Modified: / 9.7.1998 / 00:58:39 / cg" |
244 | 1075 |
! |
1076 |
||
1077 |
leaveEventLoop |
|
1078 |
"immediately leave the event loop, returning way back. |
|
1079 |
This can be used to leave (and closedown) a modal group. |
|
1080 |
(for normal views, this does not make sense)" |
|
1081 |
||
1082 |
^ LeaveSignal raise |
|
1083 |
! |
|
1084 |
||
103 | 1085 |
processEvents |
1086 |
"process events from either the damage- or user input queues. |
|
1087 |
Abort is assumed to be handled elsewhere." |
|
19 | 1088 |
|
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1089 |
self processEventsWithModalGroup:nil |
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1090 |
|
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1091 |
"Modified: 5.3.1997 / 11:33:51 / cg" |
1328 | 1092 |
! |
1093 |
||
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1094 |
processEventsWithModalGroup:modalGroup |
1328 | 1095 |
"process events from either the damage- or user input queues. |
1868 | 1096 |
Abort is assumed to be handled elsewhere." |
1328 | 1097 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
1098 |
<resource: #keyboard (#Escape )> |
496 | 1099 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1100 |
|event ignore key focus firstTop evView evType evArgs |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1101 |
modalTops modalTop modalDelegate syntheticEvent| |
11 | 1102 |
|
72 | 1103 |
self processExposeEvents. |
180 | 1104 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1105 |
[(event := mySensor nextEvent) notNil] whileTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1106 |
ignore := false. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1107 |
focus := focusView. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1108 |
modalDelegate := false. |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1109 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1110 |
modalGroup notNil ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1111 |
"/ an incoming event for a masterView, |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1112 |
"/ while being blocked by some other modalView. |
1328 | 1113 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1114 |
modalTops := modalGroup topViews. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1115 |
modalTops size > 0 ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1116 |
modalTop := modalTops first. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1117 |
]. |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
1118 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1119 |
event isKeyEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1120 |
"/ forward keyboard events to my modal |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1121 |
"/ groups first topView ... |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1122 |
modalTop notNil ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1123 |
focus := modalTop. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1124 |
modalDelegate := true. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1125 |
] |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1126 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1127 |
event isFocusEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1128 |
event isFocusInEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1129 |
"/ focusIn is forwarded to the modalGroup |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1130 |
"/ (since keyboard is forwarded) |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1131 |
event view:modalTop. |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1132 |
focus := modalTop. |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1133 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1134 |
"/ focusOut goes to both the modal and |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1135 |
"/ the blocked main-group |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1136 |
"/ (actually, only the very first focusOut |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1137 |
"/ is needed in the mainGroup (to turn off the cursor) |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1138 |
"/ all others are only needed in the modalGroup) |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1139 |
"/ syntheticEvent := event copy. |
1876
6b5a5931a2b9
allow autonomous windowGroup processes to
Claus Gittinger <cg@exept.de>
parents:
1869
diff
changeset
|
1140 |
"/ syntheticEvent view:modalTop. |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1141 |
"/ LastEventQuerySignal handle:[:ex | |
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1142 |
"/ ex proceedWith:syntheticEvent |
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1143 |
"/ ] do:[ |
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1144 |
"/ syntheticEvent sendEventWithFocusOn:nil. |
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1145 |
"/ ]. |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1146 |
event view:modalTop. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1147 |
]. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1148 |
modalDelegate := true. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1149 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1150 |
event isPointerLeaveEvent ifTrue:[ |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1151 |
] ifFalse:[ |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1152 |
event isUserEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1153 |
ignore := true |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1154 |
] |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1155 |
] |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1156 |
] |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1157 |
] |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1158 |
]. |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1159 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1160 |
ignore ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1161 |
(views notNil or:[topViews notNil]) ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1162 |
LastEventQuerySignal handle:[:ex | |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1163 |
ex proceedWith:event |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1164 |
] do:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1165 |
(preEventHook notNil |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1166 |
and:[preEventHook processEvent:event]) ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1167 |
ignore := true. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1168 |
]. |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1169 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1170 |
ignore ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1171 |
evView := event view. |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1172 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1173 |
event isKeyPressEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1174 |
key := event key. |
1110 | 1175 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1176 |
key == #Escape ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1177 |
modalDelegate ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1178 |
modalTop hideRequest |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1179 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1180 |
isModal ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1181 |
topViews first hideRequest |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1182 |
] |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1183 |
] |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1184 |
] |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1185 |
] ifFalse:[ |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1186 |
"/ |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1187 |
"/ keep track of which view has the pointer |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1188 |
"/ |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1189 |
event isPointerEnterEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1190 |
pointerView := evView |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1191 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1192 |
event isPointerLeaveEvent ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1193 |
pointerView := nil |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1194 |
] |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1195 |
] |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1196 |
]. |
1419
a40a4f3ad589
while blocked by a modal view, forward key events to
Claus Gittinger <cg@exept.de>
parents:
1411
diff
changeset
|
1197 |
|
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1198 |
"/ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1199 |
"/ buttonPress events turn off explicit focus, and revert |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1200 |
"/ to implicit focus control |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1201 |
"/ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1202 |
(focusView notNil |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1203 |
and:[event isButtonPressEvent]) ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1204 |
self focusView:nil |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1205 |
]. |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1206 |
|
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1207 |
LastActiveGroup := self. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1208 |
LastActiveProcess := Processor activeProcess. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1209 |
|
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1210 |
" |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1211 |
if there is no view information in the event, |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1212 |
it must have been sent directly to the sensor. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1213 |
Send it to the first topView. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1214 |
" |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1215 |
evType := event type. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1216 |
evArgs := event arguments. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1217 |
|
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1218 |
evView isNil ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1219 |
(firstTop := topViews first) notNil ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1220 |
firstTop perform:evType withArguments:evArgs |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1221 |
] |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1222 |
] ifFalse:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1223 |
evView |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1224 |
dispatchEvent:evType |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1225 |
arguments:evArgs |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1226 |
withFocusOn:focus |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1227 |
delegate:true |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1228 |
] |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1229 |
]. |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1230 |
|
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1231 |
postEventHook notNil ifTrue:[ |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1232 |
postEventHook processEvent:event |
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1233 |
]. |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1234 |
] |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1235 |
] |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1236 |
]. |
72 | 1237 |
] |
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1238 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1239 |
"Created: / 5.3.1997 / 11:33:11 / cg" |
2172
6dccf11733fd
avoid a send in #processEventsWithModalGroup:
Claus Gittinger <cg@exept.de>
parents:
2170
diff
changeset
|
1240 |
"Modified: / 14.7.1998 / 20:59:40 / cg" |
48 | 1241 |
! |
1242 |
||
1243 |
processExposeEvents |
|
103 | 1244 |
"process only expose events from the damage queue" |
48 | 1245 |
|
180 | 1246 |
|event view rect x y w h sensor thisProcess| |
109 | 1247 |
|
1248 |
(sensor := mySensor) isNil ifTrue:[^ self]. |
|
2154 | 1249 |
(sensor damageCount ~~ 0) ifTrue:[ |
1250 |
thisProcess := Processor activeProcess. |
|
180 | 1251 |
|
2154 | 1252 |
[(event := sensor nextDamage) notNil] whileTrue:[ |
1253 |
LastActiveGroup := self. |
|
1254 |
LastActiveProcess := thisProcess. |
|
180 | 1255 |
|
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1256 |
(views notNil or:[topViews notNil]) ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1257 |
LastEventQuerySignal handle:[:ex | |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1258 |
ex proceedWith:event |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1259 |
] do:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1260 |
(preEventHook notNil |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1261 |
and:[preEventHook processEvent:event]) ifFalse:[ |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1262 |
view := event view. |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1263 |
|
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1264 |
event isDamage ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1265 |
"/ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1266 |
"/ if the view is no longer shown (iconified or closed), |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1267 |
"/ this is a leftover event and ignored. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1268 |
"/ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1269 |
view shown ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1270 |
LastActiveGroup := self. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1271 |
LastActiveProcess := thisProcess. |
1868 | 1272 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1273 |
view |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1274 |
dispatchEvent:(event type) |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1275 |
arguments:(event arguments) |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1276 |
withFocusOn:nil |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1277 |
delegate:true |
1868 | 1278 |
|
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1279 |
"/ ] ifFalse:[ |
1851
6a6225647696
fixes for expose-event-lost after re-map
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
1280 |
"/ ('WGROUP: damage for ' , view displayString , ' ignored') infoPrintCR. |
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1281 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1282 |
] ifFalse:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1283 |
" |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1284 |
mhmh - could we possibly arrive here ? |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1285 |
" |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1286 |
LastActiveGroup := self. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1287 |
LastActiveProcess := thisProcess. |
2126
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1288 |
"/ event sendEventWithFocusOn:nil. |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1289 |
view |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1290 |
dispatchEvent:(event type) |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1291 |
arguments:(event arguments) |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1292 |
withFocusOn:nil |
1f108c76dfdb
moved event dispatching code to view (where it belongs)
Claus Gittinger <cg@exept.de>
parents:
2116
diff
changeset
|
1293 |
delegate:true |
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1294 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1295 |
]. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1296 |
postEventHook notNil ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1297 |
postEventHook processEvent:event |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1298 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1299 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1300 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1301 |
] |
90 | 1302 |
] |
1157 | 1303 |
|
2154 | 1304 |
"Modified: / 17.6.1998 / 09:09:48 / cg" |
11 | 1305 |
! |
1306 |
||
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1307 |
processRealExposeEvents |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1308 |
"process only expose events from the damage queue |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1309 |
(for any of my views). |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1310 |
This is required after a scroll operation, |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1311 |
to wait for either a noExpose or a real expose." |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1312 |
|
2093 | 1313 |
self processRealExposeEventsFor:nil |
1314 |
! |
|
1315 |
||
1316 |
processRealExposeEventsFor:someViewOrNil |
|
1317 |
"process only expose events from the damage queue |
|
1318 |
(for any of my views if the arg is nil). |
|
1319 |
This is required after a scroll operation, |
|
1320 |
to wait for either a noExpose or a real expose." |
|
1321 |
||
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1322 |
|event view rect x y w h sensor thisProcess| |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1323 |
|
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1324 |
(sensor := mySensor) isNil ifTrue:[^ self]. |
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1325 |
sensor damageCount == 0 ifTrue:[^ self]. |
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1326 |
|
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1327 |
thisProcess := Processor activeProcess. |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1328 |
|
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1329 |
[true] whileTrue:[ |
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1330 |
LastActiveGroup := self. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1331 |
LastActiveProcess := thisProcess. |
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1332 |
|
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1333 |
"/ event := aView nextDamage. |
2093 | 1334 |
event := sensor nextExposeEventFor:someViewOrNil. |
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1335 |
event isNil ifTrue:[^ self]. |
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1336 |
|
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1337 |
(views notNil or:[topViews notNil]) ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1338 |
LastEventQuerySignal handle:[:ex | |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1339 |
ex proceedWith:event |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1340 |
] do:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1341 |
(preEventHook notNil |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1342 |
and:[preEventHook processEvent:event]) ifFalse:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1343 |
view := event view. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1344 |
"/ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1345 |
"/ if the view is no longer shown (iconified or closed), |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1346 |
"/ this is a leftover event and ignored. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1347 |
"/ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1348 |
view shown ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1349 |
rect := event rectangle. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1350 |
x := rect left. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1351 |
y := rect top. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1352 |
w := rect width. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1353 |
h := rect height. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1354 |
LastActiveGroup := self. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1355 |
LastActiveProcess := thisProcess. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1356 |
view transformation notNil ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1357 |
view deviceExposeX:x y:y width:w height:h |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1358 |
] ifFalse:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1359 |
view exposeX:x y:y width:w height:h |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1360 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1361 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1362 |
]. |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1363 |
postEventHook notNil ifTrue:[ |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1364 |
postEventHook processEvent:event |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1365 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1366 |
] |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1367 |
] |
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1368 |
] |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1369 |
|
2086
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1370 |
"Created: / 2.7.1997 / 14:32:19 / cg" |
069a179b1849
dont yield when asking for pending events.
Claus Gittinger <cg@exept.de>
parents:
2051
diff
changeset
|
1371 |
"Modified: / 5.4.1998 / 11:35:43 / cg" |
1806
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1372 |
! |
16c958be35d8
fixed no-deviceID error with destroy arriving while waiting for
Claus Gittinger <cg@exept.de>
parents:
1752
diff
changeset
|
1373 |
|
28 | 1374 |
waitForExposeFor:aView |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1375 |
"wait for a noExpose event for aView, then process all exposes. |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1376 |
To be used after a scroll. |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1377 |
This is very Xspecific and not needed with other systems |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1378 |
(i.e. a synthetic noExpose may be generated there)." |
28 | 1379 |
|
1380 |
mySensor waitForExposeFor:aView. |
|
90 | 1381 |
AbortSignal catch:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1382 |
self processRealExposeEventsFor:aView |
90 | 1383 |
] |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1384 |
|
1851
6a6225647696
fixes for expose-event-lost after re-map
Claus Gittinger <cg@exept.de>
parents:
1822
diff
changeset
|
1385 |
"Modified: 6.8.1997 / 19:50:24 / cg" |
11 | 1386 |
! ! |
19 | 1387 |
|
90 | 1388 |
!WindowGroup methodsFor:'focus control'! |
1389 |
||
244 | 1390 |
focusNext |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1391 |
"give focus to the next view in the focusSequence. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1392 |
Skip invisible views." |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1393 |
|
1946 | 1394 |
|index "{ Class: SmallInteger }" |
1395 |
lastIndex "{ Class: SmallInteger }" |
|
1396 |
index0 next sequence| |
|
244 | 1397 |
|
1946 | 1398 |
sequence := self focusSequence. |
1399 |
(lastIndex := sequence size) == 0 ifTrue:[^ self]. |
|
244 | 1400 |
|
1401 |
focusView notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1402 |
index := index0 := (sequence identityIndexOf:focusView). |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1403 |
] ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1404 |
index := 0. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1405 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1406 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1407 |
[next isNil] whileTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1408 |
index := index + 1. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1409 |
index > lastIndex ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1410 |
index := 1. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1411 |
index0 isNil ifTrue:[^ self]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1412 |
]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1413 |
index == index0 ifTrue:[^ self]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1414 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1415 |
next := (sequence at:index). |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1416 |
next realized not ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1417 |
next := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1418 |
] ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1419 |
next enabled ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1420 |
next := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1421 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1422 |
] |
244 | 1423 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1424 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1425 |
self focusView:next |
244 | 1426 |
|
1427 |
" |
|
1428 |
|top v1 v2| |
|
1429 |
||
1430 |
top := StandardSystemView new. |
|
1431 |
v1 := EditTextView origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
1432 |
v2 := EditTextView origin:0.0@0.5 corner:1.0@1.0 in:top. |
|
1433 |
top open. |
|
1434 |
top windowGroup focusSequence:(Array with:v1 with:v2). |
|
1435 |
top windowGroup focusOn:v1. |
|
1436 |
(Delay forSeconds:10) wait. |
|
1437 |
top windowGroup focusNext. |
|
1438 |
" |
|
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1439 |
|
1946 | 1440 |
"Modified: / 31.10.1997 / 19:22:34 / cg" |
244 | 1441 |
! |
1442 |
||
1443 |
focusPrevious |
|
1444 |
"give focus to previous view in focusSequence" |
|
1445 |
||
1946 | 1446 |
|index "{ Class: SmallInteger }" |
1447 |
lastIndex "{ Class: SmallInteger }" |
|
1448 |
prev index0 sequence| |
|
244 | 1449 |
|
1946 | 1450 |
sequence := self focusSequence. |
1451 |
(lastIndex := sequence size) == 0 ifTrue:[^ self]. |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1452 |
|
244 | 1453 |
focusView notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1454 |
index := index0 := (sequence identityIndexOf:focusView). |
244 | 1455 |
] ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1456 |
index := lastIndex + 1. |
244 | 1457 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1458 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1459 |
[prev isNil] whileTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1460 |
index := index - 1. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1461 |
index < 1 ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1462 |
index := lastIndex. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1463 |
index0 isNil ifTrue:[^ self]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1464 |
]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1465 |
index == index0 ifTrue:[^ self]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1466 |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1467 |
prev := (sequence at:index). |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1468 |
prev realized not ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1469 |
prev := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1470 |
] ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1471 |
prev enabled ifFalse:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1472 |
prev := nil |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1473 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1474 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1475 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1476 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1477 |
self focusView:prev |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1478 |
|
1946 | 1479 |
"Modified: / 31.10.1997 / 19:21:50 / cg" |
244 | 1480 |
! |
1481 |
||
135 | 1482 |
focusSequence |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1483 |
"return my focus sequence for focusNext/focusPrevious. |
135 | 1484 |
Focus is stepped in the order in which subviews occur in |
1485 |
the sequence" |
|
1486 |
||
1946 | 1487 |
|sequence| |
1488 |
||
1489 |
"/ a fix focusSequence ... |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1490 |
focusSequence notNil ifTrue:[^ focusSequence]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1491 |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1492 |
topViews do:[:top | |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1493 |
sequence := top focusSequence. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1494 |
sequence notNil ifTrue:[^ sequence]. |
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1495 |
]. |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1496 |
|
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1497 |
^ nil |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1498 |
|
1946 | 1499 |
"Modified: / 31.10.1997 / 20:37:54 / cg" |
135 | 1500 |
! |
1501 |
||
90 | 1502 |
focusSequence:aSequenceableCollection |
1503 |
"define the focus sequence for focusNext/focusPrevious. |
|
1504 |
Focus is stepped in the order in which subviews occur in |
|
1946 | 1505 |
the sequence." |
90 | 1506 |
|
1507 |
focusSequence := aSequenceableCollection |
|
1946 | 1508 |
|
1509 |
"Modified: / 31.10.1997 / 20:40:04 / cg" |
|
90 | 1510 |
! |
1511 |
||
1512 |
focusView |
|
135 | 1513 |
"return the view which currently has the focus" |
90 | 1514 |
|
1515 |
^ focusView |
|
1516 |
! |
|
1517 |
||
1518 |
focusView:aViewOrNil |
|
1519 |
"give focus to aViewOrNil" |
|
1520 |
||
410
9d9d03fa5d82
moved Tab handling to topView (which sends #focusNext if no subview handled it)
Claus Gittinger <cg@exept.de>
parents:
408
diff
changeset
|
1521 |
focusView == aViewOrNil ifTrue:[^ self]. |
9d9d03fa5d82
moved Tab handling to topView (which sends #focusNext if no subview handled it)
Claus Gittinger <cg@exept.de>
parents:
408
diff
changeset
|
1522 |
|
90 | 1523 |
focusView notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1524 |
"/ lost explicit focus |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1525 |
focusView == aViewOrNil ifTrue:[^ self]. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1526 |
focusView showNoFocus:true. |
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1527 |
] ifFalse:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1528 |
pointerView notNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1529 |
pointerView ~~ aViewOrNil ifTrue:[ |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1530 |
"/ lost implicit focus |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1531 |
pointerView showNoFocus:false |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1532 |
] |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1533 |
]. |
90 | 1534 |
]. |
387
aa80487842b8
compile event classes with optSpace;
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1535 |
|
90 | 1536 |
focusView := aViewOrNil. |
1537 |
focusView notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1538 |
"/ got explicit focus |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1539 |
focusView showFocus:true. |
90 | 1540 |
]. |
1541 |
||
1542 |
" |
|
1543 |
|top v1 v2| |
|
1544 |
||
1545 |
top := StandardSystemView new. |
|
1546 |
v1 := EditTextView origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
1547 |
v2 := EditTextView origin:0.0@0.5 corner:1.0@1.0 in:top. |
|
1548 |
top open. |
|
1549 |
top windowGroup focusView:v1. |
|
1550 |
" |
|
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1551 |
|
777
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1552 |
"Modified: 31.5.1996 / 21:13:25 / cg" |
244 | 1553 |
! ! |
1554 |
||
1555 |
!WindowGroup methodsFor:'initialization'! |
|
1556 |
||
1557 |
initialize |
|
1558 |
"setup the windowgroup, by creating a new sensor |
|
1559 |
and an event semaphore" |
|
1560 |
||
1561 |
mySensor := WindowSensor new. |
|
1273 | 1562 |
mySensor eventSemaphore:(Semaphore new name:'WGroup eventSema'). |
244 | 1563 |
isModal := false. |
417 | 1564 |
isForModalSubview := false. |
1273 | 1565 |
|
1566 |
"Modified: 25.1.1997 / 00:20:19 / cg" |
|
90 | 1567 |
! |
1568 |
||
244 | 1569 |
reinitialize |
1570 |
"reinitialize the windowgroup after an image restart" |
|
90 | 1571 |
|
244 | 1572 |
"throw away old (zombie) process" |
1573 |
myProcess notNil ifTrue:[ |
|
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1574 |
"/ careful: the old processes exit-actions must be cleared. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1575 |
"/ otherwise, it might do destroy or other actions when it |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1576 |
"/ gets finalized ... |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1577 |
|
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1578 |
"/ myProcess removeAllExitActions. |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1579 |
myProcess removeAllSuspendActions. |
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1580 |
myProcess := nil. |
244 | 1581 |
]. |
90 | 1582 |
|
244 | 1583 |
"throw away old events" |
1584 |
mySensor reinitialize |
|
313 | 1585 |
|
1586 |
"Modified: 13.12.1995 / 13:45:35 / stefan" |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1587 |
"Modified: 12.1.1997 / 00:45:01 / cg" |
90 | 1588 |
! ! |
1589 |
||
19 | 1590 |
!WindowGroup methodsFor:'printing'! |
1591 |
||
90 | 1592 |
printOn:aStream |
19 | 1593 |
"return a printed representation; |
144 | 1594 |
just for more user friendlyness: add name of process." |
19 | 1595 |
|
90 | 1596 |
myProcess isNil ifTrue:[ |
1597 |
(previousGroup notNil and:[previousGroup process notNil]) ifTrue:[ |
|
1598 |
aStream nextPutAll:('WindowGroup(modal in ' , previousGroup process nameOrId , ')'). |
|
1599 |
^ self. |
|
1600 |
]. |
|
1601 |
^ super printOn:aStream |
|
1602 |
]. |
|
1603 |
aStream nextPutAll:('WindowGroup(' , myProcess nameOrId , ')') |
|
19 | 1604 |
! ! |
244 | 1605 |
|
1606 |
!WindowGroup methodsFor:'special'! |
|
1607 |
||
1608 |
restoreCursors |
|
1609 |
"restore the original cursors in all of my views" |
|
1610 |
||
330
13a3fa93330c
careful - view could have been destroyed in the meanwhile (in restoreCursors)
Claus Gittinger <cg@exept.de>
parents:
329
diff
changeset
|
1611 |
self allViewsDo:[:aView | |
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1612 |
|c dev id cid| |
244 | 1613 |
|
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1614 |
dev := aView graphicsDevice. |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1615 |
dev notNil ifTrue:[ |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1616 |
(id := aView id) notNil ifTrue:[ |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1617 |
c := aView cursor onDevice:dev. |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1618 |
(cid := c id) notNil ifTrue:[ |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1619 |
dev setCursor:cid in:id. |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1620 |
] |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1621 |
] |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1622 |
] |
244 | 1623 |
]. |
743 | 1624 |
|
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1625 |
"Modified: / 22.4.1998 / 14:28:22 / cg" |
244 | 1626 |
! |
1627 |
||
328 | 1628 |
showActivity:someMessage |
597 | 1629 |
"some activityNotification shalt be communicated to |
1630 |
the user; |
|
1631 |
forward it to my first topView if there is one |
|
1632 |
(that one should know how to deal with it)" |
|
1633 |
||
328 | 1634 |
topViews notNil ifTrue:[ |
1977
9bda3ac0d83d
no need for #flush in event-loop (already done by threads suspendAction)
Claus Gittinger <cg@exept.de>
parents:
1966
diff
changeset
|
1635 |
topViews first showActivity:someMessage |
328 | 1636 |
] |
1637 |
||
1638 |
"Created: 16.12.1995 / 18:39:40 / cg" |
|
597 | 1639 |
"Modified: 23.4.1996 / 21:36:54 / cg" |
328 | 1640 |
! |
1641 |
||
244 | 1642 |
showCursor:aCursor |
1643 |
"change the cursor to aCursor in all of my views." |
|
1644 |
||
2051
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1645 |
|c cId vId dev| |
244 | 1646 |
|
1647 |
c := aCursor. |
|
1648 |
self allViewsDo:[:aView | |
|
2051
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1649 |
dev := aView graphicsDevice. |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1650 |
dev notNil ifTrue:[ |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1651 |
c := c onDevice:dev. |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1652 |
(cId := c id) notNil ifTrue:[ |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1653 |
(vId := aView id) notNil ifTrue:[ |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1654 |
dev setCursor:cId in:vId. |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1655 |
] |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1656 |
] |
323362098e21
care for view being still physically present, when setting cursor back
Claus Gittinger <cg@exept.de>
parents:
2046
diff
changeset
|
1657 |
] |
244 | 1658 |
]. |
743 | 1659 |
|
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1660 |
"Modified: / 22.4.1998 / 14:26:45 / cg" |
244 | 1661 |
! |
1662 |
||
1663 |
withCursor:aCursor do:aBlock |
|
1664 |
"evaluate aBlock while showing aCursor in all |
|
1665 |
my views (used to show wait-cursor while doing something). |
|
1666 |
Return the result as returned by aBlock." |
|
1667 |
||
1986 | 1668 |
|oldCursors dev deviceCursor action| |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1669 |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1670 |
dev := self graphicsDevice. |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1671 |
dev isNil ifTrue:[ |
1986 | 1672 |
^ aBlock value |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1673 |
]. |
244 | 1674 |
|
1652 | 1675 |
deviceCursor := aCursor onDevice:dev. |
1676 |
||
244 | 1677 |
" |
1678 |
get mapping of view->cursor for all of my subviews |
|
1679 |
" |
|
1680 |
oldCursors := IdentityDictionary new. |
|
1681 |
self allViewsDo:[:aView | |
|
1986 | 1682 |
|old| |
1387
3fabdef0790d
better behavior if called recursively
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
1683 |
|
1986 | 1684 |
old := aView cursor. |
1685 |
old ~~ aCursor ifTrue:[ |
|
1686 |
oldCursors at:aView put:old. |
|
1687 |
aView cursor:deviceCursor now:false |
|
1688 |
] |
|
244 | 1689 |
]. |
1387
3fabdef0790d
better behavior if called recursively
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
1690 |
|
3fabdef0790d
better behavior if called recursively
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
1691 |
oldCursors size == 0 ifTrue:[ |
1986 | 1692 |
action := aBlock |
1693 |
] ifFalse:[ |
|
1694 |
action := [ |
|
1695 |
|rslt| |
|
1696 |
||
1697 |
"/ |
|
1698 |
"/ here sync looks better; flush leads to almost invisible cursors when accepting. |
|
1699 |
"/ I dont really know why (maybe unix does not context-switch to the Xserver |
|
1700 |
"/ early enough after the requests have been sent ?) |
|
1701 |
"/ |
|
1702 |
dev sync. |
|
1703 |
||
1704 |
rslt := aBlock valueNowOrOnUnwindDo:[ |
|
1705 |
" |
|
1706 |
restore cursors from the mapping |
|
1707 |
" |
|
1708 |
oldCursors keysAndValuesDo:[:view :cursor | |
|
1709 |
view cursor:cursor now:false. |
|
1710 |
]. |
|
1711 |
dev flush |
|
1712 |
]. |
|
1713 |
rslt |
|
1714 |
] |
|
1387
3fabdef0790d
better behavior if called recursively
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
1715 |
]. |
3fabdef0790d
better behavior if called recursively
Claus Gittinger <cg@exept.de>
parents:
1364
diff
changeset
|
1716 |
|
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1717 |
"/ (self isModal and:[previousGroup notNil]) ifTrue:[ |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1718 |
"/ "/ pass the work to my parentGroup |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1719 |
"/ ^ previousGroup withCursor:aCursor do:action |
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1720 |
"/ ]. |
1986 | 1721 |
^ action value. |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1722 |
|
2097
d290e7910bec
dont change cursors of mainGroup
Claus Gittinger <cg@exept.de>
parents:
2093
diff
changeset
|
1723 |
"Modified: / 22.4.1998 / 14:36:47 / cg" |
408 | 1724 |
! |
1725 |
||
2213
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1726 |
withExecuteCursorDo:aBlock |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1727 |
"evaluate aBlock while showing a busyCursor in all |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1728 |
my views (used to show busy-cursor while doing something time consuming). |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1729 |
Return the result as returned by aBlock." |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1730 |
|
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1731 |
^ self withCursor:(Cursor execute) do:aBlock |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1732 |
|
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1733 |
"Created: / 31.7.1998 / 20:11:52 / cg" |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1734 |
! |
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1735 |
|
408 | 1736 |
withWaitCursorDo:aBlock |
1737 |
"evaluate aBlock while showing a waitCursor in all |
|
1738 |
my views (used to show wait-cursor while doing something time consuming). |
|
1739 |
Return the result as returned by aBlock." |
|
1740 |
||
1741 |
^ self withCursor:(Cursor wait) do:aBlock |
|
1742 |
||
1743 |
"Created: 6.2.1996 / 19:51:53 / cg" |
|
244 | 1744 |
! ! |
1745 |
||
1746 |
!WindowGroup methodsFor:'special accessing'! |
|
1747 |
||
429 | 1748 |
isForModalSubview |
1749 |
"special for windowgroups for modal subviews. |
|
1750 |
These must be flagged specially to avoid the views being reassigned |
|
1751 |
to the maingroup. |
|
1752 |
This is a private interface to the SimpleView class" |
|
1753 |
||
1754 |
^ isForModalSubview |
|
1755 |
! |
|
1756 |
||
1757 |
isForModalSubview:aBoolean |
|
1758 |
"special for windowgroups for modal subviews. |
|
1759 |
These must be flagged specially to avoid the views being reassigned |
|
1760 |
to the maingroup. |
|
1761 |
This is a private interface to the SimpleView class" |
|
1762 |
||
1763 |
isForModalSubview := aBoolean |
|
1764 |
! |
|
1765 |
||
244 | 1766 |
setModal:aBoolean |
1767 |
"special entry for debugger: set the modal flag. |
|
1768 |
Not for public use" |
|
1769 |
||
1770 |
isModal := aBoolean |
|
1771 |
||
1772 |
"Modified: 3.9.1995 / 14:51:04 / claus" |
|
1773 |
! |
|
1774 |
||
1775 |
setPreviousGroup:aGroup |
|
1776 |
"special entry for debugger: |
|
1777 |
set the windowgroup that started this group (for modal groups only). |
|
1778 |
This is not a public interface." |
|
1779 |
||
1780 |
previousGroup := aGroup |
|
1781 |
||
1782 |
"Modified: 3.9.1995 / 14:55:40 / claus" |
|
1783 |
! |
|
1784 |
||
1785 |
setProcess:aProcess |
|
1786 |
"special entry for debugger: set the windowGroups process. |
|
1787 |
Not for public use." |
|
1788 |
||
1789 |
myProcess := aProcess |
|
1790 |
||
1791 |
"Modified: 3.9.1995 / 14:25:38 / claus" |
|
1792 |
! ! |
|
1793 |
||
1110 | 1794 |
!WindowGroup class methodsFor:'documentation'! |
251 | 1795 |
|
1796 |
version |
|
2213
84035dc560e0
added #withExecuteCursorDo: (for completeness)
Claus Gittinger <cg@exept.de>
parents:
2172
diff
changeset
|
1797 |
^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.140 1998-07-31 18:13:08 cg Exp $' |
251 | 1798 |
! ! |
244 | 1799 |
WindowGroup initialize! |