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