author | Claus Gittinger <cg@exept.de> |
Thu, 27 Feb 1997 12:50:58 +0100 | |
changeset 461 | bacef118f54a |
parent 450 | 2a6e2eb653f0 |
child 463 | 75a8e06ef324 |
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 |
436 | 14 |
instanceVariableNames:'window application bindings focusSequence namedComponents |
15 |
componentCreationHook applicationClass' |
|
16 |
classVariableNames:'' |
|
17 |
poolDictionaries:'' |
|
18 |
category:'Interface-Support-UI' |
|
66 | 19 |
! |
20 |
||
21 |
!WindowBuilder class methodsFor:'documentation'! |
|
22 |
||
89 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 1995 by Claus Gittinger |
|
434 | 26 |
All Rights Reserved |
89 | 27 |
|
28 |
This software is furnished under a license and may be used |
|
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
! |
|
36 |
||
66 | 37 |
documentation |
38 |
" |
|
69 | 39 |
a no-op class, for systems which do not use the UIBuilder. |
66 | 40 |
Concrete subclasses know how to create a view (with components) from |
41 |
some interface spec. Currently, an experimantal version of UIBuilder exists, |
|
42 |
and more may be added in the future (for example, to parse different UI |
|
43 |
specs - thinking of motifs UIL specs etc). |
|
223 | 44 |
|
45 |
[author:] |
|
46 |
Claus Gittinger |
|
66 | 47 |
" |
48 |
! ! |
|
49 |
||
50 |
!WindowBuilder methodsFor:'accessing'! |
|
51 |
||
100 | 52 |
application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
53 |
"return the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
54 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
55 |
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
|
56 |
|
100 | 57 |
^ application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
58 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
59 |
"Modified: 17.1.1997 / 19:04:40 / cg" |
66 | 60 |
! |
61 |
||
125 | 62 |
application:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
63 |
"set the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
64 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
65 |
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
|
66 |
|
125 | 67 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
68 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
69 |
"Modified: 17.1.1997 / 19:04:47 / cg" |
66 | 70 |
! |
71 |
||
422 | 72 |
applicationClass:something |
73 |
"set the value of the instance variable 'applicationClass' (automatically generated)" |
|
74 |
||
75 |
applicationClass := something.! |
|
76 |
||
66 | 77 |
aspectAt:aSymbol |
433 | 78 |
|b| |
79 |
||
434 | 80 |
bindings notNil ifTrue:[ |
81 |
b := bindings at:aSymbol ifAbsent:nil. |
|
82 |
b notNil ifTrue:[^ b]. |
|
83 |
]. |
|
84 |
||
433 | 85 |
application notNil ifTrue:[ |
450 | 86 |
Object messageNotUnderstoodSignal catch:[ |
87 |
^ application aspectFor:aSymbol |
|
88 |
] |
|
433 | 89 |
]. |
90 |
^ nil |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
91 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
92 |
"Modified: 17.1.1997 / 19:28:32 / cg" |
66 | 93 |
! |
94 |
||
125 | 95 |
aspectAt:aSymbol put:aModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
96 |
bindings isNil ifTrue:[ |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
97 |
bindings := IdentityDictionary new |
125 | 98 |
]. |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
99 |
^ bindings at:aSymbol put:aModel |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
100 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
101 |
"Modified: 17.1.1997 / 19:28:37 / cg" |
100 | 102 |
! |
103 |
||
450 | 104 |
bindingAt:aSymbol |
105 |
bindings notNil ifTrue:[ |
|
106 |
^ bindings at:aSymbol ifAbsent:nil. |
|
107 |
]. |
|
108 |
^ nil |
|
109 |
! |
|
110 |
||
100 | 111 |
bindings |
112 |
^ bindings |
|
113 |
! |
|
114 |
||
115 |
bindings:aDictionary |
|
116 |
bindings := aDictionary |
|
117 |
! |
|
118 |
||
125 | 119 |
componentAt:name |
450 | 120 |
namedComponents isNil ifTrue:[^ nil]. |
121 |
^ namedComponents at:name asSymbol ifAbsent:nil |
|
125 | 122 |
! |
123 |
||
100 | 124 |
componentAt:name put:aComponent |
450 | 125 |
namedComponents isNil ifTrue:[ |
126 |
namedComponents := IdentityDictionary new. |
|
100 | 127 |
]. |
450 | 128 |
namedComponents at:name asSymbol put:aComponent |
100 | 129 |
! |
130 |
||
410 | 131 |
componentCreationHook:something |
132 |
"set the value of the instance variable 'componentCreationHook' (automatically generated)" |
|
133 |
||
134 |
componentCreationHook := something.! |
|
135 |
||
125 | 136 |
focusSequence |
137 |
^ focusSequence |
|
66 | 138 |
! |
139 |
||
86 | 140 |
namedComponents |
450 | 141 |
^ namedComponents |
86 | 142 |
! |
143 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
144 |
source |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
145 |
"same as #application, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
146 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
147 |
^ application |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
148 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
149 |
"Created: 17.1.1997 / 19:03:51 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
150 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
151 |
|
125 | 152 |
source:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
153 |
"same as #application:, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
154 |
|
125 | 155 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
156 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
157 |
"Modified: 17.1.1997 / 19:03:57 / cg" |
125 | 158 |
! |
159 |
||
160 |
window |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
161 |
"return the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
162 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
163 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
164 |
^ window |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
165 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
166 |
"Modified: 17.1.1997 / 19:30:00 / cg" |
125 | 167 |
! |
168 |
||
169 |
window:aView |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
170 |
"set the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
171 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
172 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
173 |
window := aView |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
174 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
175 |
"Modified: 17.1.1997 / 19:30:22 / cg" |
66 | 176 |
! |
177 |
||
178 |
windowGroup |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
179 |
self halt. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
180 |
^ window windowGroup |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
181 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
182 |
"Modified: 17.1.1997 / 19:30:26 / cg" |
66 | 183 |
! ! |
184 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
185 |
!WindowBuilder methodsFor:'building'! |
66 | 186 |
|
125 | 187 |
buildFromSpec:aSpec |
176 | 188 |
^ self subclassResponsibility |
408 | 189 |
! |
190 |
||
191 |
makeTabable:aComponent |
|
192 |
focusSequence isNil ifTrue:[ |
|
193 |
focusSequence := OrderedCollection new. |
|
194 |
]. |
|
195 |
focusSequence add:aComponent |
|
66 | 196 |
! ! |
100 | 197 |
|
422 | 198 |
!WindowBuilder methodsFor:'spec creation aspect fetch'! |
100 | 199 |
|
374 | 200 |
actionFor:aKey |
450 | 201 |
"return an action for aKey. This is invoked during window building |
202 |
(by the builder) to ask for an ActionButtons actionBlock. |
|
203 |
Here, first the local bindings are searched, then the application and |
|
204 |
finally the applications class is asked for a corresponding action. |
|
205 |
The returned object is typically a block." |
|
206 |
||
434 | 207 |
|b| |
208 |
||
209 |
bindings notNil ifTrue:[ |
|
210 |
b := bindings at:aKey ifAbsent:nil. |
|
211 |
b notNil ifTrue:[^ b]. |
|
212 |
]. |
|
213 |
||
374 | 214 |
application notNil ifTrue:[ |
450 | 215 |
Object messageNotUnderstoodSignal catch:[ |
216 |
^ application actionFor:aKey |
|
217 |
] |
|
374 | 218 |
]. |
422 | 219 |
applicationClass notNil ifTrue:[ |
424 | 220 |
(applicationClass respondsTo:#actionFor:) ifTrue:[ |
221 |
^ applicationClass actionFor:aKey |
|
222 |
] |
|
422 | 223 |
]. |
224 |
^ [] |
|
374 | 225 |
|
226 |
"Created: 17.1.1997 / 21:08:22 / cg" |
|
227 |
! |
|
228 |
||
229 |
aspectFor:aKey |
|
450 | 230 |
"return a model for aKey. This is invoked during window building |
231 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
|
232 |
Here, first the local bindings are searched, then the application and |
|
233 |
finally the applications class is asked for a corresponding action. |
|
234 |
The returned object is typically a valueHolder." |
|
235 |
||
434 | 236 |
|b| |
237 |
||
238 |
bindings notNil ifTrue:[ |
|
239 |
b := bindings at:aKey ifAbsent:nil. |
|
240 |
b notNil ifTrue:[^ b]. |
|
241 |
]. |
|
242 |
||
374 | 243 |
application notNil ifTrue:[ |
450 | 244 |
Object messageNotUnderstoodSignal catch:[ |
245 |
^ application aspectFor:aKey |
|
246 |
] |
|
374 | 247 |
]. |
422 | 248 |
applicationClass notNil ifTrue:[ |
424 | 249 |
(applicationClass respondsTo:#aspectFor:) ifTrue:[ |
250 |
^ applicationClass aspectFor:aKey |
|
251 |
] |
|
422 | 252 |
]. |
374 | 253 |
^ self aspectAt:aKey |
254 |
||
255 |
"Created: 17.1.1997 / 21:06:16 / cg" |
|
256 |
! |
|
257 |
||
423 | 258 |
componentFor:aKey |
450 | 259 |
"return a component for aKey. This is invoked during window building |
260 |
(by the builder) to ask for an ArbitraryComponents view. |
|
261 |
Here, first the local bindings are searched, then the application and |
|
262 |
finally the applications class is asked for a corresponding action. |
|
263 |
The returned object is typically a view." |
|
264 |
||
423 | 265 |
|cls| |
266 |
||
267 |
application notNil ifTrue:[ |
|
450 | 268 |
Object messageNotUnderstoodSignal catch:[ |
269 |
^ application componentFor:aKey |
|
270 |
] |
|
423 | 271 |
]. |
272 |
applicationClass notNil ifTrue:[ |
|
424 | 273 |
(applicationClass respondsTo:#componentFor:) ifTrue:[ |
274 |
^ applicationClass componentFor:aKey |
|
275 |
] |
|
423 | 276 |
]. |
277 |
^ self aspectAt:aKey |
|
278 |
||
279 |
! |
|
280 |
||
422 | 281 |
labelFor:aKey |
450 | 282 |
"return a label for aKey. This is invoked during window building |
283 |
(by the builder) to ask for a ???'s label. |
|
284 |
Here, first the local bindings are searched, then the application and |
|
285 |
finally the applications class is asked for a corresponding action. |
|
286 |
The returned object is typically a string." |
|
287 |
||
422 | 288 |
|cls| |
289 |
||
290 |
application notNil ifTrue:[ |
|
450 | 291 |
Object messageNotUnderstoodSignal catch:[ |
292 |
^ application labelFor:aKey |
|
293 |
] |
|
422 | 294 |
]. |
295 |
applicationClass notNil ifTrue:[ |
|
424 | 296 |
(applicationClass respondsTo:#labelFor:) ifTrue:[ |
297 |
^ applicationClass labelFor:aKey |
|
298 |
] |
|
422 | 299 |
]. |
300 |
^ self aspectAt:aKey |
|
301 |
||
302 |
! |
|
303 |
||
304 |
listFor:aKey |
|
450 | 305 |
"return a list for aKey. This is invoked during window building |
306 |
(by the builder) to ask for a ???'s label. |
|
307 |
Here, first the local bindings are searched, then the application and |
|
308 |
finally the applications class is asked for a corresponding action. |
|
309 |
The returned object is typically a list." |
|
310 |
||
422 | 311 |
application notNil ifTrue:[ |
450 | 312 |
Object messageNotUnderstoodSignal catch:[ |
313 |
^ application listFor:aKey |
|
314 |
] |
|
422 | 315 |
]. |
316 |
applicationClass notNil ifTrue:[ |
|
424 | 317 |
(applicationClass respondsTo:#listFor:) ifTrue:[ |
318 |
^ applicationClass listFor:aKey |
|
319 |
] |
|
422 | 320 |
]. |
321 |
^ self aspectAt:aKey |
|
322 |
||
323 |
"Created: 17.1.1997 / 21:08:45 / cg" |
|
324 |
! ! |
|
325 |
||
326 |
!WindowBuilder methodsFor:'spec creation callbacks'! |
|
327 |
||
100 | 328 |
createdComponent:aView forSpec:spec |
410 | 329 |
componentCreationHook notNil ifTrue:[ |
330 |
componentCreationHook value:aView value:spec value:self |
|
331 |
] |
|
100 | 332 |
|
333 |
"Modified: 5.9.1995 / 21:42:54 / claus" |
|
334 |
! ! |
|
335 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
336 |
!WindowBuilder methodsFor:'startup'! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
337 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
338 |
closeRequest |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
339 |
window destroy |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
340 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
341 |
"Modified: 17.1.1997 / 19:30:32 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
342 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
343 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
344 |
open |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
345 |
"open my topView, as previously created" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
346 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
347 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
348 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
349 |
andType:(application defaultWindowType) |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
350 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
351 |
"Modified: 17.1.1997 / 19:59:22 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
352 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
353 |
|
428 | 354 |
openAt:aPoint |
355 |
"open my topView at some location" |
|
356 |
||
357 |
self |
|
358 |
openAt:aPoint withExtent:nil |
|
359 |
andType:(application defaultWindowType) |
|
360 |
||
361 |
"Created: 14.2.1997 / 20:21:57 / cg" |
|
362 |
"Modified: 14.2.1997 / 20:23:23 / cg" |
|
363 |
! |
|
364 |
||
436 | 365 |
openAt:origin withExtent:ext andType:type |
428 | 366 |
"open my window, as previously created, optionally defining the |
367 |
windows origin and/or extent. |
|
368 |
The type argument may be #dialog or #normal, and specifies if the view |
|
369 |
should be opened as a modal view, blocking interaction to the currently |
|
370 |
active view, or as a normal view." |
|
371 |
||
372 |
origin notNil ifTrue:[ |
|
373 |
window origin:origin |
|
374 |
]. |
|
375 |
ext notNil ifTrue:[ |
|
376 |
window extent:ext |
|
377 |
]. |
|
378 |
||
379 |
type == #dialog ifTrue:[ |
|
380 |
window openModal. |
|
381 |
^ self |
|
382 |
]. |
|
383 |
||
384 |
type == #normal ifTrue:[ |
|
385 |
window open. |
|
386 |
^ self |
|
387 |
]. |
|
388 |
||
389 |
type == #popUp ifTrue:[ |
|
390 |
"/ window openAsPopUp. "/ not yet implemented |
|
391 |
window openModal. |
|
392 |
^ self |
|
393 |
]. |
|
394 |
||
395 |
" |
|
396 |
if ST-80 supports more types - these may be added later |
|
397 |
" |
|
398 |
self halt:'unimplemented' |
|
399 |
||
400 |
"Created: 14.2.1997 / 20:22:24 / cg" |
|
401 |
"Modified: 14.2.1997 / 20:23:56 / cg" |
|
402 |
! |
|
403 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
404 |
openDialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
405 |
"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
|
406 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
407 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
408 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
409 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
410 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
411 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
412 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
413 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
414 |
|
428 | 415 |
openDialogAt:aPoint withExtent:ext |
416 |
"open my topView, as previously created as a modal view, |
|
417 |
blocking interaction to the currently active view." |
|
418 |
||
419 |
self |
|
420 |
openAt:aPoint withExtent:ext |
|
421 |
andType:#dialog |
|
422 |
||
423 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
|
424 |
"Created: 14.2.1997 / 20:24:19 / cg" |
|
425 |
! |
|
426 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
427 |
openDialogWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
428 |
"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
|
429 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
430 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
431 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
432 |
openWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
433 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
434 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
435 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
436 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
437 |
|
428 | 438 |
openPopUpAt:aPoint |
439 |
"open my topView, as previously created as a popUp view, |
|
440 |
blocking interaction to the currently active view." |
|
441 |
||
442 |
self |
|
443 |
openAt:aPoint withExtent:nil |
|
444 |
andType:#popUp |
|
445 |
||
446 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
|
447 |
"Created: 14.2.1997 / 20:24:38 / cg" |
|
448 |
! |
|
449 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
450 |
openPopUpIn:aRectangle |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
451 |
"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
|
452 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
453 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
454 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
455 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
456 |
andType:#popUp |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
457 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
458 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
459 |
"Created: 17.1.1997 / 20:01:24 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
460 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
461 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
462 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
463 |
"open my topView, as previously created, but override |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
464 |
the extent." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
465 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
466 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
467 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
468 |
andType:(application defaultWindowType) |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
469 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
470 |
"Modified: 17.1.1997 / 19:58:48 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
471 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
472 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
473 |
openWithExtent:ext andType:type |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
474 |
"open my window, as previously created. The type argument |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
475 |
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
|
476 |
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
|
477 |
active view, or as a normal view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
478 |
|
428 | 479 |
^ self openAt:nil withExtent:ext andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
480 |
|
428 | 481 |
"Modified: 14.2.1997 / 20:22:47 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
482 |
! ! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
483 |
|
132 | 484 |
!WindowBuilder class methodsFor:'documentation'! |
485 |
||
486 |
version |
|
450 | 487 |
^ '$Header: /cvs/stx/stx/libview2/WindowBuilder.st,v 1.26 1997-02-25 13:29:49 ca Exp $' |
132 | 488 |
! ! |