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