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