author | Claus Gittinger <cg@exept.de> |
Tue, 28 Oct 1997 19:37:28 +0100 | |
changeset 717 | b89142a61d05 |
parent 716 | a23d48401446 |
child 727 | 74603345637d |
permissions | -rw-r--r-- |
89 | 1 |
" |
2 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
434 | 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 |
" |
|
12 |
||
100 | 13 |
Object subclass:#WindowBuilder |
480 | 14 |
instanceVariableNames:'window windowView application bindings visuals focusSequence |
600 | 15 |
namedComponents helpKeys componentCreationHook applicationClass |
502 | 16 |
keyboardProcessor subCanvasSpecs' |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
17 |
classVariableNames:'StopOnError' |
436 | 18 |
poolDictionaries:'' |
19 |
category:'Interface-Support-UI' |
|
66 | 20 |
! |
21 |
||
22 |
!WindowBuilder class methodsFor:'documentation'! |
|
23 |
||
89 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
434 | 27 |
All Rights Reserved |
89 | 28 |
|
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
66 | 38 |
documentation |
39 |
" |
|
69 | 40 |
a no-op class, for systems which do not use the UIBuilder. |
66 | 41 |
Concrete subclasses know how to create a view (with components) from |
42 |
some interface spec. Currently, an experimantal version of UIBuilder exists, |
|
43 |
and more may be added in the future (for example, to parse different UI |
|
44 |
specs - thinking of motifs UIL specs etc). |
|
223 | 45 |
|
46 |
[author:] |
|
47 |
Claus Gittinger |
|
66 | 48 |
" |
49 |
! ! |
|
50 |
||
51 |
!WindowBuilder methodsFor:'accessing'! |
|
52 |
||
463 | 53 |
addBindings:moreBindings |
54 |
"used with subDialogs, which provide local bindings. |
|
55 |
All bindings from moreBindings overwrite any local bindings." |
|
56 |
||
57 |
moreBindings notNil ifTrue:[ |
|
58 |
moreBindings keysAndValuesDo:[:aKey :aValue | |
|
59 |
bindings at:aKey put:aValue |
|
60 |
] |
|
61 |
] |
|
62 |
||
63 |
"Created: 28.2.1997 / 14:14:33 / cg" |
|
64 |
! |
|
65 |
||
100 | 66 |
application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
67 |
"return the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
68 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
69 |
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
|
70 |
|
100 | 71 |
^ application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
72 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
73 |
"Modified: 17.1.1997 / 19:04:40 / cg" |
66 | 74 |
! |
75 |
||
125 | 76 |
application:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
77 |
"set the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
78 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
79 |
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
|
80 |
|
125 | 81 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
82 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
83 |
"Modified: 17.1.1997 / 19:04:47 / cg" |
66 | 84 |
! |
85 |
||
422 | 86 |
applicationClass:something |
87 |
"set the value of the instance variable 'applicationClass' (automatically generated)" |
|
88 |
||
89 |
applicationClass := something.! |
|
90 |
||
66 | 91 |
aspectAt:aSymbol |
433 | 92 |
|b| |
93 |
||
473 | 94 |
aSymbol notNil ifTrue:[ |
95 |
bindings notNil ifTrue:[ |
|
96 |
b := bindings at:aSymbol ifAbsent:nil. |
|
97 |
b notNil ifTrue:[^ b]. |
|
98 |
]. |
|
434 | 99 |
|
473 | 100 |
application notNil ifTrue:[ |
577 | 101 |
Object messageNotUnderstoodSignal handle:[:ex | |
102 |
] do:[ |
|
473 | 103 |
^ application aspectFor:aSymbol |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
104 |
]. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
105 |
Object messageNotUnderstoodSignal handle:[:ex | |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
106 |
] do:[ |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
107 |
^ application class aspectFor:aSymbol |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
108 |
]. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
109 |
Transcript showCR:'WindowBuilder: no aspect for ' , aSymbol storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
110 |
StopOnError == true ifTrue:[self halt]. "/ avoids debugger in end-user apps |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
111 |
]. |
433 | 112 |
]. |
113 |
^ nil |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
114 |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
115 |
"Modified: / 28.10.1997 / 19:36:41 / cg" |
66 | 116 |
! |
117 |
||
125 | 118 |
aspectAt:aSymbol put:aModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
119 |
bindings isNil ifTrue:[ |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
120 |
bindings := IdentityDictionary new |
125 | 121 |
]. |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
122 |
^ bindings at:aSymbol put:aModel |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
123 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
124 |
"Modified: 17.1.1997 / 19:28:37 / cg" |
100 | 125 |
! |
126 |
||
450 | 127 |
bindingAt:aSymbol |
128 |
bindings notNil ifTrue:[ |
|
129 |
^ bindings at:aSymbol ifAbsent:nil. |
|
130 |
]. |
|
131 |
^ nil |
|
132 |
! |
|
133 |
||
100 | 134 |
bindings |
135 |
^ bindings |
|
136 |
! |
|
137 |
||
138 |
bindings:aDictionary |
|
139 |
bindings := aDictionary |
|
140 |
! |
|
141 |
||
125 | 142 |
componentAt:name |
450 | 143 |
namedComponents isNil ifTrue:[^ nil]. |
144 |
^ namedComponents at:name asSymbol ifAbsent:nil |
|
125 | 145 |
! |
146 |
||
100 | 147 |
componentAt:name put:aComponent |
450 | 148 |
namedComponents isNil ifTrue:[ |
149 |
namedComponents := IdentityDictionary new. |
|
100 | 150 |
]. |
450 | 151 |
namedComponents at:name asSymbol put:aComponent |
100 | 152 |
! |
153 |
||
410 | 154 |
componentCreationHook:something |
155 |
"set the value of the instance variable 'componentCreationHook' (automatically generated)" |
|
156 |
||
157 |
componentCreationHook := something.! |
|
158 |
||
125 | 159 |
focusSequence |
160 |
^ focusSequence |
|
66 | 161 |
! |
162 |
||
600 | 163 |
helpKeyFor:aComponent |
164 |
|v key| |
|
165 |
||
166 |
helpKeys isNil ifTrue:[^ nil]. |
|
167 |
v := aComponent. |
|
168 |
[v notNil] whileTrue:[ |
|
169 |
(key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[ |
|
170 |
^ key |
|
171 |
]. |
|
172 |
v := v superView |
|
173 |
]. |
|
595 | 174 |
^ nil |
600 | 175 |
! |
595 | 176 |
|
600 | 177 |
helpKeyFor:aComponent put:aKey |
595 | 178 |
|
600 | 179 |
aKey isNil ifTrue:[ |
180 |
helpKeys isNil ifFalse:[ |
|
181 |
helpKeys removeKey:aComponent ifAbsent:nil |
|
182 |
] |
|
183 |
] ifFalse:[ |
|
184 |
helpKeys isNil ifTrue:[ |
|
185 |
helpKeys := IdentityDictionary new |
|
186 |
]. |
|
187 |
helpKeys at:aComponent put:aKey |
|
188 |
] |
|
595 | 189 |
|
190 |
! |
|
191 |
||
477 | 192 |
keyboardProcessor |
193 |
keyboardProcessor isNil ifTrue:[ |
|
194 |
keyboardProcessor := KeyboardProcessor new |
|
195 |
]. |
|
196 |
^ keyboardProcessor |
|
197 |
||
198 |
"Created: 3.3.1997 / 18:31:37 / cg" |
|
199 |
"Modified: 3.3.1997 / 18:32:27 / cg" |
|
200 |
! |
|
201 |
||
86 | 202 |
namedComponents |
450 | 203 |
^ namedComponents |
86 | 204 |
! |
205 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
206 |
source |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
207 |
"same as #application, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
208 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
209 |
^ application |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
210 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
211 |
"Created: 17.1.1997 / 19:03:51 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
212 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
213 |
|
125 | 214 |
source:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
215 |
"same as #application:, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
216 |
|
125 | 217 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
218 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
219 |
"Modified: 17.1.1997 / 19:03:57 / cg" |
125 | 220 |
! |
221 |
||
502 | 222 |
subCanvasAt:majorKey at:minorKey |
586 | 223 |
"get the subCanvas specification from major and minor key |
224 |
" |
|
225 |
|spec cls dict dkey| |
|
502 | 226 |
|
227 |
subCanvasSpecs notNil ifTrue:[ |
|
586 | 228 |
dkey := majorKey ? #NoMajorKey. |
229 |
dict := subCanvasSpecs at:dkey ifAbsent:nil. |
|
230 |
||
231 |
dict notNil ifTrue:[ |
|
232 |
spec := dict at:minorKey ifAbsent:nil. |
|
502 | 233 |
spec notNil ifTrue:[^ spec]. |
234 |
]. |
|
235 |
]. |
|
586 | 236 |
|
502 | 237 |
majorKey isNil ifTrue:[ |
586 | 238 |
spec := self safelyPerform:#specificationFor: with:minorKey. |
239 |
||
240 |
spec isNil ifTrue:[ |
|
241 |
spec := self safelyPerform:minorKey |
|
242 |
] |
|
502 | 243 |
] ifFalse:[ |
701 | 244 |
"/ look for class in applications namespace ... |
707 | 245 |
cls := self application resolveName:majorKey. |
246 |
||
586 | 247 |
(cls notNil and:[cls respondsTo:minorKey]) ifTrue:[ |
502 | 248 |
spec := cls perform:minorKey |
249 |
] |
|
250 |
]. |
|
586 | 251 |
^ spec |
252 |
||
502 | 253 |
! |
254 |
||
255 |
subCanvasAt:majorKey at:minorKey put:aSpec |
|
256 |
|dict key| |
|
257 |
||
258 |
key := majorKey ? #NoMajorKey. |
|
259 |
dict := subCanvasSpecs at:key ifAbsent:nil. |
|
260 |
dict isNil ifTrue:[ |
|
261 |
dict := IdentityDictionary new. |
|
262 |
subCanvasSpecs at:key put:dict |
|
263 |
]. |
|
264 |
dict at:minorKey put:aSpec |
|
265 |
||
266 |
! |
|
267 |
||
475
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
268 |
visualAt:name |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
269 |
visuals isNil ifTrue:[^ nil]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
270 |
^ visuals at:name asSymbol ifAbsent:nil |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
271 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
272 |
"Created: 3.3.1997 / 16:24:17 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
273 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
274 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
275 |
visualAt:name put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
276 |
visuals isNil ifTrue:[ |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
277 |
visuals := IdentityDictionary new. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
278 |
]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
279 |
visuals at:name asSymbol put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
280 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
281 |
"Created: 3.3.1997 / 16:24:41 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
282 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
283 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
284 |
visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
285 |
^ visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
286 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
287 |
"Created: 3.3.1997 / 16:24:00 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
288 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
289 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
290 |
visuals:aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
291 |
visuals := aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
292 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
293 |
"Created: 3.3.1997 / 16:24:06 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
294 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
295 |
|
125 | 296 |
window |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
297 |
"return the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
298 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
299 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
300 |
^ window |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
301 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
302 |
"Modified: 17.1.1997 / 19:30:00 / cg" |
125 | 303 |
! |
304 |
||
305 |
window:aView |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
306 |
"set the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
307 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
308 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
309 |
window := aView |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
310 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
311 |
"Modified: 17.1.1997 / 19:30:22 / cg" |
66 | 312 |
! |
313 |
||
314 |
windowGroup |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
315 |
^ window windowGroup |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
316 |
|
608 | 317 |
"Modified: 17.6.1997 / 18:04:01 / cg" |
66 | 318 |
! ! |
319 |
||
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
320 |
!WindowBuilder methodsFor:'aspect access support'! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
321 |
|
675 | 322 |
booleanValueAspectFor:aKey |
674 | 323 |
"helper (common code) to generate a boolean aspect if required. |
324 |
If no binding exists for aKey, a valueHolder holding false is |
|
325 |
created and added to the bindings. |
|
326 |
Otherwise, the existing binding is returned." |
|
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
327 |
|
676 | 328 |
^ self valueAspectFor:aKey initialValue:false |
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
329 |
|
676 | 330 |
"Modified: 28.7.1997 / 12:53:57 / cg" |
675 | 331 |
! |
332 |
||
333 |
nilValueAspectFor:aKey |
|
334 |
"helper (common code) to generate a valueHolder aspect if required. |
|
335 |
If no binding exists for aKey, a valueHolder holding nil is |
|
336 |
created and added to the bindings. |
|
337 |
Otherwise, the existing binding is returned." |
|
338 |
||
676 | 339 |
^ self valueAspectFor:aKey initialValue:nil |
340 |
||
341 |
"Modified: 28.7.1997 / 12:54:06 / cg" |
|
342 |
! |
|
343 |
||
344 |
valueAspectFor:aKey initialValue:initialValue |
|
345 |
"helper (common code) to generate a valueHolder aspect if required. |
|
346 |
If no binding exists for aKey, a valueHolder holding initialValue is |
|
347 |
created and added to the bindings. |
|
348 |
Otherwise, the existing binding is returned." |
|
349 |
||
675 | 350 |
|holder| |
351 |
||
352 |
(holder := self bindingAt:aKey) isNil ifTrue:[ |
|
676 | 353 |
self aspectAt:aKey put:(holder := initialValue asValue). |
675 | 354 |
]. |
355 |
^ holder |
|
356 |
||
676 | 357 |
"Created: 28.7.1997 / 12:53:45 / cg" |
358 |
"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
|
359 |
! ! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
360 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
361 |
!WindowBuilder methodsFor:'building'! |
66 | 362 |
|
125 | 363 |
buildFromSpec:aSpec |
176 | 364 |
^ self subclassResponsibility |
408 | 365 |
! |
366 |
||
367 |
makeTabable:aComponent |
|
368 |
focusSequence isNil ifTrue:[ |
|
369 |
focusSequence := OrderedCollection new. |
|
370 |
]. |
|
371 |
focusSequence add:aComponent |
|
66 | 372 |
! ! |
100 | 373 |
|
586 | 374 |
!WindowBuilder methodsFor:'message sending'! |
375 |
||
376 |
safelyPerform:aSelector |
|
377 |
"send the message aSelector to the receiver self or application; |
|
378 |
the result returned from the send or nil is returned |
|
379 |
" |
|
380 |
|res| |
|
381 |
||
595 | 382 |
aSelector isSymbol ifTrue:[ |
383 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
384 |
] do:[ |
|
385 |
(res := self perform:aSelector) notNil ifTrue:[^ res] |
|
386 |
]. |
|
387 |
||
388 |
application notNil ifTrue:[ |
|
389 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
390 |
] do:[ |
|
391 |
(res := application perform:aSelector) notNil ifTrue:[^ res] |
|
392 |
] |
|
586 | 393 |
] |
394 |
]. |
|
595 | 395 |
^ nil |
586 | 396 |
! |
397 |
||
398 |
safelyPerform:aSelector with:anArgument |
|
399 |
"send the one-arg-message aSelector to the receiver self or application; |
|
400 |
the result returned from the send or nil is returned |
|
401 |
" |
|
402 |
|res| |
|
403 |
||
595 | 404 |
aSelector isSymbol ifTrue:[ |
405 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
406 |
] do:[ |
|
407 |
(res := self perform:aSelector with:anArgument) notNil ifTrue:[^ res] |
|
408 |
]. |
|
409 |
||
410 |
application notNil ifTrue:[ |
|
411 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
412 |
] do:[ |
|
413 |
(res := application perform:aSelector with:anArgument) notNil ifTrue:[^ res] |
|
414 |
] |
|
586 | 415 |
] |
416 |
]. |
|
595 | 417 |
^ nil |
586 | 418 |
! ! |
419 |
||
422 | 420 |
!WindowBuilder methodsFor:'spec creation aspect fetch'! |
100 | 421 |
|
374 | 422 |
actionFor:aKey |
450 | 423 |
"return an action for aKey. This is invoked during window building |
424 |
(by the builder) to ask for an ActionButtons actionBlock. |
|
425 |
Here, first the local bindings are searched, then the application and |
|
426 |
finally the applications class is asked for a corresponding action. |
|
427 |
The returned object is typically a block." |
|
428 |
||
434 | 429 |
|b| |
430 |
||
431 |
bindings notNil ifTrue:[ |
|
432 |
b := bindings at:aKey ifAbsent:nil. |
|
433 |
b notNil ifTrue:[^ b]. |
|
434 |
]. |
|
435 |
||
374 | 436 |
application notNil ifTrue:[ |
577 | 437 |
Object messageNotUnderstoodSignal handle:[:ex | |
438 |
] do:[ |
|
450 | 439 |
^ application actionFor:aKey |
440 |
] |
|
374 | 441 |
]. |
422 | 442 |
applicationClass notNil ifTrue:[ |
424 | 443 |
(applicationClass respondsTo:#actionFor:) ifTrue:[ |
444 |
^ applicationClass actionFor:aKey |
|
445 |
] |
|
422 | 446 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
447 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
448 |
Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
449 |
StopOnError == true ifTrue:[self halt]. "/ avoids debugger in end-user apps |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
450 |
|
422 | 451 |
^ [] |
374 | 452 |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
453 |
"Created: / 17.1.1997 / 21:08:22 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
454 |
"Modified: / 28.10.1997 / 12:52:57 / cg" |
374 | 455 |
! |
456 |
||
716 | 457 |
actionFor:aKey withValue:aValue |
458 |
"return an action for aKey/value combonation. |
|
459 |
This is invoked during window building |
|
460 |
(by the builder) to ask for an ActionButtons actionBlock if that button |
|
461 |
specified an action with an argument value. |
|
462 |
Here, first the local bindings are searched, then the application and |
|
463 |
finally the applications class is asked for a corresponding action. |
|
464 |
The returned object is typically a block." |
|
465 |
||
466 |
|b| |
|
467 |
||
468 |
bindings notNil ifTrue:[ |
|
469 |
b := bindings at:aKey ifAbsent:nil. |
|
470 |
b notNil ifTrue:[^ b]. |
|
471 |
]. |
|
472 |
||
473 |
application notNil ifTrue:[ |
|
474 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
475 |
] do:[ |
|
476 |
^ application actionFor:aKey withValue:aValue |
|
477 |
] |
|
478 |
]. |
|
479 |
applicationClass notNil ifTrue:[ |
|
480 |
(applicationClass respondsTo:#actionFor:withValue:) ifTrue:[ |
|
481 |
^ applicationClass actionFor:aKey withValue:aValue |
|
482 |
] |
|
483 |
]. |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
484 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
485 |
Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
486 |
StopOnError == true ifTrue:[self halt]. "/ avoids debugger in end-user apps |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
487 |
|
716 | 488 |
^ [:dummy | ] |
489 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
490 |
"Created: / 17.1.1997 / 21:08:22 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
491 |
"Modified: / 28.10.1997 / 12:53:22 / cg" |
716 | 492 |
! |
493 |
||
374 | 494 |
aspectFor:aKey |
450 | 495 |
"return a model for aKey. This is invoked during window building |
496 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
|
497 |
Here, first the local bindings are searched, then the application and |
|
498 |
finally the applications class is asked for a corresponding action. |
|
499 |
The returned object is typically a valueHolder." |
|
500 |
||
434 | 501 |
|b| |
502 |
||
503 |
bindings notNil ifTrue:[ |
|
504 |
b := bindings at:aKey ifAbsent:nil. |
|
505 |
b notNil ifTrue:[^ b]. |
|
506 |
]. |
|
507 |
||
374 | 508 |
application notNil ifTrue:[ |
577 | 509 |
Object messageNotUnderstoodSignal handle:[:ex | |
510 |
] do:[ |
|
450 | 511 |
^ application aspectFor:aKey |
512 |
] |
|
374 | 513 |
]. |
422 | 514 |
applicationClass notNil ifTrue:[ |
424 | 515 |
(applicationClass respondsTo:#aspectFor:) ifTrue:[ |
516 |
^ applicationClass aspectFor:aKey |
|
517 |
] |
|
422 | 518 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
519 |
|
374 | 520 |
^ self aspectAt:aKey |
521 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
522 |
"Created: / 17.1.1997 / 21:06:16 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
523 |
"Modified: / 28.10.1997 / 12:53:43 / cg" |
374 | 524 |
! |
525 |
||
423 | 526 |
componentFor:aKey |
450 | 527 |
"return a component for aKey. This is invoked during window building |
528 |
(by the builder) to ask for an ArbitraryComponents view. |
|
529 |
Here, first the local bindings are searched, then the application and |
|
530 |
finally the applications class is asked for a corresponding action. |
|
531 |
The returned object is typically a view." |
|
532 |
||
677 | 533 |
|component| |
423 | 534 |
|
535 |
application notNil ifTrue:[ |
|
611
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
536 |
component := application componentFor:aKey. |
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
537 |
component notNil ifTrue:[^ component]. |
423 | 538 |
]. |
539 |
applicationClass notNil ifTrue:[ |
|
424 | 540 |
(applicationClass respondsTo:#componentFor:) ifTrue:[ |
541 |
^ applicationClass componentFor:aKey |
|
542 |
] |
|
423 | 543 |
]. |
544 |
^ self aspectAt:aKey |
|
545 |
||
611
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
546 |
"Modified: 20.6.1997 / 11:40:22 / cg" |
423 | 547 |
! |
548 |
||
422 | 549 |
labelFor:aKey |
450 | 550 |
"return a label for aKey. This is invoked during window building |
551 |
(by the builder) to ask for a ???'s label. |
|
552 |
Here, first the local bindings are searched, then the application and |
|
553 |
finally the applications class is asked for a corresponding action. |
|
554 |
The returned object is typically a string." |
|
555 |
||
422 | 556 |
application notNil ifTrue:[ |
577 | 557 |
Object messageNotUnderstoodSignal handle:[:ex | |
558 |
] do:[ |
|
450 | 559 |
^ application labelFor:aKey |
560 |
] |
|
422 | 561 |
]. |
562 |
applicationClass notNil ifTrue:[ |
|
424 | 563 |
(applicationClass respondsTo:#labelFor:) ifTrue:[ |
564 |
^ applicationClass labelFor:aKey |
|
565 |
] |
|
422 | 566 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
567 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
568 |
"/ Transcript showCR:'WindowBuilder: no label for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
569 |
"/ StopOnError == true ifTrue:[self halt]. "/ avoids debugger in end-user apps |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
570 |
|
422 | 571 |
^ self aspectAt:aKey |
572 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
573 |
"Modified: / 28.10.1997 / 12:54:10 / cg" |
422 | 574 |
! |
575 |
||
576 |
listFor:aKey |
|
450 | 577 |
"return a list for aKey. This is invoked during window building |
578 |
(by the builder) to ask for a ???'s label. |
|
579 |
Here, first the local bindings are searched, then the application and |
|
580 |
finally the applications class is asked for a corresponding action. |
|
581 |
The returned object is typically a list." |
|
582 |
||
422 | 583 |
application notNil ifTrue:[ |
577 | 584 |
Object messageNotUnderstoodSignal handle:[:ex | |
585 |
] do:[ |
|
450 | 586 |
^ application listFor:aKey |
587 |
] |
|
422 | 588 |
]. |
589 |
applicationClass notNil ifTrue:[ |
|
424 | 590 |
(applicationClass respondsTo:#listFor:) ifTrue:[ |
591 |
^ applicationClass listFor:aKey |
|
592 |
] |
|
422 | 593 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
594 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
595 |
"/ Transcript showCR:'WindowBuilder: no list for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
596 |
"/ StopOnError == true ifTrue:[self halt]. "/ avoids debugger in end-user apps |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
597 |
|
422 | 598 |
^ self aspectAt:aKey |
599 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
600 |
"Created: / 17.1.1997 / 21:08:45 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
601 |
"Modified: / 28.10.1997 / 12:54:32 / cg" |
422 | 602 |
! ! |
603 |
||
604 |
!WindowBuilder methodsFor:'spec creation callbacks'! |
|
605 |
||
100 | 606 |
createdComponent:aView forSpec:spec |
410 | 607 |
componentCreationHook notNil ifTrue:[ |
608 |
componentCreationHook value:aView value:spec value:self |
|
609 |
] |
|
100 | 610 |
|
611 |
"Modified: 5.9.1995 / 21:42:54 / claus" |
|
612 |
! ! |
|
613 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
614 |
!WindowBuilder methodsFor:'startup'! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
615 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
616 |
closeRequest |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
617 |
window destroy |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
618 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
619 |
"Modified: 17.1.1997 / 19:30:32 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
620 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
621 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
622 |
open |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
623 |
"open my topView, as previously created" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
624 |
|
477 | 625 |
|type| |
626 |
||
627 |
application isNil ifTrue:[ |
|
628 |
type := #normal |
|
629 |
] ifFalse:[ |
|
630 |
type := application defaultWindowType |
|
631 |
]. |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
632 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
633 |
openWithExtent:nil |
477 | 634 |
andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
635 |
|
477 | 636 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
637 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
638 |
|
428 | 639 |
openAt:aPoint |
640 |
"open my topView at some location" |
|
641 |
||
642 |
self |
|
467 | 643 |
openAt:aPoint |
644 |
withExtent:nil |
|
428 | 645 |
andType:(application defaultWindowType) |
646 |
||
647 |
"Created: 14.2.1997 / 20:21:57 / cg" |
|
467 | 648 |
"Modified: 28.2.1997 / 22:50:29 / cg" |
428 | 649 |
! |
650 |
||
436 | 651 |
openAt:origin withExtent:ext andType:type |
428 | 652 |
"open my window, as previously created, optionally defining the |
653 |
windows origin and/or extent. |
|
654 |
The type argument may be #dialog or #normal, and specifies if the view |
|
655 |
should be opened as a modal view, blocking interaction to the currently |
|
656 |
active view, or as a normal view." |
|
657 |
||
658 |
origin notNil ifTrue:[ |
|
659 |
window origin:origin |
|
660 |
]. |
|
661 |
ext notNil ifTrue:[ |
|
480 | 662 |
window extent:ext. |
663 |
] ifFalse:[ |
|
664 |
type == #dialog ifTrue:[ |
|
665 |
window fixSize |
|
666 |
] |
|
667 |
]. |
|
668 |
||
669 |
(windowView notNil and:[windowView ~~ window]) ifTrue:[ |
|
670 |
windowView extent:(window extent). |
|
428 | 671 |
]. |
672 |
||
673 |
type == #dialog ifTrue:[ |
|
467 | 674 |
window fixPosition:(window device pointerPosition - window positionOffset). |
428 | 675 |
window openModal. |
676 |
^ self |
|
677 |
]. |
|
678 |
||
679 |
type == #normal ifTrue:[ |
|
480 | 680 |
window isNil ifTrue:[ |
681 |
self setupWindowFor:(StandardSystemView new). |
|
682 |
]. |
|
683 |
||
428 | 684 |
window open. |
685 |
^ self |
|
686 |
]. |
|
687 |
||
688 |
type == #popUp ifTrue:[ |
|
467 | 689 |
window fixPosition:(window device pointerPosition). |
690 |
window openAsPopUp. |
|
428 | 691 |
^ self |
692 |
]. |
|
693 |
||
694 |
" |
|
695 |
if ST-80 supports more types - these may be added later |
|
696 |
" |
|
697 |
self halt:'unimplemented' |
|
698 |
||
699 |
"Created: 14.2.1997 / 20:22:24 / cg" |
|
480 | 700 |
"Modified: 3.3.1997 / 22:27:52 / cg" |
428 | 701 |
! |
702 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
703 |
openDialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
704 |
"open my topView, as previously created as a modal view, |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
705 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
706 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
707 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
708 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
709 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
710 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
711 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
712 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
713 |
|
428 | 714 |
openDialogAt:aPoint withExtent:ext |
715 |
"open my topView, as previously created as a modal view, |
|
716 |
blocking interaction to the currently active view." |
|
717 |
||
718 |
self |
|
719 |
openAt:aPoint withExtent:ext |
|
720 |
andType:#dialog |
|
721 |
||
722 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
|
723 |
"Created: 14.2.1997 / 20:24:19 / cg" |
|
724 |
! |
|
725 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
726 |
openDialogWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
727 |
"open my topView, as previously created as a modal view, |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
728 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
729 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
730 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
731 |
openWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
732 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
733 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
734 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
735 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
736 |
|
664 | 737 |
openModal |
738 |
"open my topView, as previously created" |
|
739 |
||
740 |
self |
|
741 |
openWithExtent:nil |
|
742 |
andType:#dialog |
|
743 |
||
744 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
|
745 |
! |
|
746 |
||
428 | 747 |
openPopUpAt:aPoint |
748 |
"open my topView, as previously created as a popUp view, |
|
749 |
blocking interaction to the currently active view." |
|
750 |
||
751 |
self |
|
752 |
openAt:aPoint withExtent:nil |
|
753 |
andType:#popUp |
|
754 |
||
755 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
|
756 |
"Created: 14.2.1997 / 20:24:38 / cg" |
|
757 |
! |
|
758 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
759 |
openPopUpIn:aRectangle |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
760 |
"open my topView, as previously created as a popUp view, |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
761 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
762 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
763 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
764 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
765 |
andType:#popUp |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
766 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
767 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
768 |
"Created: 17.1.1997 / 20:01:24 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
769 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
770 |
|
587 | 771 |
openWindowAt:aPoint |
772 |
"open my topView at some location" |
|
773 |
||
774 |
self openAt:aPoint |
|
775 |
! |
|
776 |
||
777 |
openWindowAt:origin withExtent:ext andType:type |
|
778 |
"open my window, as previously created, optionally defining the |
|
779 |
windows origin and/or extent. |
|
780 |
The type argument may be #dialog or #normal, and specifies if the view |
|
781 |
should be opened as a modal view, blocking interaction to the currently |
|
782 |
active view, or as a normal view." |
|
783 |
||
784 |
^ self openAt:origin withExtent:ext andType:type |
|
785 |
! |
|
786 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
787 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
788 |
"open my topView, as previously created, but override |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
789 |
the extent." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
790 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
791 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
792 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
793 |
andType:(application defaultWindowType) |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
794 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
795 |
"Modified: 17.1.1997 / 19:58:48 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
796 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
797 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
798 |
openWithExtent:ext andType:type |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
799 |
"open my window, as previously created. The type argument |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
800 |
may be #dialog or #normal, and specifies if the view should |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
801 |
be opened as a modal view, blocking interaction to the currently |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
802 |
active view, or as a normal view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
803 |
|
428 | 804 |
^ self openAt:nil withExtent:ext andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
805 |
|
428 | 806 |
"Modified: 14.2.1997 / 20:22:47 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
807 |
! ! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
808 |
|
132 | 809 |
!WindowBuilder class methodsFor:'documentation'! |
810 |
||
811 |
version |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
812 |
^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.52 1997-10-28 18:37:28 cg Exp $' |
132 | 813 |
! ! |