author | Claus Gittinger <cg@exept.de> |
Wed, 29 Jan 1997 19:46:57 +0100 | |
changeset 1298 | d070db2e4530 |
parent 1273 | 158d030a5553 |
child 1304 | d914bfc99b49 |
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 |
144 | 48 |
event queue (therefore views all share the same input event queue). |
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 |
|
512 | 85 |
(for example, the FileBrowsers kill-Button is created that |
86 |
way, to allow a kill of an executing unix command, while the browser |
|
87 |
itself reads the pipeStream for incoming text. |
|
88 |
Even if the fileBrowser is busy reading the pipe, the killButton is still |
|
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: |
512 | 117 |
You dont have to care for details in the normal case, a windowgroup is |
118 |
created for you automatically, when a view is opened. |
|
119 |
All of the internals are not required to be known for most applications. |
|
297 | 120 |
|
103 | 121 |
|
597 | 122 |
[instance variables:] |
144 | 123 |
|
512 | 124 |
views collection of views of this group |
103 | 125 |
|
512 | 126 |
topViews collection of topviews of this group |
103 | 127 |
|
512 | 128 |
myProcess the process executing the events |
103 | 129 |
|
512 | 130 |
mySensor my input sensor |
103 | 131 |
|
512 | 132 |
isModal true if this is for a modal box |
103 | 133 |
|
512 | 134 |
previousGroup if modal, the group that started this one |
103 | 135 |
|
512 | 136 |
focusView the one that has the focus (or nil) |
103 | 137 |
|
512 | 138 |
focusSequence defines the focus sequence |
103 | 139 |
|
140 |
||
597 | 141 |
[class variables:] |
512 | 142 |
LeaveSignal if raised, a modal box leaves (closes) |
103 | 143 |
|
1111 | 144 |
WindowGroupQuerySignal to ask for the current windowGroup, |
145 |
anywhere in the program, simply raise this |
|
146 |
signal. The raise returns nil, for processes, |
|
147 |
which are not under control of a windowGroup. |
|
148 |
(i.e. wg := WindowGroup windowGroupQuerySignal raise) |
|
149 |
||
150 |
LastEventQuerySignal to ask for the event which was responsible |
|
151 |
for being where you are (whereever that is). |
|
152 |
The raise returns nil, if you did not arrive |
|
153 |
there due to an event. |
|
154 |
(i.e. ev := WindowGroup lastEventQuerySignal raise) |
|
155 |
The event can be asked for the view, the type |
|
156 |
of event, x/y position etc. |
|
103 | 157 |
|
144 | 158 |
(*) |
512 | 159 |
due to historic reasons, many views have the controller functionality |
160 |
integrated, and handle events themself. The windowSensor takes care |
|
161 |
of this, by checking if a view has a controller, and, if so, forwarding |
|
162 |
the events to it. Otherwise, events are sent directly to the view. |
|
144 | 163 |
|
512 | 164 |
In the future, all views will be rewritten to actually use a controller. |
165 |
Currently (being in the middle of this migration), only some views |
|
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:] |
172 |
Claus Gittinger |
|
173 |
||
597 | 174 |
[see also:] |
1111 | 175 |
WindowSensor WindowEvent EventListener KeyboardForwarder |
598 | 176 |
DeviceWorkstation |
597 | 177 |
View StandardSystemView |
178 |
ApplicationModel |
|
651 | 179 |
Process ProcessorScheduler |
1153 | 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:[ |
|
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
188 |
LeaveSignal := (Signal new) mayProceed:true. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
189 |
LeaveSignal nameClass:self message:#leaveSignal. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
190 |
LeaveSignal notifierString:'unhandled leave signal'. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
191 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
192 |
WindowGroupQuerySignal := QuerySignal new. |
1111 | 193 |
WindowGroupQuerySignal nameClass:self message:#windowGroupQuerySignal. |
194 |
WindowGroupQuerySignal notifierString:'query for windowgroup'. |
|
195 |
||
1110 | 196 |
LastEventQuerySignal := QuerySignal new. |
1111 | 197 |
LastEventQuerySignal nameClass:self message:#lastEventQuerySignal. |
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. |
144 | 226 |
This private signal, is always cought while a modalbox is active. |
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:[ |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
266 |
LastActiveGroup process == LastActiveProcess ifTrue:[ |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
267 |
^ LastActiveGroup |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
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:[ |
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
274 |
"/ mhmh - noone willing to answer that question ... |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
275 |
"/ (how can ths happen ?) |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
276 |
groups := self scheduledWindowGroups |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
277 |
select:[:wg | wg process == activeProcess]. |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
278 |
groups size == 1 ifTrue:[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
279 |
wg := groups anElement |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
280 |
] ifFalse:[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
281 |
wg := groups detect:[:wg | wg isModal] ifNone:nil. |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
282 |
wg isNil ifTrue:[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
283 |
wg := groups anElement |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
284 |
] |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
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:[ |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
289 |
LastActiveProcess := activeProcess. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
290 |
LastActiveGroup := wg. |
180 | 291 |
]. |
292 |
^ wg |
|
293 |
||
294 |
" |
|
295 |
WindowGroup activeGroup |
|
296 |
" |
|
297 |
||
298 |
"Modified: 3.9.1995 / 14:49:53 / claus" |
|
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
299 |
"Modified: 29.1.1997 / 19:46:25 / 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. |
|
310 |
screens isNil ifTrue:[^ #()]. |
|
311 |
||
312 |
set := IdentitySet new. |
|
313 |
screens do:[:aDevice | |
|
314 |
aDevice allViewsDo:[:aView | |
|
315 |
|wg| |
|
109 | 316 |
|
180 | 317 |
(wg := aView windowGroup) notNil ifTrue:[ |
318 |
wg process notNil ifTrue:[ |
|
319 |
set add:wg |
|
320 |
] |
|
321 |
]. |
|
322 |
]. |
|
323 |
]. |
|
324 |
^ set asArray |
|
325 |
||
326 |
" |
|
327 |
WindowGroup scheduledWindowGroups |
|
328 |
" |
|
329 |
||
330 |
"Modified: 1.9.1995 / 13:43:09 / claus" |
|
244 | 331 |
! |
332 |
||
333 |
setActiveGroup:aGroup |
|
334 |
"set the currently active windowGroup. |
|
335 |
Temporary; do not use this interface, it will vanish." |
|
336 |
||
337 |
LastActiveProcess := Processor activeProcess. |
|
338 |
LastActiveGroup := aGroup |
|
26 | 339 |
! ! |
340 |
||
11 | 341 |
!WindowGroup methodsFor:'accessing'! |
342 |
||
512 | 343 |
device |
344 |
"return the device, we receive our events from" |
|
345 |
||
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
346 |
self obsoleteMethodWarning:'use #graphicsDevice'. |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
347 |
^ self graphicsDevice |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
348 |
|
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
349 |
"Modified: 5.7.1996 / 17:53:58 / cg" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
350 |
! |
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 |
graphicsDevice |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
353 |
"return the device, we receive our events from" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
354 |
|
1116 | 355 |
|v| |
356 |
||
512 | 357 |
(topViews notNil and:[topViews isEmpty not]) ifTrue:[ |
1116 | 358 |
v := topViews first |
359 |
] ifFalse:[ |
|
360 |
(views notNil and:[views isEmpty not]) ifTrue:[ |
|
361 |
v := views first |
|
362 |
] |
|
512 | 363 |
]. |
1116 | 364 |
v notNil ifTrue:[ |
365 |
^ v graphicsDevice |
|
512 | 366 |
]. |
367 |
^ nil |
|
368 |
||
369 |
"Modified: 13.12.1995 / 14:18:11 / stefan" |
|
743 | 370 |
"Modified: 28.5.1996 / 20:26:59 / cg" |
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
371 |
"Created: 5.7.1996 / 17:53:31 / cg" |
512 | 372 |
! |
373 |
||
374 |
isModal |
|
375 |
"return true, if the receiver is in a modal mode |
|
376 |
(i.e. for a modal box)" |
|
377 |
||
378 |
^ isModal |
|
379 |
||
380 |
"Modified: 7.3.1996 / 14:29:46 / cg" |
|
381 |
! |
|
382 |
||
383 |
mainGroup |
|
384 |
"return the main windowgroup (for modal groups only) |
|
385 |
that is the top one, which is not modal. |
|
386 |
NonModal groups return themSelf. |
|
387 |
||
388 |
There is one exception to this: the debugger (which is sort of modal) |
|
389 |
returns itself as mainGroup (not its debuggee)." |
|
390 |
||
391 |
|g prev| |
|
392 |
||
393 |
g := self. |
|
394 |
[g notNil and:[g isModal and:[(prev := g previousGroup) notNil]]] whileTrue:[ |
|
395 |
g := prev |
|
396 |
]. |
|
397 |
^ g |
|
398 |
||
399 |
"Modified: 3.9.1995 / 14:57:20 / claus" |
|
400 |
"Modified: 7.3.1996 / 14:29:28 / cg" |
|
401 |
! |
|
402 |
||
403 |
previousGroup |
|
404 |
"return the windowgroup that started this group. (for modal groups only). |
|
405 |
This may be another modalGroup (for boxes opened by boxes). |
|
406 |
NonModal groups return nil." |
|
407 |
||
408 |
^ previousGroup |
|
409 |
||
410 |
"Modified: 7.3.1996 / 14:28:46 / cg" |
|
411 |
! |
|
412 |
||
413 |
process |
|
414 |
"return the windowGroups process" |
|
415 |
||
416 |
^ myProcess |
|
417 |
! |
|
418 |
||
419 |
sensor |
|
420 |
"return the windowGroups sensor. |
|
421 |
All events for any of the groups views is handled by that sensor." |
|
422 |
||
423 |
^ mySensor |
|
424 |
||
425 |
"Modified: 7.3.1996 / 14:30:21 / cg" |
|
426 |
! |
|
427 |
||
428 |
sensor:aSensor |
|
429 |
"set the windowGroups sensor" |
|
430 |
||
431 |
mySensor := aSensor |
|
432 |
! ! |
|
433 |
||
434 |
!WindowGroup methodsFor:'accessing-hook'! |
|
435 |
||
436 |
postEventHook |
|
437 |
"return the postEventHook if any" |
|
438 |
||
439 |
^ postEventHook |
|
440 |
||
441 |
"Created: 7.3.1996 / 14:42:46 / cg" |
|
442 |
! |
|
443 |
||
444 |
postEventHook:anObject |
|
445 |
"set the postEventHook - this one will get all events |
|
446 |
passed after being processed here (via #processEvent:)." |
|
447 |
||
448 |
postEventHook := anObject |
|
449 |
! |
|
450 |
||
451 |
preEventHook |
|
452 |
"return the preEventHook if any" |
|
453 |
||
454 |
^ preEventHook |
|
455 |
||
456 |
"Created: 7.3.1996 / 14:42:42 / cg" |
|
457 |
! |
|
458 |
||
459 |
preEventHook:anObject |
|
460 |
"set the preEventHook - this one will get all events |
|
461 |
passed before being processed here (via #processEvent:). |
|
462 |
If this returns true, the event is supposed to be already |
|
463 |
processed and ignored here. |
|
464 |
Otherwise, it is processed as usual." |
|
465 |
||
466 |
preEventHook := anObject |
|
467 |
! ! |
|
468 |
||
469 |
!WindowGroup methodsFor:'accessing-views'! |
|
470 |
||
244 | 471 |
addTopView:aView |
472 |
"add a topview to the group" |
|
26 | 473 |
|
244 | 474 |
topViews isNil ifTrue:[ |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
475 |
topViews := OrderedCollection new. |
244 | 476 |
]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
477 |
(topViews includesIdentical:aView) ifFalse:[ |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
478 |
topViews add:aView |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
479 |
] |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
480 |
|
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
481 |
"Modified: 6.3.1996 / 15:35:15 / cg" |
26 | 482 |
! |
483 |
||
11 | 484 |
addView:aView |
26 | 485 |
"add aView to the windowGroup" |
486 |
||
11 | 487 |
views isNil ifTrue:[ |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
488 |
views := OrderedCollection new. |
11 | 489 |
]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
490 |
(views includesIdentical:aView) ifFalse:[ |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
491 |
views add:aView |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
492 |
] |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
493 |
|
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
494 |
"Modified: 6.3.1996 / 15:35:41 / cg" |
11 | 495 |
! |
496 |
||
26 | 497 |
removeView:aView |
498 |
"remove aView from the windowGroup; |
|
499 |
if this was the last view in this group, |
|
81 | 500 |
also shut down the corresponding process |
501 |
(actually, only wake it up here - it will terminate itself |
|
502 |
when finding out that all views are gone)" |
|
11 | 503 |
|
263 | 504 |
|sema| |
505 |
||
11 | 506 |
views notNil ifTrue:[ |
72 | 507 |
views remove:aView ifAbsent:[]. |
508 |
views isEmpty ifTrue:[ |
|
509 |
views := nil |
|
510 |
] |
|
11 | 511 |
]. |
512 |
topViews notNil ifTrue:[ |
|
72 | 513 |
topViews remove:aView ifAbsent:[]. |
514 |
topViews isEmpty ifTrue:[ |
|
515 |
topViews := nil |
|
516 |
] |
|
11 | 517 |
]. |
54 | 518 |
" |
519 |
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
|
520 |
removed (modalBoxes terminate their modalLoop if so) |
54 | 521 |
" |
262
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
522 |
mySensor notNil ifTrue:[ |
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
523 |
(sema := mySensor eventSemaphore) notNil ifTrue:[ |
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
524 |
sema signal |
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
525 |
] |
546f42586e3c
only signal sema if there is one (when views are removed)
Claus Gittinger <cg@exept.de>
parents:
251
diff
changeset
|
526 |
] |
11 | 527 |
! |
528 |
||
244 | 529 |
topViews |
530 |
"return the topviews accociated to this windowGroup" |
|
172 | 531 |
|
244 | 532 |
^ topViews |
172 | 533 |
! |
534 |
||
244 | 535 |
views |
536 |
"return the views accociated to this windowGroup" |
|
172 | 537 |
|
244 | 538 |
^ views |
54 | 539 |
! ! |
540 |
||
244 | 541 |
!WindowGroup methodsFor:'activation / deactivation'! |
542 |
||
543 |
closeDownViews |
|
544 |
"destroy all views associated to this window group" |
|
545 |
||
546 |
topViews notNil ifTrue:[ |
|
403 | 547 |
topViews do:[:aTopView | aTopView notNil ifTrue:[aTopView destroy]] |
244 | 548 |
]. |
549 |
views := nil. |
|
550 |
topViews := nil. |
|
551 |
mySensor := nil. |
|
552 |
! |
|
553 |
||
554 |
realizeTopViews:isRestart |
|
555 |
"realize all topViews associated to this windowGroup. |
|
556 |
If this is a restart, tell topViews about it." |
|
557 |
||
558 |
topViews notNil ifTrue:[ |
|
559 |
topViews do:[:aView | |
|
560 |
aView realize. |
|
561 |
isRestart ifTrue:[ |
|
562 |
aView restarted |
|
563 |
] |
|
564 |
]. |
|
565 |
]. |
|
566 |
! |
|
180 | 567 |
|
244 | 568 |
restart |
569 |
"restart after a snapin." |
|
180 | 570 |
|
244 | 571 |
topViews notNil ifTrue:[ |
1273 | 572 |
" |
573 |
need a new semaphore, since obsolete processes |
|
574 |
(from our previous live) may still sit on the current semaphore |
|
575 |
" |
|
576 |
mySensor eventSemaphore:(Semaphore new name:'WGroup eventSema'). |
|
577 |
isModal ifFalse:[ |
|
578 |
self startup:true |
|
579 |
] |
|
244 | 580 |
] |
1273 | 581 |
|
582 |
"Modified: 25.1.1997 / 00:20:25 / cg" |
|
244 | 583 |
! |
180 | 584 |
|
582
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
585 |
shutDown |
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
586 |
"shutdown the window group; close all views and |
244 | 587 |
terminate process" |
588 |
||
589 |
|p| |
|
590 |
||
591 |
self closeDownViews. |
|
592 |
myProcess notNil ifTrue:[ |
|
582
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
593 |
p := myProcess. |
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
594 |
myProcess := nil. |
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
595 |
p terminate. |
244 | 596 |
] |
582
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
597 |
|
dbb1d19a1065
obsolete shutdown (use shutDown)
Claus Gittinger <cg@exept.de>
parents:
565
diff
changeset
|
598 |
"Created: 22.4.1996 / 17:58:37 / cg" |
180 | 599 |
! |
600 |
||
244 | 601 |
startup:isRestart |
602 |
"startup the window-group; |
|
603 |
this creates a new window group process, which |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
604 |
does the event processing. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
605 |
The isRestart arg is true for an image restart; the topView |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
606 |
is opened at the old position then (this is not done here)." |
244 | 607 |
|
608 |
|top nm dev devNm| |
|
609 |
||
610 |
previousGroup := nil. |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
611 |
|
244 | 612 |
myProcess isNil ifTrue:[ |
743 | 613 |
isModal := false. |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
614 |
|
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
615 |
"/ |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
616 |
"/ this is the windowGroup process; |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
617 |
"/ realize all views, then handle events forever |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
618 |
"/ (well, not really forever ... ;-) |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
619 |
|
743 | 620 |
myProcess := [ |
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
621 |
WindowGroupQuerySignal handle:[:ex | |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
622 |
ex proceedWith:self |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
623 |
] do:[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
624 |
[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
625 |
self realizeTopViews:isRestart. |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
626 |
self eventLoopWhile:[true] onLeave:[] |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
627 |
] valueOnUnwindDo:[ |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
628 |
self closeDownViews |
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
629 |
] |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
630 |
] |
743 | 631 |
] forkAt:Processor userSchedulingPriority. |
180 | 632 |
|
743 | 633 |
(topViews notNil and:[topViews isEmpty not]) ifTrue:[ |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
634 |
"/ |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
635 |
"/ give the windowGroup process a user friendly name |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
636 |
"/ ask its topView for the processName, and |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
637 |
"/ optionally append the displayName (if its not the default) |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
638 |
"/ |
743 | 639 |
top := topViews first. |
640 |
nm := top processName. |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
641 |
|
743 | 642 |
(dev := top graphicsDevice) notNil ifTrue:[ |
643 |
devNm := dev displayName. |
|
644 |
(devNm notNil and:[devNm ~= Display displayName]) ifTrue:[ |
|
645 |
nm := nm , ' (' , devNm , ')' |
|
646 |
] |
|
647 |
] |
|
648 |
] ifFalse:[ |
|
649 |
nm := 'window handler'. |
|
650 |
]. |
|
651 |
myProcess name:nm. |
|
931
00fd4b461c31
renamed beProcessGroupLeader to beGroupLeader
Claus Gittinger <cg@exept.de>
parents:
930
diff
changeset
|
652 |
myProcess beGroupLeader. |
180 | 653 |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
654 |
"/ |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
655 |
"/ when the process gets suspended, |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
656 |
"/ there maybe still buffered draw requests. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
657 |
"/ Arrange for them to be flushed then. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
658 |
"/ (otherwise, you would not see the output of a process, |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
659 |
"/ which suspends and waits - or we had to add buffer flushes |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
660 |
"/ all over the place) |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
661 |
"/ |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
662 |
myProcess addSuspendAction:[ |
743 | 663 |
|dev| |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
664 |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
665 |
dev := self graphicsDevice. |
743 | 666 |
dev notNil ifTrue:[dev flush]. |
667 |
]. |
|
244 | 668 |
] |
313 | 669 |
|
670 |
"Modified: 13.12.1995 / 14:04:53 / stefan" |
|
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
671 |
"Modified: 29.1.1997 / 19:40:25 / cg" |
180 | 672 |
! |
673 |
||
244 | 674 |
startupModal:checkBlock |
301
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
675 |
"startup the window-group in a modal loop |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
676 |
(i.e. under the currently running process); |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
677 |
checkBlock is evaluated and the modal loop is left, whenever false is returned." |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
678 |
|
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
679 |
^ self startupModal:checkBlock forGroup:WindowGroup activeGroup. |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
680 |
|
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
681 |
"Created: 10.12.1995 / 14:15:11 / cg" |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
682 |
! |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
683 |
|
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
684 |
startupModal:checkBlock forGroup:mainGroup |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
685 |
"startup the window-group in a modal loop |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
686 |
(i.e. under the currently running process); |
244 | 687 |
checkBlock is evaluated and loop is left, when false is |
301
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
688 |
returned. |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
689 |
The mainGroup info is required to allow peeking into its |
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
690 |
event queue in order for its expose/redraws to be handled." |
244 | 691 |
|
692 |
"set previousGroup to the main (non-modal) group" |
|
180 | 693 |
|
301
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
694 |
previousGroup := mainGroup. |
244 | 695 |
isModal := true. |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
696 |
|
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
697 |
WindowGroupQuerySignal handle:[:ex | |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
698 |
ex proceedWith:self |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
699 |
] do:[ |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
700 |
self realizeTopViews:false. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
701 |
self |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
702 |
eventLoopWhile:checkBlock |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
703 |
onLeave:[ |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
704 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
705 |
cleanup, in case of a terminate |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
706 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
707 |
previousGroup := nil. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
708 |
topViews := nil. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
709 |
views := nil. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
710 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
711 |
the following is rubbish; |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
712 |
the views could be reused .. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
713 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
714 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
715 |
topViews notNil ifTrue:[ |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
716 |
topViews do:[:aView | |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
717 |
aView destroy |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
718 |
]. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
719 |
topViews := nil. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
720 |
]. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
721 |
views notNil ifTrue:[ |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
722 |
views do:[:aView | |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
723 |
aView destroy |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
724 |
]. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
725 |
views := nil. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
726 |
]. |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
727 |
" |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
728 |
] |
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
729 |
] |
301
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
730 |
|
b57451fd8560
passing group to avoid multiple activeGroup searches
Claus Gittinger <cg@exept.de>
parents:
297
diff
changeset
|
731 |
"Created: 10.12.1995 / 14:14:26 / cg" |
956
32a642b5dcd3
when asking for the active windowGroup, ask the windowGroupQuerySignal
Claus Gittinger <cg@exept.de>
parents:
949
diff
changeset
|
732 |
"Modified: 17.7.1996 / 15:40:37 / cg" |
180 | 733 |
! ! |
734 |
||
90 | 735 |
!WindowGroup methodsFor:'enumerating'! |
54 | 736 |
|
1117 | 737 |
allNonTopViewsDo:aBlock |
738 |
"evaluate aBlock for all nonTopviews (i.e. subviews) in this group. |
|
739 |
This works on a copy of the view collection, to allow for |
|
1240 | 740 |
destroy and other collection changing operations to be performed in the loop." |
1117 | 741 |
|
742 |
views notNil ifTrue:[ |
|
743 |
views copy nonNilElementsDo:aBlock |
|
744 |
] |
|
745 |
! |
|
746 |
||
1153 | 747 |
allTopViewsDo:aBlock |
748 |
"evaluate aBlock for all topviews in this group. |
|
749 |
This works on a copy of the view collection, to allow for |
|
1240 | 750 |
destroy and other collection changing operations to be performed in the loop." |
1153 | 751 |
|
752 |
topViews notNil ifTrue:[ |
|
753 |
topViews copy nonNilElementsDo:aBlock |
|
754 |
] |
|
755 |
! |
|
756 |
||
54 | 757 |
allTopViewsExcept:aView do:aBlock |
157 | 758 |
"evaluate aBlock for all topviews except aView in this group. |
759 |
This works on a copy of the view collection, to allow for |
|
1240 | 760 |
destroy and other collection changing operations to be performed in the loop." |
157 | 761 |
|
762 |
topViews notNil ifTrue:[ |
|
1117 | 763 |
topViews copy nonNilElementsDo:[:v | |
157 | 764 |
v ~~ aView ifTrue:[aBlock value:v] |
765 |
] |
|
766 |
]. |
|
767 |
! |
|
768 |
||
244 | 769 |
allViewsDo:aBlock |
770 |
"evaluate aBlock for all views & topviews in this group. |
|
771 |
This works on a copy of the view collection, to allow for |
|
1240 | 772 |
destroy and other collection changing operations to be performed in the loop." |
244 | 773 |
|
1117 | 774 |
self allTopViewsDo:aBlock. |
775 |
self allNonTopViewsDo:aBlock. |
|
244 | 776 |
! |
777 |
||
778 |
partnersDo:aBlock |
|
779 |
"evaluate aBlock for all partnerViews. |
|
780 |
This works on a copy of the view collection, to allow for |
|
1240 | 781 |
destroy and other collection changing operations to be performed in the loop." |
244 | 782 |
|
783 |
topViews notNil ifTrue:[ |
|
1117 | 784 |
topViews copy nonNilElementsDo:[:v | |
785 |
(v type == #partner) ifTrue:[aBlock value:v]. |
|
244 | 786 |
] |
787 |
]. |
|
788 |
! |
|
789 |
||
157 | 790 |
slavesDo:aBlock |
791 |
"evaluate aBlock for all slaveViews. |
|
792 |
This works on a copy of the view collection, to allow for |
|
1240 | 793 |
destroy and other collection changing operations to be performed in the loop." |
54 | 794 |
|
795 |
topViews notNil ifTrue:[ |
|
1117 | 796 |
topViews copy nonNilElementsDo:[:v | |
797 |
(v type == #slave) ifTrue:[aBlock value:v]. |
|
157 | 798 |
] |
799 |
]. |
|
11 | 800 |
! ! |
801 |
||
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
802 |
!WindowGroup methodsFor:'event debugging'! |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
803 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
804 |
traceEvents:trueOrFalse |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
805 |
|hook| |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
806 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
807 |
trueOrFalse ifFalse:[ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
808 |
"/ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
809 |
"/ remove any eventHook on the receiver |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
810 |
"/ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
811 |
self preEventHook:nil. |
697 | 812 |
"/ Transcript showCR:'removed eventHook'. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
813 |
] ifTrue:[ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
814 |
"/ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
815 |
"/ set an eventHook on its windowGroup |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
816 |
"/ |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
817 |
hook := Plug new. |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
818 |
hook respondTo:#processEvent: |
698 | 819 |
with:[:ev | ev displayString printCR. false]. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
820 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
821 |
self preEventHook:hook. |
697 | 822 |
"/ Transcript showCR:'set eventHook for tracing'. |
605
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
823 |
] |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
824 |
|
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
825 |
"Created: 24.4.1996 / 10:25:21 / cg" |
698 | 826 |
"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
|
827 |
! ! |
20f960026796
convenient interface for eventTracing ; comments & docu
Claus Gittinger <cg@exept.de>
parents:
598
diff
changeset
|
828 |
|
19 | 829 |
!WindowGroup methodsFor:'event handling'! |
11 | 830 |
|
244 | 831 |
eventLoop |
832 |
"loop executed by windowGroup process; |
|
833 |
wait-for and process events forever" |
|
834 |
||
835 |
self eventLoopWhile:[true] onLeave:[] |
|
836 |
! |
|
837 |
||
838 |
eventLoopWhile:aBlock onLeave:cleanupActions |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
839 |
"wait-for and process events. |
244 | 840 |
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
|
841 |
and aBlock evaluates to true. |
244 | 842 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
843 |
Some signals are cought & handled: |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
844 |
LeaveSignal forces an exit from the eventLoop; |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
845 |
AbortSignal brings us back into the loop, processing the next event; |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
846 |
ActivityNotifications send a #showActivity: if nonModal, |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
847 |
otherwise they are ignored." |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
848 |
|
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
849 |
|thisProcess sigs| |
244 | 850 |
|
851 |
thisProcess := Processor activeProcess. |
|
852 |
||
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
853 |
sigs := SignalSet |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
854 |
with:AbortSignal |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
855 |
with:LeaveSignal |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
856 |
with:ActivityNotificationSignal. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
857 |
|
244 | 858 |
[ |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
859 |
|p g mainGroup mySema waitSema| |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
860 |
|
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
861 |
waitSema := mySema := mySensor eventSemaphore. |
325
b24d9a1c74dc
stefans modalBox changes (no more polling)
Claus Gittinger <cg@exept.de>
parents:
324
diff
changeset
|
862 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
863 |
isModal ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
864 |
mainGroup := self mainGroup. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
865 |
mainGroup == self ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
866 |
mainGroup := nil |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
867 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
868 |
mainGroup notNil ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
869 |
waitSema := SemaphoreSet with:mySema |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
870 |
with:(mainGroup sensor eventSemaphore). |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
871 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
872 |
]. |
244 | 873 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
874 |
[aBlock value] whileTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
875 |
LastActiveGroup := self. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
876 |
LastActiveProcess := thisProcess. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
877 |
|
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
878 |
(views isNil and:[topViews isNil]) ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
879 |
myProcess notNil ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
880 |
p := myProcess. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
881 |
myProcess := nil. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
882 |
p terminate. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
883 |
"not reached - there is no life after death" |
429 | 884 |
]. |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
885 |
" |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
886 |
this is the end of a modal loop |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
887 |
(not having a private process ...) |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
888 |
" |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
889 |
^ self |
429 | 890 |
]. |
244 | 891 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
892 |
"/ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
893 |
"/ on abort, stay in the event loop |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
894 |
"/ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
895 |
sigs handle:[:ex | |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
896 |
|theSig| |
244 | 897 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
898 |
(theSig := ex signal) == AbortSignal ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
899 |
"/ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
900 |
"/ on abort, stay in loop |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
901 |
"/ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
902 |
ex return |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
903 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
904 |
theSig == LeaveSignal ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
905 |
"/ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
906 |
"/ on leave, exit the event loop |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
907 |
"/ |
429 | 908 |
^ self |
909 |
]. |
|
323
619085d52522
be careful - device may be nil
Claus Gittinger <cg@exept.de>
parents:
319
diff
changeset
|
910 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
911 |
"/ ActivityNotification |
429 | 912 |
"/ |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
913 |
"/ if I am a modal-group, let it be handled |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
914 |
"/ by the outer main-groups handler |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
915 |
"/ otherwise show the activityMessage and continue. |
429 | 916 |
"/ |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
917 |
isModal ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
918 |
ex reject |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
919 |
"never reached" |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
920 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
921 |
self showActivity:(ex errorString). |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
922 |
ex proceed. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
923 |
] do:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
924 |
|dev gotSema mainView| |
429 | 925 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
926 |
"/ no more events. Flush device output. This may produce more events. |
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
927 |
dev := self graphicsDevice. |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
928 |
dev notNil ifTrue:[dev flush]. |
328 | 929 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
930 |
thisProcess setStateTo:#eventWait if:#active. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
931 |
gotSema := waitSema wait. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
932 |
LastActiveGroup := self. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
933 |
LastActiveProcess := thisProcess. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
934 |
gotSema == mySema ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
935 |
self processEvents |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
936 |
] ifFalse:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
937 |
mainGroup topViews notNil ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
938 |
mainView := mainGroup topViews first |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
939 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
940 |
mainView notNil ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
941 |
(mainGroup sensor hasConfigureEventFor:mainView) ifTrue:[ |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
942 |
topViews first raiseDeiconified |
429 | 943 |
] |
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
944 |
]. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
945 |
" |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
946 |
if modal, also check for redraw events in my maingroup |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
947 |
(we arrive here after we woke up on maingroup sensor eventSemaphore) |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
948 |
" |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
949 |
mainGroup processExposeEvents. |
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
950 |
] |
429 | 951 |
]. |
952 |
]. |
|
244 | 953 |
] valueNowOrOnUnwindDo:[ |
429 | 954 |
cleanupActions notNil ifTrue:[cleanupActions value] |
244 | 955 |
] |
313 | 956 |
|
325
b24d9a1c74dc
stefans modalBox changes (no more polling)
Claus Gittinger <cg@exept.de>
parents:
324
diff
changeset
|
957 |
"Modified: 14.12.1995 / 11:12:24 / stefan" |
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
958 |
"Modified: 12.1.1997 / 00:18:57 / cg" |
244 | 959 |
! |
960 |
||
961 |
leaveEventLoop |
|
962 |
"immediately leave the event loop, returning way back. |
|
963 |
This can be used to leave (and closedown) a modal group. |
|
964 |
(for normal views, this does not make sense)" |
|
965 |
||
966 |
^ LeaveSignal raise |
|
967 |
! |
|
968 |
||
103 | 969 |
processEvents |
970 |
"process events from either the damage- or user input queues. |
|
971 |
Abort is assumed to be handled elsewhere." |
|
19 | 972 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
973 |
<resource: #keyboard (#Escape )> |
496 | 974 |
|
388
64e43f82d93e
Escape leaves modalBoxes or PopUpViews
Claus Gittinger <cg@exept.de>
parents:
387
diff
changeset
|
975 |
|event ignore key| |
11 | 976 |
|
72 | 977 |
self processExposeEvents. |
180 | 978 |
|
72 | 979 |
[mySensor hasEvents] whileTrue:[ |
496 | 980 |
event := mySensor nextEvent. |
981 |
event notNil ifTrue:[ |
|
982 |
(views notNil or:[topViews notNil]) ifTrue:[ |
|
1110 | 983 |
LastEventQuerySignal handle:[:ex | |
984 |
ex proceedWith:event |
|
985 |
] do:[ |
|
986 |
ignore := false. |
|
987 |
||
988 |
(preEventHook notNil |
|
989 |
and:[preEventHook processEvent:event]) ifTrue:[ |
|
990 |
ignore := true. |
|
991 |
]. |
|
992 |
ignore ifFalse:[ |
|
993 |
event isKeyPressEvent ifTrue:[ |
|
994 |
key := event key. |
|
172 | 995 |
|
1110 | 996 |
key == #Escape ifTrue:[ |
997 |
isModal ifTrue:[ |
|
998 |
topViews first hideRequest |
|
999 |
] |
|
1000 |
] |
|
1001 |
]. |
|
1002 |
event isPointerEnterEvent ifTrue:[ |
|
1003 |
pointerView := event view |
|
1004 |
]. |
|
1005 |
event isPointerLeaveEvent ifTrue:[ |
|
1006 |
pointerView := nil |
|
1007 |
]. |
|
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1008 |
|
1110 | 1009 |
ignore ifFalse:[ |
1010 |
"/ |
|
1011 |
"/ button events turn off explicit focus, and revert |
|
1012 |
"/ to implicit focus control |
|
1013 |
"/ |
|
1014 |
(focusView notNil |
|
1015 |
and:[event isButtonEvent]) ifTrue:[ |
|
1016 |
self focusView:nil |
|
1017 |
]. |
|
1018 |
"/ |
|
1019 |
"/ let the event forward itself |
|
1020 |
"/ |
|
1021 |
LastActiveGroup := self. |
|
1022 |
LastActiveProcess := Processor activeProcess. |
|
1023 |
event sendEventWithFocusOn:focusView. |
|
496 | 1024 |
] |
1025 |
]. |
|
1110 | 1026 |
postEventHook notNil ifTrue:[ |
1027 |
postEventHook processEvent:event |
|
496 | 1028 |
] |
1029 |
] |
|
1030 |
] |
|
1031 |
]. |
|
72 | 1032 |
] |
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1033 |
|
513
47b0f4bf4d89
use a single handler for handled signals
Claus Gittinger <cg@exept.de>
parents:
512
diff
changeset
|
1034 |
"Modified: 7.3.1996 / 17:46:27 / cg" |
48 | 1035 |
! |
1036 |
||
1037 |
processExposeEvents |
|
103 | 1038 |
"process only expose events from the damage queue" |
48 | 1039 |
|
180 | 1040 |
|event view rect x y w h sensor thisProcess| |
109 | 1041 |
|
1042 |
(sensor := mySensor) isNil ifTrue:[^ self]. |
|
48 | 1043 |
|
180 | 1044 |
thisProcess := Processor activeProcess. |
1045 |
||
1046 |
[sensor hasDamage] whileTrue:[ |
|
1110 | 1047 |
LastActiveGroup := self. |
1048 |
LastActiveProcess := thisProcess. |
|
180 | 1049 |
|
1110 | 1050 |
event := sensor nextDamage. |
1051 |
event notNil ifTrue:[ |
|
1052 |
(views notNil or:[topViews notNil]) ifTrue:[ |
|
1053 |
LastEventQuerySignal handle:[:ex | |
|
1054 |
ex proceedWith:event |
|
1055 |
] do:[ |
|
1056 |
(preEventHook notNil |
|
1057 |
and:[preEventHook processEvent:event]) ifFalse:[ |
|
1058 |
event isDamage ifTrue:[ |
|
1059 |
view := event view. |
|
1060 |
"/ |
|
1061 |
"/ if the view is no longer shown (iconified or closed), |
|
1062 |
"/ this is a leftover event and ignored. |
|
1063 |
"/ |
|
1064 |
view shown ifTrue:[ |
|
1065 |
rect := event rectangle. |
|
1066 |
x := rect left. |
|
1067 |
y := rect top. |
|
1068 |
w := rect width. |
|
1069 |
h := rect height. |
|
1070 |
LastActiveGroup := self. |
|
1071 |
LastActiveProcess := thisProcess. |
|
1072 |
view transformation notNil ifTrue:[ |
|
1073 |
view deviceExposeX:x y:y width:w height:h |
|
1074 |
] ifFalse:[ |
|
1075 |
view exposeX:x y:y width:w height:h |
|
1076 |
] |
|
1077 |
] |
|
1078 |
] ifFalse:[ |
|
1079 |
" |
|
1080 |
mhmh - could we possibly arrive here ? |
|
1081 |
" |
|
1082 |
LastActiveGroup := self. |
|
1083 |
LastActiveProcess := thisProcess. |
|
1157 | 1084 |
event sendEventWithFocusOn:nil. |
1110 | 1085 |
] |
1086 |
]. |
|
1087 |
postEventHook notNil ifTrue:[ |
|
1088 |
postEventHook processEvent:event |
|
1089 |
] |
|
1090 |
] |
|
1091 |
] |
|
1092 |
] |
|
90 | 1093 |
] |
1157 | 1094 |
|
1095 |
"Modified: 8.1.1997 / 11:16:55 / cg" |
|
11 | 1096 |
! |
1097 |
||
28 | 1098 |
waitForExposeFor:aView |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1099 |
"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
|
1100 |
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
|
1101 |
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
|
1102 |
(i.e. a synthetic noExpose may be generated there)." |
28 | 1103 |
|
1104 |
mySensor waitForExposeFor:aView. |
|
90 | 1105 |
AbortSignal catch:[ |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1106 |
self processExposeEvents |
90 | 1107 |
] |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1108 |
|
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1109 |
"Modified: 6.3.1996 / 15:58:36 / cg" |
11 | 1110 |
! ! |
19 | 1111 |
|
90 | 1112 |
!WindowGroup methodsFor:'focus control'! |
1113 |
||
244 | 1114 |
focusNext |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1115 |
"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
|
1116 |
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
|
1117 |
|
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1118 |
|index index0 last next| |
244 | 1119 |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1120 |
focusSequence := self focusSequence. |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1121 |
(last := focusSequence size) == 0 ifTrue:[^ self]. |
244 | 1122 |
|
1123 |
focusView notNil ifTrue:[ |
|
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1124 |
index := index0 := (focusSequence identityIndexOf:focusView). |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1125 |
] ifFalse:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1126 |
index := 0. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1127 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1128 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1129 |
[next isNil] whileTrue:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1130 |
index := index + 1. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1131 |
index > last ifTrue:[ |
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1132 |
index := 1. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1133 |
index0 isNil ifTrue:[^ self]. |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1134 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1135 |
index == index0 ifTrue:[^ self]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1136 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1137 |
next := (focusSequence at:index). |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1138 |
next realized not ifTrue:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1139 |
next := nil |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1140 |
]. |
244 | 1141 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1142 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1143 |
self focusView:next |
244 | 1144 |
|
1145 |
" |
|
1146 |
|top v1 v2| |
|
1147 |
||
1148 |
top := StandardSystemView new. |
|
1149 |
v1 := EditTextView origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
1150 |
v2 := EditTextView origin:0.0@0.5 corner:1.0@1.0 in:top. |
|
1151 |
top open. |
|
1152 |
top windowGroup focusSequence:(Array with:v1 with:v2). |
|
1153 |
top windowGroup focusOn:v1. |
|
1154 |
(Delay forSeconds:10) wait. |
|
1155 |
top windowGroup focusNext. |
|
1156 |
" |
|
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1157 |
|
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1158 |
"Modified: 17.7.1996 / 12:27:30 / cg" |
244 | 1159 |
! |
1160 |
||
1161 |
focusPrevious |
|
1162 |
"give focus to previous view in focusSequence" |
|
1163 |
||
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1164 |
|index prev index0| |
244 | 1165 |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1166 |
focusSequence := self focusSequence. |
244 | 1167 |
focusSequence 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
|
1168 |
|
244 | 1169 |
focusView notNil ifTrue:[ |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1170 |
index := index0 := (focusSequence identityIndexOf:focusView). |
244 | 1171 |
] ifFalse:[ |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1172 |
index := focusSequence size + 1. |
244 | 1173 |
]. |
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1174 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1175 |
[prev isNil] whileTrue:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1176 |
index := index - 1. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1177 |
index < 1 ifTrue:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1178 |
index := focusSequence size. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1179 |
index0 isNil ifTrue:[^ self]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1180 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1181 |
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
|
1182 |
|
949
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1183 |
prev := (focusSequence at:index). |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1184 |
prev realized not ifTrue:[ |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1185 |
prev := nil |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1186 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1187 |
]. |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1188 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1189 |
self focusView:prev |
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1190 |
|
3894d442e895
care for invisible views when stepping the focus
Claus Gittinger <cg@exept.de>
parents:
931
diff
changeset
|
1191 |
"Modified: 17.7.1996 / 12:42:10 / cg" |
244 | 1192 |
! |
1193 |
||
135 | 1194 |
focusSequence |
500
a313e9fda9f0
ask topView for focusSequence; focusKey handling now done in TopView/Controller
Claus Gittinger <cg@exept.de>
parents:
496
diff
changeset
|
1195 |
"return my focus sequence for focusNext/focusPrevious. |
135 | 1196 |
Focus is stepped in the order in which subviews occur in |
1197 |
the sequence" |
|
1198 |
||
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1199 |
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
|
1200 |
|
507
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1201 |
topViews do:[:top | |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1202 |
focusSequence := top focusSequence. |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1203 |
focusSequence notNil ifTrue:[^ focusSequence]. |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1204 |
]. |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1205 |
|
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1206 |
^ nil |
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1207 |
|
5098d8e9be3c
oops - when asking for focusSequence, take first nonNil collection from any topView
Claus Gittinger <cg@exept.de>
parents:
500
diff
changeset
|
1208 |
"Modified: 6.3.1996 / 17:50:01 / cg" |
135 | 1209 |
! |
1210 |
||
90 | 1211 |
focusSequence:aSequenceableCollection |
1212 |
"define the focus sequence for focusNext/focusPrevious. |
|
1213 |
Focus is stepped in the order in which subviews occur in |
|
1214 |
the sequence" |
|
1215 |
||
1216 |
focusSequence := aSequenceableCollection |
|
1217 |
! |
|
1218 |
||
1219 |
focusView |
|
135 | 1220 |
"return the view which currently has the focus" |
90 | 1221 |
|
1222 |
^ focusView |
|
1223 |
! |
|
1224 |
||
1225 |
focusView:aViewOrNil |
|
1226 |
"give focus to aViewOrNil" |
|
1227 |
||
410
9d9d03fa5d82
moved Tab handling to topView (which sends #focusNext if no subview handled it)
Claus Gittinger <cg@exept.de>
parents:
408
diff
changeset
|
1228 |
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
|
1229 |
|
90 | 1230 |
focusView notNil ifTrue:[ |
777
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1231 |
"/ lost explicit focus |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1232 |
focusView == aViewOrNil ifTrue:[^ self]. |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1233 |
focusView showNoFocus:true. |
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1234 |
] ifFalse:[ |
777
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1235 |
pointerView notNil ifTrue:[ |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1236 |
pointerView ~~ aViewOrNil ifTrue:[ |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1237 |
"/ lost implicit focus |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1238 |
pointerView showNoFocus:false |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1239 |
] |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1240 |
]. |
90 | 1241 |
]. |
387
aa80487842b8
compile event classes with optSpace;
Claus Gittinger <cg@exept.de>
parents:
385
diff
changeset
|
1242 |
|
90 | 1243 |
focusView := aViewOrNil. |
1244 |
focusView notNil ifTrue:[ |
|
777
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1245 |
"/ got explicit focus |
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1246 |
focusView showFocus:true. |
90 | 1247 |
]. |
1248 |
||
1249 |
" |
|
1250 |
|top v1 v2| |
|
1251 |
||
1252 |
top := StandardSystemView new. |
|
1253 |
v1 := EditTextView origin:0.0@0.0 corner:1.0@0.5 in:top. |
|
1254 |
v2 := EditTextView origin:0.0@0.5 corner:1.0@1.0 in:top. |
|
1255 |
top open. |
|
1256 |
top windowGroup focusView:v1. |
|
1257 |
" |
|
357
3655807445b7
keep track of pointerView, for implizit focus tracking
Claus Gittinger <cg@exept.de>
parents:
330
diff
changeset
|
1258 |
|
777
4d0b66f65346
search in focusSequence for identical view - who knows
Claus Gittinger <cg@exept.de>
parents:
743
diff
changeset
|
1259 |
"Modified: 31.5.1996 / 21:13:25 / cg" |
244 | 1260 |
! ! |
1261 |
||
1262 |
!WindowGroup methodsFor:'initialization'! |
|
1263 |
||
1264 |
initialize |
|
1265 |
"setup the windowgroup, by creating a new sensor |
|
1266 |
and an event semaphore" |
|
1267 |
||
1268 |
mySensor := WindowSensor new. |
|
1273 | 1269 |
mySensor eventSemaphore:(Semaphore new name:'WGroup eventSema'). |
244 | 1270 |
isModal := false. |
417 | 1271 |
isForModalSubview := false. |
1273 | 1272 |
|
1273 |
"Modified: 25.1.1997 / 00:20:19 / cg" |
|
90 | 1274 |
! |
1275 |
||
244 | 1276 |
reinitialize |
1277 |
"reinitialize the windowgroup after an image restart" |
|
90 | 1278 |
|
244 | 1279 |
"throw away old (zombie) process" |
1280 |
myProcess notNil ifTrue:[ |
|
1186
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1281 |
"/ careful: the old processes exit-actions must be cleared. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1282 |
"/ otherwise, it might do destroy or other actions when it |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1283 |
"/ gets finalized ... |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1284 |
|
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1285 |
"/ myProcess removeAllExitActions. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1286 |
myProcess removeAllSuspendActions. |
e1fbbabcd682
no longer use exitBlocks - a termination-unwind handler will
Claus Gittinger <cg@exept.de>
parents:
1157
diff
changeset
|
1287 |
myProcess := nil. |
244 | 1288 |
]. |
90 | 1289 |
|
244 | 1290 |
"throw away old events" |
1291 |
mySensor reinitialize |
|
313 | 1292 |
|
1293 |
"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
|
1294 |
"Modified: 12.1.1997 / 00:45:01 / cg" |
90 | 1295 |
! ! |
1296 |
||
19 | 1297 |
!WindowGroup methodsFor:'printing'! |
1298 |
||
90 | 1299 |
printOn:aStream |
19 | 1300 |
"return a printed representation; |
144 | 1301 |
just for more user friendlyness: add name of process." |
19 | 1302 |
|
90 | 1303 |
myProcess isNil ifTrue:[ |
1304 |
(previousGroup notNil and:[previousGroup process notNil]) ifTrue:[ |
|
1305 |
aStream nextPutAll:('WindowGroup(modal in ' , previousGroup process nameOrId , ')'). |
|
1306 |
^ self. |
|
1307 |
]. |
|
1308 |
^ super printOn:aStream |
|
1309 |
]. |
|
1310 |
aStream nextPutAll:('WindowGroup(' , myProcess nameOrId , ')') |
|
19 | 1311 |
! ! |
244 | 1312 |
|
1313 |
!WindowGroup methodsFor:'special'! |
|
1314 |
||
1315 |
restoreCursors |
|
1316 |
"restore the original cursors in all of my views" |
|
1317 |
||
330
13a3fa93330c
careful - view could have been destroyed in the meanwhile (in restoreCursors)
Claus Gittinger <cg@exept.de>
parents:
329
diff
changeset
|
1318 |
self allViewsDo:[:aView | |
743 | 1319 |
|c dev id cid| |
244 | 1320 |
|
743 | 1321 |
dev := aView graphicsDevice. |
1322 |
dev notNil ifTrue:[ |
|
1323 |
(id := aView id) notNil ifTrue:[ |
|
1324 |
c := aView cursor on:dev. |
|
1325 |
(cid := c id) notNil ifTrue:[ |
|
1326 |
dev setCursor:cid in:id. |
|
1327 |
] |
|
1328 |
] |
|
1329 |
] |
|
244 | 1330 |
]. |
743 | 1331 |
|
1332 |
"Modified: 28.5.1996 / 20:27:14 / cg" |
|
244 | 1333 |
! |
1334 |
||
328 | 1335 |
showActivity:someMessage |
597 | 1336 |
"some activityNotification shalt be communicated to |
1337 |
the user; |
|
1338 |
forward it to my first topView if there is one |
|
1339 |
(that one should know how to deal with it)" |
|
1340 |
||
328 | 1341 |
topViews notNil ifTrue:[ |
597 | 1342 |
topViews first showActivity:someMessage |
328 | 1343 |
] |
1344 |
||
1345 |
"Created: 16.12.1995 / 18:39:40 / cg" |
|
597 | 1346 |
"Modified: 23.4.1996 / 21:36:54 / cg" |
328 | 1347 |
! |
1348 |
||
244 | 1349 |
showCursor:aCursor |
1350 |
"change the cursor to aCursor in all of my views." |
|
1351 |
||
406 | 1352 |
|c id dev| |
244 | 1353 |
|
1354 |
c := aCursor. |
|
1355 |
self allViewsDo:[:aView | |
|
743 | 1356 |
c := c on:(dev := aView graphicsDevice). |
1357 |
(id := c id) notNil ifTrue:[ |
|
1358 |
dev setCursor:id in:aView id. |
|
1359 |
] |
|
244 | 1360 |
]. |
743 | 1361 |
|
1362 |
"Modified: 28.5.1996 / 20:27:17 / cg" |
|
244 | 1363 |
! |
1364 |
||
1365 |
withCursor:aCursor do:aBlock |
|
1366 |
"evaluate aBlock while showing aCursor in all |
|
1367 |
my views (used to show wait-cursor while doing something). |
|
1368 |
Return the result as returned by aBlock." |
|
1369 |
||
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1370 |
|oldCursors dev| |
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1371 |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1372 |
dev := self graphicsDevice. |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1373 |
dev isNil ifTrue:[ |
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1374 |
^ aBlock value |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1375 |
]. |
244 | 1376 |
|
1377 |
" |
|
1378 |
get mapping of view->cursor for all of my subviews |
|
1379 |
" |
|
1380 |
oldCursors := IdentityDictionary new. |
|
1381 |
self allViewsDo:[:aView | |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1382 |
oldCursors at:aView put:(aView cursor). |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1383 |
aView cursor:aCursor now:false |
244 | 1384 |
]. |
329
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1385 |
"/ |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1386 |
"/ here sync looks better; flush leads to almost invisible cursors when accepting. |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1387 |
"/ I dont really know why (maybe unix does not context-switch to the Xserver |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1388 |
"/ early enough after the requests have been sent ?) |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1389 |
"/ |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1390 |
"/ dev flush. |
8a34deadc4ff
sync (not flush) after a cursor change
Claus Gittinger <cg@exept.de>
parents:
328
diff
changeset
|
1391 |
dev sync. |
244 | 1392 |
|
1393 |
^ aBlock valueNowOrOnUnwindDo:[ |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1394 |
" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1395 |
restore cursors from the mapping |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1396 |
" |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1397 |
oldCursors keysAndValuesDo:[:view :cursor | |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1398 |
view cursor:cursor now:false. |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1399 |
]. |
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1400 |
dev flush "/ sync. |
244 | 1401 |
] |
317
7a1271ecb987
use new #cursor:now: if many cursors are switched
Claus Gittinger <cg@exept.de>
parents:
313
diff
changeset
|
1402 |
|
926
1b8422921e4d
use #graphicsDevice instead of #device.
Claus Gittinger <cg@exept.de>
parents:
777
diff
changeset
|
1403 |
"Modified: 5.7.1996 / 17:54:16 / cg" |
408 | 1404 |
! |
1405 |
||
1406 |
withWaitCursorDo:aBlock |
|
1407 |
"evaluate aBlock while showing a waitCursor in all |
|
1408 |
my views (used to show wait-cursor while doing something time consuming). |
|
1409 |
Return the result as returned by aBlock." |
|
1410 |
||
1411 |
^ self withCursor:(Cursor wait) do:aBlock |
|
1412 |
||
1413 |
"Created: 6.2.1996 / 19:51:53 / cg" |
|
244 | 1414 |
! ! |
1415 |
||
1416 |
!WindowGroup methodsFor:'special accessing'! |
|
1417 |
||
429 | 1418 |
isForModalSubview |
1419 |
"special for windowgroups for modal subviews. |
|
1420 |
These must be flagged specially to avoid the views being reassigned |
|
1421 |
to the maingroup. |
|
1422 |
This is a private interface to the SimpleView class" |
|
1423 |
||
1424 |
^ isForModalSubview |
|
1425 |
! |
|
1426 |
||
1427 |
isForModalSubview:aBoolean |
|
1428 |
"special for windowgroups for modal subviews. |
|
1429 |
These must be flagged specially to avoid the views being reassigned |
|
1430 |
to the maingroup. |
|
1431 |
This is a private interface to the SimpleView class" |
|
1432 |
||
1433 |
isForModalSubview := aBoolean |
|
1434 |
! |
|
1435 |
||
244 | 1436 |
setModal:aBoolean |
1437 |
"special entry for debugger: set the modal flag. |
|
1438 |
Not for public use" |
|
1439 |
||
1440 |
isModal := aBoolean |
|
1441 |
||
1442 |
"Modified: 3.9.1995 / 14:51:04 / claus" |
|
1443 |
! |
|
1444 |
||
1445 |
setPreviousGroup:aGroup |
|
1446 |
"special entry for debugger: |
|
1447 |
set the windowgroup that started this group (for modal groups only). |
|
1448 |
This is not a public interface." |
|
1449 |
||
1450 |
previousGroup := aGroup |
|
1451 |
||
1452 |
"Modified: 3.9.1995 / 14:55:40 / claus" |
|
1453 |
! |
|
1454 |
||
1455 |
setProcess:aProcess |
|
1456 |
"special entry for debugger: set the windowGroups process. |
|
1457 |
Not for public use." |
|
1458 |
||
1459 |
myProcess := aProcess |
|
1460 |
||
1461 |
"Modified: 3.9.1995 / 14:25:38 / claus" |
|
1462 |
! ! |
|
1463 |
||
1110 | 1464 |
!WindowGroup class methodsFor:'documentation'! |
251 | 1465 |
|
1466 |
version |
|
1298
d070db2e4530
always handle a windowGroupQuery - use that first when being asked for a group
Claus Gittinger <cg@exept.de>
parents:
1273
diff
changeset
|
1467 |
^ '$Header: /cvs/stx/stx/libview/WindowGroup.st,v 1.100 1997-01-29 18:46:57 cg Exp $' |
251 | 1468 |
! ! |
244 | 1469 |
WindowGroup initialize! |