author | Claus Gittinger <cg@exept.de> |
Fri, 28 Jun 2019 09:04:27 +0200 | |
changeset 4285 | 86c48debecd5 |
parent 4244 | b60f87ce9eda |
child 4456 | e059fcc5f0b3 |
permissions | -rw-r--r-- |
4244 | 1 |
"{ Encoding: utf8 }" |
2 |
||
89 | 3 |
" |
4 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
2870 | 5 |
All Rights Reserved |
89 | 6 |
|
7 |
This software is furnished under a license and may be used |
|
8 |
only in accordance with the terms of that license and with the |
|
9 |
inclusion of the above copyright notice. This software may not |
|
10 |
be provided or otherwise made available to, or used by, any |
|
11 |
other person. No title to or ownership of the software is |
|
12 |
hereby transferred. |
|
13 |
" |
|
1395 | 14 |
"{ Package: 'stx:libview2' }" |
15 |
||
3470 | 16 |
"{ NameSpace: Smalltalk }" |
17 |
||
100 | 18 |
Object subclass:#WindowBuilder |
2288 | 19 |
instanceVariableNames:'window application bindings visuals labels namedComponents |
20 |
helpKeys componentCreationHook applicationClass keyboardProcessor |
|
3470 | 21 |
subCanvasSpecs componentToSpecMapping windowTitle' |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
22 |
classVariableNames:'StopOnError Verbose' |
436 | 23 |
poolDictionaries:'' |
2362 | 24 |
category:'Interface-Framework' |
66 | 25 |
! |
26 |
||
27 |
!WindowBuilder class methodsFor:'documentation'! |
|
28 |
||
89 | 29 |
copyright |
30 |
" |
|
31 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
2870 | 32 |
All Rights Reserved |
89 | 33 |
|
34 |
This software is furnished under a license and may be used |
|
35 |
only in accordance with the terms of that license and with the |
|
36 |
inclusion of the above copyright notice. This software may not |
|
37 |
be provided or otherwise made available to, or used by, any |
|
38 |
other person. No title to or ownership of the software is |
|
39 |
hereby transferred. |
|
40 |
" |
|
41 |
! |
|
42 |
||
66 | 43 |
documentation |
44 |
" |
|
69 | 45 |
a no-op class, for systems which do not use the UIBuilder. |
66 | 46 |
Concrete subclasses know how to create a view (with components) from |
848 | 47 |
some interface spec. |
48 |
||
49 |
The order of the lookup sequence to access an aspect is defined: |
|
2870 | 50 |
application |
51 |
application class |
|
52 |
additional class (applicationClass). |
|
848 | 53 |
|
54 |
Methods to access any aspect are located in the category |
|
55 |
'spec creation aspect fetch'. |
|
56 |
||
735 | 57 |
Currently, an experimantal version of UIBuilder exists, |
66 | 58 |
and more may be added in the future (for example, to parse different UI |
735 | 59 |
specs - thinking of motifs UIL specs, Windows DialogSpecs etc.). |
223 | 60 |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
61 |
[instance variables:] |
2870 | 62 |
window <View> |
63 |
the topView into which the components |
|
64 |
are (have been) created from the specification |
|
65 |
||
66 |
application <ApplicationModel> |
|
67 |
the application object (typically an instance |
|
68 |
of a subclass of ApplicationModel). |
|
69 |
That one is usually supposed to provide |
|
70 |
valueHolders for aspects, action methods |
|
71 |
menuSpecs and possibly more windowSpecs. |
|
72 |
Usually means, that most of those can also be |
|
73 |
provided to the builder via a set of bindings, |
|
74 |
which overrides those. |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
75 |
|
2870 | 76 |
bindings <Dictionary> |
77 |
can be set (or filled) with bindings for |
|
78 |
aspects to be used when setting up the models |
|
79 |
for components. Useful either to overwrite |
|
80 |
corresponding appModel aspects or if the appModel |
|
81 |
does not want to procide those. |
|
82 |
(for example, to open a dialog and provide the |
|
83 |
bindings in a dictionary - as opposed to |
|
84 |
providing them via aspect methods) |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
85 |
|
2870 | 86 |
visuals not yet used - for compatibility |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
87 |
|
2870 | 88 |
focusSequence <Collection> |
89 |
maintained during the build process; |
|
90 |
contains tabable components. |
|
91 |
This will be replaced by a more intelligent |
|
92 |
mechanism in the near future. |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
93 |
|
2870 | 94 |
namedComponents <Dictionary> |
95 |
contains name->component associations for |
|
96 |
all components which have a non-nil component |
|
97 |
name. Created during the build process. |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
98 |
|
2870 | 99 |
helpKeys not yet used - for compatibility |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
100 |
|
2870 | 101 |
componentCreationHook <BlockOrNil> |
102 |
can be set before the components are built |
|
103 |
from the spec, to provide an arbitrary |
|
104 |
callBacks-hook which will be invoked after |
|
105 |
a component has been created from a spec. |
|
106 |
The UIPainter uses this to maintain its |
|
107 |
component<->spec assiciations. |
|
108 |
Can be set by the app, to catch creation of |
|
109 |
components and fiddle around during the |
|
110 |
creation process (change extents, colors or whatever) |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
111 |
|
2870 | 112 |
applicationClass <ClassOrNil> |
113 |
can be set to provide an additional class which |
|
114 |
is asked for aspects during the build process. |
|
115 |
If not set, the app is asked, which itself asks |
|
116 |
its class. |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
117 |
|
2870 | 118 |
keyboardProcessor not yet used - for compatibility |
119 |
Will eventually takeover the functionality |
|
120 |
of the focusSequence, shortcuts & provide a hook |
|
121 |
for the app. |
|
122 |
||
123 |
subCanvasSpecs <Dictionary> |
|
124 |
can be set by the app to provide subcanvas |
|
125 |
specs (much like the bindings dictionary) |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
126 |
|
223 | 127 |
[author:] |
2870 | 128 |
Claus Gittinger |
66 | 129 |
" |
130 |
! ! |
|
131 |
||
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
132 |
!WindowBuilder class methodsFor:'debugging'! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
133 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
134 |
stopOnError:aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
135 |
"enable/disable debug halt when aspects are missing. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
136 |
Useful during development, to detect missing aspects. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
137 |
The default is off." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
138 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
139 |
StopOnError := aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
140 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
141 |
"Modified: / 4.8.1998 / 19:40:09 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
142 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
143 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
144 |
verbose:aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
145 |
"enable/disable debug messages on the Transcript. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
146 |
Useful during development, to detect missing aspects. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
147 |
The default is off." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
148 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
149 |
Verbose := aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
150 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
151 |
"Created: / 4.8.1998 / 19:39:37 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
152 |
"Modified: / 4.8.1998 / 19:40:14 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
153 |
! ! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
154 |
|
1763 | 155 |
!WindowBuilder methodsFor:'Compatibility-VW'! |
974 | 156 |
|
157 |
source |
|
158 |
"same as #application, for ST-80 compatibility" |
|
159 |
||
160 |
^ application |
|
161 |
||
162 |
"Created: 17.1.1997 / 19:03:51 / cg" |
|
163 |
! |
|
164 |
||
165 |
source:anApplicationModel |
|
166 |
"same as #application:, for ST-80 compatibility" |
|
167 |
||
168 |
application := anApplicationModel |
|
169 |
||
170 |
"Modified: 17.1.1997 / 19:03:57 / cg" |
|
171 |
! ! |
|
172 |
||
66 | 173 |
!WindowBuilder methodsFor:'accessing'! |
174 |
||
463 | 175 |
addBindings:moreBindings |
176 |
"used with subDialogs, which provide local bindings. |
|
177 |
All bindings from moreBindings overwrite any local bindings." |
|
178 |
||
179 |
moreBindings notNil ifTrue:[ |
|
2870 | 180 |
bindings isNil ifTrue:[ |
181 |
bindings := IdentityDictionary new |
|
182 |
]. |
|
183 |
bindings addAll:moreBindings |
|
463 | 184 |
] |
185 |
||
186 |
"Created: 28.2.1997 / 14:14:33 / cg" |
|
187 |
! |
|
188 |
||
100 | 189 |
application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
190 |
"return the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
191 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
192 |
This one is supposed to provide the aspects, menus etc." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
193 |
|
100 | 194 |
^ application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
195 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
196 |
"Modified: 17.1.1997 / 19:04:40 / cg" |
66 | 197 |
! |
198 |
||
125 | 199 |
application:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
200 |
"set the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
201 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
202 |
This one is supposed to provide the aspects, menus etc." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
203 |
|
125 | 204 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
205 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
206 |
"Modified: 17.1.1997 / 19:04:47 / cg" |
66 | 207 |
! |
208 |
||
1155 | 209 |
applicationClass |
210 |
"return the value of the instance variable 'applicationClass' (automatically generated). |
|
1585 | 211 |
WARNING: |
2870 | 212 |
This is a private interface for the UIPainter to pass down the app-class |
213 |
to the specs when editing." |
|
1155 | 214 |
|
2870 | 215 |
^ applicationClass |
1155 | 216 |
! |
217 |
||
422 | 218 |
applicationClass:something |
1155 | 219 |
"set the value of the instance variable 'applicationClass' (automatically generated). |
1585 | 220 |
WARNING: |
2870 | 221 |
This is a private interface for the UIPainter to pass down the app-class |
222 |
to the specs when editing." |
|
422 | 223 |
|
1155 | 224 |
applicationClass := something. |
225 |
! |
|
422 | 226 |
|
66 | 227 |
aspectAt:aSymbol |
2005 | 228 |
"return the aspect for a symbol or nil." |
229 |
||
2870 | 230 |
^ self |
231 |
aspectAt:aSymbol |
|
232 |
ifAbsent:[self aspectNotFound:aSymbol error:'no aspect for:'] |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
233 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
234 |
"Modified: / 4.8.1998 / 19:29:36 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
235 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
236 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
237 |
aspectAt:aSymbol ifAbsent:exceptionBlock |
2005 | 238 |
"return the aspect for a symbol or the value from exceptionBlock." |
239 |
||
433 | 240 |
|b| |
241 |
||
473 | 242 |
aSymbol notNil ifTrue:[ |
2933
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
243 |
bindings notNil ifTrue:[ |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
244 |
b := bindings at:aSymbol ifAbsent:nil. |
4070 | 245 |
b notNil ifTrue:[ |
246 |
^ b |
|
247 |
]. |
|
2933
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
248 |
]. |
434 | 249 |
|
2933
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
250 |
application notNil ifTrue:[ |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
251 |
MessageNotUnderstood |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
252 |
ignoreNotUnderstoodOf:aSymbol |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
253 |
in:[ |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
254 |
^ application aspectFor:aSymbol |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
255 |
]. |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
256 |
MessageNotUnderstood |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
257 |
ignoreNotUnderstoodOf:aSymbol |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
258 |
in:[ |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
259 |
^ application class aspectFor:aSymbol |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
260 |
]. |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
261 |
] |
433 | 262 |
]. |
4070 | 263 |
|
264 |
^ exceptionBlock value. |
|
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
265 |
|
2933
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
266 |
"Created: / 04-08-1998 / 19:28:30 / cg" |
6e96dc9ee4dd
changed: #aspectAt:ifAbsent:
Claus Gittinger <cg@exept.de>
parents:
2899
diff
changeset
|
267 |
"Modified: / 25-07-2011 / 15:29:25 / cg" |
4070 | 268 |
"Modified (format): / 20-02-2018 / 11:36:07 / stefan" |
66 | 269 |
! |
270 |
||
125 | 271 |
aspectAt:aSymbol put:aModel |
2499 | 272 |
"store an aspect identified by its symbol and its value. |
273 |
Returns the stored aspect !!" |
|
2005 | 274 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
275 |
bindings isNil ifTrue:[ |
2870 | 276 |
bindings := IdentityDictionary new |
125 | 277 |
]. |
2499 | 278 |
bindings at:aSymbol put:aModel. |
279 |
^ aModel |
|
100 | 280 |
! |
281 |
||
450 | 282 |
bindingAt:aSymbol |
2005 | 283 |
"return the binding for a symbol or nil if there is none" |
284 |
||
450 | 285 |
bindings notNil ifTrue:[ |
2870 | 286 |
^ bindings at:aSymbol ifAbsent:nil. |
450 | 287 |
]. |
288 |
^ nil |
|
289 |
! |
|
290 |
||
4070 | 291 |
bindingAt:aSymbol ifAbsentPut:anAspectOrBlock |
292 |
"return the binding for a symbol or nil if there is none" |
|
293 |
||
294 |
bindings isNil ifTrue:[ |
|
295 |
bindings := IdentityDictionary new |
|
296 |
]. |
|
297 |
^ bindings at:aSymbol ifAbsentPut:anAspectOrBlock. |
|
298 |
||
299 |
"Created: / 20-02-2018 / 09:59:56 / stefan" |
|
300 |
! |
|
301 |
||
100 | 302 |
bindings |
2005 | 303 |
"return my bindings" |
304 |
||
3415 | 305 |
bindings isNil ifTrue:[ |
306 |
bindings := IdentityDictionary new. |
|
307 |
]. |
|
100 | 308 |
^ bindings |
2744 | 309 |
|
310 |
"Modified: / 20-04-2005 / 18:59:28 / janfrog" |
|
100 | 311 |
! |
312 |
||
313 |
bindings:aDictionary |
|
2005 | 314 |
"set bindings to a dictionary" |
315 |
||
100 | 316 |
bindings := aDictionary |
317 |
! |
|
318 |
||
125 | 319 |
componentAt:name |
1673 | 320 |
"return a component identified by its name" |
1208 | 321 |
|
1673 | 322 |
|widget| |
1208 | 323 |
|
324 |
namedComponents notNil ifTrue:[ |
|
3776 | 325 |
widget := namedComponents at:name asSymbol ifAbsent:nil. |
326 |
widget notNil ifTrue:[^ widget]. |
|
1208 | 327 |
]. |
328 |
||
329 |
"/ cg the following code looks in any application- |
|
330 |
"/ or master applications builder for the component. |
|
1357
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
331 |
"/ This has an effect, if a subcanvases builder is asked for |
1208 | 332 |
"/ a component, which is actually held by the real-apps builder |
333 |
"/ (in case they have different builders). |
|
3776 | 334 |
"/ For now, this code is disabled, since I don't know what effect this |
1208 | 335 |
"/ has to existing code ... |
336 |
||
337 |
"/ application notNil ifTrue:[ |
|
1673 | 338 |
"/ |appBuilder masterApplication masterBuilder| |
339 |
"/ |
|
1208 | 340 |
"/ (appBuilder := application builder) notNil ifTrue:[ |
2870 | 341 |
"/ appBuilder ~~ self ifTrue:[ |
1208 | 342 |
"/ ^ appBuilder componentAt:name |
343 |
"/ ] |
|
344 |
"/ ]. |
|
345 |
"/ |
|
346 |
"/ (masterApplication := application masterApplication) notNil ifTrue:[ |
|
347 |
"/ (masterBuilder := masterApplication builder) notNil ifTrue:[ |
|
2870 | 348 |
"/ masterBuilder ~~ self ifTrue:[ |
1208 | 349 |
"/ ^ masterBuilder componentAt:name |
350 |
"/ ] |
|
351 |
"/ ] |
|
352 |
"/ ] |
|
353 |
"/ ]. |
|
354 |
^ nil |
|
125 | 355 |
! |
356 |
||
100 | 357 |
componentAt:name put:aComponent |
2005 | 358 |
"store a component identified by its name." |
359 |
||
450 | 360 |
namedComponents isNil ifTrue:[ |
2870 | 361 |
namedComponents := IdentityDictionary new. |
100 | 362 |
]. |
450 | 363 |
namedComponents at:name asSymbol put:aComponent |
100 | 364 |
! |
365 |
||
410 | 366 |
componentCreationHook:something |
367 |
"set the value of the instance variable 'componentCreationHook' (automatically generated)" |
|
368 |
||
1447 | 369 |
componentCreationHook := something. |
370 |
! |
|
410 | 371 |
|
2460 | 372 |
componentToSpecMappingAt:aView |
373 |
componentToSpecMapping isNil ifTrue:[^ nil]. |
|
374 |
^ componentToSpecMapping at:aView ifAbsent:nil |
|
375 |
! |
|
376 |
||
377 |
componentToSpecMappingAt:aView put:aSpec |
|
2462 | 378 |
|
379 |
"/ self assert:(aSpec isKindOf:UISpecification). |
|
380 |
||
2460 | 381 |
componentToSpecMapping isNil ifTrue:[ |
2870 | 382 |
componentToSpecMapping := IdentityDictionary new. |
2460 | 383 |
]. |
384 |
componentToSpecMapping at:aView put:aSpec |
|
385 |
! |
|
386 |
||
1357
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
387 |
findComponentAt:name |
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
388 |
"recursively search for a component identified by its name in myself |
2005 | 389 |
and all of my subApplications." |
1357
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
390 |
|
2870 | 391 |
^ self |
392 |
findComponentAt:name |
|
393 |
forWhichViewConformsTo:[:v | true] |
|
394 |
ignoringViews:(IdentitySet new). |
|
1563
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
395 |
! |
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
396 |
|
1992 | 397 |
findComponentAt:name forWhichViewConformsTo:viewCheck ignoringViews:triedViews |
398 |
"recursively search for a visible component identified by its name in myself |
|
1563
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
399 |
and all of my subApplications. |
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
400 |
As a builders applications view might be different from the builders view, |
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
401 |
we must be careful to avoid endless recursion if a subview refers to the topviews builder, |
2005 | 402 |
(sigh)" |
1563
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
403 |
|
1992 | 404 |
|comp "window" app b| |
405 |
||
406 |
(comp := self componentAt:name) notNil ifTrue:[ |
|
2870 | 407 |
^ comp |
1992 | 408 |
]. |
1357
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
409 |
|
1992 | 410 |
window isNil ifTrue:[ |
2870 | 411 |
^ self |
1992 | 412 |
]. |
413 |
"/ window := self application window. |
|
1563
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
414 |
|
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
415 |
(triedViews includes:window) ifTrue:[^ nil]. |
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
416 |
triedViews add:window. |
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
417 |
|
166f840701bf
avoid endless recursion in #findComponentAt:
Claus Gittinger <cg@exept.de>
parents:
1533
diff
changeset
|
418 |
window allSubViewsDo:[:v | |
2870 | 419 |
(triedViews includes:v) ifFalse:[ |
420 |
triedViews add:v. |
|
421 |
(viewCheck value:v) ifTrue:[ |
|
422 |
((app := v application) notNil |
|
423 |
and:[(b := app builder) notNil |
|
424 |
and:[b ~~ self]]) |
|
425 |
ifTrue:[ |
|
426 |
comp := b findComponentAt:name forWhichViewConformsTo:viewCheck ignoringViews:triedViews. |
|
427 |
comp notNil ifTrue:[ |
|
428 |
^ comp |
|
429 |
] |
|
430 |
] |
|
431 |
] |
|
432 |
] |
|
1357
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
433 |
]. |
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
434 |
^ nil |
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
435 |
! |
facab5c393b9
added #findComponentAt: - recursive search for a named component
Claus Gittinger <cg@exept.de>
parents:
1351
diff
changeset
|
436 |
|
1992 | 437 |
findVisibleComponentAt:name |
438 |
"recursively search for a visible component identified by its name in myself |
|
439 |
and all of my subApplications. |
|
2005 | 440 |
Be careful: this also searches for components in unmapped canvases." |
1992 | 441 |
|
2870 | 442 |
^ self |
443 |
findComponentAt:name |
|
444 |
forWhichViewConformsTo:[:v | v shown] |
|
445 |
ignoringViews:(IdentitySet new). |
|
1992 | 446 |
! |
447 |
||
600 | 448 |
helpKeyFor:aComponent |
2005 | 449 |
"return the helpkey for a component or nil" |
450 |
||
600 | 451 |
|v key| |
452 |
||
453 |
v := aComponent. |
|
454 |
[v notNil] whileTrue:[ |
|
2870 | 455 |
(key := v helpKey) notNil ifTrue:[ |
456 |
^ key |
|
457 |
]. |
|
2077 | 458 |
"/ helpKeys notNil ifTrue:[ |
459 |
"/ (key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[ |
|
460 |
"/ ^ key |
|
461 |
"/ ]. |
|
462 |
"/ ]. |
|
2870 | 463 |
v := v superView |
600 | 464 |
]. |
595 | 465 |
^ nil |
600 | 466 |
! |
595 | 467 |
|
600 | 468 |
helpKeyFor:aComponent put:aKey |
848 | 469 |
"assign a key for a component which is used to access the help text |
2005 | 470 |
from the application." |
471 |
||
2077 | 472 |
aComponent helpKey:aKey. |
473 |
||
474 |
"/ aKey isNil ifTrue:[ |
|
475 |
"/ helpKeys isNil ifFalse:[ |
|
476 |
"/ helpKeys removeKey:aComponent ifAbsent:nil |
|
477 |
"/ ] |
|
478 |
"/ ] ifFalse:[ |
|
479 |
"/ helpKeys isNil ifTrue:[ |
|
480 |
"/ helpKeys := IdentityDictionary new |
|
481 |
"/ ]. |
|
482 |
"/ helpKeys at:aComponent put:aKey |
|
483 |
"/ ] |
|
595 | 484 |
! |
485 |
||
477 | 486 |
keyboardProcessor |
2005 | 487 |
"return my keyboard processor" |
488 |
||
477 | 489 |
keyboardProcessor isNil ifTrue:[ |
2870 | 490 |
keyboardProcessor := KeyboardProcessor new |
477 | 491 |
]. |
492 |
^ keyboardProcessor |
|
493 |
||
494 |
"Created: 3.3.1997 / 18:31:37 / cg" |
|
495 |
"Modified: 3.3.1997 / 18:32:27 / cg" |
|
496 |
! |
|
497 |
||
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
498 |
keyboardProcessor:aKeyboardProcessor |
2005 | 499 |
"set my keyboard processor" |
500 |
||
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
501 |
keyboardProcessor := aKeyboardProcessor |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
502 |
|
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
503 |
"Created: / 18.6.1998 / 19:59:38 / cg" |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
504 |
! |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
505 |
|
855
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
506 |
labelAt:name |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
507 |
labels isNil ifTrue:[^ nil]. |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
508 |
^ labels at:name asSymbol ifAbsent:nil |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
509 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
510 |
"Created: / 27.2.1998 / 13:52:28 / cg" |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
511 |
! |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
512 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
513 |
labelAt:name put:aLabelString |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
514 |
labels isNil ifTrue:[ |
2870 | 515 |
labels := IdentityDictionary new. |
855
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
516 |
]. |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
517 |
labels at:name asSymbol put:aLabelString |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
518 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
519 |
"Created: / 27.2.1998 / 02:30:54 / cg" |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
520 |
! |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
521 |
|
848 | 522 |
menuAt:aKey |
2870 | 523 |
"Find a binding for the menu named aKey, either in the bindings |
848 | 524 |
or from the source" |
525 |
||
526 |
^ self menuFor:aKey |
|
527 |
||
528 |
||
529 |
! |
|
530 |
||
531 |
menuAt:aSymbol put:someMenuOrHolder |
|
532 |
"add someMenuOrHolder as the binding for the menu named aSymbol to the bindings" |
|
533 |
||
534 |
^ self aspectAt:aSymbol put:someMenuOrHolder |
|
535 |
||
536 |
! |
|
537 |
||
86 | 538 |
namedComponents |
2005 | 539 |
"return a list of named components" |
540 |
||
450 | 541 |
^ namedComponents |
86 | 542 |
! |
543 |
||
1971 | 544 |
namedComponentsDo: aBlock |
545 |
namedComponents notNil ifTrue:[ |
|
2870 | 546 |
namedComponents do:[:aView| |
547 |
aBlock value: aView |
|
548 |
] |
|
1971 | 549 |
] |
550 |
! |
|
551 |
||
1585 | 552 |
resources |
3035 | 553 |
"return the application's resources - |
2610 | 554 |
that's a ResourcePack containing national language strings" |
555 |
||
1585 | 556 |
application notNil ifTrue:[ |
3035 | 557 |
^ application resources |
1585 | 558 |
]. |
559 |
^ Dialog classResources. |
|
560 |
! |
|
561 |
||
502 | 562 |
subCanvasAt:majorKey at:minorKey |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
563 |
"get the subCanvas or subSpec specification from major and minor key. |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
564 |
Here, we first look for a spec in the private subCanvasSpecs dictionary, |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
565 |
which can be filled via #specificationAt:at:put: messages. |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
566 |
If not present, or none is found there, we bounce back trying |
824 | 567 |
#specificationFor: (if majorKey is nil) or by sending the minorKey |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
568 |
message to the class named as majorKey. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
569 |
Notice, that the class named majorKey is first searched in the |
2005 | 570 |
application classes namespace - allowing private classes as majorKey." |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
571 |
|
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
572 |
|spec cls dict dkey| |
502 | 573 |
|
1351
42d9de8818bf
care for nil minorKey in #subCanvasAt:at:
Claus Gittinger <cg@exept.de>
parents:
1344
diff
changeset
|
574 |
minorKey isNil ifTrue:[^ nil]. |
42d9de8818bf
care for nil minorKey in #subCanvasAt:at:
Claus Gittinger <cg@exept.de>
parents:
1344
diff
changeset
|
575 |
|
502 | 576 |
subCanvasSpecs notNil ifTrue:[ |
2870 | 577 |
dkey := majorKey ? #NoMajorKey. |
578 |
dict := subCanvasSpecs at:dkey ifAbsent:nil. |
|
586 | 579 |
|
2870 | 580 |
dict notNil ifTrue:[ |
581 |
spec := dict at:minorKey ifAbsent:nil. |
|
582 |
spec notNil ifTrue:[^ spec]. |
|
583 |
]. |
|
502 | 584 |
]. |
586 | 585 |
|
502 | 586 |
majorKey isNil ifTrue:[ |
2870 | 587 |
spec := self specificationFor:minorKey. |
588 |
spec isNil ifTrue:[ |
|
589 |
"fallback for UIPainter" |
|
590 |
MessageNotUnderstood catch:[ |
|
591 |
spec := applicationClass perform:minorKey. |
|
592 |
]. |
|
593 |
]. |
|
594 |
^ spec |
|
848 | 595 |
]. |
596 |
||
597 |
application notNil ifTrue:[ |
|
2870 | 598 |
"/ look for class in applications namespace ... |
599 |
cls := application resolveName:majorKey. |
|
502 | 600 |
] ifFalse:[ |
2870 | 601 |
"/ fallBack - use that global, if it exists |
602 |
cls := Smalltalk at:majorKey. |
|
603 |
cls isNil ifTrue:[ |
|
604 |
Transcript showCR:('WindowBuilder[warning]: missing application when fetching majorKey:' , majorKey). |
|
605 |
]. |
|
502 | 606 |
]. |
586 | 607 |
|
848 | 608 |
cls notNil ifTrue:[ |
2870 | 609 |
MessageNotUnderstood catch:[ |
610 |
^ cls specificationFor:minorKey |
|
611 |
]. |
|
612 |
MessageNotUnderstood catch:[ |
|
613 |
^ cls perform:minorKey. |
|
614 |
] |
|
848 | 615 |
]. |
616 |
^ nil |
|
502 | 617 |
! |
618 |
||
619 |
subCanvasAt:majorKey at:minorKey put:aSpec |
|
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
620 |
"deposit an interfaceSpecification for major and minor key |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
621 |
in my private subCanvasSpecs dictionary. |
2870 | 622 |
This will be used later, when building, |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
623 |
to provide an interfaceSpec for a subcanvas or subSpecification |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
624 |
(or possibly override an application provided interfaceSpec). |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
625 |
See #subCanvasAt:at:." |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
626 |
|
502 | 627 |
|dict key| |
628 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
629 |
subCanvasSpecs isNil ifTrue:[ |
3683 | 630 |
"/ lazily initialize |
631 |
subCanvasSpecs := IdentityDictionary new |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
632 |
]. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
633 |
|
502 | 634 |
key := majorKey ? #NoMajorKey. |
635 |
dict := subCanvasSpecs at:key ifAbsent:nil. |
|
636 |
dict isNil ifTrue:[ |
|
3683 | 637 |
dict := IdentityDictionary new. |
638 |
subCanvasSpecs at:key put:dict |
|
502 | 639 |
]. |
640 |
dict at:minorKey put:aSpec |
|
641 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
642 |
"Modified: / 27.1.1998 / 12:21:27 / cg" |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
643 |
"Modified: / 5.2.1998 / 12:05:32 / stefan" |
502 | 644 |
! |
645 |
||
475
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
646 |
visualAt:name |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
647 |
visuals isNil ifTrue:[^ nil]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
648 |
^ visuals at:name asSymbol ifAbsent:nil |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
649 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
650 |
"Created: 3.3.1997 / 16:24:17 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
651 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
652 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
653 |
visualAt:name put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
654 |
visuals isNil ifTrue:[ |
2870 | 655 |
visuals := IdentityDictionary new. |
475
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
656 |
]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
657 |
visuals at:name asSymbol put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
658 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
659 |
"Created: 3.3.1997 / 16:24:41 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
660 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
661 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
662 |
visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
663 |
^ visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
664 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
665 |
"Created: 3.3.1997 / 16:24:00 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
666 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
667 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
668 |
visuals:aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
669 |
visuals := aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
670 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
671 |
"Created: 3.3.1997 / 16:24:06 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
672 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
673 |
|
125 | 674 |
window |
1995 | 675 |
"return the top window (view), for which an interface is (being) built" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
676 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
677 |
^ window |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
678 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
679 |
"Modified: 17.1.1997 / 19:30:00 / cg" |
125 | 680 |
! |
681 |
||
682 |
window:aView |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
683 |
"set the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
684 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
685 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
686 |
window := aView |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
687 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
688 |
"Modified: 17.1.1997 / 19:30:22 / cg" |
66 | 689 |
! |
690 |
||
691 |
windowGroup |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
692 |
^ window windowGroup |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
693 |
|
608 | 694 |
"Modified: 17.6.1997 / 18:04:01 / cg" |
3470 | 695 |
! |
696 |
||
697 |
windowTitle:aString |
|
698 |
"if the window is already created, change its title. |
|
699 |
Otherwise, remember the title to be set when the window is created later" |
|
700 |
||
701 |
windowTitle := aString. |
|
702 |
window notNil ifTrue:[ |
|
703 |
window label:aString |
|
704 |
]. |
|
66 | 705 |
! ! |
706 |
||
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
707 |
!WindowBuilder methodsFor:'aspect access support'! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
708 |
|
675 | 709 |
booleanValueAspectFor:aKey |
674 | 710 |
"helper (common code) to generate a boolean aspect if required. |
4244 | 711 |
If no binding exists for aKey, a valueHolder holding false |
712 |
is created and added to the bindings. |
|
674 | 713 |
Otherwise, the existing binding is returned." |
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
714 |
|
676 | 715 |
^ self valueAspectFor:aKey initialValue:false |
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
716 |
|
4244 | 717 |
"Modified: / 28-07-1997 / 12:53:57 / cg" |
718 |
"Modified (comment): / 08-03-2019 / 17:48:13 / Claus Gittinger" |
|
675 | 719 |
! |
720 |
||
1198
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
721 |
listAspectFor:aKey |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
722 |
"helper (common code) to generate a list model aspect if required. |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
723 |
If no binding exists for aKey, a new List is |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
724 |
created and added to the bindings. |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
725 |
Otherwise, the existing binding is returned." |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
726 |
|
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
727 |
|list| |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
728 |
|
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
729 |
(list := self bindingAt:aKey) isNil ifTrue:[ |
2870 | 730 |
self aspectAt:aKey put:(list := List new). |
1198
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
731 |
]. |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
732 |
^ list |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
733 |
|
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
734 |
"Created: 28.7.1997 / 12:53:45 / cg" |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
735 |
"Modified: 28.7.1997 / 12:54:13 / cg" |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
736 |
! |
b10129322a0c
another convenient method: #listAspectFor:
Claus Gittinger <cg@exept.de>
parents:
1155
diff
changeset
|
737 |
|
675 | 738 |
nilValueAspectFor:aKey |
739 |
"helper (common code) to generate a valueHolder aspect if required. |
|
740 |
If no binding exists for aKey, a valueHolder holding nil is |
|
741 |
created and added to the bindings. |
|
742 |
Otherwise, the existing binding is returned." |
|
743 |
||
676 | 744 |
^ self valueAspectFor:aKey initialValue:nil |
745 |
||
746 |
"Modified: 28.7.1997 / 12:54:06 / cg" |
|
747 |
! |
|
748 |
||
4097 | 749 |
valueAspectFor:aKey |
750 |
"helper (common code) to generate a valueHolder aspect if required. |
|
751 |
If no binding exists for aKey, a valueHolder holding nil is |
|
752 |
created and added to the bindings. |
|
753 |
Otherwise, the existing binding is returned." |
|
754 |
||
755 |
^ self valueAspectFor:aKey initialValue:nil |
|
756 |
||
757 |
"Created: / 31-05-2018 / 08:43:56 / Claus Gittinger" |
|
758 |
! |
|
759 |
||
2403
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
760 |
valueAspectFor:aKey computeInitialValueWith:initialValueBlock |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
761 |
"helper (common code) to generate a valueHolder aspect if required. |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
762 |
If no binding exists for aKey, a valueHolder holding initialValue is |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
763 |
created and added to the bindings. |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
764 |
Otherwise, the existing binding is returned. |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
765 |
The initial value is computed by evaluating initialValueBlock" |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
766 |
|
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
767 |
|holder| |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
768 |
|
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
769 |
(holder := self bindingAt:aKey) isNil ifTrue:[ |
2870 | 770 |
self aspectAt:aKey put:(holder := initialValueBlock value asValue). |
2403
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
771 |
]. |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
772 |
^ holder |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
773 |
! |
e9733679fa92
changed #valueAspectFor:computeInitialValueWith:
Claus Gittinger <cg@exept.de>
parents:
2389
diff
changeset
|
774 |
|
676 | 775 |
valueAspectFor:aKey initialValue:initialValue |
776 |
"helper (common code) to generate a valueHolder aspect if required. |
|
777 |
If no binding exists for aKey, a valueHolder holding initialValue is |
|
778 |
created and added to the bindings. |
|
779 |
Otherwise, the existing binding is returned." |
|
780 |
||
675 | 781 |
|holder| |
782 |
||
783 |
(holder := self bindingAt:aKey) isNil ifTrue:[ |
|
2870 | 784 |
self aspectAt:aKey put:(holder := initialValue asValue). |
675 | 785 |
]. |
786 |
^ holder |
|
787 |
||
676 | 788 |
"Created: 28.7.1997 / 12:53:45 / cg" |
789 |
"Modified: 28.7.1997 / 12:54:13 / cg" |
|
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
790 |
! ! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
791 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
792 |
!WindowBuilder methodsFor:'building'! |
66 | 793 |
|
125 | 794 |
buildFromSpec:aSpec |
176 | 795 |
^ self subclassResponsibility |
408 | 796 |
! |
797 |
||
798 |
makeTabable:aComponent |
|
735 | 799 |
"add a component to the list of tabable components" |
800 |
||
1315 | 801 |
aComponent canTab:true |
735 | 802 |
|
1123 | 803 |
! |
804 |
||
805 |
setupWindowFor:aWindow |
|
806 |
self subclassResponsibility |
|
66 | 807 |
! ! |
100 | 808 |
|
848 | 809 |
!WindowBuilder methodsFor:'error handling'! |
810 |
||
811 |
aspectNotFound:anAspect error:aString |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
812 |
"show error message on transcript (if Verbose is true) |
1825 | 813 |
and/or stop (if StopOnError) is true" |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
814 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
815 |
Verbose == true ifTrue:[ |
4224 | 816 |
Transcript showCR:'WindowBuilder: %1 aspect: <%2>' with:aString with:anAspect storeString. |
817 |
application notNil ifTrue:[ |
|
818 |
Transcript showCR:'WindowBuilder: (while building for %1)' with:application class name. |
|
819 |
]. |
|
1028
4f3401b606bd
better warning when no aspect is found.
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
820 |
]. |
848 | 821 |
|
822 |
StopOnError == true ifTrue:[ |
|
4224 | 823 |
self halt:'aspect not found' "/ set StopOnError to true to debug end-user apps |
848 | 824 |
]. |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
825 |
^ nil |
1028
4f3401b606bd
better warning when no aspect is found.
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
826 |
|
4224 | 827 |
"Modified: / 18-08-2000 / 14:10:59 / cg" |
828 |
"Modified: / 15-02-2019 / 09:53:29 / Claus Gittinger" |
|
848 | 829 |
! ! |
830 |
||
586 | 831 |
!WindowBuilder methodsFor:'message sending'! |
832 |
||
848 | 833 |
safelyPerform:aSelector ifNone:aBlock |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
834 |
"send the message aSelector to the application; |
2558 | 835 |
the result returned from the send or nil is returned" |
836 |
||
2363 | 837 |
|handlerBlock| |
586 | 838 |
|
848 | 839 |
aSelector notNil ifTrue:[ |
2870 | 840 |
handlerBlock := [:ex| |
841 |
(ex selector ~~ aSelector) ifTrue:[ |
|
842 |
ex reject |
|
843 |
] |
|
844 |
]. |
|
1096
14a4fdeecd02
avoid generation of multiple handlerBlocks in savelyPerform:
Claus Gittinger <cg@exept.de>
parents:
1092
diff
changeset
|
845 |
|
2870 | 846 |
application notNil ifTrue:[ |
847 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
848 |
^ application perform:aSelector |
|
849 |
]. |
|
850 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
851 |
^ application class perform:aSelector |
|
852 |
] |
|
853 |
]. |
|
854 |
" |
|
855 |
WARNING: |
|
856 |
This is a private interface for the UIPainter to pass down the app-class |
|
857 |
" |
|
858 |
applicationClass notNil ifTrue:[ |
|
859 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
860 |
^ applicationClass perform:aSelector |
|
861 |
] |
|
862 |
] |
|
586 | 863 |
]. |
2363 | 864 |
^ aBlock value |
981
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
865 |
|
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
866 |
"Modified: / 20.6.1998 / 11:52:19 / cg" |
586 | 867 |
! |
868 |
||
848 | 869 |
safelyPerform:aSelector with:anArgument ifNone:aBlock |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
870 |
"send the one-arg-message aSelector to the application; |
2005 | 871 |
the result returned from the send or nil is returned" |
872 |
||
2870 | 873 |
^ self |
874 |
safelyPerform:aSelector |
|
875 |
withArguments:(Array with:anArgument) |
|
876 |
ifNone:aBlock |
|
2363 | 877 |
! |
878 |
||
879 |
safelyPerform:aSelector with:arg1 with:arg2 ifNone:aBlock |
|
880 |
"send the two-arg-message aSelector to the application; |
|
881 |
the result returned from the send or nil is returned" |
|
882 |
||
2870 | 883 |
^ self |
884 |
safelyPerform:aSelector |
|
885 |
withArguments:(Array with:arg1 with:arg2) |
|
886 |
ifNone:aBlock |
|
2363 | 887 |
! |
888 |
||
889 |
safelyPerform:aSelector with:arg1 with:arg2 with:arg3 ifNone:aBlock |
|
890 |
"send the 3-arg-message aSelector to the application; |
|
891 |
the result returned from the send or nil is returned" |
|
892 |
||
2870 | 893 |
^ self |
894 |
safelyPerform:aSelector |
|
895 |
withArguments:(Array with:arg1 with:arg2 with:arg3) |
|
896 |
ifNone:aBlock |
|
2363 | 897 |
! |
898 |
||
899 |
safelyPerform:aSelector withArguments:arguments ifNone:aBlock |
|
900 |
"send the one-arg-message aSelector to the application; |
|
901 |
the result returned from the send or nil is returned" |
|
902 |
||
1587 | 903 |
|handlerBlock| |
586 | 904 |
|
848 | 905 |
aSelector notNil ifTrue:[ |
2870 | 906 |
handlerBlock := [:ex| |badSel| |
907 |
badSel := ex selector. |
|
908 |
(badSel ~~ aSelector and:[badSel ~~ arguments first]) ifTrue:[ |
|
909 |
ex reject |
|
910 |
] |
|
911 |
]. |
|
1096
14a4fdeecd02
avoid generation of multiple handlerBlocks in savelyPerform:
Claus Gittinger <cg@exept.de>
parents:
1092
diff
changeset
|
912 |
|
2870 | 913 |
application notNil ifTrue:[ |
914 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
915 |
^ application perform:aSelector withArguments:arguments |
|
916 |
]. |
|
917 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
918 |
^ application class perform:aSelector withArguments:arguments |
|
919 |
] |
|
920 |
]. |
|
921 |
" |
|
922 |
WARNING: |
|
923 |
This is a private interface for the UIPainter to pass down the app-class |
|
924 |
" |
|
925 |
applicationClass notNil ifTrue:[ |
|
926 |
MessageNotUnderstood handle:handlerBlock do:[ |
|
927 |
^ applicationClass perform:aSelector withArguments:arguments |
|
928 |
]. |
|
929 |
] |
|
848 | 930 |
]. |
1587 | 931 |
^ aBlock value |
961 | 932 |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
933 |
"Modified: / 4.8.1998 / 19:33:52 / cg" |
586 | 934 |
! ! |
935 |
||
2369 | 936 |
!WindowBuilder methodsFor:'queries'! |
937 |
||
938 |
isEditing |
|
939 |
"true if building from a GUI builder resource ( UIPainter, ... ), |
|
940 |
false if building for the real thing. |
|
941 |
If true, no models or actions should be set (no application is running)" |
|
942 |
||
943 |
^ false |
|
944 |
! ! |
|
945 |
||
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
946 |
!WindowBuilder methodsFor:'resolving fonts'! |
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
947 |
|
2870 | 948 |
resolveFont:fontOrSymbolOrStyle |
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
949 |
"resolve fontOrSymbol to a real font" |
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
950 |
|
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
951 |
|font txtAttribs charAttribs| |
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
952 |
|
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
953 |
fontOrSymbolOrStyle isSymbol ifTrue:[ |
3309 | 954 |
self isEditing ifTrue:[ |
955 |
"special for UIPainter setup: check class for font" |
|
956 |
applicationClass notNil ifTrue:[ |
|
957 |
font := applicationClass fontFor:fontOrSymbolOrStyle. |
|
958 |
]. |
|
959 |
] ifFalse:[ |
|
960 |
font := application fontFor:fontOrSymbolOrStyle. |
|
961 |
]. |
|
962 |
font notNil ifTrue:[ |
|
963 |
^ font. |
|
964 |
]. |
|
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
965 |
|
3309 | 966 |
"/ ST80 style textAttributes |
967 |
(TextAttributes notNil and:[TextAttributes isLoaded]) ifTrue:[ |
|
968 |
txtAttribs := TextAttributes styleNamed:fontOrSymbolOrStyle ifAbsent:nil. |
|
969 |
txtAttribs notNil ifTrue:[ |
|
970 |
charAttribs := txtAttribs characterAttributes. |
|
971 |
charAttribs notNil ifTrue:[ |
|
972 |
font := charAttribs defaultFont. |
|
973 |
] |
|
974 |
]. |
|
975 |
]. |
|
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
976 |
|
3309 | 977 |
font isNil ifTrue:[ |
978 |
('Missing font <1p> in <2p>' expandMacrosWith:fontOrSymbolOrStyle with:application class) errorPrintCR. |
|
979 |
]. |
|
980 |
^ font. |
|
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
981 |
]. |
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
982 |
|
2870 | 983 |
^ Font |
3309 | 984 |
family:(fontOrSymbolOrStyle family) |
985 |
face:(fontOrSymbolOrStyle face) |
|
986 |
style:(fontOrSymbolOrStyle style) |
|
987 |
size:(fontOrSymbolOrStyle size) |
|
988 |
encoding:(fontOrSymbolOrStyle encoding) |
|
2546
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
989 |
! ! |
eba039ef14ba
Resolve symbolic fonts - now in WindowBuilder
Stefan Vogel <sv@exept.de>
parents:
2529
diff
changeset
|
990 |
|
422 | 991 |
!WindowBuilder methodsFor:'spec creation aspect fetch'! |
100 | 992 |
|
374 | 993 |
actionFor:aKey |
450 | 994 |
"return an action for aKey. This is invoked during window building |
995 |
(by the builder) to ask for an ActionButtons actionBlock. |
|
996 |
Here, first the local bindings are searched, then the application and |
|
997 |
finally the applications class is asked for a corresponding action. |
|
998 |
The returned object is typically a block." |
|
999 |
||
434 | 1000 |
|b| |
1001 |
||
1002 |
bindings notNil ifTrue:[ |
|
2870 | 1003 |
b := bindings at:aKey ifAbsent:nil. |
1004 |
b notNil ifTrue:[^ b]. |
|
434 | 1005 |
]. |
1006 |
||
848 | 1007 |
^ self safelyPerform:#actionFor: |
2870 | 1008 |
with:aKey |
1009 |
ifNone:[ self aspectNotFound:aKey error:'no action for:'. [] ] |
|
374 | 1010 |
! |
1011 |
||
716 | 1012 |
actionFor:aKey withValue:aValue |
2870 | 1013 |
"return an action for aKey/value combonation. |
716 | 1014 |
This is invoked during window building |
1015 |
(by the builder) to ask for an ActionButtons actionBlock if that button |
|
1016 |
specified an action with an argument value. |
|
1017 |
Here, first the local bindings are searched, then the application and |
|
1018 |
finally the applications class is asked for a corresponding action. |
|
1019 |
The returned object is typically a block." |
|
1020 |
||
1021 |
|b| |
|
1022 |
||
1023 |
bindings notNil ifTrue:[ |
|
2870 | 1024 |
b := bindings at:aKey ifAbsent:nil. |
1025 |
b notNil ifTrue:[ |
|
1026 |
(b isBlock and:[b numArgs == 1]) ifTrue:[ |
|
1027 |
^ [b value:aValue] |
|
1028 |
]. |
|
1029 |
^ b |
|
1030 |
]. |
|
716 | 1031 |
]. |
1032 |
||
2870 | 1033 |
^ self |
1034 |
safelyPerform:#actionFor:withValue: |
|
1035 |
withArguments:(Array with:aKey with:aValue) |
|
1036 |
ifNone:[ self aspectNotFound:aKey error:'no action for:'. |
|
1037 |
[] |
|
1038 |
] |
|
2363 | 1039 |
! |
1040 |
||
1041 |
actionFor:aKey withValue:arg1 withValue:arg2 |
|
2870 | 1042 |
"return an action for aKey/value combination. |
2363 | 1043 |
This is invoked during window building |
1044 |
(by the builder) to ask for an ActionButtons actionBlock if that button |
|
1045 |
specified an action with an argument value. |
|
1046 |
Here, first the local bindings are searched, then the application and |
|
1047 |
finally the applications class is asked for a corresponding action. |
|
1048 |
The returned object is typically a block." |
|
1049 |
||
1050 |
|b| |
|
1051 |
||
1052 |
bindings notNil ifTrue:[ |
|
2870 | 1053 |
b := bindings at:aKey ifAbsent:nil. |
1054 |
b notNil ifTrue:[ |
|
1055 |
(b isBlock and:[b numArgs == 2]) ifTrue:[ |
|
1056 |
^ [b value:arg1 value:arg2] |
|
1057 |
]. |
|
1058 |
^ b |
|
1059 |
]. |
|
2363 | 1060 |
]. |
1061 |
||
2870 | 1062 |
^ self |
1063 |
safelyPerform:#actionFor:withValue:withValue: |
|
1064 |
withArguments:(Array with:aKey with:arg1 with:arg2) |
|
1065 |
ifNone:[ self aspectNotFound:aKey error:'no action for:'. ] |
|
716 | 1066 |
! |
1067 |
||
374 | 1068 |
aspectFor:aKey |
450 | 1069 |
"return a model for aKey. This is invoked during window building |
1070 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
|
1071 |
Here, first the local bindings are searched, then the application and |
|
1072 |
finally the applications class is asked for a corresponding action. |
|
1073 |
The returned object is typically a valueHolder." |
|
1074 |
||
434 | 1075 |
|b| |
1076 |
||
1077 |
bindings notNil ifTrue:[ |
|
4070 | 1078 |
b := bindings at:aKey ifAbsent:nil. |
1079 |
b notNil ifTrue:[^ b]. |
|
434 | 1080 |
]. |
1081 |
||
2870 | 1082 |
^ self |
4070 | 1083 |
safelyPerform:#aspectFor: |
1084 |
with:aKey |
|
1085 |
ifNone:[ self aspectAt:aKey ] |
|
1086 |
||
1087 |
"Modified: / 20-02-2018 / 12:43:57 / stefan" |
|
374 | 1088 |
! |
1089 |
||
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1090 |
aspectFor:aKey ifAbsent:exceptionBlock |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1091 |
"return a model for aKey. This is invoked during window building |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1092 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1093 |
Here, first the local bindings are searched, then the application and |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1094 |
finally the applications class is asked for a corresponding action. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1095 |
The returned object is typically a valueHolder." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1096 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1097 |
|b| |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1098 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1099 |
bindings notNil ifTrue:[ |
2870 | 1100 |
b := bindings at:aKey ifAbsent:nil. |
1101 |
b notNil ifTrue:[^ b]. |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1102 |
]. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1103 |
|
2870 | 1104 |
^ self |
1105 |
safelyPerform:#aspectFor: |
|
1106 |
with:aKey |
|
1107 |
ifNone:[ self aspectAt:aKey ifAbsent:exceptionBlock ] |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1108 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1109 |
|
423 | 1110 |
componentFor:aKey |
450 | 1111 |
"return a component for aKey. This is invoked during window building |
1112 |
(by the builder) to ask for an ArbitraryComponents view. |
|
1113 |
Here, first the local bindings are searched, then the application and |
|
1114 |
finally the applications class is asked for a corresponding action. |
|
1115 |
The returned object is typically a view." |
|
1116 |
||
848 | 1117 |
^ self safelyPerform:#componentFor: |
2870 | 1118 |
with:aKey |
1119 |
ifNone:[ self aspectAt:aKey ] |
|
423 | 1120 |
! |
1121 |
||
2870 | 1122 |
labelFor:aKey |
450 | 1123 |
"return a label for aKey. This is invoked during window building |
1124 |
(by the builder) to ask for a ???'s label. |
|
1125 |
Here, first the local bindings are searched, then the application and |
|
1126 |
finally the applications class is asked for a corresponding action. |
|
1127 |
The returned object is typically a string." |
|
2870 | 1128 |
|
1129 |
^ self |
|
1130 |
safelyPerform:#labelFor: |
|
1131 |
with:aKey |
|
1132 |
ifNone:[ self aspectAt:aKey ] |
|
422 | 1133 |
! |
1134 |
||
1135 |
listFor:aKey |
|
450 | 1136 |
"return a list for aKey. This is invoked during window building |
1137 |
(by the builder) to ask for a ???'s label. |
|
1138 |
Here, first the local bindings are searched, then the application and |
|
1139 |
finally the applications class is asked for a corresponding action. |
|
1140 |
The returned object is typically a list." |
|
1141 |
||
848 | 1142 |
^ self safelyPerform:#listFor: |
2870 | 1143 |
with:aKey |
1144 |
ifNone:[ self aspectAt:aKey ] |
|
848 | 1145 |
! |
1146 |
||
1147 |
menuFor:aKey |
|
2870 | 1148 |
"Find a binding for the menu named aKey, either in the bindings |
848 | 1149 |
or from the source" |
1150 |
||
1151 |
|menu| |
|
1152 |
||
961 | 1153 |
aKey isNil ifTrue:[^ nil]. |
1154 |
||
848 | 1155 |
(menu := self bindingAt:aKey) notNil ifTrue:[ |
2870 | 1156 |
^ menu |
848 | 1157 |
]. |
1158 |
||
1159 |
menu := self safelyPerform:#menuFor: with:aKey ifNone:[ |
|
2870 | 1160 |
self safelyPerform:aKey ifNone:[ |
1161 |
self aspectNotFound:aKey error:'no menu for:'. |
|
1162 |
nil |
|
1163 |
] |
|
1164 |
]. |
|
848 | 1165 |
|
862 | 1166 |
menu isBlock ifFalse:[ |
2870 | 1167 |
((menu := menu value) notNil and:[application notNil]) ifTrue:[ |
1168 |
menu isCollection ifTrue:[ |
|
1169 |
menu := Menu decodeFromLiteralArray:menu. |
|
1170 |
"/ menu receiver:application. -- now done in findGuiResources ... |
|
1171 |
]. |
|
1172 |
menu findGuiResourcesIn:application |
|
1173 |
] |
|
422 | 1174 |
]. |
848 | 1175 |
^ menu |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
1176 |
|
2291 | 1177 |
"Modified: / 27-03-2007 / 11:17:22 / cg" |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1178 |
! |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1179 |
|
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1180 |
specificationFor:aKey |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1181 |
"return a specification for aKey. This is invoked during window building |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1182 |
(by the builder) to ask for the interfaceSpec for a subCanvas or subSpecification. |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1183 |
Here, first the local bindings are searched, then the application and |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1184 |
finally the applications class is asked for a corresponding interfaceSPec. |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1185 |
The returned object is typically an interfaceSpec array." |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
1186 |
|
2870 | 1187 |
^ self |
1188 |
safelyPerform:#specificationFor: |
|
1189 |
with:aKey |
|
1190 |
ifNone:[ self aspectFor:aKey ] |
|
2690 | 1191 |
! |
1192 |
||
1193 |
visualFor:aKey |
|
1194 |
"return a visual (icon, image) for aKey. This is invoked during window building |
|
1195 |
(by the builder) to ask for some graphical labels. |
|
1196 |
Here, first the local bindings are searched, then the application and |
|
1197 |
finally the applications class is asked for a corresponding action. |
|
1198 |
The returned object is typically an image or form." |
|
1199 |
||
1200 |
^ self safelyPerform:#visualFor: |
|
2870 | 1201 |
with:aKey |
1202 |
ifNone:[ self aspectAt:aKey ] |
|
422 | 1203 |
! ! |
1204 |
||
1205 |
!WindowBuilder methodsFor:'spec creation callbacks'! |
|
1206 |
||
735 | 1207 |
createdComponent:aView forSpec:spec named:name |
1208 |
"callback from the UISpec after a view has been |
|
1209 |
created for a spec. |
|
1210 |
If it has a name, add it to the namedComponents dictionary; |
|
1211 |
if I have a creationHook (application callBack), evaluate it." |
|
1212 |
||
2369 | 1213 |
|createCallBackSelector app| |
1214 |
||
735 | 1215 |
name notNil ifTrue:[ |
1993 | 1216 |
"/ "/ debugging ... |
1217 |
"/ (namedComponents notNil and:[namedComponents includesKey:name asSymbol]) ifTrue:[ |
|
1218 |
"/ Transcript showCR:'WARNING multiple UI-build of: ',name asSymbol |
|
1219 |
"/ ]. |
|
2870 | 1220 |
self componentAt:name put:aView. |
735 | 1221 |
]. |
2462 | 1222 |
spec addView:aView toMappingOfBuilder:self. |
410 | 1223 |
componentCreationHook notNil ifTrue:[ |
2870 | 1224 |
componentCreationHook value:aView value:spec value:self |
2369 | 1225 |
]. |
1226 |
||
1227 |
self isEditing ifFalse:[ |
|
2870 | 1228 |
(createCallBackSelector := spec postBuildCallback) notNil ifTrue:[ |
1229 |
app := self application. |
|
1230 |
app |
|
1231 |
perform:createCallBackSelector |
|
1232 |
withOptionalArgument:aView |
|
1233 |
and:spec |
|
1234 |
and:self. |
|
1235 |
]. |
|
2369 | 1236 |
]. |
100 | 1237 |
|
735 | 1238 |
"Modified: / 5.9.1995 / 21:42:54 / claus" |
1239 |
"Created: / 31.10.1997 / 18:47:01 / cg" |
|
1240 |
"Modified: / 31.10.1997 / 18:51:22 / cg" |
|
100 | 1241 |
! ! |
1242 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1243 |
!WindowBuilder methodsFor:'startup'! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1244 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1245 |
closeRequest |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1246 |
window destroy |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1247 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1248 |
"Modified: 17.1.1997 / 19:30:32 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1249 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1250 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1251 |
open |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1252 |
"open my topView, as previously created" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1253 |
|
477 | 1254 |
|type| |
1255 |
||
1256 |
application isNil ifTrue:[ |
|
2870 | 1257 |
type := #normal |
477 | 1258 |
] ifFalse:[ |
2870 | 1259 |
type := application defaultWindowType |
477 | 1260 |
]. |
2870 | 1261 |
^ self |
1262 |
openAt:nil |
|
1263 |
withExtent:nil |
|
1264 |
andType:type |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1265 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1266 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1267 |
|
428 | 1268 |
openAt:aPoint |
1269 |
"open my topView at some location" |
|
1270 |
||
2870 | 1271 |
^ self |
1272 |
openAt:aPoint |
|
1273 |
withExtent:nil |
|
1274 |
andType:(application defaultWindowType) |
|
428 | 1275 |
|
1276 |
"Created: 14.2.1997 / 20:21:57 / cg" |
|
467 | 1277 |
"Modified: 28.2.1997 / 22:50:29 / cg" |
428 | 1278 |
! |
1279 |
||
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1280 |
openDialog |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1281 |
"open my topView, as previously created as a modal view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1282 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1283 |
|
2870 | 1284 |
^ self |
1285 |
openAt:nil |
|
1286 |
withExtent:nil |
|
1287 |
andType:#dialog |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1288 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1289 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1290 |
openDialogAt:aPoint |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1291 |
"open my topView, as previously created as a modal view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1292 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1293 |
|
2870 | 1294 |
^ self |
1295 |
openAt:aPoint |
|
1296 |
withExtent:nil |
|
1297 |
andType:#dialog |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1298 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1299 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1300 |
"Created: 14.2.1997 / 20:24:19 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1301 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1302 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1303 |
openDialogAt:aPoint withExtent:ext |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1304 |
"open my topView, as previously created as a modal view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1305 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1306 |
|
2870 | 1307 |
^ self |
1308 |
openAt:aPoint |
|
1309 |
withExtent:ext |
|
1310 |
andType:#dialog |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1311 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1312 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1313 |
"Created: 14.2.1997 / 20:24:19 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1314 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1315 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1316 |
openDialogWithExtent:ext |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1317 |
"open my topView, as previously created as a modal view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1318 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1319 |
|
2870 | 1320 |
^ self |
1321 |
openAt:nil |
|
1322 |
withExtent:ext |
|
1323 |
andType:#dialog |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1324 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1325 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1326 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1327 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1328 |
openModal |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1329 |
"open my topView as a modal dialog, as previously created, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1330 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1331 |
|
2870 | 1332 |
^ self |
1333 |
openAt:nil |
|
1334 |
withExtent:nil |
|
1335 |
andType:#dialog |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1336 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1337 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1338 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1339 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1340 |
openPopUpAt:aPoint |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1341 |
"open my topView, as previously created as a popUp view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1342 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1343 |
|
2870 | 1344 |
^ self |
1345 |
openAt:aPoint |
|
1346 |
withExtent:nil |
|
1347 |
andType:#popUp |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1348 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1349 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1350 |
"Created: 14.2.1997 / 20:24:38 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1351 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1352 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1353 |
openPopUpIn:aRectangle |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1354 |
"open my topView, as previously created as a popUp view, |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1355 |
blocking interaction to the currently active view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1356 |
|
2870 | 1357 |
^ self |
1358 |
openAt:aRectangle origin |
|
1359 |
withExtent:aRectangle extent |
|
1360 |
andType:#popUp |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1361 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1362 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1363 |
openWindow |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1364 |
"open my topView" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1365 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1366 |
^ self |
2870 | 1367 |
openAt:nil |
1368 |
withExtent:nil |
|
1369 |
andType:(application defaultWindowType) |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1370 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1371 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1372 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1373 |
openWindowAt:aPoint |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1374 |
"open my topView at some location" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1375 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1376 |
^ self |
2870 | 1377 |
openAt:aPoint |
1378 |
withExtent:nil |
|
1379 |
andType:(application defaultWindowType) |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1380 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1381 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1382 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1383 |
openWindowAt:origin withExtent:ext andType:type |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1384 |
"open my window, as previously created, optionally defining the |
2870 | 1385 |
windows origin and/or extent. |
1386 |
The type argument may be #dialog or #normal, and specifies if the view |
|
1387 |
should be opened as a modal view, blocking interaction to the currently |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1388 |
active view, or as a normal view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1389 |
|
2870 | 1390 |
^ self |
1391 |
openAt:origin |
|
1392 |
withExtent:ext |
|
1393 |
andType:type |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1394 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1395 |
|
1118
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1396 |
openWindowCenter |
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1397 |
"open my topView centered on the screen (dialog & normal only)" |
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1398 |
|
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1399 |
^ self |
2870 | 1400 |
openAt:#center |
1401 |
withExtent:nil |
|
1402 |
andType:(application defaultWindowType) |
|
1118
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1403 |
|
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1404 |
! |
67eb0839e703
added hooks to allow openAtCenter.
Claus Gittinger <cg@exept.de>
parents:
1096
diff
changeset
|
1405 |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1406 |
openWithExtent:aPoint |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1407 |
"open my topView, as previously created, but override |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1408 |
the extent." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1409 |
|
2870 | 1410 |
^ self |
1411 |
openAt:nil |
|
1412 |
withExtent:aPoint |
|
1413 |
andType:(application defaultWindowType) |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1414 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1415 |
"Modified: 17.1.1997 / 19:58:48 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1416 |
! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1417 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1418 |
openWithExtent:ext andType:type |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1419 |
"open my window, as previously created. The type argument |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1420 |
may be #dialog or #normal, and specifies if the view should |
2870 | 1421 |
be opened as a modal view, blocking interaction to the currently |
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1422 |
active view, or as a normal view." |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1423 |
|
2870 | 1424 |
^ self |
1425 |
openAt:nil |
|
1426 |
withExtent:ext |
|
1427 |
andType:type |
|
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1428 |
|
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1429 |
"Modified: 14.2.1997 / 20:22:47 / cg" |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1430 |
! ! |
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1431 |
|
1766 | 1432 |
!WindowBuilder methodsFor:'startup-basic'! |
1092
20104ea94915
cleaned up all #openWindow* methods
Claus Gittinger <cg@exept.de>
parents:
1031
diff
changeset
|
1433 |
|
436 | 1434 |
openAt:origin withExtent:ext andType:type |
428 | 1435 |
"open my window, as previously created, optionally defining the |
2870 | 1436 |
windows origin and/or extent. |
4234 | 1437 |
The type argument may be |
1438 |
#normal, #dialog, #popUp, |
|
1439 |
#toolDialog, #popupWithFrame, #slave, #partner, #popUpNotModal |
|
1440 |
#undecorated or #undecoratedResizable |
|
1441 |
and specifies how the view should be opened. |
|
1442 |
Most common are |
|
1443 |
#dialog: modal view (blocking interaction to the currently active view), |
|
1444 |
#popUp: blocking, undecorated |
|
1445 |
#normal: a standard view" |
|
428 | 1446 |
|
3620 | 1447 |
|appWinClass windowsDevice wg mainWin x y monitorBounds newOrigin| |
1359
f40bfb94f862
allow for application to decide what type of
Claus Gittinger <cg@exept.de>
parents:
1357
diff
changeset
|
1448 |
|
3620 | 1449 |
windowsDevice := window device. |
2870 | 1450 |
|
2873
835095080d19
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2871
diff
changeset
|
1451 |
"/ ********* MULTI SCREEN |
2870 | 1452 |
|
1453 |
wg := WindowGroup activeGroup. |
|
1454 |
wg notNil ifTrue:[ |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1455 |
|mainGroup focusView| |
2870 | 1456 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1457 |
mainGroup := wg mainGroup ? wg. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1458 |
focusView := mainGroup focusView. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1459 |
focusView notNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1460 |
mainWin := focusView topView |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1461 |
] ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1462 |
mainGroup notNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1463 |
mainWin := (mainGroup topViews ? #()) firstIfEmpty:nil |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1464 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1465 |
]. |
428 | 1466 |
]. |
2870 | 1467 |
|
1468 |
origin isPoint ifTrue:[ |
|
3620 | 1469 |
monitorBounds := windowsDevice monitorBoundsAt:origin. |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1470 |
window origin:origin. |
480 | 1471 |
] ifFalse:[ |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1472 |
mainWin isNil ifTrue:[ |
3620 | 1473 |
monitorBounds := windowsDevice monitorBoundsAt:(windowsDevice pointerPosition). |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1474 |
] ifFalse:[ |
3620 | 1475 |
monitorBounds := windowsDevice monitorBoundsAt:(mainWin origin). |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1476 |
]. |
2870 | 1477 |
]. |
1478 |
||
1479 |
ext notNil ifTrue:[ |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1480 |
window extent:ext. |
2870 | 1481 |
] ifFalse:[ |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1482 |
((type == #dialog) or:[type == #toolDialog]) ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1483 |
window fixSize |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1484 |
] |
480 | 1485 |
]. |
1486 |
||
2896
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1487 |
((type == #dialog) or:[type == #toolDialog or:[ type == #popUp or:[type == #popUpWithFrame]] ]) ifTrue:[ |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1488 |
((origin isNil and:[window class forceModalBoxesToOpenAtCenter]) |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1489 |
or:[origin == #center]) ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1490 |
newOrigin := nil. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1491 |
] ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1492 |
origin isPoint ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1493 |
newOrigin := origin |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1494 |
] ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1495 |
mainWin notNil ifTrue:[ |
2899
807ebeb72418
comment/format in: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2897
diff
changeset
|
1496 |
"/ newOrigin := device pointerPosition |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1497 |
newOrigin := mainWin bounds center rounded - (window extent // 2). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1498 |
] |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1499 |
] |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1500 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1501 |
newOrigin isNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1502 |
newOrigin := monitorBounds center rounded - (window extent // 2). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1503 |
]. |
2873
835095080d19
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2871
diff
changeset
|
1504 |
|
835095080d19
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2871
diff
changeset
|
1505 |
UserPreferences current forceWindowsIntoMonitorBounds ifTrue:[ |
3701 | 1506 |
|usableHeight| |
1507 |
||
1508 |
(newOrigin x + window width) > monitorBounds right ifTrue:[ |
|
1509 |
x := monitorBounds right - window width - 20. |
|
1510 |
newOrigin := x @ newOrigin y. |
|
3262 | 1511 |
]. |
3701 | 1512 |
(newOrigin y + window height) > monitorBounds bottom ifTrue:[ |
1513 |
y := monitorBounds bottom - window height - 20. |
|
1514 |
newOrigin := newOrigin x @ y. |
|
1515 |
]. |
|
1516 |
usableHeight := windowsDevice usableHeightAt:newOrigin+window extent. |
|
1517 |
(newOrigin y + window height) > usableHeight ifTrue:[ |
|
1518 |
y := usableHeight - window height - 20. |
|
1519 |
newOrigin := newOrigin x @ y. |
|
2873
835095080d19
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2871
diff
changeset
|
1520 |
]. |
835095080d19
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2871
diff
changeset
|
1521 |
]. |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1522 |
window origin:newOrigin. |
2894
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1523 |
type == #toolDialog ifTrue:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1524 |
window beToolDialog |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1525 |
] ifFalse:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1526 |
type == #popUp ifTrue:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1527 |
window bePopUpView. |
2896
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1528 |
] ifFalse:[ |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1529 |
type == #popUpWithFrame ifTrue:[ |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1530 |
"/ window windowType:type. |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1531 |
window beUndecorated. |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1532 |
] |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1533 |
]. |
2894
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1534 |
]. |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1535 |
^ window openModal. |
428 | 1536 |
]. |
1537 |
||
2897
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1538 |
(type == #normal |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1539 |
or:[type = #slave or:[type = #partner |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1540 |
or:[type = #popUpNotModal |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1541 |
or:[type = #undecorated |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1542 |
or:[type = #undecoratedResizable]]]]]) ifTrue:[ |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1543 |
window isNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1544 |
application notNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1545 |
appWinClass := application applicationWindowClass |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1546 |
] ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1547 |
appWinClass := ApplicationWindow |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1548 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1549 |
self setupWindowFor:appWinClass new. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1550 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1551 |
origin isPoint ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1552 |
|windowExtent newOrg| |
2870 | 1553 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1554 |
windowExtent := window extent. |
480 | 1555 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1556 |
mainWin notNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1557 |
(windowExtent x > mainWin extent x or:[windowExtent y > mainWin extent y]) ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1558 |
newOrg := mainWin bounds center - (windowExtent // 2). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1559 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1560 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1561 |
newOrg isNil ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1562 |
newOrg := monitorBounds center - (windowExtent // 2). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1563 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1564 |
window origin:newOrg rounded. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1565 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1566 |
y := window origin y. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1567 |
x := window origin x. |
2870 | 1568 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1569 |
window corner y > monitorBounds bottom ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1570 |
y := (monitorBounds bottom - window height) max:(monitorBounds top). |
2870 | 1571 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1572 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1573 |
window corner x > monitorBounds right ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1574 |
x := (monitorBounds right - window width) max:(monitorBounds left). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1575 |
]. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1576 |
window origin:(x @ y ). |
2870 | 1577 |
|
1578 |
||
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1579 |
"/ the following code creates a master-slave relationship, if |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1580 |
"/ the masterApplication is not nil. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1581 |
"/ Disabled, because: the masterApplication is used to fulfill missing aspects, |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1582 |
"/ which has nothing to do with a window master-slave relationship. |
2870 | 1583 |
|
1584 |
"/ application masterApplication notNil ifTrue:[ |
|
1634 | 1585 |
"/ masterWindow := application masterApplication window. |
1586 |
"/ (masterWindow isMaster or:[masterWindow isSlave or:[masterWindow isPartner]]) |
|
1587 |
"/ ifFalse:[ |
|
1588 |
"/ "/ master is neutral - make him a master |
|
1589 |
"/ masterWindow beMaster |
|
1590 |
"/ ]. |
|
1591 |
"/ window beSlave. |
|
1592 |
"/ ]. |
|
1593 |
||
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1594 |
"/ must be done explicit, by passing an appropriate windowType |
1722 | 1595 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1596 |
type = #slave ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1597 |
window beSlave. |
2894
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1598 |
] ifFalse:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1599 |
type = #partner ifTrue:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1600 |
window bePartner. |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1601 |
] ifFalse:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1602 |
type == #popUpNotModal ifTrue:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1603 |
window bePopUpView. |
2896
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1604 |
] ifFalse:[ |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1605 |
type == #undecorated ifTrue:[ |
96d5a0b6fc56
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2894
diff
changeset
|
1606 |
window beUndecorated. |
2897
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1607 |
] ifFalse:[ |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1608 |
type == #undecoratedResizable ifTrue:[ |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1609 |
window beUndecoratedResizable. |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1610 |
] |
ea76bd971a64
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2896
diff
changeset
|
1611 |
]. |
2894
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1612 |
] |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1613 |
]. |
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1614 |
]. |
1722 | 1615 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1616 |
((type = #slave or:[type = #partner]) |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1617 |
and:[ window windowGroup isNil ]) |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1618 |
ifTrue:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1619 |
window openInGroup:(WindowGroup activeGroup). |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1620 |
] ifFalse:[ |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1621 |
window open. |
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1622 |
]. |
1725
a9945722dab2
openAsSlave makes view a slave, but NOT the current view a master
Claus Gittinger <cg@exept.de>
parents:
1723
diff
changeset
|
1623 |
|
a9945722dab2
openAsSlave makes view a slave, but NOT the current view a master
Claus Gittinger <cg@exept.de>
parents:
1723
diff
changeset
|
1624 |
"/ the following automatism is probably too cryptic and has too much of a side effect. |
1722 | 1625 |
"/ I prefer to leave things as they are: i.e. enforce the programmer to |
3470 | 1626 |
"/ do things explicit. |
1722 | 1627 |
|
1628 |
"/ type = #slave ifTrue:[ |
|
1629 |
"/ window windowGroup topViews first beMaster |
|
1630 |
"/ ]. |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1631 |
^ self |
428 | 1632 |
]. |
1633 |
||
2894
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1634 |
"/ type == #popUp ifTrue:[ |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1635 |
"/ window fixPosition:(device pointerPosition). |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1636 |
"/ ^ window openAsPopUp. |
4380670e758e
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2873
diff
changeset
|
1637 |
"/ ]. |
428 | 1638 |
|
1639 |
" |
|
1640 |
if ST-80 supports more types - these may be added later |
|
1641 |
" |
|
1825 | 1642 |
self shouldImplement |
428 | 1643 |
|
2871
e9df4227a57d
changed: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2870
diff
changeset
|
1644 |
"Created: / 14-02-1997 / 20:22:24 / cg" |
2899
807ebeb72418
comment/format in: #openAt:withExtent:andType:
Claus Gittinger <cg@exept.de>
parents:
2897
diff
changeset
|
1645 |
"Modified: / 22-03-2011 / 13:31:52 / cg" |
4234 | 1646 |
"Modified (comment): / 23-02-2019 / 15:02:21 / Claus Gittinger" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1647 |
! ! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1648 |
|
2529
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1649 |
!WindowBuilder methodsFor:'translating'! |
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1650 |
|
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1651 |
translateString:aString |
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1652 |
"translate aString to the current language. |
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1653 |
If there is an application, it knows best what to do" |
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1654 |
|
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1655 |
application isNil ifTrue:[ |
2870 | 1656 |
^ self resources string:aString |
2529
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1657 |
]. |
2608 | 1658 |
^ application translateString:aString |
2529
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1659 |
! ! |
c22b95752b7b
New: let the Application do the string translation
Stefan Vogel <sv@exept.de>
parents:
2499
diff
changeset
|
1660 |
|
132 | 1661 |
!WindowBuilder class methodsFor:'documentation'! |
1662 |
||
1663 |
version |
|
3620 | 1664 |
^ '$Header$' |
2784
a0cdac50e04b
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
2744
diff
changeset
|
1665 |
! |
a0cdac50e04b
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
2744
diff
changeset
|
1666 |
|
a0cdac50e04b
comment/format in: #labelFor:
Claus Gittinger <cg@exept.de>
parents:
2744
diff
changeset
|
1667 |
version_CVS |
3620 | 1668 |
^ '$Header$' |
132 | 1669 |
! ! |
3262 | 1670 |