author | Claus Gittinger <cg@exept.de> |
Thu, 22 Aug 2002 18:52:14 +0200 | |
changeset 3706 | c2b41c6ea4ef |
parent 3697 | 44233528f334 |
child 3712 | b32f73e34e34 |
permissions | -rw-r--r-- |
135 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1353 | 3 |
All Rights Reserved |
135 | 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 |
||
3347 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
135 | 15 |
View subclass:#TopView |
3370 | 16 |
instanceVariableNames:'type iconified keyboardProcessor' |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
17 |
classVariableNames:'TakeFocusWhenMapped ForceModalBoxesToOpenAtCenter' |
1398 | 18 |
poolDictionaries:'' |
19 |
category:'Views-Basic' |
|
135 | 20 |
! |
21 |
||
1160 | 22 |
!TopView class methodsFor:'documentation'! |
135 | 23 |
|
24 |
copyright |
|
25 |
" |
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1353 | 27 |
All Rights Reserved |
135 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
I am an abstract superclass of StandardSystemView and PopUpView; |
|
41 |
i.e. views which have no superview. |
|
616 | 42 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
43 |
Do not get confused by the name TopView - your applications |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
44 |
topViews are typically instances of StandardSystemView. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
45 |
|
1396 | 46 |
[instance variables:] |
47 |
type <Symbol> one of #normal, #master, #slave or #partner |
|
48 |
for modeless views |
|
49 |
(#master, #slave or #partner link multiple views |
|
50 |
into a windowManagers windowGroup -> de-iconification) |
|
51 |
#dialog for modal views; #popup for popup views. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
52 |
|
616 | 53 |
[see also:] |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
54 |
StandardSystemView PopUpView DialogBox |
616 | 55 |
( introduction to view programming :html: programming/viewintro.html ) |
56 |
||
57 |
[author:] |
|
58 |
Claus Gittinger |
|
135 | 59 |
" |
60 |
! ! |
|
61 |
||
1160 | 62 |
!TopView class methodsFor:'defaults'! |
135 | 63 |
|
64 |
defaultExtent |
|
586 | 65 |
"return the default extent of my instances. |
66 |
Topviews extents is 2/3 of screen by default" |
|
135 | 67 |
|
153 | 68 |
|display| |
69 |
||
70 |
display := Screen current. |
|
3072 | 71 |
display isNil ifTrue:[ |
72 |
^ 600 @ 400 |
|
73 |
]. |
|
3446 | 74 |
^ display defaultExtentForTopViews |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
75 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
76 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
77 |
forceModalBoxesToOpenAtCenter |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
78 |
"return a flag which can be used to force all modal views to be forced to open |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
79 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
80 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
81 |
^ ForceModalBoxesToOpenAtCenter ? false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
82 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
83 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
84 |
forceModalBoxesToOpenAtCenter:aBoolean |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
85 |
"set/clear a flag which can be used to force all modal views to be forced to open |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
86 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
87 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
88 |
ForceModalBoxesToOpenAtCenter := aBoolean |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
89 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
90 |
" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
91 |
TopView forceModalBoxesToOpenAtCenter:true |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
92 |
TopView forceModalBoxesToOpenAtCenter:false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
93 |
" |
135 | 94 |
! ! |
95 |
||
3143 | 96 |
!TopView methodsFor:'Compatibility - ST80'! |
1410
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
97 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
98 |
displayBox |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
99 |
^ self bounds |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
100 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
101 |
"Created: 3.3.1997 / 16:31:33 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
102 |
! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
103 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
104 |
displayBox:aRectangle |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
105 |
self origin:aRectangle origin corner:aRectangle corner |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
106 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
107 |
"Created: 3.3.1997 / 16:34:38 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
108 |
! ! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
109 |
|
3370 | 110 |
!TopView methodsFor:'accessing'! |
111 |
||
112 |
keyboardProcessor |
|
113 |
"return my keyboard processor" |
|
114 |
||
115 |
^ keyboardProcessor |
|
116 |
||
117 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
118 |
"Modified: / 18.6.1998 / 20:00:18 / cg" |
|
119 |
! |
|
120 |
||
121 |
keyboardProcessor:something |
|
122 |
"set my keyboard processor" |
|
123 |
||
124 |
keyboardProcessor := something. |
|
125 |
||
126 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
127 |
"Modified: / 18.6.1998 / 20:00:30 / cg" |
|
128 |
! ! |
|
129 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
130 |
!TopView methodsFor:'accessing-behavior'! |
269 | 131 |
|
1765 | 132 |
beIndependent |
133 |
"make this an independent view; i.e. remove any master/slave or partner |
|
134 |
attribute (this is the default). |
|
135 |
However, the view remains in the current windowGroup" |
|
136 |
||
137 |
type := nil |
|
138 |
! |
|
139 |
||
269 | 140 |
beMaster |
141 |
"make this a master-view. All slave views within the same |
|
142 |
windowGroup will be closed if any master is closed." |
|
143 |
||
144 |
type := #master |
|
298 | 145 |
|
146 |
" |
|
147 |
see example in TopView>>beSlave |
|
148 |
" |
|
149 |
||
150 |
"Created: 10.12.1995 / 13:30:50 / cg" |
|
269 | 151 |
! |
152 |
||
153 |
bePartner |
|
154 |
"make this a partner-view. Each partner-view will automatically |
|
712 | 155 |
close other partner views (within the same windowGroup) when closed." |
269 | 156 |
|
157 |
type := #partner |
|
298 | 158 |
|
159 |
" |
|
160 |
create two topViews within the same group: |
|
161 |
if any of them is iconified/deiconified/closed, the other one is also |
|
162 |
||
163 |
|top1 top2| |
|
164 |
||
712 | 165 |
top1 := StandardSystemView new label:'partner'; extent:300@300. |
166 |
top2 := StandardSystemView new label:'partner'; extent:200@200. |
|
298 | 167 |
top1 bePartner. |
168 |
top2 bePartner. |
|
169 |
||
170 |
top1 open. |
|
171 |
top2 openInGroup:(top1 windowGroup) |
|
172 |
" |
|
173 |
||
174 |
"Created: 10.12.1995 / 13:29:59 / cg" |
|
712 | 175 |
"Modified: 25.5.1996 / 11:44:48 / cg" |
269 | 176 |
! |
177 |
||
178 |
beSlave |
|
179 |
"make this a slave-view. It will be closed automatically, |
|
712 | 180 |
whenever any master of the windowgroup is closed. |
181 |
See also: #bePartner" |
|
269 | 182 |
|
183 |
type := #slave |
|
298 | 184 |
|
185 |
" |
|
186 |
create two topViews within the same group: |
|
187 |
the slave is allowed to be iconified/close independ of the master; |
|
188 |
but if the master is iconified, the slave is also. |
|
189 |
||
190 |
|top1 top2| |
|
191 |
||
712 | 192 |
top1 := StandardSystemView new label:'master'; extent:300@300. |
193 |
top2 := StandardSystemView new label:'slave'; extent:200@200. |
|
298 | 194 |
top1 beMaster. |
195 |
top2 beSlave. |
|
196 |
||
197 |
top1 open. |
|
198 |
top2 openInGroup:(top1 windowGroup) |
|
199 |
" |
|
200 |
||
201 |
"Created: 10.12.1995 / 13:29:10 / cg" |
|
712 | 202 |
"Modified: 25.5.1996 / 11:45:30 / cg" |
269 | 203 |
! |
204 |
||
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
205 |
focusSequence:aCollectionOfSubcomponents |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
206 |
"define the sequence for stepping through my components." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
207 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
208 |
windowGroup isNil ifTrue:[ |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
209 |
windowGroup := WindowGroup new. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
210 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
211 |
windowGroup focusSequence:aCollectionOfSubcomponents. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
212 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
213 |
"Created: 6.3.1996 / 15:37:11 / cg" |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
214 |
"Modified: 30.4.1996 / 15:41:40 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
215 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
216 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
217 |
!TopView methodsFor:'event handling'! |
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 |
keyPress:key x:x y:y |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
220 |
"notice: this is going to be moved into the upcoming |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
221 |
StandardSystemViewController." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
222 |
|
1160 | 223 |
<resource: #keyboard ( #Tab |
224 |
#FocusNext #FocusPrevious |
|
225 |
#CursorDown #CursorUp ) > |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
226 |
|
932 | 227 |
windowGroup notNil ifTrue:[ |
228 |
key == #Tab ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
229 |
self sensor shiftDown ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
230 |
windowGroup focusPrevious |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
231 |
] ifFalse:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
232 |
windowGroup focusNext |
932 | 233 |
]. |
234 |
^ self. |
|
235 |
]. |
|
236 |
(key == #FocusNext or:[key == #CursorDown]) ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
237 |
windowGroup focusNext. |
932 | 238 |
^ self. |
239 |
]. |
|
240 |
(key == #FocusPrevious or:[key == #CursorUp]) ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
241 |
windowGroup focusPrevious. |
932 | 242 |
^ self. |
243 |
]. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
244 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
245 |
|
932 | 246 |
super keyPress:key x:x y:y |
247 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
248 |
"Created: 1.2.1996 / 22:08:30 / cg" |
1160 | 249 |
"Modified: 9.1.1997 / 12:17:38 / cg" |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
250 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
251 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
252 |
showActivity:someMessage |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
253 |
"some activityNotification shalt be communicated to |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
254 |
the user. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
255 |
Default for activity notifications here: ignore them" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
256 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
257 |
^ self |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
258 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
259 |
"Created: 16.12.1995 / 18:40:13 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
260 |
"Modified: 23.4.1996 / 21:38:27 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
261 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
262 |
|
2466 | 263 |
!TopView methodsFor:'help stubs'! |
264 |
||
3697 | 265 |
flyByHelpTextFor:aSubView |
266 |
"this will vanish - its temporarily here to allow for stdSysViews to be |
|
267 |
used as a masterApp for dialogs" |
|
268 |
||
269 |
^ nil |
|
270 |
! |
|
271 |
||
272 |
helpTextFor:aSubView |
|
273 |
"this will vanish - its temporarily here to allow for stdSysViews to be |
|
274 |
used as a masterApp for dialogs" |
|
275 |
||
276 |
^ nil |
|
277 |
! |
|
278 |
||
2466 | 279 |
showHelp:aHelpText for:aView |
280 |
"dummy - added in case a regular topView is installed |
|
281 |
as a dialogs masterApplication. |
|
282 |
Concrete application subclasses may redefine this to |
|
283 |
display a help text in one of its message areas" |
|
284 |
! ! |
|
285 |
||
2573 | 286 |
!TopView methodsFor:'initialize / release'! |
287 |
||
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
288 |
assignKeyboardFocusToFirstInputField |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
289 |
"assign the keyboard focus to the first input field, |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
290 |
or else to the first keyboardConsumer. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
291 |
This prefers inputFields over editTextViews |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
292 |
(which may change in the future)" |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
293 |
|
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
294 |
|firstConsumer| |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
295 |
|
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
296 |
self allSubViewsDo:[:v | |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
297 |
v isInputField ifTrue:[ |
3585
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
298 |
"/ self windowGroup focusView:v. -- very old |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
299 |
device platformName = 'WIN32' ifTrue:[ |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
300 |
self windowGroup focusView:v byTab:true. |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
301 |
] ifFalse:[ |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
302 |
v requestFocus. |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
303 |
]. |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
304 |
^ self |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
305 |
]. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
306 |
(firstConsumer isNil and:[v isKeyboardConsumer]) ifTrue:[ |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
307 |
firstConsumer := v |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
308 |
]. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
309 |
]. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
310 |
firstConsumer notNil ifTrue:[ |
2693
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
311 |
firstConsumer requestFocus. |
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
312 |
"/ firstConsumer requestFocus. - could be denied; but we force it here |
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
313 |
windowGroup focusView:firstConsumer byTab:false. |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
314 |
]. |
2693
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
315 |
|
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
316 |
"Modified: / 20.5.1999 / 18:14:16 / cg" |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
317 |
! |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
318 |
|
2573 | 319 |
destroy |
320 |
"the receiver is to be destroyed - look for partners and slaves" |
|
321 |
||
322 |
|wg dev| |
|
323 |
||
324 |
wg := windowGroup. "/ have to fetch windowGroup before; |
|
325 |
dev := device. "/ and device ... |
|
326 |
super destroy. "/ ... since destroy nils em |
|
327 |
||
328 |
"/ dev notNil ifTrue:[ |
|
329 |
"/ dev flush |
|
330 |
"/ ]. |
|
331 |
||
332 |
"/ |
|
333 |
"/ destroy slaves and partners |
|
334 |
"/ |
|
335 |
self masterSlaveMessage:#destroy inGroup:wg |
|
336 |
||
3446 | 337 |
"Modified: 20.3.1997 / 22:14:16 / cg" |
338 |
! |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
339 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
340 |
initialize |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
341 |
"initialize the topViews position for the screens center" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
342 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
343 |
|screenCenter| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
344 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
345 |
super initialize. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
346 |
|
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
347 |
device initializeTopViewHookFor:self. |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
348 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
349 |
screenCenter := device center. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
350 |
left := screenCenter x - (width // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
351 |
top := screenCenter y - (height // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
352 |
type := #normal |
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
353 |
! |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
354 |
|
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
355 |
postRealize |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
356 |
super postRealize. |
3370 | 357 |
|
358 |
keyboardProcessor isNil ifTrue:[ |
|
359 |
keyboardProcessor := KeyboardProcessor new. |
|
360 |
]. |
|
361 |
||
3446 | 362 |
device realizedTopViewHookFor:self |
3706 | 363 |
! |
364 |
||
365 |
release |
|
366 |
keyboardProcessor notNil ifTrue:[ |
|
367 |
keyboardProcessor release. |
|
368 |
keyboardProcessor := nil. |
|
369 |
]. |
|
370 |
super release |
|
3446 | 371 |
! ! |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
372 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
373 |
!TopView methodsFor:'misc'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
374 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
375 |
raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
376 |
"deiconify & bring to front" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
377 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
378 |
self isCollapsed ifTrue:[ |
645 | 379 |
self unmap. |
380 |
self realize. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
381 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
382 |
self raise |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
383 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
384 |
" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
385 |
Transcript topView raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
386 |
" |
645 | 387 |
|
388 |
"Modified: 3.5.1996 / 23:49:36 / stefan" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
389 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
390 |
|
2124
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
391 |
waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
392 |
"wait until the receiver has been closed. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
393 |
Can be used to synchronize multiple-window applications, |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
394 |
and (especially) to wait until an application session is finished |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
395 |
when invoking commands with the rDoit mechanism" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
396 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
397 |
[drawableId isNil] whileFalse:[ |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
398 |
Delay waitForSeconds:0.1. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
399 |
]. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
400 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
401 |
"asynchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
402 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
403 |
EditTextView open |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
404 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
405 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
406 |
"synchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
407 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
408 |
EditTextView open topView waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
409 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
410 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
411 |
"Modified: / 20.5.1998 / 18:03:37 / cg" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
412 |
! |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
413 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
414 |
withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
415 |
"evaluate aBlock while showing aCursor in all my views. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
416 |
Return the value as returned by aBlock." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
417 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
418 |
windowGroup notNil ifTrue:[ |
1353 | 419 |
^ windowGroup withCursor:aCursor do:aBlock |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
420 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
421 |
^ super withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
422 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
423 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
424 |
!TopView methodsFor:'queries'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
425 |
|
269 | 426 |
heightIncludingBorder |
427 |
"return the views overall-height" |
|
428 |
||
429 |
^ height |
|
430 |
! |
|
431 |
||
432 |
isCollapsed |
|
433 |
"ST80 compatibility: return true if the view is not shown (i.e. iconified)" |
|
434 |
||
1536 | 435 |
"/ ^ device windowIsIconified:drawableId |
269 | 436 |
^ shown not |
1536 | 437 |
|
438 |
"Modified: 4.4.1997 / 14:44:39 / cg" |
|
269 | 439 |
! |
440 |
||
3620 | 441 |
isMaster |
442 |
"return true, if this is a masterView" |
|
443 |
||
444 |
^ type == #master |
|
445 |
! |
|
446 |
||
3347 | 447 |
isModal |
448 |
"return true, if the receiver has been opened modal" |
|
449 |
||
450 |
windowGroup isNil ifTrue:[^ false]. |
|
3446 | 451 |
^ windowGroup isModal |
452 |
! |
|
3347 | 453 |
|
3621 | 454 |
isPartner |
455 |
"return true, if this is a partnerView" |
|
456 |
||
457 |
^ type == #partner |
|
458 |
! |
|
459 |
||
1398 | 460 |
isPopUpView |
461 |
"return true, since I want to come up without decoration |
|
462 |
and popUp to top immediately." |
|
463 |
||
464 |
^ type == #popup |
|
465 |
||
466 |
"Created: 28.2.1997 / 22:12:30 / cg" |
|
467 |
"Modified: 28.2.1997 / 22:37:01 / cg" |
|
468 |
! |
|
469 |
||
3620 | 470 |
isSlave |
471 |
"return true, if this is a slaveView" |
|
472 |
||
473 |
^ type == #slave |
|
474 |
! |
|
475 |
||
1481 | 476 |
isTopView |
477 |
"return true, since I am a topView" |
|
478 |
||
479 |
^ true |
|
480 |
||
481 |
"Created: 22.3.1997 / 14:45:55 / cg" |
|
482 |
! |
|
483 |
||
269 | 484 |
preferredExtent |
485 |
"return my preferred extent - this is the minimum size I would like to have. |
|
486 |
The default here is the classes default extent, |
|
487 |
however many subclasses redefine this to compute the actual value |
|
488 |
depending on the sizes of the contents or subcomponents." |
|
489 |
||
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
490 |
"/ If I have an explicit preferredExtent .. |
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
491 |
|
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
492 |
preferredExtent notNil ifTrue:[ |
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
493 |
^ preferredExtent |
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
494 |
]. |
269 | 495 |
^ self class defaultExtent |
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
496 |
|
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
497 |
"Modified: 19.7.1996 / 20:45:41 / cg" |
269 | 498 |
! |
499 |
||
500 |
type |
|
501 |
"return the views type. This is one of #normal, |
|
502 |
#master, #slave or #partner." |
|
503 |
||
504 |
^ type |
|
505 |
! |
|
506 |
||
507 |
widthIncludingBorder |
|
508 |
"return the views overall-width" |
|
509 |
||
510 |
^ width |
|
2808
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
511 |
! |
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
512 |
|
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
513 |
window |
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
514 |
"for compatibility with applicationModels ... return the receiver" |
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
515 |
|
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
516 |
^ self |
269 | 517 |
! ! |
518 |
||
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
519 |
!TopView methodsFor:'show / hide'! |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
520 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
521 |
fixPosition:aPoint |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
522 |
"set origin to aPoint, but make sure, that the box is fully visible |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
523 |
by shifting it into the visible screen area if nescessary. |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
524 |
This prevents invisible modalBoxes (which you could never close)." |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
525 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
526 |
self origin:aPoint. |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
527 |
self makeFullyVisible |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
528 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
529 |
"Created: 28.2.1997 / 16:39:31 / cg" |
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
530 |
! |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
531 |
|
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
532 |
mapIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
533 |
"make the view visible but iconified. |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
534 |
In contrast to map, which does it non-iconified" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
535 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
536 |
realized ifFalse:[ |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
537 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
538 |
now, make the view visible |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
539 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
540 |
realized := true. |
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
541 |
device |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
542 |
mapView:self id:drawableId iconified:true |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
543 |
atX:left y:top width:width height:height |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
544 |
minExtent:(self minExtent) maxExtent:(self maxExtent) |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
545 |
] |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
546 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
547 |
"Modified: 25.2.1997 / 22:44:33 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
548 |
"Created: 24.7.1997 / 12:48:21 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
549 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
550 |
|
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
551 |
positionOffset |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
552 |
"return the delta, by which the box should be |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
553 |
displaced from the mouse pointer. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
554 |
Here, the boxes center is returned as a default. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
555 |
Usually redefined in subclasses to have the most convenient |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
556 |
ok-button appear under the pointer." |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
557 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
558 |
^ self extent // 2 |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
559 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
560 |
"Created: 28.2.1997 / 22:56:34 / cg" |
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
561 |
! ! |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
562 |
|
269 | 563 |
!TopView methodsFor:'startup'! |
564 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
565 |
openAt:aPosition transientFor:anotherView |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
566 |
"force the view to be opened at some position on the screen |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
567 |
AND tell the windowManager to NOT let the user choose a position |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
568 |
(i.e. suppress any ghostframe). |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
569 |
The view is marked as being a transient (i.e. pop-up) view for |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
570 |
anotherView - it will deiconify with it and (on some windowManagers) |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
571 |
have no iconify button of its own. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
572 |
Notice, that its up to the windowManager to care for any borders - |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
573 |
it seems not deterministic, where the view actually ends up being positioned. |
909
d2d624d57f61
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
908
diff
changeset
|
574 |
Not all windowManagers (olwm) honor this - some insist on it ..." |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
575 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
576 |
|otherId| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
577 |
|
1836 | 578 |
drawableId isNil ifTrue:[self create]. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
579 |
anotherView isNil ifTrue:[ |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
580 |
otherId := drawableId. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
581 |
] ifFalse:[ |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
582 |
anotherView create. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
583 |
otherId := anotherView id. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
584 |
]. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
585 |
device setTransient:drawableId for:otherId. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
586 |
self origin:aPosition. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
587 |
self open |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
588 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
589 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
590 |
|v1 v2| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
591 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
592 |
v1 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
593 |
v2 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
594 |
v1 open. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
595 |
v2 openAt:0@0 transientFor:v1. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
596 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
597 |
|
960 | 598 |
" |
599 |
|v1| |
|
600 |
||
601 |
v1 := StandardSystemView extent:300@300. |
|
602 |
v1 openAt:0@0 transientFor:v1. |
|
603 |
" |
|
604 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
605 |
"Created: 28.6.1996 / 10:51:55 / cg" |
1836 | 606 |
"Modified: 28.7.1997 / 18:53:16 / cg" |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
607 |
! |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
608 |
|
1353 | 609 |
openDisplayAt:aPoint |
610 |
"ST-80 compatibility: open the view centered around aPoint" |
|
611 |
||
612 |
^ self openModelessAt:(aPoint - (self extent//2)) |
|
613 |
||
614 |
" |
|
615 |
(TopView new extent:200@200) openDisplayAt:300@300 |
|
616 |
" |
|
617 |
! |
|
618 |
||
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
619 |
openIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
620 |
"open the view in iconified state" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
621 |
|
1829 | 622 |
self openModelessAt:nil iconified:true |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
623 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
624 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
625 |
FileBrowser new openIconified |
1829 | 626 |
ChangesBrowser new openIconified |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
627 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
628 |
|
1829 | 629 |
"Modified: 24.7.1997 / 14:54:58 / cg" |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
630 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
631 |
|
1336 | 632 |
openIn:aBoundaryRectangle |
633 |
"set origin & extent and open. |
|
634 |
The given extent overrides the receivers preferredExtent. |
|
635 |
Added for ST-80 compatibility" |
|
636 |
||
637 |
self |
|
638 |
origin:aBoundaryRectangle origin; |
|
639 |
extent:aBoundaryRectangle extent; |
|
640 |
sizeFixed:true. |
|
641 |
self open |
|
642 |
||
643 |
"Modified: 12.2.1997 / 11:58:21 / cg" |
|
644 |
! |
|
645 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
646 |
openTransientAt:aPosition |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
647 |
"force the view to be opened at soem position on the screen |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
648 |
AND tell the windowManager to NOT let the user choose a position |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
649 |
(i.e. suppress any ghostframe). |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
650 |
Notice, that its up to the windowManager to care for any borders - |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
651 |
it seems not deterministic, where the view actually ends up being positioned. |
909
d2d624d57f61
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
908
diff
changeset
|
652 |
Not all windowManagers (olwm) honor this - some insist on it ..." |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
653 |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
654 |
self openAt:aPosition transientFor:nil |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
655 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
656 |
"normal open: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
657 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
658 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
659 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
660 |
v := StandardSystemView extent:300@300. |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
661 |
v open |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
662 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
663 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
664 |
"open at position: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
665 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
666 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
667 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
668 |
v := StandardSystemView extent:300@300. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
669 |
v openTransientAt:10@10 |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
670 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
671 |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
672 |
"Created: 28.6.1996 / 10:52:30 / cg" |
909
d2d624d57f61
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
908
diff
changeset
|
673 |
"Modified: 28.6.1996 / 10:55:15 / cg" |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
674 |
! |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
675 |
|
269 | 676 |
openWithExtent:anExtent |
677 |
"set extent and open. The given extent overrides the |
|
678 |
receivers preferredExtent. |
|
679 |
Added for ST-80 compatibility" |
|
680 |
||
681 |
self extent:anExtent; sizeFixed:true. |
|
682 |
self open |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
683 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
684 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
685 |
openWithPriority:aPriority |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
686 |
"open the view, run the windowgroup process at |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
687 |
other than UserScehdulingPriority." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
688 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
689 |
self open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
690 |
windowGroup process priority:aPriority. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
691 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
692 |
"Created: 30.4.1996 / 15:34:44 / cg" |
269 | 693 |
! ! |
694 |
||
157 | 695 |
!TopView methodsFor:'window events'! |
696 |
||
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
697 |
mapped |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
698 |
"the recevier was unmapped (i.e. iconified); |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
699 |
look for partners and slaves." |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
700 |
|
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
701 |
realized := true. |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
702 |
super mapped. |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
703 |
|
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
704 |
"/ |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
705 |
"/ map slaves and partners |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
706 |
"/ |
2799
e7b1ea0db727
partners must be remapped (at the old position)
Claus Gittinger <cg@exept.de>
parents:
2693
diff
changeset
|
707 |
self masterSlaveMessage:#remap inGroup:windowGroup. |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
708 |
|
3347 | 709 |
self isModal ifTrue:[ |
710 |
"take it away from any popup menu possibly still active" |
|
711 |
||
712 |
self forceUngrabKeyboard. |
|
713 |
self forceUngrabPointer. |
|
714 |
" |
|
715 |
get the focus |
|
716 |
" |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
717 |
self getKeyboardFocus. |
3347 | 718 |
self enableEnterLeaveEvents |
719 |
] ifFalse:[ |
|
720 |
" |
|
721 |
ask for the focus - this avoids having to click on the |
|
722 |
view with WM's which need an explicit click. |
|
723 |
Q: is this a good idea ? |
|
724 |
" |
|
725 |
TakeFocusWhenMapped == true ifTrue:[ |
|
726 |
self getKeyboardFocus. |
|
727 |
] |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
728 |
] |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
729 |
|
3347 | 730 |
|
731 |
||
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
732 |
"Modified: / 10.9.1998 / 22:02:52 / cg" |
3446 | 733 |
"Modified: 30.5.1996 / 09:37:22 / cg" |
734 |
! |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
735 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
736 |
masterSlaveMessage:aSelector inGroup:aWindowGroup |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
737 |
"send aSelector to partners and/or slaves. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
738 |
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
|
739 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
740 |
aWindowGroup notNil ifTrue:[ |
1353 | 741 |
"/ |
742 |
"/ if I am a master or partner, send to all slaves |
|
743 |
"/ |
|
744 |
(type == #master or:[type == #partner]) ifTrue:[ |
|
745 |
aWindowGroup slavesDo:[:v | v perform:aSelector]. |
|
746 |
]. |
|
747 |
"/ |
|
748 |
"/ if I am a partner, send to all partners |
|
749 |
"/ |
|
750 |
type == #partner ifTrue:[ |
|
751 |
aWindowGroup partnersDo:[:v | v ~~ self ifTrue:[v perform:aSelector]]. |
|
752 |
]. |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
753 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
754 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
755 |
|
157 | 756 |
unmapped |
757 |
"the recevier was unmapped (i.e. iconified); |
|
758 |
look for partners and slaves." |
|
759 |
||
3035 | 760 |
|r| |
761 |
||
762 |
(windowGroup notNil and:[windowGroup isModal]) ifTrue:[ |
|
763 |
"keep the realized flag true (to avoid exiting the modal event loop). |
|
764 |
Consider this a kludge." |
|
765 |
r := realized. |
|
766 |
super unmapped. |
|
767 |
realized := r. |
|
768 |
] ifFalse:[ |
|
769 |
realized := false. |
|
770 |
super unmapped. |
|
771 |
]. |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
772 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
773 |
"/ |
775 | 774 |
"/ unmap slaves and partners |
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
775 |
"/ |
658 | 776 |
self masterSlaveMessage:#unmap inGroup:windowGroup |
157 | 777 |
|
775 | 778 |
"Modified: 30.5.1996 / 09:37:22 / cg" |
157 | 779 |
! ! |
780 |
||
1160 | 781 |
!TopView class methodsFor:'documentation'! |
135 | 782 |
|
269 | 783 |
version |
3706 | 784 |
^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.75 2002-08-22 16:51:42 cg Exp $' |
135 | 785 |
! ! |