author | Stefan Vogel <sv@exept.de> |
Sat, 04 May 1996 01:15:55 +0200 | |
changeset 645 | a62615e26583 |
parent 625 | 4d8f6dc3af75 |
child 658 | ce56170b3fb1 |
permissions | -rw-r--r-- |
135 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
View subclass:#TopView |
|
314
de706ed62d27
added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
14 |
instanceVariableNames:'type' |
de706ed62d27
added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
15 |
classVariableNames:'' |
de706ed62d27
added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
16 |
poolDictionaries:'' |
de706ed62d27
added withReadCursorDo: / withExecuteCursorDo:
Claus Gittinger <cg@exept.de>
parents:
298
diff
changeset
|
17 |
category:'Views-Basic' |
135 | 18 |
! |
19 |
||
20 |
!TopView class methodsFor:'documentation'! |
|
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
25 |
All Rights Reserved |
|
26 |
||
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
36 |
documentation |
|
37 |
" |
|
38 |
I am an abstract superclass of StandardSystemView and PopUpView; |
|
39 |
i.e. views which have no superview. |
|
616 | 40 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
41 |
Do not get confused by the name TopView - your applications |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
42 |
topViews are typically instances of StandardSystemView. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
43 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
44 |
|
616 | 45 |
[see also:] |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
46 |
StandardSystemView PopUpView DialogBox |
616 | 47 |
( introduction to view programming :html: programming/viewintro.html ) |
48 |
||
49 |
[author:] |
|
50 |
Claus Gittinger |
|
135 | 51 |
" |
52 |
! ! |
|
53 |
||
54 |
!TopView class methodsFor:'defaults'! |
|
55 |
||
56 |
defaultExtent |
|
586 | 57 |
"return the default extent of my instances. |
58 |
Topviews extents is 2/3 of screen by default" |
|
135 | 59 |
|
153 | 60 |
|display| |
61 |
||
62 |
display := Screen current. |
|
63 |
^ (display width // 3 * 2) @ (display height // 3 * 2) |
|
586 | 64 |
|
65 |
"Modified: 22.4.1996 / 23:39:13 / cg" |
|
135 | 66 |
! ! |
67 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
68 |
!TopView methodsFor:'accessing-behavior'! |
269 | 69 |
|
70 |
beMaster |
|
71 |
"make this a master-view. All slave views within the same |
|
72 |
windowGroup will be closed if any master is closed." |
|
73 |
||
74 |
type := #master |
|
298 | 75 |
|
76 |
" |
|
77 |
see example in TopView>>beSlave |
|
78 |
" |
|
79 |
||
80 |
"Created: 10.12.1995 / 13:30:50 / cg" |
|
269 | 81 |
! |
82 |
||
83 |
bePartner |
|
84 |
"make this a partner-view. Each partner-view will automatically |
|
85 |
close other partner views whenclosed." |
|
86 |
||
87 |
type := #partner |
|
298 | 88 |
|
89 |
" |
|
90 |
create two topViews within the same group: |
|
91 |
if any of them is iconified/deiconified/closed, the other one is also |
|
92 |
||
93 |
|top1 top2| |
|
94 |
||
95 |
top1 := StandardSystemView new label:'top1'; extent:300@300. |
|
96 |
top2 := StandardSystemView new label:'top2'; extent:200@200. |
|
97 |
top1 bePartner. |
|
98 |
top2 bePartner. |
|
99 |
||
100 |
top1 open. |
|
101 |
top2 openInGroup:(top1 windowGroup) |
|
102 |
" |
|
103 |
||
104 |
"Created: 10.12.1995 / 13:29:59 / cg" |
|
269 | 105 |
! |
106 |
||
107 |
beSlave |
|
108 |
"make this a slave-view. It will be closed automatically, |
|
109 |
whenever any master of the group is closed." |
|
110 |
||
111 |
type := #slave |
|
298 | 112 |
|
113 |
" |
|
114 |
create two topViews within the same group: |
|
115 |
the slave is allowed to be iconified/close independ of the master; |
|
116 |
but if the master is iconified, the slave is also. |
|
117 |
||
118 |
|top1 top2| |
|
119 |
||
120 |
top1 := StandardSystemView new label:'top1'; extent:300@300. |
|
121 |
top2 := StandardSystemView new label:'top2'; extent:200@200. |
|
122 |
top1 beMaster. |
|
123 |
top2 beSlave. |
|
124 |
||
125 |
top1 open. |
|
126 |
top2 openInGroup:(top1 windowGroup) |
|
127 |
" |
|
128 |
||
129 |
"Created: 10.12.1995 / 13:29:10 / cg" |
|
269 | 130 |
! |
131 |
||
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
132 |
focusSequence:aCollectionOfSubcomponents |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
133 |
"define the sequence for stepping through my components." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
134 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
135 |
windowGroup isNil ifTrue:[ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
136 |
windowGroup := WindowGroup new. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
137 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
138 |
windowGroup focusSequence:aCollectionOfSubcomponents. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
139 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
140 |
"Created: 6.3.1996 / 15:37:11 / cg" |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
141 |
"Modified: 30.4.1996 / 15:41:40 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
142 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
143 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
144 |
!TopView methodsFor:'event handling'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
145 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
146 |
keyPress:key x:x y:y |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
147 |
"notice: this is going to be moved into the upcoming |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
148 |
StandardSystemViewController." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
149 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
150 |
<resource: #keyboard ( #Tab #FocusNext #FocusPrevious #CursorDown #CursorUp ) > |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
151 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
152 |
key == #Tab ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
153 |
windowGroup notNil ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
154 |
self sensor shiftDown ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
155 |
windowGroup focusPrevious |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
156 |
] ifFalse:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
157 |
windowGroup focusNext |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
158 |
] |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
159 |
] |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
160 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
161 |
(key == #FocusNext or:[key == #CursorDown]) ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
162 |
windowGroup notNil ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
163 |
windowGroup focusNext. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
164 |
] |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
165 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
166 |
(key == #FocusPrevious or:[key == #CursorUp]) ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
167 |
windowGroup notNil ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
168 |
windowGroup focusPrevious. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
169 |
] |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
170 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
171 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
172 |
"Created: 1.2.1996 / 22:08:30 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
173 |
"Modified: 7.3.1996 / 13:19:35 / cg" |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
174 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
175 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
176 |
showActivity:someMessage |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
177 |
"some activityNotification shalt be communicated to |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
178 |
the user. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
179 |
Default for activity notifications here: ignore them" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
180 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
181 |
^ self |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
182 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
183 |
"Created: 16.12.1995 / 18:40:13 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
184 |
"Modified: 23.4.1996 / 21:38:27 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
185 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
186 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
187 |
!TopView methodsFor:'initialization'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
188 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
189 |
initialize |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
190 |
"initialize the topViews position for the screens center" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
191 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
192 |
|screenCenter| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
193 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
194 |
super initialize. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
195 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
196 |
screenCenter := device center. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
197 |
left := screenCenter x - (width // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
198 |
top := screenCenter y - (height // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
199 |
type := #normal |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
200 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
201 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
202 |
!TopView methodsFor:'misc'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
203 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
204 |
raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
205 |
"deiconify & bring to front" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
206 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
207 |
self isCollapsed ifTrue:[ |
645 | 208 |
self unmap. |
209 |
self realize. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
210 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
211 |
self raise |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
212 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
213 |
" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
214 |
Transcript topView raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
215 |
" |
645 | 216 |
|
217 |
"Modified: 3.5.1996 / 23:49:36 / stefan" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
218 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
219 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
220 |
withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
221 |
"evaluate aBlock while showing aCursor in all my views. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
222 |
Return the value as returned by aBlock." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
223 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
224 |
windowGroup notNil ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
225 |
^ windowGroup withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
226 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
227 |
^ super withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
228 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
229 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
230 |
!TopView methodsFor:'queries'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
231 |
|
269 | 232 |
heightIncludingBorder |
233 |
"return the views overall-height" |
|
234 |
||
235 |
^ height |
|
236 |
! |
|
237 |
||
238 |
isCollapsed |
|
239 |
"ST80 compatibility: return true if the view is not shown (i.e. iconified)" |
|
240 |
||
241 |
^ shown not |
|
242 |
! |
|
243 |
||
244 |
preferredExtent |
|
245 |
"return my preferred extent - this is the minimum size I would like to have. |
|
246 |
The default here is the classes default extent, |
|
247 |
however many subclasses redefine this to compute the actual value |
|
248 |
depending on the sizes of the contents or subcomponents." |
|
249 |
||
250 |
^ self class defaultExtent |
|
251 |
! |
|
252 |
||
253 |
type |
|
254 |
"return the views type. This is one of #normal, |
|
255 |
#master, #slave or #partner." |
|
256 |
||
257 |
^ type |
|
258 |
! |
|
259 |
||
260 |
widthIncludingBorder |
|
261 |
"return the views overall-width" |
|
262 |
||
263 |
^ width |
|
264 |
! ! |
|
265 |
||
266 |
!TopView methodsFor:'startup'! |
|
267 |
||
268 |
openWithExtent:anExtent |
|
269 |
"set extent and open. The given extent overrides the |
|
270 |
receivers preferredExtent. |
|
271 |
Added for ST-80 compatibility" |
|
272 |
||
273 |
self extent:anExtent; sizeFixed:true. |
|
274 |
self open |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
275 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
276 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
277 |
openWithPriority:aPriority |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
278 |
"open the view, run the windowgroup process at |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
279 |
other than UserScehdulingPriority." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
280 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
281 |
self open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
282 |
windowGroup process priority:aPriority. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
283 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
284 |
"Created: 30.4.1996 / 15:34:44 / cg" |
269 | 285 |
! ! |
286 |
||
157 | 287 |
!TopView methodsFor:'window events'! |
288 |
||
289 |
destroy |
|
290 |
"the receiver is to be destroyed - look for partners and slaves" |
|
291 |
||
292 |
|wg| |
|
293 |
||
294 |
wg := windowGroup. "/ have to fetch windowGroup before; |
|
295 |
super destroy. "/ since destroy nils it |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
296 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
297 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
298 |
"/ destroy slaves and partners |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
299 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
300 |
self masterSlaveMessage:#destroy inGroup:wg |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
301 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
302 |
"/ wg notNil ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
303 |
"/ "/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
304 |
"/ "/ if I am a master or partner, close all slaves |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
305 |
"/ "/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
306 |
"/ (type == #master or:[type == #partner]) ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
307 |
"/ wg slavesDo:[:v | v destroy]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
308 |
"/ ]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
309 |
"/ "/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
310 |
"/ "/ if I am a partner, close all partners |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
311 |
"/ "/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
312 |
"/ type == #partner ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
313 |
"/ wg partnersDo:[:v | v ~~ self ifTrue:[v destroy]]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
314 |
"/ ]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
315 |
"/ ]. |
157 | 316 |
! |
317 |
||
318 |
mapped |
|
319 |
"the recevier was mapped (i.e. deiconified or just created); |
|
320 |
look for partners and slaves." |
|
321 |
||
322 |
realized := true. |
|
323 |
super mapped. |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
324 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
325 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
326 |
"/ rerealize slaves and partners |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
327 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
328 |
self masterSlaveMessage:#rerealize inGroup:windowGroup |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
329 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
330 |
"/ windowGroup notNil ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
331 |
"/ (type == #master or:[type == #partner]) ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
332 |
"/ windowGroup slavesDo:[:v | v rerealize]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
333 |
"/ ]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
334 |
"/ type == #partner ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
335 |
"/ windowGroup partnersDo:[:v | v ~~ self ifTrue:[v rerealize]]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
336 |
"/ ] |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
337 |
"/ ]. |
157 | 338 |
! |
339 |
||
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
340 |
masterSlaveMessage:aSelector inGroup:aWindowGroup |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
341 |
"send aSelector to partners and/or slaves. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
342 |
This is a private helper for destroy / mapped / unmapped" |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
343 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
344 |
aWindowGroup notNil ifTrue:[ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
345 |
"/ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
346 |
"/ if I am a master or partner, send to all slaves |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
347 |
"/ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
348 |
(type == #master or:[type == #partner]) ifTrue:[ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
349 |
aWindowGroup slavesDo:[:v | v perform:aSelector]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
350 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
351 |
"/ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
352 |
"/ if I am a partner, send to all partners |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
353 |
"/ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
354 |
type == #partner ifTrue:[ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
355 |
aWindowGroup partnersDo:[:v | v ~~ self ifTrue:[v perform:aSelector]]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
356 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
357 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
358 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
359 |
|
157 | 360 |
unmapped |
361 |
"the recevier was unmapped (i.e. iconified); |
|
362 |
look for partners and slaves." |
|
363 |
||
364 |
super unmapped. |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
365 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
366 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
367 |
"/ unrealize slaves and partners |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
368 |
"/ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
369 |
self masterSlaveMessage:#unrealize inGroup:windowGroup |
157 | 370 |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
371 |
"/ windowGroup notNil ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
372 |
"/ (type == #master or:[type == #partner]) ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
373 |
"/ windowGroup slavesDo:[:v | v unrealize]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
374 |
"/ ]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
375 |
"/ type == #partner ifTrue:[ |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
376 |
"/ windowGroup partnersDo:[:v | v ~~ self ifTrue:[v unrealize]]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
377 |
"/ ]. |
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
378 |
"/ ]. |
157 | 379 |
! ! |
380 |
||
269 | 381 |
!TopView class methodsFor:'documentation'! |
135 | 382 |
|
269 | 383 |
version |
645 | 384 |
^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.22 1996-05-03 23:15:55 stefan Exp $' |
135 | 385 |
! ! |