author | Claus Gittinger <cg@exept.de> |
Tue, 25 Sep 2018 10:38:44 +0200 | |
changeset 8484 | 03f94160fb5d |
parent 8396 | c6ff7df785d8 |
child 8485 | 17e245765f1d |
permissions | -rw-r--r-- |
135 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
5721 | 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 |
" |
|
3347 | 12 |
"{ Package: 'stx:libview' }" |
13 |
||
6791 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
135 | 16 |
View subclass:#TopView |
5721 | 17 |
instanceVariableNames:'type iconified keyboardProcessor' |
18 |
classVariableNames:'TakeFocusWhenMapped ForceModalBoxesToOpenAtCenter |
|
19 |
ForceModalBoxesToOpenAtPointer MasterSlaveMask WindowTypeMask |
|
20 |
TypeMaster TypeSlave TypePartner TypeDialog TypePopUp |
|
21 |
TypeUndecorated TypeToolWindow TypeToolDialog MDIClientMask |
|
22 |
MDIClient TypeScreenDialog CurrentWindowMoveStart |
|
6647 | 23 |
CurrentWindowMoveState CurrentWindowBeingMoved |
24 |
TypeUndecoratedResizable TypePopUpNonModal' |
|
5721 | 25 |
poolDictionaries:'' |
26 |
category:'Views-Basic' |
|
135 | 27 |
! |
28 |
||
1160 | 29 |
!TopView class methodsFor:'documentation'! |
135 | 30 |
|
31 |
copyright |
|
32 |
" |
|
33 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
5721 | 34 |
All Rights Reserved |
135 | 35 |
|
36 |
This software is furnished under a license and may be used |
|
37 |
only in accordance with the terms of that license and with the |
|
38 |
inclusion of the above copyright notice. This software may not |
|
39 |
be provided or otherwise made available to, or used by, any |
|
40 |
other person. No title to or ownership of the software is |
|
41 |
hereby transferred. |
|
42 |
" |
|
43 |
! |
|
44 |
||
45 |
documentation |
|
46 |
" |
|
47 |
I am an abstract superclass of StandardSystemView and PopUpView; |
|
48 |
i.e. views which have no superview. |
|
616 | 49 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
50 |
Do not get confused by the name TopView - your applications |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
51 |
topViews are typically instances of StandardSystemView. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
52 |
|
1396 | 53 |
[instance variables:] |
5721 | 54 |
type <Integer> encodes master/slave relationship: |
55 |
#normal, #master, #slave or #partner |
|
56 |
for modeless views |
|
57 |
(the #master-, #slave- or #partner-type links multiple views |
|
58 |
into a windowManagers windowGroup -> for de-iconification) |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
59 |
|
5721 | 60 |
encodes window type: |
61 |
#normal, #dialog, #popup, #undecorated |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
62 |
|
616 | 63 |
[see also:] |
5721 | 64 |
StandardSystemView PopUpView DialogBox |
65 |
( introduction to view programming :html: programming/viewintro.html ) |
|
616 | 66 |
|
67 |
[author:] |
|
5721 | 68 |
Claus Gittinger |
135 | 69 |
" |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
70 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
71 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
72 |
examples |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
73 |
" |
8293 | 74 |
Notice, the following examples only demonstrate the windows style (not its modal behavior). |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
75 |
the style is controlled by the systems windowManager, and might even be ignored by some. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
76 |
(for example, the dialog- and normal styles often look the same). |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
77 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
78 |
The bahavior is controlled by ST/X, and controlled by the open vs. openModeless vs. openModal message. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
79 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
80 |
Modeless: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
81 |
regular style: |
8293 | 82 |
[exBegin] |
83 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
84 |
|
8293 | 85 |
v := TopView new. |
86 |
v extent:200@200. |
|
87 |
v open |
|
88 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
89 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
90 |
dialog: |
8293 | 91 |
[exBegin] |
92 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
93 |
|
8293 | 94 |
v := TopView new. |
95 |
v beDialogView. |
|
96 |
v extent:200@200. |
|
97 |
v open |
|
98 |
Delay waitForSeconds:10. v destroy. |
|
99 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
100 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
101 |
popUp (always on top): |
8293 | 102 |
[exBegin] |
103 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
104 |
|
8293 | 105 |
v := TopView new. |
106 |
v bePopUpView. |
|
107 |
v extent:200@200. |
|
108 |
v open. |
|
109 |
Delay waitForSeconds:10. v destroy. |
|
110 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
111 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
112 |
undecorated (looks loke popUp, but is not always on top): |
8293 | 113 |
[exBegin] |
114 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
115 |
|
8293 | 116 |
v := TopView new. |
117 |
v beUndecorated. |
|
118 |
v extent:200@200. |
|
119 |
v open. |
|
120 |
Delay waitForSeconds:10. v destroy. |
|
121 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
122 |
|
4254 | 123 |
toolwindow (looks loke normal, but has smaller windowTitle-area on win32): |
8293 | 124 |
[exBegin] |
125 |
|v| |
|
4254 | 126 |
|
8293 | 127 |
v := TopView new. |
128 |
v beToolWindow. |
|
129 |
v extent:200@200. |
|
130 |
v open. |
|
131 |
Delay waitForSeconds:10. v destroy. |
|
132 |
[exEnd] |
|
4254 | 133 |
|
4256 | 134 |
toolwindow dialog (looks loke normal, but has smaller windowTitle-area on win32): |
8293 | 135 |
[exBegin] |
136 |
|v| |
|
4256 | 137 |
|
8293 | 138 |
v := TopView new. |
139 |
v beToolDialog. |
|
140 |
v extent:200@200. |
|
141 |
v open. |
|
142 |
Delay waitForSeconds:10. v destroy. |
|
143 |
[exEnd] |
|
4256 | 144 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
145 |
Modal: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
146 |
regular style: |
8293 | 147 |
[exBegin] |
148 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
149 |
|
8293 | 150 |
v := TopView new. |
151 |
v extent:200@200. |
|
152 |
v openModal |
|
153 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
154 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
155 |
dialog: |
8293 | 156 |
[exBegin] |
157 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
158 |
|
8293 | 159 |
v := TopView new. |
160 |
v beDialogView. |
|
161 |
v extent:200@200. |
|
162 |
v openModal |
|
163 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
164 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
165 |
popUp (always on top): |
8293 | 166 |
[exBegin] |
167 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
168 |
|
8293 | 169 |
v := TopView new. |
170 |
v bePopUpView. |
|
171 |
v extent:200@200. |
|
172 |
v openModal |
|
173 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
174 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
175 |
undecorated (looks loke popUp, but is not always on top): |
8293 | 176 |
[exBegin] |
177 |
|v| |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
178 |
|
8293 | 179 |
v := TopView new. |
180 |
v beUndecorated. |
|
181 |
v extent:200@200. |
|
182 |
v openModal |
|
183 |
[exEnd] |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
184 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
185 |
" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
186 |
! ! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
187 |
|
5720 | 188 |
!TopView class methodsFor:'accessing'! |
189 |
||
190 |
currentWindowBeingMoved |
|
6500 | 191 |
"the current window move operation |
5720 | 192 |
(only used with modeless popup windows; i.e. windows without decoration, |
193 |
which want to be moved by click-motion on the background)" |
|
194 |
||
195 |
^ CurrentWindowBeingMoved |
|
196 |
||
197 |
"Created: / 03-03-2011 / 19:20:34 / cg" |
|
198 |
! ! |
|
199 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
200 |
!TopView class methodsFor:'class initialization'! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
201 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
202 |
initialize |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
203 |
MasterSlaveMask := 16r0F. |
4498 | 204 |
TypeMaster := 16r01. |
205 |
TypeSlave := 16r02. |
|
206 |
TypePartner := 16r03. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
207 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
208 |
WindowTypeMask := 16rF0. |
4498 | 209 |
TypeDialog := 16r10. |
210 |
TypePopUp := 16r20. |
|
211 |
TypeUndecorated := 16r30. |
|
212 |
TypeToolWindow := 16r40. |
|
213 |
TypeToolDialog := 16r50. |
|
4798 | 214 |
TypeScreenDialog:= 16r60. |
6647 | 215 |
TypeUndecoratedResizable := 16r70. |
216 |
TypePopUpNonModal := 16r80. |
|
4498 | 217 |
|
218 |
MDIClientMask := 16r100. |
|
219 |
MDIClient := 16r100. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
220 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
221 |
" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
222 |
self initialize |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
223 |
" |
135 | 224 |
! ! |
225 |
||
1160 | 226 |
!TopView class methodsFor:'defaults'! |
135 | 227 |
|
228 |
defaultExtent |
|
586 | 229 |
"return the default extent of my instances. |
230 |
Topviews extents is 2/3 of screen by default" |
|
135 | 231 |
|
153 | 232 |
|display| |
233 |
||
234 |
display := Screen current. |
|
3072 | 235 |
display isNil ifTrue:[ |
5721 | 236 |
^ 600 @ 400 |
3072 | 237 |
]. |
3446 | 238 |
^ display defaultExtentForTopViews |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
239 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
240 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
241 |
forceModalBoxesToOpenAtCenter |
5614 | 242 |
"return the flag which forces all modal views to be opened |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
243 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
244 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
245 |
^ ForceModalBoxesToOpenAtCenter ? false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
246 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
247 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
248 |
forceModalBoxesToOpenAtCenter:aBoolean |
3768 | 249 |
"set/clear a flag which forces all modal views to be opened |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
250 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
251 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
252 |
ForceModalBoxesToOpenAtCenter := aBoolean |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
253 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
254 |
" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
255 |
TopView forceModalBoxesToOpenAtCenter:true |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
256 |
TopView forceModalBoxesToOpenAtCenter:false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
257 |
" |
3768 | 258 |
! |
259 |
||
260 |
forceModalBoxesToOpenAtPointer |
|
5614 | 261 |
"return the flag which forces all modal views to be opened |
3768 | 262 |
at the current pointer position" |
263 |
||
264 |
^ ForceModalBoxesToOpenAtPointer ? false |
|
265 |
! |
|
266 |
||
267 |
forceModalBoxesToOpenAtPointer:aBoolean |
|
5614 | 268 |
"set/clear the flag which forces all modal views to be opened |
3768 | 269 |
at the current pointer position" |
270 |
||
271 |
ForceModalBoxesToOpenAtPointer := aBoolean |
|
3978 | 272 |
! |
273 |
||
274 |
takeFocusWhenMapped:aBoolean |
|
275 |
"if turned on, topViews will grab the keyboard when mapped. |
|
276 |
This is useful on systems like openView or Win32, where a view needs a click |
|
277 |
otherwise" |
|
278 |
||
279 |
TakeFocusWhenMapped := aBoolean |
|
280 |
||
281 |
" |
|
282 |
StandardSystemView takeFocusWhenMapped:true |
|
283 |
" |
|
135 | 284 |
! ! |
285 |
||
8252 | 286 |
!TopView class methodsFor:'help'! |
287 |
||
288 |
helpSpec |
|
289 |
^ nil |
|
290 |
! ! |
|
291 |
||
3880 | 292 |
!TopView methodsFor:'Compatibility-ST80'! |
1410
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
293 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
294 |
displayBox |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
295 |
^ self bounds |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
296 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
297 |
"Created: 3.3.1997 / 16:31:33 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
298 |
! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
299 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
300 |
displayBox:aRectangle |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
301 |
self origin:aRectangle origin corner:aRectangle corner |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
302 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
303 |
"Created: 3.3.1997 / 16:34:38 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
304 |
! ! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
305 |
|
3370 | 306 |
!TopView methodsFor:'accessing'! |
307 |
||
308 |
keyboardProcessor |
|
309 |
"return my keyboard processor" |
|
310 |
||
311 |
^ keyboardProcessor |
|
312 |
||
313 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
314 |
"Modified: / 18.6.1998 / 20:00:18 / cg" |
|
315 |
! |
|
316 |
||
317 |
keyboardProcessor:something |
|
318 |
"set my keyboard processor" |
|
319 |
||
320 |
keyboardProcessor := something. |
|
321 |
||
322 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
323 |
"Modified: / 18.6.1998 / 20:00:30 / cg" |
|
4138 | 324 |
! |
325 |
||
326 |
label:labelString iconLabel:iconLabelString |
|
327 |
"/ ignored here - for compat. with StdSysViews |
|
8484 | 328 |
! |
329 |
||
330 |
resources |
|
331 |
resources isNil ifTrue:[ |
|
332 |
^ self class resources |
|
333 |
]. |
|
334 |
^ resources |
|
335 |
||
336 |
" |
|
337 |
TopView new resources |
|
338 |
" |
|
339 |
||
340 |
"Created: / 25-09-2018 / 08:43:13 / Claus Gittinger" |
|
3370 | 341 |
! ! |
342 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
343 |
!TopView methodsFor:'accessing-behavior'! |
269 | 344 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
345 |
beDialogView |
4798 | 346 |
"make me a Dialog Window; that is one which raises above all other ST/X views" |
347 |
||
4256 | 348 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
349 |
type isInteger ifTrue:[ |
5721 | 350 |
type := (type bitClear:WindowTypeMask) bitOr:TypeDialog. |
351 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
352 |
]. |
5614 | 353 |
type := #dialog |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
354 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
355 |
|
1765 | 356 |
beIndependent |
357 |
"make this an independent view; i.e. remove any master/slave or partner |
|
358 |
attribute (this is the default). |
|
359 |
However, the view remains in the current windowGroup" |
|
360 |
||
4256 | 361 |
"/ the nonInteger handling code is for backward compatibility only. |
4081 | 362 |
type isInteger ifTrue:[ |
5721 | 363 |
type := type bitClear:MasterSlaveMask. |
364 |
^ self. |
|
4081 | 365 |
]. |
1765 | 366 |
type := nil |
367 |
! |
|
368 |
||
4500 | 369 |
beMDIClientView |
4498 | 370 |
type := (type bitClear:MDIClientMask) bitOr:MDIClient. |
371 |
! |
|
372 |
||
269 | 373 |
beMaster |
5614 | 374 |
"make this a master-view. |
4032 | 375 |
All slave views within the same windowGroup will be closed if any master is closed |
376 |
and also de/iconify together with their master(s). |
|
377 |
(i.e. they follow their master(s))." |
|
269 | 378 |
|
4256 | 379 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
380 |
type isInteger ifTrue:[ |
5721 | 381 |
type := (type bitClear:MasterSlaveMask) bitOr:TypeMaster. |
382 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
383 |
]. |
269 | 384 |
type := #master |
298 | 385 |
|
386 |
" |
|
387 |
see example in TopView>>beSlave |
|
388 |
" |
|
389 |
||
390 |
"Created: 10.12.1995 / 13:30:50 / cg" |
|
269 | 391 |
! |
392 |
||
393 |
bePartner |
|
5614 | 394 |
"make this a partner-view. Each partner-view will automatically |
712 | 395 |
close other partner views (within the same windowGroup) when closed." |
269 | 396 |
|
4256 | 397 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
398 |
type isInteger ifTrue:[ |
5721 | 399 |
type := (type bitClear:MasterSlaveMask) bitOr:TypePartner. |
400 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
401 |
]. |
5614 | 402 |
type := #partner |
298 | 403 |
|
404 |
" |
|
405 |
create two topViews within the same group: |
|
406 |
if any of them is iconified/deiconified/closed, the other one is also |
|
407 |
||
408 |
|top1 top2| |
|
409 |
||
712 | 410 |
top1 := StandardSystemView new label:'partner'; extent:300@300. |
411 |
top2 := StandardSystemView new label:'partner'; extent:200@200. |
|
298 | 412 |
top1 bePartner. |
413 |
top2 bePartner. |
|
414 |
||
415 |
top1 open. |
|
416 |
top2 openInGroup:(top1 windowGroup) |
|
417 |
" |
|
418 |
||
419 |
"Created: 10.12.1995 / 13:29:59 / cg" |
|
712 | 420 |
"Modified: 25.5.1996 / 11:44:48 / cg" |
269 | 421 |
! |
422 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
423 |
bePopUpView |
4256 | 424 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
425 |
type isInteger ifTrue:[ |
5721 | 426 |
type := (type bitClear:WindowTypeMask) bitOr:TypePopUp. |
427 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
428 |
]. |
5614 | 429 |
type := #popup |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
430 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
431 |
|
5719 | 432 |
bePopUpViewNotModal |
6647 | 433 |
"experimental/unfinished - do not use" |
434 |
||
5719 | 435 |
"/ the nonInteger handling code is for backward compatibility only. |
6647 | 436 |
|
437 |
type isInteger ifTrue:[ |
|
438 |
type := (type bitClear:WindowTypeMask) bitOr:TypePopUpNonModal. |
|
439 |
^ self. |
|
440 |
]. |
|
5719 | 441 |
type := #popUpNotModal |
442 |
! |
|
443 |
||
4798 | 444 |
beScreenDialog |
445 |
"make me a Screen-Dialog Window; that is one which raises above ALL other windows |
|
446 |
(not only st/x ones)" |
|
447 |
||
448 |
"/ the nonInteger handling code is for backward compatibility only. |
|
449 |
type isInteger ifTrue:[ |
|
5721 | 450 |
type := (type bitClear:WindowTypeMask) bitOr:TypeScreenDialog. |
451 |
^ self. |
|
4798 | 452 |
]. |
5614 | 453 |
type := #dialog |
4798 | 454 |
! |
455 |
||
269 | 456 |
beSlave |
457 |
"make this a slave-view. It will be closed automatically, |
|
712 | 458 |
whenever any master of the windowgroup is closed. |
459 |
See also: #bePartner" |
|
269 | 460 |
|
4256 | 461 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
462 |
type isInteger ifTrue:[ |
5721 | 463 |
type := (type bitClear:MasterSlaveMask) bitOr:TypeSlave. |
464 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
465 |
]. |
5614 | 466 |
type := #slave |
298 | 467 |
|
468 |
" |
|
469 |
create two topViews within the same group: |
|
470 |
the slave is allowed to be iconified/close independ of the master; |
|
471 |
but if the master is iconified, the slave is also. |
|
472 |
||
473 |
|top1 top2| |
|
474 |
||
712 | 475 |
top1 := StandardSystemView new label:'master'; extent:300@300. |
476 |
top2 := StandardSystemView new label:'slave'; extent:200@200. |
|
298 | 477 |
top1 beMaster. |
478 |
top2 beSlave. |
|
479 |
||
480 |
top1 open. |
|
481 |
top2 openInGroup:(top1 windowGroup) |
|
482 |
" |
|
483 |
||
484 |
"Created: 10.12.1995 / 13:29:10 / cg" |
|
712 | 485 |
"Modified: 25.5.1996 / 11:45:30 / cg" |
269 | 486 |
! |
487 |
||
4256 | 488 |
beToolDialog |
6647 | 489 |
"make me a tool dialog Window with a smaller title area. |
490 |
Warning: not all window systems support that. Will be normal decorated on some systems (macosx)" |
|
491 |
||
4256 | 492 |
"/ the nonInteger handling code is for backward compatibility only. |
4254 | 493 |
type isInteger ifTrue:[ |
6647 | 494 |
type := (type bitClear:WindowTypeMask) bitOr:TypeToolDialog. |
495 |
^ self. |
|
4254 | 496 |
]. |
5614 | 497 |
type := #dialog |
4254 | 498 |
! |
499 |
||
4256 | 500 |
beToolWindow |
6647 | 501 |
"make me a tool Window with a smaller title area. |
502 |
Warning: not all window systems support that. Will be normal decorated on some systems (macosx)" |
|
503 |
||
4256 | 504 |
"/ the nonInteger handling code is for backward compatibility only. |
505 |
type isInteger ifTrue:[ |
|
6647 | 506 |
type := (type bitClear:WindowTypeMask) bitOr:TypeToolWindow. |
507 |
^ self. |
|
4256 | 508 |
]. |
5614 | 509 |
type := nil |
4256 | 510 |
! |
511 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
512 |
beUndecorated |
6647 | 513 |
"make me an undecorated Window. |
514 |
Warning: not all window systems support that. Will be decorated on some systems (macosx)" |
|
4798 | 515 |
|
4256 | 516 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
517 |
type isInteger ifTrue:[ |
6647 | 518 |
type := (type bitClear:WindowTypeMask) bitOr:TypeUndecorated. |
519 |
^ self. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
520 |
]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
521 |
type := nil |
6647 | 522 |
|
523 |
" |
|
524 |
TopView new open |
|
525 |
TopView new windowType:#dialog2; open |
|
526 |
TopView new windowType:#notitle; open |
|
527 |
TopView new beDialogView; open |
|
528 |
TopView new bePopUpView; open |
|
529 |
TopView new beToolDialog; open |
|
530 |
TopView new beUndecorated; open |
|
531 |
" |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
532 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
533 |
|
5724 | 534 |
beUndecoratedResizable |
6647 | 535 |
"make me an undecorated but resizable Window" |
536 |
"experimental/unfinished - do not use |
|
537 |
Warning: not all window systems support that. Will be decorated on some systems (macosx)" |
|
538 |
||
539 |
type isInteger ifTrue:[ |
|
540 |
type := (type bitClear:WindowTypeMask) bitOr:TypeUndecoratedResizable. |
|
541 |
^ self. |
|
542 |
]. |
|
5724 | 543 |
type := #undecoratedResizable |
544 |
||
545 |
"Created: / 03-03-2011 / 20:22:14 / cg" |
|
546 |
! |
|
547 |
||
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
548 |
focusSequence:aCollectionOfSubcomponents |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
549 |
"define the sequence for stepping through my components." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
550 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
551 |
windowGroup isNil ifTrue:[ |
5721 | 552 |
windowGroup := self windowGroupClass new. |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
553 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
554 |
windowGroup focusSequence:aCollectionOfSubcomponents. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
555 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
556 |
"Created: 6.3.1996 / 15:37:11 / cg" |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
557 |
"Modified: 30.4.1996 / 15:41:40 / cg" |
4569 | 558 |
! |
559 |
||
5724 | 560 |
windowType:aTypeSymbol |
561 |
"experimental - do not use" |
|
562 |
||
563 |
type := aTypeSymbol |
|
564 |
||
565 |
"Created: / 03-03-2011 / 20:12:40 / cg" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
566 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
567 |
|
4836 | 568 |
!TopView methodsFor:'accessing-look'! |
569 |
||
570 |
addTrayIcon:anImageOrForm toolTipMessage:toolTipMessage |
|
571 |
"WIN32 only: add a tray icon for myself; |
|
572 |
may then receive tray*-events in the future." |
|
573 |
||
7265 | 574 |
device |
575 |
addTrayIconFor:self |
|
576 |
icon:anImageOrForm iconMask:nil |
|
577 |
toolTipMessage:toolTipMessage |
|
4836 | 578 |
|
579 |
" |
|
580 |
|v icon| |
|
581 |
||
582 |
v := StandardSystemView new. |
|
583 |
v openAndWait. |
|
584 |
||
585 |
icon := Icon stxIcon. |
|
586 |
v addTrayIcon:icon toolTipMessage:'Hi There' |
|
587 |
" |
|
588 |
||
589 |
"Modified: / 05-11-2007 / 12:10:48 / cg" |
|
590 |
! ! |
|
591 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
592 |
!TopView methodsFor:'event handling'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
593 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
594 |
keyPress:key x:x y:y |
5614 | 595 |
"notice: this ought to be moved into the upcoming |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
596 |
StandardSystemViewController." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
597 |
|
5614 | 598 |
<resource: #keyboard ( #Tab |
5721 | 599 |
#FocusNext #FocusPrevious |
600 |
#CursorDown #CursorUp ) > |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
601 |
|
932 | 602 |
windowGroup notNil ifTrue:[ |
5721 | 603 |
key == #Tab ifTrue:[ |
604 |
self sensor shiftDown ifTrue:[ |
|
605 |
windowGroup focusPrevious |
|
606 |
] ifFalse:[ |
|
607 |
windowGroup focusNext |
|
608 |
]. |
|
609 |
^ self. |
|
610 |
]. |
|
611 |
(key == #FocusNext or:[key == #CursorDown]) ifTrue:[ |
|
612 |
windowGroup focusNext. |
|
613 |
^ self. |
|
614 |
]. |
|
615 |
(key == #FocusPrevious or:[key == #CursorUp]) ifTrue:[ |
|
616 |
windowGroup focusPrevious. |
|
617 |
^ self. |
|
618 |
]. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
619 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
620 |
|
932 | 621 |
super keyPress:key x:x y:y |
622 |
||
4823
3a4246ca2a32
tray stuff only sent to a topView
Claus Gittinger <cg@exept.de>
parents:
4799
diff
changeset
|
623 |
"Created: / 01-02-1996 / 22:08:30 / cg" |
3a4246ca2a32
tray stuff only sent to a topView
Claus Gittinger <cg@exept.de>
parents:
4799
diff
changeset
|
624 |
"Modified: / 31-10-2007 / 01:48:50 / cg" |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
625 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
626 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
627 |
showActivity:someMessage |
5614 | 628 |
"some activityNotification shalt be communicated to the user. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
629 |
Default for activity notifications here: ignore them" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
630 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
631 |
^ self |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
632 |
|
4823
3a4246ca2a32
tray stuff only sent to a topView
Claus Gittinger <cg@exept.de>
parents:
4799
diff
changeset
|
633 |
"Created: / 16-12-1995 / 18:40:13 / cg" |
3a4246ca2a32
tray stuff only sent to a topView
Claus Gittinger <cg@exept.de>
parents:
4799
diff
changeset
|
634 |
"Modified: / 31-10-2007 / 01:48:33 / cg" |
4836 | 635 |
! |
636 |
||
637 |
trayButtonDoubleClick:buttonNr |
|
638 |
"WIN32 only: double-click in the tray. |
|
639 |
Nothing done here - must be redefined in a subclass" |
|
640 |
||
641 |
^ self |
|
642 |
||
643 |
"Created: / 31-10-2007 / 01:46:27 / cg" |
|
644 |
"Modified: / 05-11-2007 / 12:11:24 / cg" |
|
645 |
! |
|
646 |
||
647 |
trayButtonPress:buttonNr |
|
648 |
"WIN32 only: button-press in the tray. |
|
649 |
Nothing done here - must be redefined in a subclass" |
|
650 |
||
651 |
^ self |
|
652 |
||
653 |
"Created: / 31-10-2007 / 01:25:52 / cg" |
|
654 |
"Modified: / 05-11-2007 / 12:11:21 / cg" |
|
655 |
! |
|
656 |
||
657 |
trayButtonRelease:buttonNr |
|
658 |
"WIN32 only: button-release in the tray. |
|
659 |
Nothing done here - must be redefined in a subclass" |
|
660 |
||
661 |
^ self |
|
662 |
||
663 |
"Created: / 31-10-2007 / 01:25:55 / cg" |
|
664 |
"Modified: / 05-11-2007 / 12:11:19 / cg" |
|
665 |
! |
|
666 |
||
667 |
trayMouseMotion |
|
668 |
"WIN32 only: mouse-motion in the tray. |
|
669 |
Nothing done here - must be redefined in a subclass" |
|
670 |
||
671 |
^ self |
|
672 |
||
673 |
"Created: / 31-10-2007 / 01:25:33 / cg" |
|
674 |
"Modified: / 05-11-2007 / 12:11:17 / cg" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
675 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
676 |
|
5720 | 677 |
!TopView methodsFor:'event handling-window move'! |
678 |
||
679 |
doWindowMove |
|
6500 | 680 |
"a window move operation |
5720 | 681 |
(only used with modeless popup windows; i.e. windows without decoration, |
682 |
which want to be moved by click-motion on the background)" |
|
683 |
||
684 |
|delta| |
|
685 |
||
686 |
CurrentWindowBeingMoved == self ifTrue:[ |
|
7265 | 687 |
delta := device pointerPosition - CurrentWindowMoveStart. |
688 |
(CurrentWindowMoveState notNil |
|
689 |
or:[ delta r > 5 ]) ifTrue:[ |
|
690 |
CurrentWindowMoveState := #inMove. |
|
691 |
CurrentWindowMoveStart := device pointerPosition. |
|
692 |
self origin:(self origin + delta). |
|
693 |
]. |
|
5720 | 694 |
]. |
695 |
||
696 |
"Created: / 03-03-2011 / 19:13:08 / cg" |
|
697 |
! |
|
698 |
||
699 |
endWindowMove |
|
6500 | 700 |
"a window move operation |
5720 | 701 |
(only used with modeless popup windows; i.e. windows without decoration, |
702 |
which want to be moved by click-motion on the background)" |
|
703 |
||
704 |
CurrentWindowBeingMoved := nil. |
|
705 |
||
706 |
"Created: / 03-03-2011 / 19:17:24 / cg" |
|
707 |
! |
|
708 |
||
709 |
startWindowMove |
|
6500 | 710 |
"a window move operation |
5720 | 711 |
(only used with modeless popup windows; i.e. windows without decoration, |
712 |
which want to be moved by click-motion on the background)" |
|
713 |
||
714 |
CurrentWindowBeingMoved := self. |
|
7265 | 715 |
CurrentWindowMoveStart := device pointerPosition. |
5720 | 716 |
CurrentWindowMoveState := nil. |
717 |
||
718 |
"Created: / 03-03-2011 / 19:09:39 / cg" |
|
5723
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
719 |
! |
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
720 |
|
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
721 |
startWindowMoveOnButtonPress |
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
722 |
"this allows undecorated windows (i.e. modeless popups) to be moved by |
6500 | 723 |
drag-moving in their window area |
5723
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
724 |
(similar to how mac windows and realplayer are moved). |
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
725 |
Return true here, if a window move should be initiated" |
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
726 |
|
7441 | 727 |
^ self isModal not and:[self topView isPopUpView] |
5723
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
728 |
|
d75bdd85df13
added: #startWindowMoveOnButtonPress
Claus Gittinger <cg@exept.de>
parents:
5721
diff
changeset
|
729 |
"Created: / 03-03-2011 / 19:30:59 / cg" |
5720 | 730 |
! ! |
731 |
||
4992
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
732 |
!TopView methodsFor:'help'! |
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
733 |
|
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
734 |
flyByHelpDependsOnPositionIn:aView |
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
735 |
"subclasses where the help-text depends upon the pointer position might |
7335 | 736 |
want to redefine this. |
737 |
If true is returned, the tooltip-process will monitor mouse movements and |
|
738 |
ask for the help text again. |
|
739 |
If false is returned (the default here), it will only look at |
|
740 |
mouse-enter/leave time." |
|
4992
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
741 |
|
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
742 |
^ false |
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
743 |
! ! |
f5ad380a9967
+ flyByHelpDependsOnPositionIn:
Claus Gittinger <cg@exept.de>
parents:
4982
diff
changeset
|
744 |
|
2466 | 745 |
!TopView methodsFor:'help stubs'! |
746 |
||
3697 | 747 |
helpTextFor:aSubView |
7093 | 748 |
"this will vanish - it's temporarily here to allow for stdSysViews to be |
3697 | 749 |
used as a masterApp for dialogs" |
750 |
||
751 |
^ nil |
|
752 |
! |
|
753 |
||
2466 | 754 |
showHelp:aHelpText for:aView |
755 |
"dummy - added in case a regular topView is installed |
|
7335 | 756 |
as a dialog's masterApplication. |
2466 | 757 |
Concrete application subclasses may redefine this to |
758 |
display a help text in one of its message areas" |
|
759 |
! ! |
|
760 |
||
3884 | 761 |
!TopView methodsFor:'initialization & release'! |
2573 | 762 |
|
4438 | 763 |
addToCurrentProject |
764 |
"for compatibility with views which can" |
|
765 |
! |
|
766 |
||
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
767 |
assignInitialKeyboardFocus |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
768 |
"assign the initial keyboard focus to a 'useful' component." |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
769 |
|
4180 | 770 |
|componentWithInitialFocus| |
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
771 |
|
4180 | 772 |
"/ |keyboardProcessor componentWithInitialFocus| |
773 |
"/ |
|
774 |
"/ keyboardProcessor := self keyboardProcessor. |
|
775 |
"/ keyboardProcessor notNil ifTrue:[ |
|
776 |
"/ componentWithInitialFocus := keyboardProcessor componentWithInitialFocus. |
|
777 |
"/ componentWithInitialFocus notNil ifTrue:[ |
|
778 |
"/ self windowGroup focusView:componentWithInitialFocus byTab:true. |
|
5614 | 779 |
"/ "/ componentWithInitialFocus requestFocus. |
4180 | 780 |
"/ ^ self. |
781 |
"/ ] |
|
782 |
"/ ]. |
|
783 |
||
5614 | 784 |
(windowGroup notNil |
4180 | 785 |
and:[(componentWithInitialFocus := windowGroup defaultKeyboardConsumer) notNil]) ifTrue:[ |
6791 | 786 |
windowGroup focusView:componentWithInitialFocus byTab:true "false". |
4180 | 787 |
] ifFalse:[ |
6791 | 788 |
self assignKeyboardFocusToFirstKeyboardConsumer. |
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
789 |
]. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
790 |
! |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
791 |
|
2573 | 792 |
destroy |
793 |
"the receiver is to be destroyed - look for partners and slaves" |
|
794 |
||
795 |
|wg dev| |
|
796 |
||
797 |
wg := windowGroup. "/ have to fetch windowGroup before; |
|
7265 | 798 |
dev := device. "/ and device ... |
2573 | 799 |
super destroy. "/ ... since destroy nils em |
800 |
||
801 |
"/ dev notNil ifTrue:[ |
|
802 |
"/ dev flush |
|
803 |
"/ ]. |
|
804 |
||
805 |
"/ |
|
806 |
"/ destroy slaves and partners |
|
807 |
"/ |
|
808 |
self masterSlaveMessage:#destroy inGroup:wg |
|
809 |
||
3446 | 810 |
"Modified: 20.3.1997 / 22:14:16 / cg" |
811 |
! |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
812 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
813 |
initialize |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
814 |
"initialize the topViews position for the screens center" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
815 |
|
7847 | 816 |
<modifier: #super> "must be called if redefined" |
817 |
||
5971 | 818 |
|screenCenter| |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
819 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
820 |
super initialize. |
7265 | 821 |
device initializeTopViewHookFor:self. |
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
822 |
|
5625
09972b8ce40a
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
5620
diff
changeset
|
823 |
"/ MULTI SCREEN |
7265 | 824 |
screenCenter := device centerOfMonitorHavingPointer. |
5614 | 825 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
826 |
left := screenCenter x - (width // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
827 |
top := screenCenter y - (height // 2). |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
828 |
type := 0 |
5625
09972b8ce40a
comment/format in: #initialize
Claus Gittinger <cg@exept.de>
parents:
5620
diff
changeset
|
829 |
|
7847 | 830 |
"Modified: / 08-02-2017 / 00:26:43 / cg" |
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
831 |
! |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
832 |
|
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
833 |
postRealize |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
834 |
super postRealize. |
3370 | 835 |
|
836 |
keyboardProcessor isNil ifTrue:[ |
|
7265 | 837 |
keyboardProcessor := KeyboardProcessor new. |
3370 | 838 |
]. |
839 |
||
7265 | 840 |
device realizedTopViewHookFor:self |
3706 | 841 |
! |
842 |
||
4407 | 843 |
realize |
844 |
self isMarkedAsUnmappedModalBox ifTrue:[ |
|
5721 | 845 |
"/ must clear this flag |
846 |
"/ - otherwise realize thinks it is already realized. |
|
847 |
realized := false. |
|
848 |
self unmarkAsUnmappedModalBox. |
|
4407 | 849 |
]. |
850 |
super realize. |
|
6275 | 851 |
! |
852 |
||
853 |
release |
|
854 |
keyboardProcessor notNil ifTrue:[ |
|
855 |
keyboardProcessor release. |
|
856 |
keyboardProcessor := nil. |
|
857 |
]. |
|
858 |
super release |
|
3446 | 859 |
! ! |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
860 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
861 |
!TopView methodsFor:'misc'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
862 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
863 |
raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
864 |
"deiconify & bring to front" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
865 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
866 |
self isCollapsed ifTrue:[ |
3818
6a5b62a616a7
do not unmap in order to raiseDeiconified
Claus Gittinger <cg@exept.de>
parents:
3768
diff
changeset
|
867 |
"/ self unmap. |
5721 | 868 |
self realize. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
869 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
870 |
self raise |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
871 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
872 |
" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
873 |
Transcript topView raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
874 |
" |
645 | 875 |
|
876 |
"Modified: 3.5.1996 / 23:49:36 / stefan" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
877 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
878 |
|
2124
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
879 |
waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
880 |
"wait until the receiver has been closed. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
881 |
Can be used to synchronize multiple-window applications, |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
882 |
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
|
883 |
when invoking commands with the rDoit mechanism" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
884 |
|
6275 | 885 |
[self drawableId isNil] whileFalse:[ |
6500 | 886 |
Delay waitForSeconds:0.1. |
2124
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
887 |
]. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
888 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
889 |
"asynchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
890 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
891 |
EditTextView open |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
892 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
893 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
894 |
"synchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
895 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
896 |
EditTextView open topView waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
897 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
898 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
899 |
"Modified: / 20.5.1998 / 18:03:37 / cg" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
900 |
! |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
901 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
902 |
withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
903 |
"evaluate aBlock while showing aCursor in all my views. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
904 |
Return the value as returned by aBlock." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
905 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
906 |
windowGroup notNil ifTrue:[ |
5721 | 907 |
^ windowGroup withCursor:aCursor do:aBlock |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
908 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
909 |
^ super withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
910 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
911 |
|
8252 | 912 |
!TopView methodsFor:'private'! |
913 |
||
914 |
helpSpec |
|
915 |
^ self class helpSpec |
|
916 |
! ! |
|
917 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
918 |
!TopView methodsFor:'queries'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
919 |
|
4338 | 920 |
beepWhenOpening |
5620 | 921 |
"can be redefined by error and warnBoxes" |
922 |
||
4338 | 923 |
^ false |
5620 | 924 |
|
925 |
"Modified: / 21-10-2010 / 17:05:08 / cg" |
|
4338 | 926 |
! |
927 |
||
269 | 928 |
heightIncludingBorder |
7694 | 929 |
"return the view's overall-height" |
269 | 930 |
|
931 |
^ height |
|
932 |
! |
|
933 |
||
934 |
isCollapsed |
|
935 |
"ST80 compatibility: return true if the view is not shown (i.e. iconified)" |
|
936 |
||
1536 | 937 |
"/ ^ device windowIsIconified:drawableId |
269 | 938 |
^ shown not |
1536 | 939 |
|
940 |
"Modified: 4.4.1997 / 14:44:39 / cg" |
|
269 | 941 |
! |
942 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
943 |
isDialogView |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
944 |
"return true if this is a dialog view" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
945 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
946 |
type isInteger ifTrue:[ |
5721 | 947 |
^ (type bitAnd:WindowTypeMask) == TypeDialog |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
948 |
]. |
4256 | 949 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
950 |
^ type == #dialog |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
951 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
952 |
|
4500 | 953 |
isMDIClientView |
5724 | 954 |
type isInteger ifFalse:[^ false]. |
955 |
||
4498 | 956 |
^ (type bitAnd:MDIClientMask) == MDIClient. |
5724 | 957 |
|
958 |
"Modified: / 03-03-2011 / 20:14:09 / cg" |
|
4498 | 959 |
! |
960 |
||
3620 | 961 |
isMaster |
962 |
"return true, if this is a masterView" |
|
963 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
964 |
type isInteger ifTrue:[ |
5721 | 965 |
^ (type bitAnd:MasterSlaveMask) == TypeMaster |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
966 |
]. |
4256 | 967 |
"/ the nonInteger handling code is for backward compatibility only. |
3620 | 968 |
^ type == #master |
969 |
! |
|
970 |
||
3347 | 971 |
isModal |
972 |
"return true, if the receiver has been opened modal" |
|
973 |
||
974 |
windowGroup isNil ifTrue:[^ false]. |
|
3446 | 975 |
^ windowGroup isModal |
976 |
! |
|
3347 | 977 |
|
3621 | 978 |
isPartner |
979 |
"return true, if this is a partnerView" |
|
980 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
981 |
type isInteger ifTrue:[ |
5721 | 982 |
^ (type bitAnd:MasterSlaveMask) == TypePartner |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
983 |
]. |
4256 | 984 |
"/ the nonInteger handling code is for backward compatibility only. |
3621 | 985 |
^ type == #partner |
986 |
! |
|
987 |
||
1398 | 988 |
isPopUpView |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
989 |
"return true if I am a popup view. |
5718 | 990 |
(i.e. I want to come up without any decoration and popUp to top immediately)" |
1398 | 991 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
992 |
type isInteger ifTrue:[ |
6500 | 993 |
^ (type bitAnd:WindowTypeMask) == TypePopUp |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
994 |
]. |
4256 | 995 |
"/ the nonInteger handling code is for backward compatibility only. |
1398 | 996 |
^ type == #popup |
997 |
||
5718 | 998 |
"Created: / 28-02-1997 / 22:12:30 / cg" |
999 |
"Modified: / 03-03-2011 / 15:00:35 / cg" |
|
1398 | 1000 |
! |
1001 |
||
4798 | 1002 |
isScreenDialog |
1003 |
"return true if I am a screen dialog view. |
|
5656 | 1004 |
(i.e. I want to come up above all other windows)" |
4798 | 1005 |
|
1006 |
type isInteger ifTrue:[ |
|
6500 | 1007 |
^ (type bitAnd:WindowTypeMask) == TypeScreenDialog |
4798 | 1008 |
]. |
1009 |
"/ the nonInteger handling code is for backward compatibility only. |
|
1010 |
^ false |
|
5656 | 1011 |
|
1012 |
"Modified: / 01-12-2010 / 12:15:59 / cg" |
|
4798 | 1013 |
! |
1014 |
||
3620 | 1015 |
isSlave |
1016 |
"return true, if this is a slaveView" |
|
1017 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1018 |
type isInteger ifTrue:[ |
5721 | 1019 |
^ (type bitAnd:MasterSlaveMask) == TypeSlave |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1020 |
]. |
4256 | 1021 |
"/ the nonInteger handling code is for backward compatibility only. |
3620 | 1022 |
^ type == #slave |
1023 |
! |
|
1024 |
||
4256 | 1025 |
isToolDialog |
1026 |
"return true if I am a toolWindow dialog view. |
|
5717 | 1027 |
(i.e. I want to come up with a smaller window-title area, without minimize and maximize buttons)" |
4256 | 1028 |
|
1029 |
type isInteger ifTrue:[ |
|
6500 | 1030 |
^ (type bitAnd:WindowTypeMask) == TypeToolDialog |
4256 | 1031 |
]. |
1032 |
"/ the nonInteger handling code is for backward compatibility only. |
|
1033 |
^ false |
|
5717 | 1034 |
|
1035 |
"Modified: / 03-03-2011 / 14:59:42 / cg" |
|
4256 | 1036 |
! |
1037 |
||
4254 | 1038 |
isToolWindow |
1039 |
"return true if I am a toolWindow view. |
|
5717 | 1040 |
(i.e. I want to come up with a smaller window-title area, without minimize and maximize buttons)" |
4254 | 1041 |
|
1042 |
type isInteger ifTrue:[ |
|
6500 | 1043 |
^ (type bitAnd:WindowTypeMask) == TypeToolWindow |
4254 | 1044 |
]. |
4256 | 1045 |
"/ the nonInteger handling code is for backward compatibility only. |
1046 |
^ false |
|
5717 | 1047 |
|
1048 |
"Modified: / 03-03-2011 / 14:59:38 / cg" |
|
4254 | 1049 |
! |
1050 |
||
1481 | 1051 |
isTopView |
1052 |
"return true, since I am a topView" |
|
1053 |
||
1054 |
^ true |
|
1055 |
||
1056 |
"Created: 22.3.1997 / 14:45:55 / cg" |
|
1057 |
! |
|
1058 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1059 |
isUndecoratedView |
5717 | 1060 |
"return true if I am an undecorated view (no minimize, maximize and close buttons)." |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1061 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1062 |
type isInteger ifTrue:[ |
6500 | 1063 |
^ (type bitAnd:WindowTypeMask) == TypeUndecorated |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1064 |
]. |
4256 | 1065 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1066 |
^ false |
5717 | 1067 |
|
1068 |
"Modified: / 03-03-2011 / 15:00:22 / cg" |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1069 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1070 |
|
269 | 1071 |
preferredExtent |
1072 |
"return my preferred extent - this is the minimum size I would like to have. |
|
1073 |
The default here is the classes default extent, |
|
1074 |
however many subclasses redefine this to compute the actual value |
|
1075 |
depending on the sizes of the contents or subcomponents." |
|
1076 |
||
5059
0b3c75d7dbad
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
4992
diff
changeset
|
1077 |
"/ If I have an explicit preferredExtent.. |
0b3c75d7dbad
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
4992
diff
changeset
|
1078 |
explicitExtent notNil ifTrue:[ |
5721 | 1079 |
^ explicitExtent |
5059
0b3c75d7dbad
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
4992
diff
changeset
|
1080 |
]. |
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
1081 |
|
5059
0b3c75d7dbad
changed #preferredExtent - use explicitExtent instvar
Stefan Vogel <sv@exept.de>
parents:
4992
diff
changeset
|
1082 |
"/ If I have a cached preferredExtent value.. |
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
1083 |
preferredExtent notNil ifTrue:[ |
5721 | 1084 |
^ preferredExtent |
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
1085 |
]. |
269 | 1086 |
^ self class defaultExtent |
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
1087 |
|
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
1088 |
"Modified: 19.7.1996 / 20:45:41 / cg" |
269 | 1089 |
! |
1090 |
||
1091 |
widthIncludingBorder |
|
7694 | 1092 |
"return the view's overall-width" |
269 | 1093 |
|
1094 |
^ width |
|
2808
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
1095 |
! |
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
1096 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1097 |
windowStyle |
4254 | 1098 |
"return a symbol describing my style which should be one of |
1099 |
#dialog, #popUp, #undecorated, #normal or #toolWindow. |
|
1100 |
This is used by the device as a decoration hint." |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1101 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1102 |
|t| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1103 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1104 |
type isInteger ifTrue:[ |
6647 | 1105 |
t := type bitAnd:WindowTypeMask. |
1106 |
t == TypeUndecorated ifTrue:[^ #undecorated]. |
|
1107 |
t == TypeDialog ifTrue:[^ #dialog]. |
|
1108 |
t == TypePopUp ifTrue:[^ #popUp]. |
|
1109 |
t == TypeToolWindow ifTrue:[^ #toolWindow]. |
|
1110 |
t == TypeToolDialog ifTrue:[^ #toolDialog]. |
|
1111 |
t == TypeUndecoratedResizable ifTrue:[^ #dialog]. |
|
1112 |
t == TypePopUpNonModal ifTrue:[^ #undecorated ]. |
|
1113 |
^ #normal |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1114 |
]. |
4256 | 1115 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1116 |
^ super windowStyle |
269 | 1117 |
! ! |
1118 |
||
4338 | 1119 |
!TopView methodsFor:'realization'! |
1120 |
||
1121 |
openModal |
|
1122 |
"added bell to wake up user" |
|
1123 |
||
1124 |
(self beepWhenOpening) ifTrue:[ |
|
5721 | 1125 |
self beep. |
4338 | 1126 |
]. |
1127 |
super openModal |
|
1128 |
||
1129 |
" |
|
1130 |
self warn:'hello' |
|
1131 |
self information:'hello' |
|
1132 |
ModalBox new openModal |
|
1133 |
WarningBox new openModal |
|
1134 |
InfoBox new openModal |
|
1135 |
" |
|
1136 |
||
1137 |
"Modified: 28.5.1996 / 16:59:01 / cg" |
|
1138 |
! ! |
|
1139 |
||
3881 | 1140 |
!TopView methodsFor:'show & hide'! |
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1141 |
|
4353 | 1142 |
activate |
1143 |
"added for MS-windows - much like raise. |
|
1144 |
Raise/Activate seem to work only within my own (ST/X)-windows; |
|
1145 |
they do not raise one of my views above another (for example: command.com)-window. |
|
5614 | 1146 |
Can anyone tell me what the difference between raise, activate and setForeground |
4353 | 1147 |
really is (I mean really - not what is written in the crappy documentation)" |
1148 |
||
6589 | 1149 |
|id| |
1150 |
||
1151 |
(id := self drawableId) isNil ifTrue:[ |
|
1152 |
self create. |
|
1153 |
id := self drawableId |
|
1154 |
]. |
|
7265 | 1155 |
device |
6589 | 1156 |
activateWindow:id; |
1157 |
focusView:self |
|
4353 | 1158 |
|
1159 |
" |
|
1160 |
Transcript topView activate |
|
1161 |
" |
|
1162 |
! |
|
1163 |
||
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1164 |
fixPosition:aPoint |
5614 | 1165 |
"set origin to aPoint, but make sure, that the box is fully visible |
8040 | 1166 |
by shifting it into the visible screen area if necessary. |
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1167 |
This prevents invisible modalBoxes (which you could never close)." |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1168 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1169 |
self origin:aPoint. |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1170 |
self makeFullyVisible |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1171 |
|
8040 | 1172 |
"Created: / 28-02-1997 / 16:39:31 / cg" |
1173 |
"Modified (comment): / 30-05-2017 / 17:43:00 / mawalch" |
|
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1174 |
! |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1175 |
|
5272
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1176 |
hide |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1177 |
|masterGroup myApplication| |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1178 |
|
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1179 |
realized ifFalse:[^ self]. |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1180 |
|
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1181 |
"/ if I am a modal-opened application's view |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1182 |
"/ (for example, an UIPainter) give it a chance |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1183 |
"/ to intercept the hide. |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1184 |
"/ Q: shouln't this be done in the windowGroup, |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1185 |
"/ by sending a closerequest always and letting popUps |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1186 |
"/ respond by hiding ??? |
5287 | 1187 |
|
5272
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1188 |
(windowGroup notNil |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1189 |
and:[ windowGroup isModal ]) ifTrue:[ |
5721 | 1190 |
masterGroup := windowGroup previousGroup. |
1191 |
myApplication := self application. |
|
5272
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1192 |
|
5721 | 1193 |
(myApplication notNil |
1194 |
and:[ masterGroup isNil or:[myApplication ~= masterGroup application]]) ifTrue:[ |
|
1195 |
AbortOperationRequest handle:[:ex | |
|
6500 | 1196 |
"/ in case the close is caught by the application |
5721 | 1197 |
^ self. |
1198 |
] do:[ |
|
1199 |
myApplication closeRequest. |
|
5287 | 1200 |
|
5721 | 1201 |
"/ if myApp called closeDownViews, it wants me to hide. |
1202 |
"/ otherwise, it has redefined closeRequest to return without closeDownViews. |
|
1203 |
realized ifTrue:[ |
|
1204 |
"/ closeDownViews was not called - app wants me to remain open |
|
1205 |
^ self |
|
1206 |
]. |
|
1207 |
]. |
|
1208 |
]. |
|
5272
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1209 |
]. |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1210 |
super hide. |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1211 |
! |
2e4ccb226a3f
hide redefined to allow abort in close.
Claus Gittinger <cg@exept.de>
parents:
5261
diff
changeset
|
1212 |
|
3916 | 1213 |
map |
1214 |
"make the view visible on the screen. |
|
1215 |
For topViews, the windowManager will choose (or ask for) the |
|
1216 |
views position on the screen. |
|
1217 |
Notice: |
|
5721 | 1218 |
Actually, this method is only valid for topViews; |
1219 |
however, it is defined here to allow things like 'Button new realize'" |
|
3916 | 1220 |
|
1221 |
self mapAt:(self origin) iconified:false |
|
1222 |
! |
|
1223 |
||
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1224 |
mapIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1225 |
"make the view visible but iconified. |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1226 |
In contrast to map, which does it non-iconified" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1227 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1228 |
realized ifFalse:[ |
7265 | 1229 |
" |
1230 |
now, make the view visible |
|
1231 |
" |
|
1232 |
realized := true. |
|
1233 |
device |
|
1234 |
mapView:self id:self drawableId iconified:true |
|
1235 |
atX:left y:top width:width height:height |
|
1236 |
minExtent:(self minExtent) maxExtent:(self maxExtent) |
|
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1237 |
] |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1238 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1239 |
"Modified: 25.2.1997 / 22:44:33 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1240 |
"Created: 24.7.1997 / 12:48:21 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1241 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1242 |
|
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1243 |
positionOffset |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1244 |
"return the delta, by which the box should be |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1245 |
displaced from the mouse pointer. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1246 |
Here, the boxes center is returned as a default. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1247 |
Usually redefined in subclasses to have the most convenient |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1248 |
ok-button appear under the pointer." |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1249 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1250 |
^ self extent // 2 |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1251 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
1252 |
"Created: 28.2.1997 / 22:56:34 / cg" |
4353 | 1253 |
! |
1254 |
||
1255 |
setForegroundWindow |
|
4522 | 1256 |
"make a window the foreground window (so raise and activate it). |
1257 |
Under Win 98/Me/XP/2000 the window is not raised/activated, if a window from |
|
1258 |
a different process is currently active - in this case the title bar/icon is flashed. |
|
4974
bd8ff34bd381
Comment in #raise/#setForegroundWindow
Stefan Vogel <sv@exept.de>
parents:
4961
diff
changeset
|
1259 |
this also raises the priority of the sending thread slightly. |
bd8ff34bd381
Comment in #raise/#setForegroundWindow
Stefan Vogel <sv@exept.de>
parents:
4961
diff
changeset
|
1260 |
|
5614 | 1261 |
Mark a TopView as #beScreenDialog, to send this on open." |
4353 | 1262 |
|
6275 | 1263 |
self drawableId isNil ifTrue:[self create]. |
7265 | 1264 |
device setForegroundWindow:self drawableId |
4353 | 1265 |
|
1266 |
" |
|
4974
bd8ff34bd381
Comment in #raise/#setForegroundWindow
Stefan Vogel <sv@exept.de>
parents:
4961
diff
changeset
|
1267 |
Transcript topView raise |
4353 | 1268 |
Transcript topView setForegroundWindow |
1269 |
" |
|
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1270 |
! ! |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
1271 |
|
269 | 1272 |
!TopView methodsFor:'startup'! |
1273 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1274 |
openAt:aPosition transientFor:anotherView |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1275 |
"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
|
1276 |
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
|
1277 |
(i.e. suppress any ghostframe). |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1278 |
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
|
1279 |
anotherView - it will deiconify with it and (on some windowManagers) |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1280 |
have no iconify button of its own. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1281 |
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
|
1282 |
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
|
1283 |
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
|
1284 |
|
5887 | 1285 |
<resource: #obsolete> |
1286 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1287 |
|otherId| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1288 |
|
5887 | 1289 |
self obsoleteMethodWarning. |
1290 |
||
6275 | 1291 |
self drawableId isNil ifTrue:[self create]. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1292 |
anotherView isNil ifTrue:[ |
7265 | 1293 |
otherId := self drawableId. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1294 |
] ifFalse:[ |
7265 | 1295 |
anotherView create. |
1296 |
otherId := anotherView id. |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1297 |
]. |
7265 | 1298 |
device setTransient:self drawableId for:otherId. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1299 |
self origin:aPosition. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1300 |
self open |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1301 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1302 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1303 |
|v1 v2| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1304 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1305 |
v1 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1306 |
v2 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1307 |
v1 open. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1308 |
v2 openAt:0@0 transientFor:v1. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1309 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1310 |
|
960 | 1311 |
" |
1312 |
|v1| |
|
1313 |
||
1314 |
v1 := StandardSystemView extent:300@300. |
|
1315 |
v1 openAt:0@0 transientFor:v1. |
|
1316 |
" |
|
1317 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1318 |
"Created: 28.6.1996 / 10:51:55 / cg" |
1836 | 1319 |
"Modified: 28.7.1997 / 18:53:16 / cg" |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1320 |
! |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1321 |
|
1353 | 1322 |
openDisplayAt:aPoint |
1323 |
"ST-80 compatibility: open the view centered around aPoint" |
|
1324 |
||
1325 |
^ self openModelessAt:(aPoint - (self extent//2)) |
|
1326 |
||
1327 |
" |
|
1328 |
(TopView new extent:200@200) openDisplayAt:300@300 |
|
1329 |
" |
|
1330 |
! |
|
1331 |
||
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1332 |
openIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1333 |
"open the view in iconified state" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1334 |
|
1829 | 1335 |
self openModelessAt:nil iconified:true |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1336 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1337 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1338 |
FileBrowser new openIconified |
1829 | 1339 |
ChangesBrowser new openIconified |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1340 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1341 |
|
1829 | 1342 |
"Modified: 24.7.1997 / 14:54:58 / cg" |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1343 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1344 |
|
1336 | 1345 |
openIn:aBoundaryRectangle |
5614 | 1346 |
"set origin & extent and open. |
7233 | 1347 |
The given extent overrides the receiver's preferredExtent. |
1336 | 1348 |
Added for ST-80 compatibility" |
1349 |
||
5614 | 1350 |
self |
7233 | 1351 |
origin:aBoundaryRectangle origin; |
1352 |
extent:aBoundaryRectangle extent; |
|
1353 |
sizeFixed:true. |
|
1336 | 1354 |
self open |
1355 |
||
1356 |
"Modified: 12.2.1997 / 11:58:21 / cg" |
|
1357 |
! |
|
1358 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1359 |
openTransientAt:aPosition |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1360 |
"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
|
1361 |
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
|
1362 |
(i.e. suppress any ghostframe). |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1363 |
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
|
1364 |
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
|
1365 |
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
|
1366 |
|
5887 | 1367 |
<resource: #obsolete> |
1368 |
self obsoleteMethodWarning. |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1369 |
self openAt:aPosition transientFor:nil |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1370 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1371 |
"normal open: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1372 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1373 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1374 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1375 |
v := StandardSystemView extent:300@300. |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1376 |
v open |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1377 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1378 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1379 |
"open at position: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1380 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1381 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1382 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1383 |
v := StandardSystemView extent:300@300. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1384 |
v openTransientAt:10@10 |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1385 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1386 |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1387 |
"Created: 28.6.1996 / 10:52:30 / cg" |
909
d2d624d57f61
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
908
diff
changeset
|
1388 |
"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
|
1389 |
! |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1390 |
|
269 | 1391 |
openWithExtent:anExtent |
5614 | 1392 |
"set extent and open. The given extent overrides the |
7233 | 1393 |
receiver's preferredExtent. |
269 | 1394 |
Added for ST-80 compatibility" |
1395 |
||
1396 |
self extent:anExtent; sizeFixed:true. |
|
1397 |
self open |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1398 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1399 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1400 |
openWithPriority:aPriority |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1401 |
"open the view, run the windowgroup process at |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1402 |
other than UserScehdulingPriority." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1403 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1404 |
self open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1405 |
windowGroup process priority:aPriority. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1406 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1407 |
"Created: 30.4.1996 / 15:34:44 / cg" |
269 | 1408 |
! ! |
1409 |
||
157 | 1410 |
!TopView methodsFor:'window events'! |
1411 |
||
5614 | 1412 |
mapped |
7233 | 1413 |
"the receiver was mapped (i.e. deiconified); |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1414 |
look for partners and slaves." |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1415 |
|
5614 | 1416 |
realized := true. |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1417 |
super mapped. |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1418 |
|
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1419 |
"/ |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1420 |
"/ map slaves and partners |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1421 |
"/ |
2799
e7b1ea0db727
partners must be remapped (at the old position)
Claus Gittinger <cg@exept.de>
parents:
2693
diff
changeset
|
1422 |
self masterSlaveMessage:#remap inGroup:windowGroup. |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1423 |
|
3347 | 1424 |
self isModal ifTrue:[ |
7233 | 1425 |
"take it away from any popup menu possibly still active" |
3347 | 1426 |
|
7233 | 1427 |
self forceUngrabKeyboard. |
1428 |
self forceUngrabPointer. |
|
1429 |
" |
|
1430 |
get the focus |
|
1431 |
" |
|
1432 |
self getKeyboardFocus. |
|
1433 |
self enableEnterLeaveEvents |
|
3347 | 1434 |
] ifFalse:[ |
7233 | 1435 |
" |
1436 |
ask for the focus - this avoids having to click on the |
|
1437 |
view with WM's which need an explicit click. |
|
1438 |
Q: is this a good idea ? |
|
1439 |
" |
|
1440 |
TakeFocusWhenMapped == true ifTrue:[ |
|
1441 |
self getKeyboardFocus. |
|
1442 |
] |
|
4355 | 1443 |
]. |
7265 | 1444 |
device isWindowsPlatform ifTrue:[ |
7233 | 1445 |
self raise |
4355 | 1446 |
]. |
5658 | 1447 |
false "self isScreenDialog" ifTrue:[ |
7233 | 1448 |
self setForegroundWindow. |
1449 |
self activate. |
|
4799
b91607dae5bb
if marked as ScreenDialog, raise above ALL windows.
Michael Beyl <mb@exept.de>
parents:
4798
diff
changeset
|
1450 |
]. |
5666 | 1451 |
subViews notNil ifTrue:[ |
7233 | 1452 |
subViews do:[:eachSubView | eachSubView topViewWasMapped ]. |
5666 | 1453 |
] |
3347 | 1454 |
|
5666 | 1455 |
"Modified: / 09-12-2010 / 18:13:20 / cg" |
3446 | 1456 |
! |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1457 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1458 |
masterSlaveMessage:aSelector inGroup:aWindowGroup |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1459 |
"send aSelector to partners and/or slaves. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1460 |
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
|
1461 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1462 |
aWindowGroup notNil ifTrue:[ |
5721 | 1463 |
"/ |
1464 |
"/ if I am a master or partner, send to all slaves |
|
1465 |
"/ |
|
1466 |
(self isMaster or:[self isPartner]) ifTrue:[ |
|
1467 |
aWindowGroup slavesDo:[:v | v perform:aSelector]. |
|
1468 |
]. |
|
1469 |
"/ |
|
1470 |
"/ if I am a partner, send to all partners |
|
1471 |
"/ |
|
1472 |
self isPartner ifTrue:[ |
|
1473 |
aWindowGroup partnersDo:[:v | v ~~ self ifTrue:[v perform:aSelector]]. |
|
1474 |
]. |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1475 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1476 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1477 |
|
5614 | 1478 |
unmapped |
7233 | 1479 |
"the receiver was unmapped (i.e. iconified); |
157 | 1480 |
look for partners and slaves." |
1481 |
||
3035 | 1482 |
|r| |
1483 |
||
1484 |
(windowGroup notNil and:[windowGroup isModal]) ifTrue:[ |
|
7233 | 1485 |
"keep the realized flag true (to avoid exiting the modal event loop). |
1486 |
Consider this a kludge." |
|
1487 |
self markAsUnmappedModalBox. |
|
1488 |
r := realized. |
|
3035 | 1489 |
] ifFalse:[ |
7233 | 1490 |
self unmarkAsUnmappedModalBox. |
1491 |
r := realized := false. |
|
3035 | 1492 |
]. |
4407 | 1493 |
super unmapped. |
1494 |
realized := r. |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1495 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1496 |
"/ |
775 | 1497 |
"/ unmap slaves and partners |
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1498 |
"/ |
658 | 1499 |
self masterSlaveMessage:#unmap inGroup:windowGroup |
157 | 1500 |
|
775 | 1501 |
"Modified: 30.5.1996 / 09:37:22 / cg" |
157 | 1502 |
! ! |
1503 |
||
1160 | 1504 |
!TopView class methodsFor:'documentation'! |
135 | 1505 |
|
269 | 1506 |
version |
7093 | 1507 |
^ '$Header$' |
5614 | 1508 |
! |
1509 |
||
1510 |
version_CVS |
|
7093 | 1511 |
^ '$Header$' |
135 | 1512 |
! ! |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1513 |
|
6033
4e9ab193b90f
moved assignKeyboardFocus stuff from topView
Claus Gittinger <cg@exept.de>
parents:
5971
diff
changeset
|
1514 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1515 |
TopView initialize! |