author | Claus Gittinger <cg@exept.de> |
Tue, 03 Feb 1998 18:17:18 +0100 | |
changeset 814 | 6240dfc2fd3b |
parent 774 | fb8810086f95 |
child 824 | 06de83e3fdee |
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 |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
14 |
instanceVariableNames:'window application bindings visuals focusSequence namedComponents |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
15 |
helpKeys componentCreationHook applicationClass keyboardProcessor |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
16 |
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 |
735 | 42 |
some interface spec. |
43 |
Currently, an experimantal version of UIBuilder exists, |
|
66 | 44 |
and more may be added in the future (for example, to parse different UI |
735 | 45 |
specs - thinking of motifs UIL specs, Windows DialogSpecs etc.). |
223 | 46 |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
47 |
[instance variables:] |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
48 |
window <View> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
49 |
the topView into which the components |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
50 |
are (have been) created from the specification |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
51 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
52 |
application <ApplicationModel> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
53 |
the application object (typically an instance |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
54 |
of a subclass of ApplicationModel). |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
55 |
That one is usually supposed to provide |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
56 |
valueHolders for aspects, action methods |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
57 |
menuSpecs and possibly more windowSpecs. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
58 |
Usually means, that most of those can also be |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
59 |
provided to the builder via a set of bindings, |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
60 |
which overrides those. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
61 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
62 |
bindings <Dictionary> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
63 |
can be set (or filled) with bindings for |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
64 |
aspects to be used when setting up the models |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
65 |
for components. Useful either to overwrite |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
66 |
corresponding appModel aspects or if the appModel |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
67 |
does not want to procide those. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
68 |
(for example, to open a dialog and provide the |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
69 |
bindings in a dictionary - as opposed to |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
70 |
providing them via aspect methods) |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
71 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
72 |
visuals not yet used - for compatibility |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
73 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
74 |
focusSequence <Collection> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
75 |
maintained during the build process; |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
76 |
contains tabable components. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
77 |
This will be replaced by a more intelligent |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
78 |
mechanism in the near future. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
79 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
80 |
namedComponents <Dictionary> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
81 |
contains name->component associations for |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
82 |
all components which have a non-nil component |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
83 |
name. Created during the build process. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
84 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
85 |
helpKeys not yet used - for compatibility |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
86 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
87 |
componentCreationHook <BlockOrNil> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
88 |
can be set before the components are built |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
89 |
from the spec, to provide an arbitrary |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
90 |
callBacks-hook which will be invoked after |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
91 |
a component has been created from a spec. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
92 |
The UIPainter uses this to maintain its |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
93 |
component<->spec assiciations. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
94 |
Can be set by the app, to catch creation of |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
95 |
components and fiddle around during the |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
96 |
creation process (change extents, colors or whatever) |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
97 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
98 |
applicationClass <ClassOrNil> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
99 |
can be set to provide an additional class which |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
100 |
is asked for aspects during the build process. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
101 |
If not set, the app is asked, which itself asks |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
102 |
its class. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
103 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
104 |
keyboardProcessor not yet used - for compatibility |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
105 |
Will eventually takeover the functionality |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
106 |
of the focusSequence, shortcuts & provide a hook |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
107 |
for the app. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
108 |
|
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
109 |
subCanvasSpecs <Dictionary> |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
110 |
can be set by the app to provide subcanvas |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
111 |
specs (much like the bindings dictionary) |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
112 |
|
223 | 113 |
[author:] |
114 |
Claus Gittinger |
|
66 | 115 |
" |
116 |
! ! |
|
117 |
||
118 |
!WindowBuilder methodsFor:'accessing'! |
|
119 |
||
463 | 120 |
addBindings:moreBindings |
121 |
"used with subDialogs, which provide local bindings. |
|
122 |
All bindings from moreBindings overwrite any local bindings." |
|
123 |
||
124 |
moreBindings notNil ifTrue:[ |
|
125 |
moreBindings keysAndValuesDo:[:aKey :aValue | |
|
126 |
bindings at:aKey put:aValue |
|
127 |
] |
|
128 |
] |
|
129 |
||
130 |
"Created: 28.2.1997 / 14:14:33 / cg" |
|
131 |
! |
|
132 |
||
100 | 133 |
application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
134 |
"return the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
135 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
136 |
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
|
137 |
|
100 | 138 |
^ application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
139 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
140 |
"Modified: 17.1.1997 / 19:04:40 / cg" |
66 | 141 |
! |
142 |
||
125 | 143 |
application:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
144 |
"set the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
145 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
146 |
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
|
147 |
|
125 | 148 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
149 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
150 |
"Modified: 17.1.1997 / 19:04:47 / cg" |
66 | 151 |
! |
152 |
||
422 | 153 |
applicationClass:something |
154 |
"set the value of the instance variable 'applicationClass' (automatically generated)" |
|
155 |
||
156 |
applicationClass := something.! |
|
157 |
||
66 | 158 |
aspectAt:aSymbol |
433 | 159 |
|b| |
160 |
||
473 | 161 |
aSymbol notNil ifTrue:[ |
162 |
bindings notNil ifTrue:[ |
|
163 |
b := bindings at:aSymbol ifAbsent:nil. |
|
164 |
b notNil ifTrue:[^ b]. |
|
165 |
]. |
|
434 | 166 |
|
473 | 167 |
application notNil ifTrue:[ |
577 | 168 |
Object messageNotUnderstoodSignal handle:[:ex | |
727 | 169 |
ex parameter selector == aSymbol ifFalse:[ |
170 |
ex reject |
|
171 |
] |
|
577 | 172 |
] do:[ |
473 | 173 |
^ application aspectFor:aSymbol |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
174 |
]. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
175 |
Object messageNotUnderstoodSignal handle:[:ex | |
727 | 176 |
ex parameter selector == aSymbol ifFalse:[ |
177 |
ex reject |
|
178 |
] |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
179 |
] do:[ |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
180 |
^ application class aspectFor:aSymbol |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
181 |
]. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
182 |
Transcript showCR:'WindowBuilder: no aspect for ' , aSymbol storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
183 |
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
|
184 |
]. |
433 | 185 |
]. |
186 |
^ nil |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
187 |
|
727 | 188 |
"Modified: / 29.10.1997 / 17:26:16 / cg" |
66 | 189 |
! |
190 |
||
125 | 191 |
aspectAt:aSymbol put:aModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
192 |
bindings isNil ifTrue:[ |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
193 |
bindings := IdentityDictionary new |
125 | 194 |
]. |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
195 |
^ bindings at:aSymbol put:aModel |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
196 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
197 |
"Modified: 17.1.1997 / 19:28:37 / cg" |
100 | 198 |
! |
199 |
||
450 | 200 |
bindingAt:aSymbol |
201 |
bindings notNil ifTrue:[ |
|
202 |
^ bindings at:aSymbol ifAbsent:nil. |
|
203 |
]. |
|
204 |
^ nil |
|
205 |
! |
|
206 |
||
100 | 207 |
bindings |
208 |
^ bindings |
|
209 |
! |
|
210 |
||
211 |
bindings:aDictionary |
|
212 |
bindings := aDictionary |
|
213 |
! |
|
214 |
||
125 | 215 |
componentAt:name |
450 | 216 |
namedComponents isNil ifTrue:[^ nil]. |
217 |
^ namedComponents at:name asSymbol ifAbsent:nil |
|
125 | 218 |
! |
219 |
||
100 | 220 |
componentAt:name put:aComponent |
450 | 221 |
namedComponents isNil ifTrue:[ |
222 |
namedComponents := IdentityDictionary new. |
|
100 | 223 |
]. |
450 | 224 |
namedComponents at:name asSymbol put:aComponent |
100 | 225 |
! |
226 |
||
410 | 227 |
componentCreationHook:something |
228 |
"set the value of the instance variable 'componentCreationHook' (automatically generated)" |
|
229 |
||
230 |
componentCreationHook := something.! |
|
231 |
||
125 | 232 |
focusSequence |
233 |
^ focusSequence |
|
66 | 234 |
! |
235 |
||
600 | 236 |
helpKeyFor:aComponent |
237 |
|v key| |
|
238 |
||
239 |
helpKeys isNil ifTrue:[^ nil]. |
|
240 |
v := aComponent. |
|
241 |
[v notNil] whileTrue:[ |
|
242 |
(key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[ |
|
243 |
^ key |
|
244 |
]. |
|
245 |
v := v superView |
|
246 |
]. |
|
595 | 247 |
^ nil |
600 | 248 |
! |
595 | 249 |
|
600 | 250 |
helpKeyFor:aComponent put:aKey |
595 | 251 |
|
600 | 252 |
aKey isNil ifTrue:[ |
253 |
helpKeys isNil ifFalse:[ |
|
254 |
helpKeys removeKey:aComponent ifAbsent:nil |
|
255 |
] |
|
256 |
] ifFalse:[ |
|
257 |
helpKeys isNil ifTrue:[ |
|
258 |
helpKeys := IdentityDictionary new |
|
259 |
]. |
|
260 |
helpKeys at:aComponent put:aKey |
|
261 |
] |
|
595 | 262 |
|
263 |
! |
|
264 |
||
477 | 265 |
keyboardProcessor |
266 |
keyboardProcessor isNil ifTrue:[ |
|
267 |
keyboardProcessor := KeyboardProcessor new |
|
268 |
]. |
|
269 |
^ keyboardProcessor |
|
270 |
||
271 |
"Created: 3.3.1997 / 18:31:37 / cg" |
|
272 |
"Modified: 3.3.1997 / 18:32:27 / cg" |
|
273 |
! |
|
274 |
||
86 | 275 |
namedComponents |
450 | 276 |
^ namedComponents |
86 | 277 |
! |
278 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
279 |
source |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
280 |
"same as #application, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
281 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
282 |
^ application |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
283 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
284 |
"Created: 17.1.1997 / 19:03:51 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
285 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
286 |
|
125 | 287 |
source:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
288 |
"same as #application:, for ST-80 compatibility" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
289 |
|
125 | 290 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
291 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
292 |
"Modified: 17.1.1997 / 19:03:57 / cg" |
125 | 293 |
! |
294 |
||
502 | 295 |
subCanvasAt:majorKey at:minorKey |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
296 |
"get the subCanvas specification from major and minor key. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
297 |
Here, we first look for a spec in the private subCanvasSpecs dictionary, |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
298 |
which can be filled via #subCanvasAt:put: messages. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
299 |
If not present, or none is found there, we bounce back trying |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
300 |
#specificationFor:with: (if minorKey is nil) or by sending the minorKey |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
301 |
message to the class named as majorKey. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
302 |
Notice, that the class named majorKey is first searched in the |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
303 |
application classes namespace - allowing private classes as majorKey. |
586 | 304 |
" |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
305 |
|
735 | 306 |
|spec cls app dict dkey| |
502 | 307 |
|
308 |
subCanvasSpecs notNil ifTrue:[ |
|
586 | 309 |
dkey := majorKey ? #NoMajorKey. |
310 |
dict := subCanvasSpecs at:dkey ifAbsent:nil. |
|
311 |
||
312 |
dict notNil ifTrue:[ |
|
313 |
spec := dict at:minorKey ifAbsent:nil. |
|
502 | 314 |
spec notNil ifTrue:[^ spec]. |
315 |
]. |
|
316 |
]. |
|
586 | 317 |
|
502 | 318 |
majorKey isNil ifTrue:[ |
586 | 319 |
spec := self safelyPerform:#specificationFor: with:minorKey. |
320 |
||
321 |
spec isNil ifTrue:[ |
|
322 |
spec := self safelyPerform:minorKey |
|
323 |
] |
|
502 | 324 |
] ifFalse:[ |
701 | 325 |
"/ look for class in applications namespace ... |
735 | 326 |
app := self application. |
327 |
app isNil ifTrue:[ |
|
328 |
"/ fallBack - use that global, if it exists |
|
329 |
cls := Smalltalk at:majorKey. |
|
330 |
cls isNil ifTrue:[ |
|
331 |
Transcript showCR:('missing application when fetching majorKey:' , majorKey). |
|
332 |
] |
|
333 |
] ifFalse:[ |
|
334 |
cls := app resolveName:majorKey. |
|
335 |
]. |
|
586 | 336 |
(cls notNil and:[cls respondsTo:minorKey]) ifTrue:[ |
502 | 337 |
spec := cls perform:minorKey |
338 |
] |
|
339 |
]. |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
340 |
^ spec |
586 | 341 |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
342 |
"Modified: / 27.1.1998 / 12:17:13 / cg" |
502 | 343 |
! |
344 |
||
345 |
subCanvasAt:majorKey at:minorKey put:aSpec |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
346 |
"deposit a subCanvas specification for major and minor key |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
347 |
in my private subCanvasSpecs dictionary. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
348 |
This will be used later, when building subcanvases, to provide |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
349 |
(or possibly override an application provided subcanvas) the |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
350 |
spec for a subcanvas. (see #subCanvasAt:at:)." |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
351 |
|
502 | 352 |
|dict key| |
353 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
354 |
subCanvasSpecs isNil ifTrue:[ |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
355 |
"/ lazyly initialize |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
356 |
subCanvasSpecs := IdentityDictionary new |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
357 |
]. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
358 |
|
502 | 359 |
key := majorKey ? #NoMajorKey. |
360 |
dict := subCanvasSpecs at:key ifAbsent:nil. |
|
361 |
dict isNil ifTrue:[ |
|
362 |
dict := IdentityDictionary new. |
|
363 |
subCanvasSpecs at:key put:dict |
|
364 |
]. |
|
365 |
dict at:minorKey put:aSpec |
|
366 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
367 |
"Modified: / 27.1.1998 / 12:21:27 / cg" |
502 | 368 |
! |
369 |
||
475
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
370 |
visualAt:name |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
371 |
visuals isNil ifTrue:[^ nil]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
372 |
^ visuals at:name asSymbol ifAbsent:nil |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
373 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
374 |
"Created: 3.3.1997 / 16:24:17 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
375 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
376 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
377 |
visualAt:name put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
378 |
visuals isNil ifTrue:[ |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
379 |
visuals := IdentityDictionary new. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
380 |
]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
381 |
visuals at:name asSymbol put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
382 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
383 |
"Created: 3.3.1997 / 16:24:41 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
384 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
385 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
386 |
visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
387 |
^ visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
388 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
389 |
"Created: 3.3.1997 / 16:24:00 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
390 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
391 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
392 |
visuals:aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
393 |
visuals := aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
394 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
395 |
"Created: 3.3.1997 / 16:24:06 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
396 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
397 |
|
125 | 398 |
window |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
399 |
"return the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
400 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
401 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
402 |
^ window |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
403 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
404 |
"Modified: 17.1.1997 / 19:30:00 / cg" |
125 | 405 |
! |
406 |
||
407 |
window:aView |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
408 |
"set the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
409 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
410 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
411 |
window := aView |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
412 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
413 |
"Modified: 17.1.1997 / 19:30:22 / cg" |
66 | 414 |
! |
415 |
||
416 |
windowGroup |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
417 |
^ window windowGroup |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
418 |
|
608 | 419 |
"Modified: 17.6.1997 / 18:04:01 / cg" |
66 | 420 |
! ! |
421 |
||
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
422 |
!WindowBuilder methodsFor:'aspect access support'! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
423 |
|
675 | 424 |
booleanValueAspectFor:aKey |
674 | 425 |
"helper (common code) to generate a boolean aspect if required. |
426 |
If no binding exists for aKey, a valueHolder holding false is |
|
427 |
created and added to the bindings. |
|
428 |
Otherwise, the existing binding is returned." |
|
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
429 |
|
676 | 430 |
^ self valueAspectFor:aKey initialValue:false |
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
431 |
|
676 | 432 |
"Modified: 28.7.1997 / 12:53:57 / cg" |
675 | 433 |
! |
434 |
||
435 |
nilValueAspectFor:aKey |
|
436 |
"helper (common code) to generate a valueHolder aspect if required. |
|
437 |
If no binding exists for aKey, a valueHolder holding nil is |
|
438 |
created and added to the bindings. |
|
439 |
Otherwise, the existing binding is returned." |
|
440 |
||
676 | 441 |
^ self valueAspectFor:aKey initialValue:nil |
442 |
||
443 |
"Modified: 28.7.1997 / 12:54:06 / cg" |
|
444 |
! |
|
445 |
||
446 |
valueAspectFor:aKey initialValue:initialValue |
|
447 |
"helper (common code) to generate a valueHolder aspect if required. |
|
448 |
If no binding exists for aKey, a valueHolder holding initialValue is |
|
449 |
created and added to the bindings. |
|
450 |
Otherwise, the existing binding is returned." |
|
451 |
||
675 | 452 |
|holder| |
453 |
||
454 |
(holder := self bindingAt:aKey) isNil ifTrue:[ |
|
676 | 455 |
self aspectAt:aKey put:(holder := initialValue asValue). |
675 | 456 |
]. |
457 |
^ holder |
|
458 |
||
676 | 459 |
"Created: 28.7.1997 / 12:53:45 / cg" |
460 |
"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
|
461 |
! ! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
462 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
463 |
!WindowBuilder methodsFor:'building'! |
66 | 464 |
|
125 | 465 |
buildFromSpec:aSpec |
176 | 466 |
^ self subclassResponsibility |
408 | 467 |
! |
468 |
||
469 |
makeTabable:aComponent |
|
735 | 470 |
"add a component to the list of tabable components" |
471 |
||
408 | 472 |
focusSequence isNil ifTrue:[ |
473 |
focusSequence := OrderedCollection new. |
|
474 |
]. |
|
475 |
focusSequence add:aComponent |
|
735 | 476 |
|
477 |
"Modified: / 31.10.1997 / 18:39:30 / cg" |
|
66 | 478 |
! ! |
100 | 479 |
|
586 | 480 |
!WindowBuilder methodsFor:'message sending'! |
481 |
||
482 |
safelyPerform:aSelector |
|
483 |
"send the message aSelector to the receiver self or application; |
|
484 |
the result returned from the send or nil is returned |
|
485 |
" |
|
486 |
|res| |
|
487 |
||
595 | 488 |
aSelector isSymbol ifTrue:[ |
489 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
490 |
] do:[ |
|
491 |
(res := self perform:aSelector) notNil ifTrue:[^ res] |
|
492 |
]. |
|
493 |
||
494 |
application notNil ifTrue:[ |
|
495 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
496 |
] do:[ |
|
497 |
(res := application perform:aSelector) notNil ifTrue:[^ res] |
|
498 |
] |
|
586 | 499 |
] |
500 |
]. |
|
595 | 501 |
^ nil |
586 | 502 |
! |
503 |
||
504 |
safelyPerform:aSelector with:anArgument |
|
505 |
"send the one-arg-message aSelector to the receiver self or application; |
|
506 |
the result returned from the send or nil is returned |
|
507 |
" |
|
508 |
|res| |
|
509 |
||
595 | 510 |
aSelector isSymbol ifTrue:[ |
511 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
512 |
] do:[ |
|
513 |
(res := self perform:aSelector with:anArgument) notNil ifTrue:[^ res] |
|
514 |
]. |
|
515 |
||
516 |
application notNil ifTrue:[ |
|
517 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
518 |
] do:[ |
|
519 |
(res := application perform:aSelector with:anArgument) notNil ifTrue:[^ res] |
|
520 |
] |
|
586 | 521 |
] |
522 |
]. |
|
595 | 523 |
^ nil |
586 | 524 |
! ! |
525 |
||
422 | 526 |
!WindowBuilder methodsFor:'spec creation aspect fetch'! |
100 | 527 |
|
374 | 528 |
actionFor:aKey |
450 | 529 |
"return an action for aKey. This is invoked during window building |
530 |
(by the builder) to ask for an ActionButtons actionBlock. |
|
531 |
Here, first the local bindings are searched, then the application and |
|
532 |
finally the applications class is asked for a corresponding action. |
|
533 |
The returned object is typically a block." |
|
534 |
||
434 | 535 |
|b| |
536 |
||
537 |
bindings notNil ifTrue:[ |
|
538 |
b := bindings at:aKey ifAbsent:nil. |
|
539 |
b notNil ifTrue:[^ b]. |
|
540 |
]. |
|
541 |
||
374 | 542 |
application notNil ifTrue:[ |
577 | 543 |
Object messageNotUnderstoodSignal handle:[:ex | |
544 |
] do:[ |
|
450 | 545 |
^ application actionFor:aKey |
546 |
] |
|
374 | 547 |
]. |
422 | 548 |
applicationClass notNil ifTrue:[ |
424 | 549 |
(applicationClass respondsTo:#actionFor:) ifTrue:[ |
550 |
^ applicationClass actionFor:aKey |
|
551 |
] |
|
422 | 552 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
553 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
554 |
Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
555 |
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
|
556 |
|
422 | 557 |
^ [] |
374 | 558 |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
559 |
"Created: / 17.1.1997 / 21:08:22 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
560 |
"Modified: / 28.10.1997 / 12:52:57 / cg" |
374 | 561 |
! |
562 |
||
716 | 563 |
actionFor:aKey withValue:aValue |
564 |
"return an action for aKey/value combonation. |
|
565 |
This is invoked during window building |
|
566 |
(by the builder) to ask for an ActionButtons actionBlock if that button |
|
567 |
specified an action with an argument value. |
|
568 |
Here, first the local bindings are searched, then the application and |
|
569 |
finally the applications class is asked for a corresponding action. |
|
570 |
The returned object is typically a block." |
|
571 |
||
572 |
|b| |
|
573 |
||
574 |
bindings notNil ifTrue:[ |
|
575 |
b := bindings at:aKey ifAbsent:nil. |
|
576 |
b notNil ifTrue:[^ b]. |
|
577 |
]. |
|
578 |
||
579 |
application notNil ifTrue:[ |
|
580 |
Object messageNotUnderstoodSignal handle:[:ex | |
|
581 |
] do:[ |
|
582 |
^ application actionFor:aKey withValue:aValue |
|
583 |
] |
|
584 |
]. |
|
585 |
applicationClass notNil ifTrue:[ |
|
586 |
(applicationClass respondsTo:#actionFor:withValue:) ifTrue:[ |
|
587 |
^ applicationClass actionFor:aKey withValue:aValue |
|
588 |
] |
|
589 |
]. |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
590 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
591 |
Transcript showCR:'WindowBuilder: no action for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
592 |
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
|
593 |
|
716 | 594 |
^ [:dummy | ] |
595 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
596 |
"Created: / 17.1.1997 / 21:08:22 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
597 |
"Modified: / 28.10.1997 / 12:53:22 / cg" |
716 | 598 |
! |
599 |
||
374 | 600 |
aspectFor:aKey |
450 | 601 |
"return a model for aKey. This is invoked during window building |
602 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
|
603 |
Here, first the local bindings are searched, then the application and |
|
604 |
finally the applications class is asked for a corresponding action. |
|
605 |
The returned object is typically a valueHolder." |
|
606 |
||
434 | 607 |
|b| |
608 |
||
609 |
bindings notNil ifTrue:[ |
|
610 |
b := bindings at:aKey ifAbsent:nil. |
|
611 |
b notNil ifTrue:[^ b]. |
|
612 |
]. |
|
613 |
||
374 | 614 |
application notNil ifTrue:[ |
577 | 615 |
Object messageNotUnderstoodSignal handle:[:ex | |
616 |
] do:[ |
|
450 | 617 |
^ application aspectFor:aKey |
618 |
] |
|
374 | 619 |
]. |
422 | 620 |
applicationClass notNil ifTrue:[ |
735 | 621 |
Object messageNotUnderstoodSignal handle:[:ex | |
622 |
] do:[ |
|
424 | 623 |
^ applicationClass aspectFor:aKey |
624 |
] |
|
422 | 625 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
626 |
|
374 | 627 |
^ self aspectAt:aKey |
628 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
629 |
"Created: / 17.1.1997 / 21:06:16 / cg" |
735 | 630 |
"Modified: / 1.11.1997 / 13:40:24 / cg" |
374 | 631 |
! |
632 |
||
423 | 633 |
componentFor:aKey |
450 | 634 |
"return a component for aKey. This is invoked during window building |
635 |
(by the builder) to ask for an ArbitraryComponents view. |
|
636 |
Here, first the local bindings are searched, then the application and |
|
637 |
finally the applications class is asked for a corresponding action. |
|
638 |
The returned object is typically a view." |
|
639 |
||
677 | 640 |
|component| |
423 | 641 |
|
642 |
application notNil ifTrue:[ |
|
611
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
643 |
component := application componentFor:aKey. |
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
644 |
component notNil ifTrue:[^ component]. |
423 | 645 |
]. |
646 |
applicationClass notNil ifTrue:[ |
|
424 | 647 |
(applicationClass respondsTo:#componentFor:) ifTrue:[ |
648 |
^ applicationClass componentFor:aKey |
|
649 |
] |
|
423 | 650 |
]. |
651 |
^ self aspectAt:aKey |
|
652 |
||
611
10d6eccf083c
dont catch errors in componentFor (makes debugging easier)
Claus Gittinger <cg@exept.de>
parents:
608
diff
changeset
|
653 |
"Modified: 20.6.1997 / 11:40:22 / cg" |
423 | 654 |
! |
655 |
||
422 | 656 |
labelFor:aKey |
450 | 657 |
"return a label for aKey. This is invoked during window building |
658 |
(by the builder) to ask for a ???'s label. |
|
659 |
Here, first the local bindings are searched, then the application and |
|
660 |
finally the applications class is asked for a corresponding action. |
|
661 |
The returned object is typically a string." |
|
662 |
||
422 | 663 |
application notNil ifTrue:[ |
577 | 664 |
Object messageNotUnderstoodSignal handle:[:ex | |
665 |
] do:[ |
|
450 | 666 |
^ application labelFor:aKey |
667 |
] |
|
422 | 668 |
]. |
669 |
applicationClass notNil ifTrue:[ |
|
424 | 670 |
(applicationClass respondsTo:#labelFor:) ifTrue:[ |
671 |
^ applicationClass labelFor:aKey |
|
672 |
] |
|
422 | 673 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
674 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
675 |
"/ Transcript showCR:'WindowBuilder: no label for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
676 |
"/ 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
|
677 |
|
422 | 678 |
^ self aspectAt:aKey |
679 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
680 |
"Modified: / 28.10.1997 / 12:54:10 / cg" |
422 | 681 |
! |
682 |
||
683 |
listFor:aKey |
|
450 | 684 |
"return a list for aKey. This is invoked during window building |
685 |
(by the builder) to ask for a ???'s label. |
|
686 |
Here, first the local bindings are searched, then the application and |
|
687 |
finally the applications class is asked for a corresponding action. |
|
688 |
The returned object is typically a list." |
|
689 |
||
422 | 690 |
application notNil ifTrue:[ |
577 | 691 |
Object messageNotUnderstoodSignal handle:[:ex | |
692 |
] do:[ |
|
450 | 693 |
^ application listFor:aKey |
694 |
] |
|
422 | 695 |
]. |
696 |
applicationClass notNil ifTrue:[ |
|
424 | 697 |
(applicationClass respondsTo:#listFor:) ifTrue:[ |
698 |
^ applicationClass listFor:aKey |
|
699 |
] |
|
422 | 700 |
]. |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
701 |
|
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
702 |
"/ Transcript showCR:'WindowBuilder: no list for: ' , aKey storeString. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
703 |
"/ 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
|
704 |
|
422 | 705 |
^ self aspectAt:aKey |
706 |
||
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
707 |
"Created: / 17.1.1997 / 21:08:45 / cg" |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
708 |
"Modified: / 28.10.1997 / 12:54:32 / cg" |
422 | 709 |
! ! |
710 |
||
711 |
!WindowBuilder methodsFor:'spec creation callbacks'! |
|
712 |
||
735 | 713 |
createdComponent:aView forSpec:spec named:name |
714 |
"callback from the UISpec after a view has been |
|
715 |
created for a spec. |
|
716 |
If it has a name, add it to the namedComponents dictionary; |
|
717 |
if I have a creationHook (application callBack), evaluate it." |
|
718 |
||
719 |
name notNil ifTrue:[ |
|
720 |
"/ self componentAt:name put:aView. |
|
721 |
namedComponents isNil ifTrue:[ |
|
722 |
namedComponents := IdentityDictionary new. |
|
723 |
]. |
|
724 |
namedComponents at:name asSymbol put:aView |
|
725 |
]. |
|
410 | 726 |
componentCreationHook notNil ifTrue:[ |
727 |
componentCreationHook value:aView value:spec value:self |
|
728 |
] |
|
100 | 729 |
|
735 | 730 |
"Modified: / 5.9.1995 / 21:42:54 / claus" |
731 |
"Created: / 31.10.1997 / 18:47:01 / cg" |
|
732 |
"Modified: / 31.10.1997 / 18:51:22 / cg" |
|
100 | 733 |
! ! |
734 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
735 |
!WindowBuilder methodsFor:'startup'! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
736 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
737 |
closeRequest |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
738 |
window destroy |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
739 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
740 |
"Modified: 17.1.1997 / 19:30:32 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
741 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
742 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
743 |
open |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
744 |
"open my topView, as previously created" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
745 |
|
477 | 746 |
|type| |
747 |
||
748 |
application isNil ifTrue:[ |
|
749 |
type := #normal |
|
750 |
] ifFalse:[ |
|
751 |
type := application defaultWindowType |
|
752 |
]. |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
753 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
754 |
openWithExtent:nil |
477 | 755 |
andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
756 |
|
477 | 757 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
758 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
759 |
|
428 | 760 |
openAt:aPoint |
761 |
"open my topView at some location" |
|
762 |
||
763 |
self |
|
467 | 764 |
openAt:aPoint |
765 |
withExtent:nil |
|
428 | 766 |
andType:(application defaultWindowType) |
767 |
||
768 |
"Created: 14.2.1997 / 20:21:57 / cg" |
|
467 | 769 |
"Modified: 28.2.1997 / 22:50:29 / cg" |
428 | 770 |
! |
771 |
||
436 | 772 |
openAt:origin withExtent:ext andType:type |
428 | 773 |
"open my window, as previously created, optionally defining the |
774 |
windows origin and/or extent. |
|
775 |
The type argument may be #dialog or #normal, and specifies if the view |
|
776 |
should be opened as a modal view, blocking interaction to the currently |
|
777 |
active view, or as a normal view." |
|
778 |
||
779 |
origin notNil ifTrue:[ |
|
780 |
window origin:origin |
|
781 |
]. |
|
782 |
ext notNil ifTrue:[ |
|
480 | 783 |
window extent:ext. |
784 |
] ifFalse:[ |
|
785 |
type == #dialog ifTrue:[ |
|
786 |
window fixSize |
|
787 |
] |
|
788 |
]. |
|
789 |
||
428 | 790 |
type == #dialog ifTrue:[ |
467 | 791 |
window fixPosition:(window device pointerPosition - window positionOffset). |
428 | 792 |
window openModal. |
793 |
^ self |
|
794 |
]. |
|
795 |
||
796 |
type == #normal ifTrue:[ |
|
480 | 797 |
window isNil ifTrue:[ |
798 |
self setupWindowFor:(StandardSystemView new). |
|
799 |
]. |
|
800 |
||
428 | 801 |
window open. |
802 |
^ self |
|
803 |
]. |
|
804 |
||
805 |
type == #popUp ifTrue:[ |
|
467 | 806 |
window fixPosition:(window device pointerPosition). |
807 |
window openAsPopUp. |
|
428 | 808 |
^ self |
809 |
]. |
|
810 |
||
811 |
" |
|
812 |
if ST-80 supports more types - these may be added later |
|
813 |
" |
|
814 |
self halt:'unimplemented' |
|
815 |
||
735 | 816 |
"Created: / 14.2.1997 / 20:22:24 / cg" |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
817 |
"Modified: / 27.1.1998 / 12:28:18 / cg" |
428 | 818 |
! |
819 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
820 |
openDialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
821 |
"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
|
822 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
823 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
824 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
825 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
826 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
827 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
828 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
829 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
830 |
|
428 | 831 |
openDialogAt:aPoint withExtent:ext |
832 |
"open my topView, as previously created as a modal view, |
|
833 |
blocking interaction to the currently active view." |
|
834 |
||
835 |
self |
|
836 |
openAt:aPoint withExtent:ext |
|
837 |
andType:#dialog |
|
838 |
||
839 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
|
840 |
"Created: 14.2.1997 / 20:24:19 / cg" |
|
841 |
! |
|
842 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
843 |
openDialogWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
844 |
"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
|
845 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
846 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
847 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
848 |
openWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
849 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
850 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
851 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
852 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
853 |
|
664 | 854 |
openModal |
855 |
"open my topView, as previously created" |
|
856 |
||
857 |
self |
|
858 |
openWithExtent:nil |
|
859 |
andType:#dialog |
|
860 |
||
861 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
|
862 |
! |
|
863 |
||
428 | 864 |
openPopUpAt:aPoint |
865 |
"open my topView, as previously created as a popUp view, |
|
866 |
blocking interaction to the currently active view." |
|
867 |
||
868 |
self |
|
869 |
openAt:aPoint withExtent:nil |
|
870 |
andType:#popUp |
|
871 |
||
872 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
|
873 |
"Created: 14.2.1997 / 20:24:38 / cg" |
|
874 |
! |
|
875 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
876 |
openPopUpIn:aRectangle |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
877 |
"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
|
878 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
879 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
880 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
881 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
882 |
andType:#popUp |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
883 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
884 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
885 |
"Created: 17.1.1997 / 20:01:24 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
886 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
887 |
|
587 | 888 |
openWindowAt:aPoint |
889 |
"open my topView at some location" |
|
890 |
||
891 |
self openAt:aPoint |
|
892 |
! |
|
893 |
||
894 |
openWindowAt:origin withExtent:ext andType:type |
|
895 |
"open my window, as previously created, optionally defining the |
|
896 |
windows origin and/or extent. |
|
897 |
The type argument may be #dialog or #normal, and specifies if the view |
|
898 |
should be opened as a modal view, blocking interaction to the currently |
|
899 |
active view, or as a normal view." |
|
900 |
||
901 |
^ self openAt:origin withExtent:ext andType:type |
|
902 |
! |
|
903 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
904 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
905 |
"open my topView, as previously created, but override |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
906 |
the extent." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
907 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
908 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
909 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
910 |
andType:(application defaultWindowType) |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
911 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
912 |
"Modified: 17.1.1997 / 19:58:48 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
913 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
914 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
915 |
openWithExtent:ext andType:type |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
916 |
"open my window, as previously created. The type argument |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
917 |
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
|
918 |
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
|
919 |
active view, or as a normal view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
920 |
|
428 | 921 |
^ self openAt:nil withExtent:ext andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
922 |
|
428 | 923 |
"Modified: 14.2.1997 / 20:22:47 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
924 |
! ! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
925 |
|
132 | 926 |
!WindowBuilder class methodsFor:'documentation'! |
927 |
||
928 |
version |
|
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
929 |
^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.55 1998-01-27 12:52:58 cg Exp $' |
132 | 930 |
! ! |