author | Claus Gittinger <cg@exept.de> |
Thu, 10 Mar 2005 14:33:50 +0100 | |
changeset 4358 | fead6dd92e10 |
parent 4357 | 068e2607388a |
child 4359 | d4fcdb342dae |
permissions | -rw-r--r-- |
135 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1353 | 3 |
All Rights Reserved |
135 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
3347 | 13 |
"{ Package: 'stx:libview' }" |
14 |
||
135 | 15 |
View subclass:#TopView |
3370 | 16 |
instanceVariableNames:'type iconified keyboardProcessor' |
3768 | 17 |
classVariableNames:'TakeFocusWhenMapped ForceModalBoxesToOpenAtCenter |
4081 | 18 |
ForceModalBoxesToOpenAtPointer MasterSlaveMask WindowTypeMask |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
19 |
TypeMaster TypeSlave TypePartner TypeDialog TypePopUp |
4256 | 20 |
TypeUndecorated TypeToolWindow TypeToolDialog' |
1398 | 21 |
poolDictionaries:'' |
22 |
category:'Views-Basic' |
|
135 | 23 |
! |
24 |
||
1160 | 25 |
!TopView class methodsFor:'documentation'! |
135 | 26 |
|
27 |
copyright |
|
28 |
" |
|
29 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
1353 | 30 |
All Rights Reserved |
135 | 31 |
|
32 |
This software is furnished under a license and may be used |
|
33 |
only in accordance with the terms of that license and with the |
|
34 |
inclusion of the above copyright notice. This software may not |
|
35 |
be provided or otherwise made available to, or used by, any |
|
36 |
other person. No title to or ownership of the software is |
|
37 |
hereby transferred. |
|
38 |
" |
|
39 |
! |
|
40 |
||
41 |
documentation |
|
42 |
" |
|
43 |
I am an abstract superclass of StandardSystemView and PopUpView; |
|
44 |
i.e. views which have no superview. |
|
616 | 45 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
46 |
Do not get confused by the name TopView - your applications |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
47 |
topViews are typically instances of StandardSystemView. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
48 |
|
1396 | 49 |
[instance variables:] |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
50 |
type <Integer> encodes master/slave relationship: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
51 |
#normal, #master, #slave or #partner |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
52 |
for modeless views |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
53 |
(the #master-, #slave- or #partner-type links multiple views |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
54 |
into a windowManagers windowGroup -> for de-iconification) |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
55 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
56 |
encodes window type: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
57 |
#normal, #dialog, #popup, #undecorated |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
58 |
|
616 | 59 |
[see also:] |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
60 |
StandardSystemView PopUpView DialogBox |
616 | 61 |
( introduction to view programming :html: programming/viewintro.html ) |
62 |
||
63 |
[author:] |
|
64 |
Claus Gittinger |
|
135 | 65 |
" |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
66 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
67 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
68 |
examples |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
69 |
" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
70 |
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
|
71 |
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
|
72 |
(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
|
73 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
74 |
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
|
75 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
76 |
Modeless: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
77 |
regular style: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
78 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
79 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
80 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
81 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
82 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
83 |
v open |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
84 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
85 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
86 |
dialog: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
87 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
88 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
89 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
90 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
91 |
v beDialogView. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
92 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
93 |
v open |
4309 | 94 |
Delay waitForSeconds:10. v destroy. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
95 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
96 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
97 |
popUp (always on top): |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
98 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
99 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
100 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
101 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
102 |
v bePopUpView. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
103 |
v extent:200@200. |
4309 | 104 |
v open. |
105 |
Delay waitForSeconds:10. v destroy. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
106 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
107 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
108 |
undecorated (looks loke popUp, but is not always on top): |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
109 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
110 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
111 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
112 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
113 |
v beUndecorated. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
114 |
v extent:200@200. |
4309 | 115 |
v open. |
116 |
Delay waitForSeconds:10. v destroy. |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
117 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
118 |
|
4254 | 119 |
toolwindow (looks loke normal, but has smaller windowTitle-area on win32): |
120 |
[exBegin] |
|
121 |
|v| |
|
122 |
||
123 |
v := TopView new. |
|
4255 | 124 |
v beToolWindow. |
4254 | 125 |
v extent:200@200. |
4309 | 126 |
v open. |
127 |
Delay waitForSeconds:10. v destroy. |
|
4254 | 128 |
[exEnd] |
129 |
||
4256 | 130 |
toolwindow dialog (looks loke normal, but has smaller windowTitle-area on win32): |
131 |
[exBegin] |
|
132 |
|v| |
|
133 |
||
134 |
v := TopView new. |
|
135 |
v beToolDialog. |
|
136 |
v extent:200@200. |
|
4309 | 137 |
v open. |
138 |
Delay waitForSeconds:10. v destroy. |
|
4256 | 139 |
[exEnd] |
140 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
141 |
Modal: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
142 |
regular style: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
143 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
144 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
145 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
146 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
147 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
148 |
v openModal |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
149 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
150 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
151 |
dialog: |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
152 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
153 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
154 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
155 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
156 |
v beDialogView. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
157 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
158 |
v openModal |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
159 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
160 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
161 |
popUp (always on top): |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
162 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
163 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
164 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
165 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
166 |
v bePopUpView. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
167 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
168 |
v openModal |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
169 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
170 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
171 |
undecorated (looks loke popUp, but is not always on top): |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
172 |
[exBegin] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
173 |
|v| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
174 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
175 |
v := TopView new. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
176 |
v beUndecorated. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
177 |
v extent:200@200. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
178 |
v openModal |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
179 |
[exEnd] |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
180 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
181 |
" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
182 |
! ! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
183 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
184 |
!TopView class methodsFor:'class initialization'! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
185 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
186 |
initialize |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
187 |
MasterSlaveMask := 16r0F. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
188 |
TypeMaster := 16r01. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
189 |
TypeSlave := 16r02. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
190 |
TypePartner := 16r03. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
191 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
192 |
WindowTypeMask := 16rF0. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
193 |
TypeDialog := 16r10. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
194 |
TypePopUp := 16r20. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
195 |
TypeUndecorated := 16r30. |
4254 | 196 |
TypeToolWindow := 16r40. |
4256 | 197 |
TypeToolDialog := 16r50. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
198 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
199 |
" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
200 |
self initialize |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
201 |
" |
135 | 202 |
! ! |
203 |
||
1160 | 204 |
!TopView class methodsFor:'defaults'! |
135 | 205 |
|
206 |
defaultExtent |
|
586 | 207 |
"return the default extent of my instances. |
208 |
Topviews extents is 2/3 of screen by default" |
|
135 | 209 |
|
153 | 210 |
|display| |
211 |
||
212 |
display := Screen current. |
|
3072 | 213 |
display isNil ifTrue:[ |
214 |
^ 600 @ 400 |
|
215 |
]. |
|
3446 | 216 |
^ display defaultExtentForTopViews |
3519
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
217 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
218 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
219 |
forceModalBoxesToOpenAtCenter |
3768 | 220 |
"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
|
221 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
222 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
223 |
^ ForceModalBoxesToOpenAtCenter ? false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
224 |
! |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
225 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
226 |
forceModalBoxesToOpenAtCenter:aBoolean |
3768 | 227 |
"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
|
228 |
at the screens center" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
229 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
230 |
ForceModalBoxesToOpenAtCenter := aBoolean |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
231 |
|
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
232 |
" |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
233 |
TopView forceModalBoxesToOpenAtCenter:true |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
234 |
TopView forceModalBoxesToOpenAtCenter:false |
ab3bf0ab96d0
added forceModalBoxesToOpenAtCenter: flag
Claus Gittinger <cg@exept.de>
parents:
3446
diff
changeset
|
235 |
" |
3768 | 236 |
! |
237 |
||
238 |
forceModalBoxesToOpenAtPointer |
|
239 |
"return the flag which forces all modal views to be opened |
|
240 |
at the current pointer position" |
|
241 |
||
242 |
^ ForceModalBoxesToOpenAtPointer ? false |
|
243 |
! |
|
244 |
||
245 |
forceModalBoxesToOpenAtPointer:aBoolean |
|
246 |
"set/clear the flag which forces all modal views to be opened |
|
247 |
at the current pointer position" |
|
248 |
||
249 |
ForceModalBoxesToOpenAtPointer := aBoolean |
|
3978 | 250 |
! |
251 |
||
252 |
takeFocusWhenMapped:aBoolean |
|
253 |
"if turned on, topViews will grab the keyboard when mapped. |
|
254 |
This is useful on systems like openView or Win32, where a view needs a click |
|
255 |
otherwise" |
|
256 |
||
257 |
TakeFocusWhenMapped := aBoolean |
|
258 |
||
259 |
" |
|
260 |
StandardSystemView takeFocusWhenMapped:true |
|
261 |
" |
|
135 | 262 |
! ! |
263 |
||
3880 | 264 |
!TopView methodsFor:'Compatibility-ST80'! |
1410
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
265 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
266 |
displayBox |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
267 |
^ self bounds |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
268 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
269 |
"Created: 3.3.1997 / 16:31:33 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
270 |
! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
271 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
272 |
displayBox:aRectangle |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
273 |
self origin:aRectangle origin corner:aRectangle corner |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
274 |
|
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
275 |
"Created: 3.3.1997 / 16:34:38 / cg" |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
276 |
! ! |
ee1f7f3b2dfd
added #displayBox for ST-80 compatibility
Claus Gittinger <cg@exept.de>
parents:
1401
diff
changeset
|
277 |
|
3370 | 278 |
!TopView methodsFor:'accessing'! |
279 |
||
280 |
keyboardProcessor |
|
281 |
"return my keyboard processor" |
|
282 |
||
283 |
^ keyboardProcessor |
|
284 |
||
285 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
286 |
"Modified: / 18.6.1998 / 20:00:18 / cg" |
|
287 |
! |
|
288 |
||
289 |
keyboardProcessor:something |
|
290 |
"set my keyboard processor" |
|
291 |
||
292 |
keyboardProcessor := something. |
|
293 |
||
294 |
"Created: / 18.6.1998 / 18:52:42 / cg" |
|
295 |
"Modified: / 18.6.1998 / 20:00:30 / cg" |
|
4138 | 296 |
! |
297 |
||
298 |
label:labelString iconLabel:iconLabelString |
|
299 |
"/ ignored here - for compat. with StdSysViews |
|
3370 | 300 |
! ! |
301 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
302 |
!TopView methodsFor:'accessing-behavior'! |
269 | 303 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
304 |
beDialogView |
4256 | 305 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
306 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
307 |
type := (type bitClear:WindowTypeMask) bitOr:TypeDialog. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
308 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
309 |
]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
310 |
type := #dialog |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
311 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
312 |
|
1765 | 313 |
beIndependent |
314 |
"make this an independent view; i.e. remove any master/slave or partner |
|
315 |
attribute (this is the default). |
|
316 |
However, the view remains in the current windowGroup" |
|
317 |
||
4256 | 318 |
"/ the nonInteger handling code is for backward compatibility only. |
4081 | 319 |
type isInteger ifTrue:[ |
320 |
type := type bitClear:MasterSlaveMask. |
|
321 |
^ self. |
|
322 |
]. |
|
1765 | 323 |
type := nil |
324 |
! |
|
325 |
||
269 | 326 |
beMaster |
4032 | 327 |
"make this a master-view. |
328 |
All slave views within the same windowGroup will be closed if any master is closed |
|
329 |
and also de/iconify together with their master(s). |
|
330 |
(i.e. they follow their master(s))." |
|
269 | 331 |
|
4256 | 332 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
333 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
334 |
type := (type bitClear:MasterSlaveMask) bitOr:TypeMaster. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
335 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
336 |
]. |
269 | 337 |
type := #master |
298 | 338 |
|
339 |
" |
|
340 |
see example in TopView>>beSlave |
|
341 |
" |
|
342 |
||
343 |
"Created: 10.12.1995 / 13:30:50 / cg" |
|
269 | 344 |
! |
345 |
||
346 |
bePartner |
|
347 |
"make this a partner-view. Each partner-view will automatically |
|
712 | 348 |
close other partner views (within the same windowGroup) when closed." |
269 | 349 |
|
4256 | 350 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
351 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
352 |
type := (type bitClear:MasterSlaveMask) bitOr:TypePartner. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
353 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
354 |
]. |
269 | 355 |
type := #partner |
298 | 356 |
|
357 |
" |
|
358 |
create two topViews within the same group: |
|
359 |
if any of them is iconified/deiconified/closed, the other one is also |
|
360 |
||
361 |
|top1 top2| |
|
362 |
||
712 | 363 |
top1 := StandardSystemView new label:'partner'; extent:300@300. |
364 |
top2 := StandardSystemView new label:'partner'; extent:200@200. |
|
298 | 365 |
top1 bePartner. |
366 |
top2 bePartner. |
|
367 |
||
368 |
top1 open. |
|
369 |
top2 openInGroup:(top1 windowGroup) |
|
370 |
" |
|
371 |
||
372 |
"Created: 10.12.1995 / 13:29:59 / cg" |
|
712 | 373 |
"Modified: 25.5.1996 / 11:44:48 / cg" |
269 | 374 |
! |
375 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
376 |
bePopUpView |
4256 | 377 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
378 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
379 |
type := (type bitClear:WindowTypeMask) bitOr:TypePopUp. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
380 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
381 |
]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
382 |
type := #popup |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
383 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
384 |
|
269 | 385 |
beSlave |
386 |
"make this a slave-view. It will be closed automatically, |
|
712 | 387 |
whenever any master of the windowgroup is closed. |
388 |
See also: #bePartner" |
|
269 | 389 |
|
4256 | 390 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
391 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
392 |
type := (type bitClear:MasterSlaveMask) bitOr:TypeSlave. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
393 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
394 |
]. |
269 | 395 |
type := #slave |
298 | 396 |
|
397 |
" |
|
398 |
create two topViews within the same group: |
|
399 |
the slave is allowed to be iconified/close independ of the master; |
|
400 |
but if the master is iconified, the slave is also. |
|
401 |
||
402 |
|top1 top2| |
|
403 |
||
712 | 404 |
top1 := StandardSystemView new label:'master'; extent:300@300. |
405 |
top2 := StandardSystemView new label:'slave'; extent:200@200. |
|
298 | 406 |
top1 beMaster. |
407 |
top2 beSlave. |
|
408 |
||
409 |
top1 open. |
|
410 |
top2 openInGroup:(top1 windowGroup) |
|
411 |
" |
|
412 |
||
413 |
"Created: 10.12.1995 / 13:29:10 / cg" |
|
712 | 414 |
"Modified: 25.5.1996 / 11:45:30 / cg" |
269 | 415 |
! |
416 |
||
4256 | 417 |
beToolDialog |
418 |
"/ the nonInteger handling code is for backward compatibility only. |
|
4254 | 419 |
type isInteger ifTrue:[ |
4256 | 420 |
type := (type bitClear:WindowTypeMask) bitOr:TypeToolDialog. |
4254 | 421 |
^ self. |
422 |
]. |
|
423 |
type := #dialog |
|
424 |
! |
|
425 |
||
4256 | 426 |
beToolWindow |
427 |
"/ the nonInteger handling code is for backward compatibility only. |
|
428 |
type isInteger ifTrue:[ |
|
429 |
type := (type bitClear:WindowTypeMask) bitOr:TypeToolWindow. |
|
430 |
^ self. |
|
431 |
]. |
|
432 |
type := nil |
|
433 |
! |
|
434 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
435 |
beUndecorated |
4256 | 436 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
437 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
438 |
type := (type bitClear:WindowTypeMask) bitOr:TypeUndecorated. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
439 |
^ self. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
440 |
]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
441 |
type := nil |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
442 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
443 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
444 |
focusSequence:aCollectionOfSubcomponents |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
445 |
"define the sequence for stepping through my components." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
446 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
447 |
windowGroup isNil ifTrue:[ |
4140 | 448 |
windowGroup := self windowGroupClass new. |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
449 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
450 |
windowGroup focusSequence:aCollectionOfSubcomponents. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
451 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
452 |
"Created: 6.3.1996 / 15:37:11 / cg" |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
453 |
"Modified: 30.4.1996 / 15:41:40 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
454 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
455 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
456 |
!TopView methodsFor:'event handling'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
457 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
458 |
keyPress:key x:x y:y |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
459 |
"notice: this is going to be moved into the upcoming |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
460 |
StandardSystemViewController." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
461 |
|
1160 | 462 |
<resource: #keyboard ( #Tab |
463 |
#FocusNext #FocusPrevious |
|
464 |
#CursorDown #CursorUp ) > |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
465 |
|
932 | 466 |
windowGroup notNil ifTrue:[ |
467 |
key == #Tab ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
468 |
self sensor shiftDown ifTrue:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
469 |
windowGroup focusPrevious |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
470 |
] ifFalse:[ |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
471 |
windowGroup focusNext |
932 | 472 |
]. |
473 |
^ self. |
|
474 |
]. |
|
475 |
(key == #FocusNext or:[key == #CursorDown]) ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
476 |
windowGroup focusNext. |
932 | 477 |
^ self. |
478 |
]. |
|
479 |
(key == #FocusPrevious or:[key == #CursorUp]) ifTrue:[ |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
480 |
windowGroup focusPrevious. |
932 | 481 |
^ self. |
482 |
]. |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
483 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
484 |
|
932 | 485 |
super keyPress:key x:x y:y |
486 |
||
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
487 |
"Created: 1.2.1996 / 22:08:30 / cg" |
1160 | 488 |
"Modified: 9.1.1997 / 12:17:38 / cg" |
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
489 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
490 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
491 |
showActivity:someMessage |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
492 |
"some activityNotification shalt be communicated to |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
493 |
the user. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
494 |
Default for activity notifications here: ignore them" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
495 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
496 |
^ self |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
497 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
498 |
"Created: 16.12.1995 / 18:40:13 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
499 |
"Modified: 23.4.1996 / 21:38:27 / cg" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
500 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
501 |
|
2466 | 502 |
!TopView methodsFor:'help stubs'! |
503 |
||
3697 | 504 |
flyByHelpTextFor:aSubView |
505 |
"this will vanish - its temporarily here to allow for stdSysViews to be |
|
506 |
used as a masterApp for dialogs" |
|
507 |
||
508 |
^ nil |
|
509 |
! |
|
510 |
||
511 |
helpTextFor:aSubView |
|
512 |
"this will vanish - its temporarily here to allow for stdSysViews to be |
|
513 |
used as a masterApp for dialogs" |
|
514 |
||
515 |
^ nil |
|
516 |
! |
|
517 |
||
2466 | 518 |
showHelp:aHelpText for:aView |
519 |
"dummy - added in case a regular topView is installed |
|
520 |
as a dialogs masterApplication. |
|
521 |
Concrete application subclasses may redefine this to |
|
522 |
display a help text in one of its message areas" |
|
523 |
! ! |
|
524 |
||
3884 | 525 |
!TopView methodsFor:'initialization & release'! |
2573 | 526 |
|
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
527 |
assignInitialKeyboardFocus |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
528 |
"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
|
529 |
|
4180 | 530 |
|componentWithInitialFocus| |
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
531 |
|
4180 | 532 |
"/ |keyboardProcessor componentWithInitialFocus| |
533 |
"/ |
|
534 |
"/ keyboardProcessor := self keyboardProcessor. |
|
535 |
"/ keyboardProcessor notNil ifTrue:[ |
|
536 |
"/ componentWithInitialFocus := keyboardProcessor componentWithInitialFocus. |
|
537 |
"/ componentWithInitialFocus notNil ifTrue:[ |
|
538 |
"/ self windowGroup focusView:componentWithInitialFocus byTab:true. |
|
539 |
"/ "/ componentWithInitialFocus requestFocus. |
|
540 |
"/ ^ self. |
|
541 |
"/ ] |
|
542 |
"/ ]. |
|
543 |
||
544 |
(windowGroup notNil |
|
545 |
and:[(componentWithInitialFocus := windowGroup defaultKeyboardConsumer) notNil]) ifTrue:[ |
|
546 |
windowGroup focusView:componentWithInitialFocus byTab:true "false". |
|
547 |
] ifFalse:[ |
|
548 |
self assignKeyboardFocusToFirstInputField. |
|
4178
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
549 |
]. |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
550 |
! |
e176977f5f2c
initial focus - allow explicit setup via InputFieldSpec
Claus Gittinger <cg@exept.de>
parents:
4140
diff
changeset
|
551 |
|
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
552 |
assignKeyboardFocusToFirstInputField |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
553 |
"assign the keyboard focus to the first input field, |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
554 |
or else to the first keyboardConsumer. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
555 |
This prefers inputFields over editTextViews |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
556 |
(which may change in the future)" |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
557 |
|
3712
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
558 |
|firstConsumer firstCursorConsumer consumer| |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
559 |
|
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
560 |
self allSubViewsDo:[:v | |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
561 |
v isInputField ifTrue:[ |
3585
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
562 |
"/ self windowGroup focusView:v. -- very old |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
563 |
device platformName = 'WIN32' ifTrue:[ |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
564 |
self windowGroup focusView:v byTab:true. |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
565 |
] ifFalse:[ |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
566 |
v requestFocus. |
9d7f0d16d20d
keyboard focus hack for windows
Claus Gittinger <cg@exept.de>
parents:
3519
diff
changeset
|
567 |
]. |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
568 |
^ self |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
569 |
]. |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
570 |
(firstConsumer isNil and:[v isKeyboardConsumer]) ifTrue:[ |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
571 |
firstConsumer := v |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
572 |
]. |
3712
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
573 |
(firstCursorConsumer isNil and:[v isCursorKeyConsumer]) ifTrue:[ |
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
574 |
firstCursorConsumer := v |
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
575 |
]. |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
576 |
]. |
3712
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
577 |
consumer := (firstConsumer ? firstCursorConsumer). |
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
578 |
consumer notNil ifTrue:[ |
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
579 |
consumer requestFocus. |
2693
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
580 |
"/ firstConsumer requestFocus. - could be denied; but we force it here |
3712
b32f73e34e34
second chance initial focus in dialog is to cursorKeyConsumers
Claus Gittinger <cg@exept.de>
parents:
3706
diff
changeset
|
581 |
windowGroup focusView:consumer byTab:false. |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
582 |
]. |
2693
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
583 |
|
8de1d8fd9a55
changed initial focus assignment
Claus Gittinger <cg@exept.de>
parents:
2590
diff
changeset
|
584 |
"Modified: / 20.5.1999 / 18:14:16 / cg" |
2590
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
585 |
! |
90d1e3277513
moved #assignKeyboardFocusToFirst....
Claus Gittinger <cg@exept.de>
parents:
2573
diff
changeset
|
586 |
|
2573 | 587 |
destroy |
588 |
"the receiver is to be destroyed - look for partners and slaves" |
|
589 |
||
590 |
|wg dev| |
|
591 |
||
592 |
wg := windowGroup. "/ have to fetch windowGroup before; |
|
593 |
dev := device. "/ and device ... |
|
594 |
super destroy. "/ ... since destroy nils em |
|
595 |
||
596 |
"/ dev notNil ifTrue:[ |
|
597 |
"/ dev flush |
|
598 |
"/ ]. |
|
599 |
||
600 |
"/ |
|
601 |
"/ destroy slaves and partners |
|
602 |
"/ |
|
603 |
self masterSlaveMessage:#destroy inGroup:wg |
|
604 |
||
3446 | 605 |
"Modified: 20.3.1997 / 22:14:16 / cg" |
606 |
! |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
607 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
608 |
initialize |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
609 |
"initialize the topViews position for the screens center" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
610 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
611 |
|screenCenter| |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
612 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
613 |
super initialize. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
614 |
|
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
615 |
device initializeTopViewHookFor:self. |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
616 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
617 |
screenCenter := device center. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
618 |
left := screenCenter x - (width // 2). |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
619 |
top := screenCenter y - (height // 2). |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
620 |
type := 0 |
2874
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
621 |
! |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
622 |
|
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
623 |
postRealize |
213e4f118402
postRealize and initializeHooks added.
Claus Gittinger <cg@exept.de>
parents:
2808
diff
changeset
|
624 |
super postRealize. |
3370 | 625 |
|
626 |
keyboardProcessor isNil ifTrue:[ |
|
627 |
keyboardProcessor := KeyboardProcessor new. |
|
628 |
]. |
|
629 |
||
3446 | 630 |
device realizedTopViewHookFor:self |
3706 | 631 |
! |
632 |
||
633 |
release |
|
634 |
keyboardProcessor notNil ifTrue:[ |
|
635 |
keyboardProcessor release. |
|
636 |
keyboardProcessor := nil. |
|
637 |
]. |
|
638 |
super release |
|
3446 | 639 |
! ! |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
640 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
641 |
!TopView methodsFor:'misc'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
642 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
643 |
raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
644 |
"deiconify & bring to front" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
645 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
646 |
self isCollapsed ifTrue:[ |
3818
6a5b62a616a7
do not unmap in order to raiseDeiconified
Claus Gittinger <cg@exept.de>
parents:
3768
diff
changeset
|
647 |
"/ self unmap. |
645 | 648 |
self realize. |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
649 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
650 |
self raise |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
651 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
652 |
" |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
653 |
Transcript topView raiseDeiconified |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
654 |
" |
645 | 655 |
|
656 |
"Modified: 3.5.1996 / 23:49:36 / stefan" |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
657 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
658 |
|
2124
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
659 |
waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
660 |
"wait until the receiver has been closed. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
661 |
Can be used to synchronize multiple-window applications, |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
662 |
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
|
663 |
when invoking commands with the rDoit mechanism" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
664 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
665 |
[drawableId isNil] whileFalse:[ |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
666 |
Delay waitForSeconds:0.1. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
667 |
]. |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
668 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
669 |
"asynchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
670 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
671 |
EditTextView open |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
672 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
673 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
674 |
"synchronous: |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
675 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
676 |
EditTextView open topView waitUntilClosed |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
677 |
" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
678 |
|
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
679 |
"Modified: / 20.5.1998 / 18:03:37 / cg" |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
680 |
! |
750a1fc2a510
added #waitUntilClosed (mostly for rdoit)
Claus Gittinger <cg@exept.de>
parents:
2103
diff
changeset
|
681 |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
682 |
withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
683 |
"evaluate aBlock while showing aCursor in all my views. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
684 |
Return the value as returned by aBlock." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
685 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
686 |
windowGroup notNil ifTrue:[ |
1353 | 687 |
^ windowGroup withCursor:aCursor do:aBlock |
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
688 |
]. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
689 |
^ super withCursor:aCursor do:aBlock |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
690 |
! ! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
691 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
692 |
!TopView methodsFor:'queries'! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
693 |
|
4338 | 694 |
beepWhenOpening |
695 |
^ false |
|
696 |
! |
|
697 |
||
269 | 698 |
heightIncludingBorder |
699 |
"return the views overall-height" |
|
700 |
||
701 |
^ height |
|
702 |
! |
|
703 |
||
704 |
isCollapsed |
|
705 |
"ST80 compatibility: return true if the view is not shown (i.e. iconified)" |
|
706 |
||
1536 | 707 |
"/ ^ device windowIsIconified:drawableId |
269 | 708 |
^ shown not |
1536 | 709 |
|
710 |
"Modified: 4.4.1997 / 14:44:39 / cg" |
|
269 | 711 |
! |
712 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
713 |
isDialogView |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
714 |
"return true if this is a dialog view" |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
715 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
716 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
717 |
^ (type bitAnd:WindowTypeMask) == TypeDialog |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
718 |
]. |
4256 | 719 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
720 |
^ type == #dialog |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
721 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
722 |
|
3620 | 723 |
isMaster |
724 |
"return true, if this is a masterView" |
|
725 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
726 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
727 |
^ (type bitAnd:MasterSlaveMask) == TypeMaster |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
728 |
]. |
4256 | 729 |
"/ the nonInteger handling code is for backward compatibility only. |
3620 | 730 |
^ type == #master |
731 |
! |
|
732 |
||
3347 | 733 |
isModal |
734 |
"return true, if the receiver has been opened modal" |
|
735 |
||
736 |
windowGroup isNil ifTrue:[^ false]. |
|
3446 | 737 |
^ windowGroup isModal |
738 |
! |
|
3347 | 739 |
|
3621 | 740 |
isPartner |
741 |
"return true, if this is a partnerView" |
|
742 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
743 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
744 |
^ (type bitAnd:MasterSlaveMask) == TypePartner |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
745 |
]. |
4256 | 746 |
"/ the nonInteger handling code is for backward compatibility only. |
3621 | 747 |
^ type == #partner |
748 |
! |
|
749 |
||
1398 | 750 |
isPopUpView |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
751 |
"return true if I am a popup view. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
752 |
(i.e. I want to come up without decoration and popUp to top immediately)" |
1398 | 753 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
754 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
755 |
^ (type bitAnd:WindowTypeMask) == TypePopUp |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
756 |
]. |
4256 | 757 |
"/ the nonInteger handling code is for backward compatibility only. |
1398 | 758 |
^ type == #popup |
759 |
||
760 |
"Created: 28.2.1997 / 22:12:30 / cg" |
|
761 |
"Modified: 28.2.1997 / 22:37:01 / cg" |
|
762 |
! |
|
763 |
||
3620 | 764 |
isSlave |
765 |
"return true, if this is a slaveView" |
|
766 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
767 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
768 |
^ (type bitAnd:MasterSlaveMask) == TypeSlave |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
769 |
]. |
4256 | 770 |
"/ the nonInteger handling code is for backward compatibility only. |
3620 | 771 |
^ type == #slave |
772 |
! |
|
773 |
||
4256 | 774 |
isToolDialog |
775 |
"return true if I am a toolWindow dialog view. |
|
776 |
(i.e. I want to come up with a smaller window-title area)" |
|
777 |
||
778 |
type isInteger ifTrue:[ |
|
779 |
^ (type bitAnd:WindowTypeMask) == TypeToolDialog |
|
780 |
]. |
|
781 |
"/ the nonInteger handling code is for backward compatibility only. |
|
782 |
^ false |
|
783 |
! |
|
784 |
||
4254 | 785 |
isToolWindow |
786 |
"return true if I am a toolWindow view. |
|
787 |
(i.e. I want to come up with a smaller window-title area)" |
|
788 |
||
789 |
type isInteger ifTrue:[ |
|
790 |
^ (type bitAnd:WindowTypeMask) == TypeToolWindow |
|
791 |
]. |
|
4256 | 792 |
"/ the nonInteger handling code is for backward compatibility only. |
793 |
^ false |
|
4254 | 794 |
! |
795 |
||
1481 | 796 |
isTopView |
797 |
"return true, since I am a topView" |
|
798 |
||
799 |
^ true |
|
800 |
||
801 |
"Created: 22.3.1997 / 14:45:55 / cg" |
|
802 |
! |
|
803 |
||
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
804 |
isUndecoratedView |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
805 |
"return true if I am an undecorated view." |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
806 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
807 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
808 |
^ (type bitAnd:WindowTypeMask) == TypeUndecorated |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
809 |
]. |
4256 | 810 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
811 |
^ false |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
812 |
! |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
813 |
|
269 | 814 |
preferredExtent |
815 |
"return my preferred extent - this is the minimum size I would like to have. |
|
816 |
The default here is the classes default extent, |
|
817 |
however many subclasses redefine this to compute the actual value |
|
818 |
depending on the sizes of the contents or subcomponents." |
|
819 |
||
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
820 |
"/ If I have an explicit preferredExtent .. |
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
821 |
|
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
822 |
preferredExtent notNil ifTrue:[ |
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
823 |
^ preferredExtent |
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
824 |
]. |
269 | 825 |
^ self class defaultExtent |
761
34d17118452a
care for preSet preferredExtent
Claus Gittinger <cg@exept.de>
parents:
712
diff
changeset
|
826 |
|
966
8e202c385338
handle Text items in xOfCol...
Claus Gittinger <cg@exept.de>
parents:
960
diff
changeset
|
827 |
"Modified: 19.7.1996 / 20:45:41 / cg" |
269 | 828 |
! |
829 |
||
830 |
widthIncludingBorder |
|
831 |
"return the views overall-width" |
|
832 |
||
833 |
^ width |
|
2808
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
834 |
! |
627ce4f2a090
respond to #window - for compatibility with appModel
Claus Gittinger <cg@exept.de>
parents:
2799
diff
changeset
|
835 |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
836 |
windowStyle |
4254 | 837 |
"return a symbol describing my style which should be one of |
838 |
#dialog, #popUp, #undecorated, #normal or #toolWindow. |
|
839 |
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
|
840 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
841 |
|t| |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
842 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
843 |
type isInteger ifTrue:[ |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
844 |
t := type bitAnd:WindowTypeMask. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
845 |
t == TypeUndecorated ifTrue:[^ #undecorated]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
846 |
t == TypeDialog ifTrue:[^ #dialog]. |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
847 |
t == TypePopUp ifTrue:[^ #popUp]. |
4254 | 848 |
t == TypeToolWindow ifTrue:[^ #toolWindow]. |
4256 | 849 |
t == TypeToolDialog ifTrue:[^ #toolDialog]. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
850 |
^ #normal |
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
851 |
]. |
4256 | 852 |
"/ the nonInteger handling code is for backward compatibility only. |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
853 |
^ super windowStyle |
269 | 854 |
! ! |
855 |
||
4338 | 856 |
!TopView methodsFor:'realization'! |
857 |
||
858 |
openModal |
|
859 |
"added bell to wake up user" |
|
860 |
||
861 |
(self beepWhenOpening) ifTrue:[ |
|
862 |
self beep. |
|
863 |
]. |
|
864 |
super openModal |
|
865 |
||
866 |
" |
|
867 |
self warn:'hello' |
|
868 |
self information:'hello' |
|
869 |
ModalBox new openModal |
|
870 |
WarningBox new openModal |
|
871 |
InfoBox new openModal |
|
872 |
" |
|
873 |
||
874 |
"Modified: 28.5.1996 / 16:59:01 / cg" |
|
875 |
! ! |
|
876 |
||
3881 | 877 |
!TopView methodsFor:'show & hide'! |
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
878 |
|
4353 | 879 |
activate |
880 |
"added for MS-windows - much like raise. |
|
881 |
Raise/Activate seem to work only within my own (ST/X)-windows; |
|
882 |
they do not raise one of my views above another (for example: command.com)-window. |
|
883 |
Can anyone tell me what the difference between raise, activate and setForefround |
|
884 |
really is (I mean really - not what is written in the crappy documentation)" |
|
885 |
||
886 |
drawableId isNil ifTrue:[self create]. |
|
887 |
device activateWindow:drawableId |
|
888 |
||
889 |
" |
|
890 |
Transcript topView activate |
|
891 |
" |
|
892 |
! |
|
893 |
||
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
894 |
fixPosition:aPoint |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
895 |
"set origin to aPoint, but make sure, that the box is fully visible |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
896 |
by shifting it into the visible screen area if nescessary. |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
897 |
This prevents invisible modalBoxes (which you could never close)." |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
898 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
899 |
self origin:aPoint. |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
900 |
self makeFullyVisible |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
901 |
|
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
902 |
"Created: 28.2.1997 / 16:39:31 / cg" |
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
903 |
! |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
904 |
|
3916 | 905 |
map |
906 |
"make the view visible on the screen. |
|
907 |
For topViews, the windowManager will choose (or ask for) the |
|
908 |
views position on the screen. |
|
909 |
Notice: |
|
910 |
Actually, this method is only valid for topViews; |
|
911 |
however, it is defined here to allow things like 'Button new realize'" |
|
912 |
||
913 |
self mapAt:(self origin) iconified:false |
|
914 |
! |
|
915 |
||
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
916 |
mapIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
917 |
"make the view visible but iconified. |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
918 |
In contrast to map, which does it non-iconified" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
919 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
920 |
realized ifFalse:[ |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
921 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
922 |
now, make the view visible |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
923 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
924 |
realized := true. |
2103
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
925 |
device |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
926 |
mapView:self id:drawableId iconified:true |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
927 |
atX:left y:top width:width height:height |
dbe7a348084f
do not forget minExtent/maxExtent in remap
Claus Gittinger <cg@exept.de>
parents:
1836
diff
changeset
|
928 |
minExtent:(self minExtent) maxExtent:(self maxExtent) |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
929 |
] |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
930 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
931 |
"Modified: 25.2.1997 / 22:44:33 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
932 |
"Created: 24.7.1997 / 12:48:21 / cg" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
933 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
934 |
|
1401
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
935 |
positionOffset |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
936 |
"return the delta, by which the box should be |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
937 |
displaced from the mouse pointer. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
938 |
Here, the boxes center is returned as a default. |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
939 |
Usually redefined in subclasses to have the most convenient |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
940 |
ok-button appear under the pointer." |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
941 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
942 |
^ self extent // 2 |
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
943 |
|
fca5f070bc0b
positionOffset also defined here
Claus Gittinger <cg@exept.de>
parents:
1399
diff
changeset
|
944 |
"Created: 28.2.1997 / 22:56:34 / cg" |
4353 | 945 |
! |
946 |
||
947 |
raise |
|
948 |
"kludge for MS-windows. |
|
949 |
Raise/Activate seem to work only within my own (ST/X)-windows; |
|
950 |
they do not raise one of my views above another (for example: command.com)-window. |
|
951 |
Can anyone tell me what the difference between raise, activate and setForefround |
|
952 |
really is (I mean really - not what is written in the crappy documentation)" |
|
953 |
||
954 |
drawableId isNil ifTrue:[self create]. |
|
4354
bfd240fa5c81
raise bug - also for modal views
Claus Gittinger <cg@exept.de>
parents:
4353
diff
changeset
|
955 |
|
bfd240fa5c81
raise bug - also for modal views
Claus Gittinger <cg@exept.de>
parents:
4353
diff
changeset
|
956 |
device platformName = 'WIN32' ifTrue:[ |
4358 | 957 |
(self isPopUpView or:[self isModal]) ifFalse:[ |
4356
a5fe3fb83a94
oops - do not use setForeground for popUps.
Claus Gittinger <cg@exept.de>
parents:
4355
diff
changeset
|
958 |
device setForegroundWindow:drawableId. |
a5fe3fb83a94
oops - do not use setForeground for popUps.
Claus Gittinger <cg@exept.de>
parents:
4355
diff
changeset
|
959 |
^ self |
a5fe3fb83a94
oops - do not use setForeground for popUps.
Claus Gittinger <cg@exept.de>
parents:
4355
diff
changeset
|
960 |
] |
4353 | 961 |
]. |
4357 | 962 |
super raise |
4353 | 963 |
|
964 |
" |
|
965 |
Transcript topView activate |
|
966 |
" |
|
967 |
! |
|
968 |
||
969 |
setForegroundWindow |
|
970 |
"added for MS-windows - much like raise + focus. |
|
971 |
Raise/Activate seem to work only within my own (ST/X)-windows; |
|
972 |
they do not raise one of my views above another (for example: command.com)-window. |
|
973 |
Can anyone tell me what the difference between raise, activate and setForefround |
|
974 |
really is (I mean really - not what is written in the crappy documentation) ?" |
|
975 |
||
976 |
drawableId isNil ifTrue:[self create]. |
|
977 |
device setForegroundWindow:drawableId |
|
978 |
||
979 |
" |
|
980 |
Transcript topView setForegroundWindow |
|
981 |
" |
|
1399
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
982 |
! ! |
a10829e54d2c
fixPosition moved from ModalBox
Claus Gittinger <cg@exept.de>
parents:
1398
diff
changeset
|
983 |
|
269 | 984 |
!TopView methodsFor:'startup'! |
985 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
986 |
openAt:aPosition transientFor:anotherView |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
987 |
"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
|
988 |
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
|
989 |
(i.e. suppress any ghostframe). |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
990 |
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
|
991 |
anotherView - it will deiconify with it and (on some windowManagers) |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
992 |
have no iconify button of its own. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
993 |
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
|
994 |
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
|
995 |
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
|
996 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
997 |
|otherId| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
998 |
|
1836 | 999 |
drawableId isNil ifTrue:[self create]. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1000 |
anotherView isNil ifTrue:[ |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1001 |
otherId := drawableId. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1002 |
] ifFalse:[ |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1003 |
anotherView create. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1004 |
otherId := anotherView id. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1005 |
]. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1006 |
device setTransient:drawableId for:otherId. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1007 |
self origin:aPosition. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1008 |
self open |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1009 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1010 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1011 |
|v1 v2| |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1012 |
|
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1013 |
v1 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1014 |
v2 := StandardSystemView extent:300@300. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1015 |
v1 open. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1016 |
v2 openAt:0@0 transientFor:v1. |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1017 |
" |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1018 |
|
960 | 1019 |
" |
1020 |
|v1| |
|
1021 |
||
1022 |
v1 := StandardSystemView extent:300@300. |
|
1023 |
v1 openAt:0@0 transientFor:v1. |
|
1024 |
" |
|
1025 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1026 |
"Created: 28.6.1996 / 10:51:55 / cg" |
1836 | 1027 |
"Modified: 28.7.1997 / 18:53:16 / cg" |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1028 |
! |
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1029 |
|
1353 | 1030 |
openDisplayAt:aPoint |
1031 |
"ST-80 compatibility: open the view centered around aPoint" |
|
1032 |
||
1033 |
^ self openModelessAt:(aPoint - (self extent//2)) |
|
1034 |
||
1035 |
" |
|
1036 |
(TopView new extent:200@200) openDisplayAt:300@300 |
|
1037 |
" |
|
1038 |
! |
|
1039 |
||
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1040 |
openIconified |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1041 |
"open the view in iconified state" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1042 |
|
1829 | 1043 |
self openModelessAt:nil iconified:true |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1044 |
|
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1045 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1046 |
FileBrowser new openIconified |
1829 | 1047 |
ChangesBrowser new openIconified |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1048 |
" |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1049 |
|
1829 | 1050 |
"Modified: 24.7.1997 / 14:54:58 / cg" |
1821
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1051 |
! |
d2b91606dc55
added #mapIconified and #openIconified.
Claus Gittinger <cg@exept.de>
parents:
1765
diff
changeset
|
1052 |
|
1336 | 1053 |
openIn:aBoundaryRectangle |
1054 |
"set origin & extent and open. |
|
1055 |
The given extent overrides the receivers preferredExtent. |
|
1056 |
Added for ST-80 compatibility" |
|
1057 |
||
1058 |
self |
|
1059 |
origin:aBoundaryRectangle origin; |
|
1060 |
extent:aBoundaryRectangle extent; |
|
1061 |
sizeFixed:true. |
|
1062 |
self open |
|
1063 |
||
1064 |
"Modified: 12.2.1997 / 11:58:21 / cg" |
|
1065 |
! |
|
1066 |
||
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1067 |
openTransientAt:aPosition |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1068 |
"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
|
1069 |
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
|
1070 |
(i.e. suppress any ghostframe). |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1071 |
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
|
1072 |
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
|
1073 |
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
|
1074 |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1075 |
self openAt:aPosition transientFor:nil |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1076 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1077 |
"normal open: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1078 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1079 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1080 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1081 |
v := StandardSystemView extent:300@300. |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1082 |
v open |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1083 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1084 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1085 |
"open at position: |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1086 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1087 |
|v| |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1088 |
|
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1089 |
v := StandardSystemView extent:300@300. |
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1090 |
v openTransientAt:10@10 |
907
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1091 |
" |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1092 |
|
908
0fbe814e06ee
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
907
diff
changeset
|
1093 |
"Created: 28.6.1996 / 10:52:30 / cg" |
909
d2d624d57f61
renamed #openAt: to #openTransientAt:
Claus Gittinger <cg@exept.de>
parents:
908
diff
changeset
|
1094 |
"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
|
1095 |
! |
6bc7254cdd6a
added #openAt: - open a view at forced position
Claus Gittinger <cg@exept.de>
parents:
775
diff
changeset
|
1096 |
|
269 | 1097 |
openWithExtent:anExtent |
1098 |
"set extent and open. The given extent overrides the |
|
1099 |
receivers preferredExtent. |
|
1100 |
Added for ST-80 compatibility" |
|
1101 |
||
1102 |
self extent:anExtent; sizeFixed:true. |
|
1103 |
self open |
|
625
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1104 |
! |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1105 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1106 |
openWithPriority:aPriority |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1107 |
"open the view, run the windowgroup process at |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1108 |
other than UserScehdulingPriority." |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1109 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1110 |
self open. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1111 |
windowGroup process priority:aPriority. |
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1112 |
|
4d8f6dc3af75
commentary & category changes
Claus Gittinger <cg@exept.de>
parents:
616
diff
changeset
|
1113 |
"Created: 30.4.1996 / 15:34:44 / cg" |
269 | 1114 |
! ! |
1115 |
||
157 | 1116 |
!TopView methodsFor:'window events'! |
1117 |
||
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1118 |
mapped |
4355 | 1119 |
"the recevier was mapped (i.e. deiconified); |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1120 |
look for partners and slaves." |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1121 |
|
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1122 |
realized := true. |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1123 |
super mapped. |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1124 |
|
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1125 |
"/ |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1126 |
"/ map slaves and partners |
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1127 |
"/ |
2799
e7b1ea0db727
partners must be remapped (at the old position)
Claus Gittinger <cg@exept.de>
parents:
2693
diff
changeset
|
1128 |
self masterSlaveMessage:#remap inGroup:windowGroup. |
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1129 |
|
3347 | 1130 |
self isModal ifTrue:[ |
1131 |
"take it away from any popup menu possibly still active" |
|
1132 |
||
1133 |
self forceUngrabKeyboard. |
|
1134 |
self forceUngrabPointer. |
|
1135 |
" |
|
1136 |
get the focus |
|
1137 |
" |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1138 |
self getKeyboardFocus. |
3347 | 1139 |
self enableEnterLeaveEvents |
1140 |
] ifFalse:[ |
|
1141 |
" |
|
1142 |
ask for the focus - this avoids having to click on the |
|
1143 |
view with WM's which need an explicit click. |
|
1144 |
Q: is this a good idea ? |
|
1145 |
" |
|
1146 |
TakeFocusWhenMapped == true ifTrue:[ |
|
1147 |
self getKeyboardFocus. |
|
1148 |
] |
|
4355 | 1149 |
]. |
1150 |
device platformName = 'WIN32' ifTrue:[ |
|
1151 |
self raise |
|
1152 |
]. |
|
3347 | 1153 |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1154 |
"Modified: / 10.9.1998 / 22:02:52 / cg" |
3446 | 1155 |
"Modified: 30.5.1996 / 09:37:22 / cg" |
1156 |
! |
|
2488
cb393b7431f0
oops - (re-)fixed mapped/unmapped with partner/slaves
Claus Gittinger <cg@exept.de>
parents:
2466
diff
changeset
|
1157 |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1158 |
masterSlaveMessage:aSelector inGroup:aWindowGroup |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1159 |
"send aSelector to partners and/or slaves. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1160 |
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
|
1161 |
|
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1162 |
aWindowGroup notNil ifTrue:[ |
1353 | 1163 |
"/ |
1164 |
"/ if I am a master or partner, send to all slaves |
|
1165 |
"/ |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1166 |
(self isMaster or:[self isPartner]) ifTrue:[ |
1353 | 1167 |
aWindowGroup slavesDo:[:v | v perform:aSelector]. |
1168 |
]. |
|
1169 |
"/ |
|
1170 |
"/ if I am a partner, send to all partners |
|
1171 |
"/ |
|
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1172 |
self isPartner ifTrue:[ |
1353 | 1173 |
aWindowGroup partnersDo:[:v | v ~~ self ifTrue:[v perform:aSelector]]. |
1174 |
]. |
|
501
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1175 |
]. |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1176 |
! |
0a701f42de02
focusKey handling now done here & in Controller
Claus Gittinger <cg@exept.de>
parents:
419
diff
changeset
|
1177 |
|
157 | 1178 |
unmapped |
1179 |
"the recevier was unmapped (i.e. iconified); |
|
1180 |
look for partners and slaves." |
|
1181 |
||
3035 | 1182 |
|r| |
1183 |
||
1184 |
(windowGroup notNil and:[windowGroup isModal]) ifTrue:[ |
|
1185 |
"keep the realized flag true (to avoid exiting the modal event loop). |
|
1186 |
Consider this a kludge." |
|
1187 |
r := realized. |
|
1188 |
super unmapped. |
|
1189 |
realized := r. |
|
1190 |
] ifFalse:[ |
|
1191 |
realized := false. |
|
1192 |
super unmapped. |
|
1193 |
]. |
|
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1194 |
|
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1195 |
"/ |
775 | 1196 |
"/ unmap slaves and partners |
419
07b575e87a34
openModal moved to SimpleView (can now open subviews modal)
Claus Gittinger <cg@exept.de>
parents:
416
diff
changeset
|
1197 |
"/ |
658 | 1198 |
self masterSlaveMessage:#unmap inGroup:windowGroup |
157 | 1199 |
|
775 | 1200 |
"Modified: 30.5.1996 / 09:37:22 / cg" |
157 | 1201 |
! ! |
1202 |
||
1160 | 1203 |
!TopView class methodsFor:'documentation'! |
135 | 1204 |
|
269 | 1205 |
version |
4358 | 1206 |
^ '$Header: /cvs/stx/stx/libview/TopView.st,v 1.102 2005-03-10 13:33:50 cg Exp $' |
135 | 1207 |
! ! |
4079
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1208 |
|
8a66b0c94337
added new windowStyle: #undecorated.
Claus Gittinger <cg@exept.de>
parents:
4032
diff
changeset
|
1209 |
TopView initialize! |