author | Claus Gittinger <cg@exept.de> |
Sat, 08 Aug 1998 13:42:06 +0200 | |
changeset 1035 | 308004d24f3d |
parent 1031 | 0f80a655cf09 |
child 1092 | 20104ea94915 |
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' |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
17 |
classVariableNames:'StopOnError Verbose' |
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 |
||
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
127 |
!WindowBuilder class methodsFor:'debugging'! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
128 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
129 |
stopOnError:aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
130 |
"enable/disable debug halt when aspects are missing. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
131 |
Useful during development, to detect missing aspects. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
132 |
The default is off." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
133 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
134 |
StopOnError := aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
135 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
136 |
"Modified: / 4.8.1998 / 19:40:09 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
137 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
138 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
139 |
verbose:aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
140 |
"enable/disable debug messages on the Transcript. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
141 |
Useful during development, to detect missing aspects. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
142 |
The default is off." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
143 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
144 |
Verbose := aBoolean |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
145 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
146 |
"Created: / 4.8.1998 / 19:39:37 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
147 |
"Modified: / 4.8.1998 / 19:40:14 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
148 |
! ! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
149 |
|
974 | 150 |
!WindowBuilder methodsFor:'ST-80 compatibility'! |
151 |
||
152 |
source |
|
153 |
"same as #application, for ST-80 compatibility" |
|
154 |
||
155 |
^ application |
|
156 |
||
157 |
"Created: 17.1.1997 / 19:03:51 / cg" |
|
158 |
! |
|
159 |
||
160 |
source:anApplicationModel |
|
161 |
"same as #application:, for ST-80 compatibility" |
|
162 |
||
163 |
application := anApplicationModel |
|
164 |
||
165 |
"Modified: 17.1.1997 / 19:03:57 / cg" |
|
166 |
! ! |
|
167 |
||
66 | 168 |
!WindowBuilder methodsFor:'accessing'! |
169 |
||
463 | 170 |
addBindings:moreBindings |
171 |
"used with subDialogs, which provide local bindings. |
|
172 |
All bindings from moreBindings overwrite any local bindings." |
|
173 |
||
174 |
moreBindings notNil ifTrue:[ |
|
175 |
moreBindings keysAndValuesDo:[:aKey :aValue | |
|
176 |
bindings at:aKey put:aValue |
|
177 |
] |
|
178 |
] |
|
179 |
||
180 |
"Created: 28.2.1997 / 14:14:33 / cg" |
|
181 |
! |
|
182 |
||
100 | 183 |
application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
184 |
"return the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
185 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
186 |
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
|
187 |
|
100 | 188 |
^ application |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
189 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
190 |
"Modified: 17.1.1997 / 19:04:40 / cg" |
66 | 191 |
! |
192 |
||
125 | 193 |
application:anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
194 |
"set the application (an ApplicationModel), |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
195 |
for which the view is built. |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
196 |
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
|
197 |
|
125 | 198 |
application := anApplicationModel |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
199 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
200 |
"Modified: 17.1.1997 / 19:04:47 / cg" |
66 | 201 |
! |
202 |
||
422 | 203 |
applicationClass:something |
204 |
"set the value of the instance variable 'applicationClass' (automatically generated)" |
|
205 |
||
206 |
applicationClass := something.! |
|
207 |
||
66 | 208 |
aspectAt:aSymbol |
848 | 209 |
"return the aspect for a symbol or nil. |
210 |
" |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
211 |
^ self |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
212 |
aspectAt:aSymbol |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
213 |
ifAbsent:[self aspectNotFound:aSymbol error:'no aspect for:'] |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
214 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
215 |
"Modified: / 4.8.1998 / 19:29:36 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
216 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
217 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
218 |
aspectAt:aSymbol ifAbsent:exceptionBlock |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
219 |
"return the aspect for a symbol or the value from exceptionBlock. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
220 |
" |
433 | 221 |
|b| |
222 |
||
473 | 223 |
aSymbol notNil ifTrue:[ |
224 |
bindings notNil ifTrue:[ |
|
225 |
b := bindings at:aSymbol ifAbsent:nil. |
|
226 |
b notNil ifTrue:[^ b]. |
|
227 |
]. |
|
434 | 228 |
|
473 | 229 |
application notNil ifTrue:[ |
577 | 230 |
Object messageNotUnderstoodSignal handle:[:ex | |
727 | 231 |
ex parameter selector == aSymbol ifFalse:[ |
232 |
ex reject |
|
233 |
] |
|
577 | 234 |
] do:[ |
473 | 235 |
^ application aspectFor:aSymbol |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
236 |
]. |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
237 |
Object messageNotUnderstoodSignal handle:[:ex | |
727 | 238 |
ex parameter selector == aSymbol ifFalse:[ |
239 |
ex reject |
|
240 |
] |
|
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
241 |
] do:[ |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
242 |
^ application class aspectFor:aSymbol |
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
243 |
]. |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
244 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
245 |
^ exceptionBlock value. |
848 | 246 |
] |
433 | 247 |
]. |
248 |
^ nil |
|
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
249 |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
250 |
"Created: / 4.8.1998 / 19:28:30 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
251 |
"Modified: / 4.8.1998 / 19:37:02 / cg" |
66 | 252 |
! |
253 |
||
125 | 254 |
aspectAt:aSymbol put:aModel |
848 | 255 |
"store an aspect identified by its symbol and its value |
256 |
" |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
257 |
bindings isNil ifTrue:[ |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
258 |
bindings := IdentityDictionary new |
125 | 259 |
]. |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
260 |
^ bindings at:aSymbol put:aModel |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
261 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
262 |
"Modified: 17.1.1997 / 19:28:37 / cg" |
100 | 263 |
! |
264 |
||
450 | 265 |
bindingAt:aSymbol |
848 | 266 |
"return the binding for a symbol or nil |
267 |
" |
|
450 | 268 |
bindings notNil ifTrue:[ |
269 |
^ bindings at:aSymbol ifAbsent:nil. |
|
270 |
]. |
|
271 |
^ nil |
|
272 |
! |
|
273 |
||
100 | 274 |
bindings |
848 | 275 |
"return my bindings |
276 |
" |
|
100 | 277 |
^ bindings |
278 |
! |
|
279 |
||
280 |
bindings:aDictionary |
|
848 | 281 |
"set bindings to a dictionary |
282 |
" |
|
100 | 283 |
bindings := aDictionary |
284 |
! |
|
285 |
||
125 | 286 |
componentAt:name |
848 | 287 |
"return a component identified by its name. |
288 |
" |
|
450 | 289 |
namedComponents isNil ifTrue:[^ nil]. |
290 |
^ namedComponents at:name asSymbol ifAbsent:nil |
|
125 | 291 |
! |
292 |
||
100 | 293 |
componentAt:name put:aComponent |
848 | 294 |
"store a component identified by its name. |
295 |
" |
|
450 | 296 |
namedComponents isNil ifTrue:[ |
297 |
namedComponents := IdentityDictionary new. |
|
100 | 298 |
]. |
450 | 299 |
namedComponents at:name asSymbol put:aComponent |
100 | 300 |
! |
301 |
||
410 | 302 |
componentCreationHook:something |
303 |
"set the value of the instance variable 'componentCreationHook' (automatically generated)" |
|
304 |
||
305 |
componentCreationHook := something.! |
|
306 |
||
125 | 307 |
focusSequence |
848 | 308 |
"return my focus sequence |
309 |
" |
|
125 | 310 |
^ focusSequence |
66 | 311 |
! |
312 |
||
600 | 313 |
helpKeyFor:aComponent |
848 | 314 |
"return the helpkey for a component or nil |
315 |
" |
|
600 | 316 |
|v key| |
317 |
||
318 |
helpKeys isNil ifTrue:[^ nil]. |
|
319 |
v := aComponent. |
|
320 |
[v notNil] whileTrue:[ |
|
321 |
(key := helpKeys at:v ifAbsent:nil) notNil ifTrue:[ |
|
322 |
^ key |
|
323 |
]. |
|
324 |
v := v superView |
|
325 |
]. |
|
595 | 326 |
^ nil |
600 | 327 |
! |
595 | 328 |
|
600 | 329 |
helpKeyFor:aComponent put:aKey |
848 | 330 |
"assign a key for a component which is used to access the help text |
331 |
from the application. |
|
332 |
" |
|
600 | 333 |
aKey isNil ifTrue:[ |
334 |
helpKeys isNil ifFalse:[ |
|
335 |
helpKeys removeKey:aComponent ifAbsent:nil |
|
336 |
] |
|
337 |
] ifFalse:[ |
|
338 |
helpKeys isNil ifTrue:[ |
|
339 |
helpKeys := IdentityDictionary new |
|
340 |
]. |
|
341 |
helpKeys at:aComponent put:aKey |
|
342 |
] |
|
595 | 343 |
|
344 |
! |
|
345 |
||
477 | 346 |
keyboardProcessor |
848 | 347 |
"return my keyboard processor |
348 |
" |
|
477 | 349 |
keyboardProcessor isNil ifTrue:[ |
350 |
keyboardProcessor := KeyboardProcessor new |
|
351 |
]. |
|
352 |
^ keyboardProcessor |
|
353 |
||
354 |
"Created: 3.3.1997 / 18:31:37 / cg" |
|
355 |
"Modified: 3.3.1997 / 18:32:27 / cg" |
|
356 |
! |
|
357 |
||
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
358 |
keyboardProcessor:aKeyboardProcessor |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
359 |
"set my keyboard processor |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
360 |
" |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
361 |
keyboardProcessor := aKeyboardProcessor |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
362 |
|
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
363 |
"Created: / 18.6.1998 / 19:59:38 / cg" |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
364 |
! |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
365 |
|
855
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
366 |
labelAt:name |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
367 |
labels isNil ifTrue:[^ nil]. |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
368 |
^ labels at:name asSymbol ifAbsent:nil |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
369 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
370 |
"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
|
371 |
! |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
372 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
373 |
labelAt:name put:aLabelString |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
374 |
labels isNil ifTrue:[ |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
375 |
labels := IdentityDictionary new. |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
376 |
]. |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
377 |
labels at:name asSymbol put:aLabelString |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
378 |
|
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
379 |
"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
|
380 |
! |
baf65c4e2bed
added #labelAt: / labelAt:put: for ST80 compatibility
Claus Gittinger <cg@exept.de>
parents:
848
diff
changeset
|
381 |
|
848 | 382 |
menuAt:aKey |
383 |
"Find a binding for the menu named aKey, either in the bindings |
|
384 |
or from the source" |
|
385 |
||
386 |
^ self menuFor:aKey |
|
387 |
||
388 |
||
389 |
! |
|
390 |
||
391 |
menuAt:aSymbol put:someMenuOrHolder |
|
392 |
"add someMenuOrHolder as the binding for the menu named aSymbol to the bindings" |
|
393 |
||
394 |
^ self aspectAt:aSymbol put:someMenuOrHolder |
|
395 |
||
396 |
! |
|
397 |
||
86 | 398 |
namedComponents |
848 | 399 |
"return list of named components |
400 |
" |
|
450 | 401 |
^ namedComponents |
86 | 402 |
! |
403 |
||
502 | 404 |
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
|
405 |
"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
|
406 |
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
|
407 |
which can be filled via #specificationAt:at:put: messages. |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
408 |
If not present, or none is found there, we bounce back trying |
824 | 409 |
#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
|
410 |
message to the class named as majorKey. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
411 |
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
|
412 |
application classes namespace - allowing private classes as majorKey. |
586 | 413 |
" |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
414 |
|
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
415 |
|spec cls dict dkey| |
502 | 416 |
|
417 |
subCanvasSpecs notNil ifTrue:[ |
|
586 | 418 |
dkey := majorKey ? #NoMajorKey. |
419 |
dict := subCanvasSpecs at:dkey ifAbsent:nil. |
|
420 |
||
421 |
dict notNil ifTrue:[ |
|
422 |
spec := dict at:minorKey ifAbsent:nil. |
|
502 | 423 |
spec notNil ifTrue:[^ spec]. |
424 |
]. |
|
425 |
]. |
|
586 | 426 |
|
502 | 427 |
majorKey isNil ifTrue:[ |
848 | 428 |
^ self specificationFor:minorKey |
429 |
]. |
|
430 |
||
431 |
application notNil ifTrue:[ |
|
432 |
"/ look for class in applications namespace ... |
|
433 |
cls := application resolveName:majorKey. |
|
502 | 434 |
] ifFalse:[ |
848 | 435 |
"/ fallBack - use that global, if it exists |
436 |
cls := Smalltalk at:majorKey. |
|
437 |
cls isNil ifTrue:[ |
|
438 |
Transcript showCR:('WindowBuilder[warning]: missing application when fetching majorKey:' , majorKey). |
|
735 | 439 |
]. |
502 | 440 |
]. |
586 | 441 |
|
848 | 442 |
cls notNil ifTrue:[ |
443 |
Object messageNotUnderstoodSignal handle:[:ex|] do:[ |
|
444 |
^ cls specificationFor:minorKey |
|
445 |
]. |
|
446 |
Object messageNotUnderstoodSignal handle:[:ex|] do:[ |
|
447 |
^ cls perform:minorKey. |
|
448 |
] |
|
449 |
]. |
|
450 |
^ nil |
|
502 | 451 |
! |
452 |
||
453 |
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
|
454 |
"deposit an interfaceSpecification for major and minor key |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
455 |
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
|
456 |
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
|
457 |
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
|
458 |
(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
|
459 |
See #subCanvasAt:at:." |
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
460 |
|
502 | 461 |
|dict key| |
462 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
463 |
subCanvasSpecs isNil ifTrue:[ |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
464 |
"/ lazyly initialize |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
465 |
subCanvasSpecs := IdentityDictionary new |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
466 |
]. |
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
467 |
|
502 | 468 |
key := majorKey ? #NoMajorKey. |
469 |
dict := subCanvasSpecs at:key ifAbsent:nil. |
|
470 |
dict isNil ifTrue:[ |
|
471 |
dict := IdentityDictionary new. |
|
472 |
subCanvasSpecs at:key put:dict |
|
473 |
]. |
|
474 |
dict at:minorKey put:aSpec |
|
475 |
||
774
fb8810086f95
removed unused instVar windowView;
Claus Gittinger <cg@exept.de>
parents:
735
diff
changeset
|
476 |
"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
|
477 |
"Modified: / 5.2.1998 / 12:05:32 / stefan" |
502 | 478 |
! |
479 |
||
475
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
480 |
visualAt:name |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
481 |
visuals isNil ifTrue:[^ nil]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
482 |
^ visuals at:name asSymbol ifAbsent:nil |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
483 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
484 |
"Created: 3.3.1997 / 16:24:17 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
485 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
486 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
487 |
visualAt:name put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
488 |
visuals isNil ifTrue:[ |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
489 |
visuals := IdentityDictionary new. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
490 |
]. |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
491 |
visuals at:name asSymbol put:aVisual |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
492 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
493 |
"Created: 3.3.1997 / 16:24:41 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
494 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
495 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
496 |
visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
497 |
^ visuals |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
498 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
499 |
"Created: 3.3.1997 / 16:24:00 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
500 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
501 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
502 |
visuals:aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
503 |
visuals := aDictionary |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
504 |
|
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
505 |
"Created: 3.3.1997 / 16:24:06 / cg" |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
506 |
! |
fd94f2bc8b9e
added #visuals, #visualAt: and #visualAt:put:
Claus Gittinger <cg@exept.de>
parents:
473
diff
changeset
|
507 |
|
125 | 508 |
window |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
509 |
"return the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
510 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
511 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
512 |
^ window |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
513 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
514 |
"Modified: 17.1.1997 / 19:30:00 / cg" |
125 | 515 |
! |
516 |
||
517 |
window:aView |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
518 |
"set the top window (view), for which an interface |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
519 |
is (being) built" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
520 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
521 |
window := aView |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
522 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
523 |
"Modified: 17.1.1997 / 19:30:22 / cg" |
66 | 524 |
! |
525 |
||
526 |
windowGroup |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
527 |
^ window windowGroup |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
528 |
|
608 | 529 |
"Modified: 17.6.1997 / 18:04:01 / cg" |
66 | 530 |
! ! |
531 |
||
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
532 |
!WindowBuilder methodsFor:'aspect access support'! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
533 |
|
675 | 534 |
booleanValueAspectFor:aKey |
674 | 535 |
"helper (common code) to generate a boolean aspect if required. |
536 |
If no binding exists for aKey, a valueHolder holding false is |
|
537 |
created and added to the bindings. |
|
538 |
Otherwise, the existing binding is returned." |
|
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
539 |
|
676 | 540 |
^ self valueAspectFor:aKey initialValue:false |
673
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
541 |
|
676 | 542 |
"Modified: 28.7.1997 / 12:53:57 / cg" |
675 | 543 |
! |
544 |
||
545 |
nilValueAspectFor:aKey |
|
546 |
"helper (common code) to generate a valueHolder aspect if required. |
|
547 |
If no binding exists for aKey, a valueHolder holding nil is |
|
548 |
created and added to the bindings. |
|
549 |
Otherwise, the existing binding is returned." |
|
550 |
||
676 | 551 |
^ self valueAspectFor:aKey initialValue:nil |
552 |
||
553 |
"Modified: 28.7.1997 / 12:54:06 / cg" |
|
554 |
! |
|
555 |
||
556 |
valueAspectFor:aKey initialValue:initialValue |
|
557 |
"helper (common code) to generate a valueHolder aspect if required. |
|
558 |
If no binding exists for aKey, a valueHolder holding initialValue is |
|
559 |
created and added to the bindings. |
|
560 |
Otherwise, the existing binding is returned." |
|
561 |
||
675 | 562 |
|holder| |
563 |
||
564 |
(holder := self bindingAt:aKey) isNil ifTrue:[ |
|
676 | 565 |
self aspectAt:aKey put:(holder := initialValue asValue). |
675 | 566 |
]. |
567 |
^ holder |
|
568 |
||
676 | 569 |
"Created: 28.7.1997 / 12:53:45 / cg" |
570 |
"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
|
571 |
! ! |
5e342b1ebe45
added #booleanAspectFor: as a code-saver
Claus Gittinger <cg@exept.de>
parents:
664
diff
changeset
|
572 |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
573 |
!WindowBuilder methodsFor:'building'! |
66 | 574 |
|
125 | 575 |
buildFromSpec:aSpec |
176 | 576 |
^ self subclassResponsibility |
408 | 577 |
! |
578 |
||
579 |
makeTabable:aComponent |
|
735 | 580 |
"add a component to the list of tabable components" |
581 |
||
408 | 582 |
focusSequence isNil ifTrue:[ |
583 |
focusSequence := OrderedCollection new. |
|
584 |
]. |
|
585 |
focusSequence add:aComponent |
|
735 | 586 |
|
587 |
"Modified: / 31.10.1997 / 18:39:30 / cg" |
|
66 | 588 |
! ! |
100 | 589 |
|
848 | 590 |
!WindowBuilder methodsFor:'error handling'! |
591 |
||
592 |
aspectNotFound:anAspect error:aString |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
593 |
"show error message on transcript (if Verbose is true) |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
594 |
and/or stop (if StopOnError) is true. |
848 | 595 |
" |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
596 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
597 |
Verbose == true ifTrue:[ |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
598 |
Transcript showCR:'WindowBuilder: ' |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
599 |
, aString |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
600 |
, ' aspect: <' |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
601 |
, anAspect storeString |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
602 |
, '>'. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
603 |
application notNil ifTrue:[ |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
604 |
Transcript showCR:'WindowBuilder: (while building for ' |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
605 |
, application class name |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
606 |
, ')'. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
607 |
]. |
1028
4f3401b606bd
better warning when no aspect is found.
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
608 |
]. |
848 | 609 |
|
610 |
StopOnError == true ifTrue:[ |
|
611 |
self halt "/ avoids debugger in end-user apps |
|
612 |
]. |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
613 |
^ nil |
1028
4f3401b606bd
better warning when no aspect is found.
Claus Gittinger <cg@exept.de>
parents:
1010
diff
changeset
|
614 |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
615 |
"Modified: / 4.8.1998 / 19:38:56 / cg" |
848 | 616 |
! ! |
617 |
||
586 | 618 |
!WindowBuilder methodsFor:'message sending'! |
619 |
||
848 | 620 |
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
|
621 |
"send the message aSelector to the application; |
586 | 622 |
the result returned from the send or nil is returned |
623 |
" |
|
848 | 624 |
|cls| |
586 | 625 |
|
848 | 626 |
aSelector notNil ifTrue:[ |
595 | 627 |
application notNil ifTrue:[ |
981
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
628 |
application messageNotUnderstoodSignal handle:[:ex| |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
629 |
(ex parameter selector ~~ aSelector) ifTrue:[ |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
630 |
ex reject |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
631 |
] |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
632 |
] do:[ |
848 | 633 |
^ application perform:aSelector |
634 |
]. |
|
635 |
cls := application class. |
|
636 |
||
981
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
637 |
cls messageNotUnderstoodSignal handle:[:ex| |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
638 |
(ex parameter selector ~~ aSelector) ifTrue:[ |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
639 |
ex reject |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
640 |
] |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
641 |
] do:[ |
848 | 642 |
^ cls perform:aSelector |
595 | 643 |
] |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
644 |
]. |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
645 |
applicationClass notNil ifTrue:[ |
981
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
646 |
applicationClass messageNotUnderstoodSignal handle:[:ex| |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
647 |
(ex parameter selector ~~ aSelector) ifTrue:[ |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
648 |
ex reject |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
649 |
] |
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
650 |
] do:[ |
848 | 651 |
^ 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
|
652 |
] |
586 | 653 |
] |
654 |
]. |
|
848 | 655 |
^ aBlock value |
981
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
656 |
|
6a9c975543ad
also reject non-selector errors in #safelyPerform: without arg.
Claus Gittinger <cg@exept.de>
parents:
974
diff
changeset
|
657 |
"Modified: / 20.6.1998 / 11:52:19 / cg" |
586 | 658 |
! |
659 |
||
848 | 660 |
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
|
661 |
"send the one-arg-message aSelector to the application; |
586 | 662 |
the result returned from the send or nil is returned |
663 |
" |
|
848 | 664 |
|cls| |
586 | 665 |
|
848 | 666 |
aSelector notNil ifTrue:[ |
595 | 667 |
application notNil ifTrue:[ |
961 | 668 |
application messageNotUnderstoodSignal handle:[:ex| |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
669 |
|selector| |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
670 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
671 |
((selector := ex parameter selector) ~~ aSelector |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
672 |
and:[selector ~~ anArgument]) ifTrue:[ |
961 | 673 |
ex reject |
674 |
] |
|
675 |
] do:[ |
|
848 | 676 |
^ application perform:aSelector with:anArgument |
677 |
]. |
|
678 |
cls := application class. |
|
679 |
||
961 | 680 |
cls messageNotUnderstoodSignal handle:[:ex| |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
681 |
|selector| |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
682 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
683 |
((selector := ex parameter selector) ~~ aSelector |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
684 |
and:[selector ~~ anArgument]) ifTrue:[ |
961 | 685 |
ex reject |
686 |
] |
|
687 |
] do:[ |
|
848 | 688 |
^ cls perform:aSelector with:anArgument |
595 | 689 |
] |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
690 |
]. |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
691 |
applicationClass notNil ifTrue:[ |
961 | 692 |
applicationClass messageNotUnderstoodSignal handle:[:ex| |
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
693 |
|selector| |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
694 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
695 |
((selector := ex parameter selector) ~~ aSelector |
1010 | 696 |
and:[ex parameter selector ~~ anArgument]) ifTrue:[ |
961 | 697 |
ex reject |
698 |
] |
|
699 |
] do:[ |
|
848 | 700 |
^ applicationClass perform:aSelector with:anArgument |
701 |
]. |
|
702 |
] |
|
703 |
]. |
|
704 |
^ aBlock value |
|
961 | 705 |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
706 |
"Modified: / 4.8.1998 / 19:33:52 / cg" |
848 | 707 |
! |
708 |
||
709 |
safelyPerform:aSelector with:arg1 with:arg2 ifNone:aBlock |
|
710 |
"send the two-arg-message aSelector to the application; |
|
711 |
the result returned from the send or nil is returned |
|
712 |
" |
|
713 |
|cls| |
|
714 |
||
715 |
aSelector notNil ifTrue:[ |
|
716 |
application notNil ifTrue:[ |
|
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
717 |
application messageNotUnderstoodSignal handle:[:ex| |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
718 |
(ex parameter selector ~~ aSelector |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
719 |
and:[ex parameter selector ~~ arg1]) ifTrue:[ |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
720 |
ex reject |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
721 |
] |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
722 |
] do:[ |
848 | 723 |
^ application perform:aSelector with:arg1 with:arg2 |
724 |
]. |
|
725 |
cls := application class. |
|
726 |
||
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
727 |
cls messageNotUnderstoodSignal handle:[:ex| |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
728 |
(ex parameter selector ~~ aSelector |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
729 |
and:[ex parameter selector ~~ arg1]) ifTrue:[ |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
730 |
ex reject |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
731 |
] |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
732 |
] do:[ |
848 | 733 |
^ 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
|
734 |
] |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
735 |
]. |
848 | 736 |
applicationClass notNil ifTrue:[ |
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
737 |
applicationClass messageNotUnderstoodSignal handle:[:ex| |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
738 |
(ex parameter selector ~~ aSelector |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
739 |
and:[ex parameter selector ~~ arg1]) ifTrue:[ |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
740 |
ex reject |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
741 |
] |
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
742 |
] do:[ |
848 | 743 |
^ applicationClass perform:aSelector with:arg1 with:arg2 |
744 |
]. |
|
745 |
] |
|
586 | 746 |
]. |
848 | 747 |
^ aBlock value |
970
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
748 |
|
d8920428eb28
undid some exception handling stuff;
Claus Gittinger <cg@exept.de>
parents:
965
diff
changeset
|
749 |
"Modified: / 18.6.1998 / 21:40:13 / cg" |
586 | 750 |
! ! |
751 |
||
422 | 752 |
!WindowBuilder methodsFor:'spec creation aspect fetch'! |
100 | 753 |
|
374 | 754 |
actionFor:aKey |
450 | 755 |
"return an action for aKey. This is invoked during window building |
756 |
(by the builder) to ask for an ActionButtons actionBlock. |
|
757 |
Here, first the local bindings are searched, then the application and |
|
758 |
finally the applications class is asked for a corresponding action. |
|
759 |
The returned object is typically a block." |
|
760 |
||
434 | 761 |
|b| |
762 |
||
763 |
bindings notNil ifTrue:[ |
|
764 |
b := bindings at:aKey ifAbsent:nil. |
|
765 |
b notNil ifTrue:[^ b]. |
|
766 |
]. |
|
767 |
||
848 | 768 |
^ self safelyPerform:#actionFor: |
769 |
with:aKey |
|
770 |
ifNone:[ self aspectNotFound:aKey error:'no action for:'. [] ] |
|
374 | 771 |
! |
772 |
||
716 | 773 |
actionFor:aKey withValue:aValue |
774 |
"return an action for aKey/value combonation. |
|
775 |
This is invoked during window building |
|
776 |
(by the builder) to ask for an ActionButtons actionBlock if that button |
|
777 |
specified an action with an argument value. |
|
778 |
Here, first the local bindings are searched, then the application and |
|
779 |
finally the applications class is asked for a corresponding action. |
|
780 |
The returned object is typically a block." |
|
781 |
||
782 |
|b| |
|
783 |
||
784 |
bindings notNil ifTrue:[ |
|
785 |
b := bindings at:aKey ifAbsent:nil. |
|
786 |
b notNil ifTrue:[^ b]. |
|
787 |
]. |
|
788 |
||
848 | 789 |
^ self safelyPerform:#actionFor:withValue: |
790 |
with:aKey |
|
791 |
with:aValue |
|
792 |
ifNone:[ self aspectNotFound:aKey error:'no action for:'. [:dummy |] ] |
|
716 | 793 |
! |
794 |
||
374 | 795 |
aspectFor:aKey |
450 | 796 |
"return a model for aKey. This is invoked during window building |
797 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
|
798 |
Here, first the local bindings are searched, then the application and |
|
799 |
finally the applications class is asked for a corresponding action. |
|
800 |
The returned object is typically a valueHolder." |
|
801 |
||
434 | 802 |
|b| |
803 |
||
804 |
bindings notNil ifTrue:[ |
|
805 |
b := bindings at:aKey ifAbsent:nil. |
|
806 |
b notNil ifTrue:[^ b]. |
|
807 |
]. |
|
808 |
||
848 | 809 |
^ self safelyPerform:#aspectFor: |
810 |
with:aKey |
|
811 |
ifNone:[ self aspectAt:aKey ] |
|
374 | 812 |
! |
813 |
||
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
814 |
aspectFor:aKey ifAbsent:exceptionBlock |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
815 |
"return a model for aKey. This is invoked during window building |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
816 |
(by the builder) to ask for an Editfields, a Toggles etc. model. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
817 |
Here, first the local bindings are searched, then the application and |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
818 |
finally the applications class is asked for a corresponding action. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
819 |
The returned object is typically a valueHolder." |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
820 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
821 |
|b| |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
822 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
823 |
bindings notNil ifTrue:[ |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
824 |
b := bindings at:aKey ifAbsent:nil. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
825 |
b notNil ifTrue:[^ b]. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
826 |
]. |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
827 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
828 |
^ self safelyPerform:#aspectFor: |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
829 |
with:aKey |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
830 |
ifNone:[self aspectAt:aKey ifAbsent:exceptionBlock] |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
831 |
|
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
832 |
"Created: / 4.8.1998 / 19:36:39 / cg" |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
833 |
! |
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
834 |
|
423 | 835 |
componentFor:aKey |
450 | 836 |
"return a component for aKey. This is invoked during window building |
837 |
(by the builder) to ask for an ArbitraryComponents view. |
|
838 |
Here, first the local bindings are searched, then the application and |
|
839 |
finally the applications class is asked for a corresponding action. |
|
840 |
The returned object is typically a view." |
|
841 |
||
848 | 842 |
^ self safelyPerform:#componentFor: |
843 |
with:aKey |
|
844 |
ifNone:[ self aspectAt:aKey ] |
|
423 | 845 |
! |
846 |
||
422 | 847 |
labelFor:aKey |
450 | 848 |
"return a label for aKey. This is invoked during window building |
849 |
(by the builder) to ask for a ???'s label. |
|
850 |
Here, first the local bindings are searched, then the application and |
|
851 |
finally the applications class is asked for a corresponding action. |
|
852 |
The returned object is typically a string." |
|
853 |
||
848 | 854 |
^ self safelyPerform:#labelFor: |
855 |
with:aKey |
|
856 |
ifNone:[ self aspectAt:aKey ] |
|
422 | 857 |
! |
858 |
||
859 |
listFor:aKey |
|
450 | 860 |
"return a list for aKey. This is invoked during window building |
861 |
(by the builder) to ask for a ???'s label. |
|
862 |
Here, first the local bindings are searched, then the application and |
|
863 |
finally the applications class is asked for a corresponding action. |
|
864 |
The returned object is typically a list." |
|
865 |
||
848 | 866 |
^ self safelyPerform:#listFor: |
867 |
with:aKey |
|
868 |
ifNone:[ self aspectAt:aKey ] |
|
869 |
! |
|
870 |
||
871 |
menuFor:aKey |
|
872 |
"Find a binding for the menu named aKey, either in the bindings |
|
873 |
or from the source" |
|
874 |
||
875 |
|menu| |
|
876 |
||
961 | 877 |
aKey isNil ifTrue:[^ nil]. |
878 |
||
848 | 879 |
(menu := self bindingAt:aKey) notNil ifTrue:[ |
880 |
^ menu |
|
881 |
]. |
|
882 |
||
883 |
menu := self safelyPerform:#menuFor: with:aKey ifNone:[ |
|
884 |
self safelyPerform:aKey ifNone:[ |
|
885 |
self aspectNotFound:aKey error:'no menu for:'. |
|
886 |
nil |
|
887 |
] |
|
888 |
]. |
|
889 |
||
862 | 890 |
menu isBlock ifFalse:[ |
891 |
((menu := menu value) notNil and:[application notNil]) ifTrue:[ |
|
892 |
menu isArray ifTrue:[ |
|
893 |
menu := Menu new fromLiteralArrayEncoding:menu. |
|
894 |
menu receiver:application. |
|
924
4680e2fe4728
must care for resource-label translation of a menu
Claus Gittinger <cg@exept.de>
parents:
862
diff
changeset
|
895 |
]. |
4680e2fe4728
must care for resource-label translation of a menu
Claus Gittinger <cg@exept.de>
parents:
862
diff
changeset
|
896 |
menu findGuiResourcesIn:application |
450 | 897 |
] |
422 | 898 |
]. |
848 | 899 |
^ menu |
717
b89142a61d05
#aspectAt: must also ask class.
Claus Gittinger <cg@exept.de>
parents:
716
diff
changeset
|
900 |
|
961 | 901 |
"Modified: / 18.6.1998 / 16:30:31 / cg" |
829
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
902 |
! |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
903 |
|
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
904 |
specificationFor:aKey |
d4cd3635d64e
Fix #subcanvasAt:at to be consistent with other binding access methods.
Stefan Vogel <sv@exept.de>
parents:
824
diff
changeset
|
905 |
"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
|
906 |
(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
|
907 |
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
|
908 |
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
|
909 |
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
|
910 |
|
848 | 911 |
^ self safelyPerform:#specificationFor: |
912 |
with:aKey |
|
913 |
ifNone:[ self aspectFor:aKey ] |
|
422 | 914 |
! ! |
915 |
||
916 |
!WindowBuilder methodsFor:'spec creation callbacks'! |
|
917 |
||
735 | 918 |
createdComponent:aView forSpec:spec named:name |
919 |
"callback from the UISpec after a view has been |
|
920 |
created for a spec. |
|
921 |
If it has a name, add it to the namedComponents dictionary; |
|
922 |
if I have a creationHook (application callBack), evaluate it." |
|
923 |
||
924 |
name notNil ifTrue:[ |
|
925 |
"/ self componentAt:name put:aView. |
|
926 |
namedComponents isNil ifTrue:[ |
|
927 |
namedComponents := IdentityDictionary new. |
|
928 |
]. |
|
929 |
namedComponents at:name asSymbol put:aView |
|
930 |
]. |
|
410 | 931 |
componentCreationHook notNil ifTrue:[ |
932 |
componentCreationHook value:aView value:spec value:self |
|
933 |
] |
|
100 | 934 |
|
735 | 935 |
"Modified: / 5.9.1995 / 21:42:54 / claus" |
936 |
"Created: / 31.10.1997 / 18:47:01 / cg" |
|
937 |
"Modified: / 31.10.1997 / 18:51:22 / cg" |
|
100 | 938 |
! ! |
939 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
940 |
!WindowBuilder methodsFor:'startup'! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
941 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
942 |
closeRequest |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
943 |
window destroy |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
944 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
945 |
"Modified: 17.1.1997 / 19:30:32 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
946 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
947 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
948 |
open |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
949 |
"open my topView, as previously created" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
950 |
|
477 | 951 |
|type| |
952 |
||
953 |
application isNil ifTrue:[ |
|
954 |
type := #normal |
|
955 |
] ifFalse:[ |
|
956 |
type := application defaultWindowType |
|
957 |
]. |
|
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
958 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
959 |
openWithExtent:nil |
477 | 960 |
andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
961 |
|
477 | 962 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
963 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
964 |
|
428 | 965 |
openAt:aPoint |
966 |
"open my topView at some location" |
|
967 |
||
968 |
self |
|
467 | 969 |
openAt:aPoint |
970 |
withExtent:nil |
|
428 | 971 |
andType:(application defaultWindowType) |
972 |
||
973 |
"Created: 14.2.1997 / 20:21:57 / cg" |
|
467 | 974 |
"Modified: 28.2.1997 / 22:50:29 / cg" |
428 | 975 |
! |
976 |
||
436 | 977 |
openAt:origin withExtent:ext andType:type |
428 | 978 |
"open my window, as previously created, optionally defining the |
979 |
windows origin and/or extent. |
|
980 |
The type argument may be #dialog or #normal, and specifies if the view |
|
981 |
should be opened as a modal view, blocking interaction to the currently |
|
982 |
active view, or as a normal view." |
|
983 |
||
984 |
origin notNil ifTrue:[ |
|
985 |
window origin:origin |
|
986 |
]. |
|
987 |
ext notNil ifTrue:[ |
|
480 | 988 |
window extent:ext. |
989 |
] ifFalse:[ |
|
990 |
type == #dialog ifTrue:[ |
|
991 |
window fixSize |
|
992 |
] |
|
993 |
]. |
|
994 |
||
428 | 995 |
type == #dialog ifTrue:[ |
467 | 996 |
window fixPosition:(window device pointerPosition - window positionOffset). |
428 | 997 |
window openModal. |
998 |
^ self |
|
999 |
]. |
|
1000 |
||
1001 |
type == #normal ifTrue:[ |
|
480 | 1002 |
window isNil ifTrue:[ |
965
04cadbd21aac
use new ApplicationWindow (instead of StandardSystemView)
Claus Gittinger <cg@exept.de>
parents:
961
diff
changeset
|
1003 |
self setupWindowFor:(ApplicationWindow new). |
480 | 1004 |
]. |
1005 |
||
428 | 1006 |
window open. |
1007 |
^ self |
|
1008 |
]. |
|
1009 |
||
1010 |
type == #popUp ifTrue:[ |
|
467 | 1011 |
window fixPosition:(window device pointerPosition). |
1012 |
window openAsPopUp. |
|
428 | 1013 |
^ self |
1014 |
]. |
|
1015 |
||
1016 |
" |
|
1017 |
if ST-80 supports more types - these may be added later |
|
1018 |
" |
|
1019 |
self halt:'unimplemented' |
|
1020 |
||
735 | 1021 |
"Created: / 14.2.1997 / 20:22:24 / cg" |
965
04cadbd21aac
use new ApplicationWindow (instead of StandardSystemView)
Claus Gittinger <cg@exept.de>
parents:
961
diff
changeset
|
1022 |
"Modified: / 18.6.1998 / 19:10:07 / cg" |
428 | 1023 |
! |
1024 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1025 |
openDialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1026 |
"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
|
1027 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1028 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1029 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1030 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1031 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1032 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1033 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1034 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1035 |
|
428 | 1036 |
openDialogAt:aPoint withExtent:ext |
1037 |
"open my topView, as previously created as a modal view, |
|
1038 |
blocking interaction to the currently active view." |
|
1039 |
||
1040 |
self |
|
1041 |
openAt:aPoint withExtent:ext |
|
1042 |
andType:#dialog |
|
1043 |
||
1044 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
|
1045 |
"Created: 14.2.1997 / 20:24:19 / cg" |
|
1046 |
! |
|
1047 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1048 |
openDialogWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1049 |
"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
|
1050 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1051 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1052 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1053 |
openWithExtent:ext |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1054 |
andType:#dialog |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1055 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1056 |
"Modified: 17.1.1997 / 19:59:36 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1057 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1058 |
|
664 | 1059 |
openModal |
1060 |
"open my topView, as previously created" |
|
1061 |
||
1062 |
self |
|
1063 |
openWithExtent:nil |
|
1064 |
andType:#dialog |
|
1065 |
||
1066 |
"Modified: 3.3.1997 / 19:43:57 / cg" |
|
1067 |
! |
|
1068 |
||
428 | 1069 |
openPopUpAt:aPoint |
1070 |
"open my topView, as previously created as a popUp view, |
|
1071 |
blocking interaction to the currently active view." |
|
1072 |
||
1073 |
self |
|
1074 |
openAt:aPoint withExtent:nil |
|
1075 |
andType:#popUp |
|
1076 |
||
1077 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
|
1078 |
"Created: 14.2.1997 / 20:24:38 / cg" |
|
1079 |
! |
|
1080 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1081 |
openPopUpIn:aRectangle |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1082 |
"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
|
1083 |
blocking interaction to the currently active view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1084 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1085 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1086 |
openWithExtent:nil |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1087 |
andType:#popUp |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1088 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1089 |
"Modified: 17.1.1997 / 19:59:29 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1090 |
"Created: 17.1.1997 / 20:01:24 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1091 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1092 |
|
587 | 1093 |
openWindowAt:aPoint |
1094 |
"open my topView at some location" |
|
1095 |
||
1096 |
self openAt:aPoint |
|
1097 |
! |
|
1098 |
||
1099 |
openWindowAt:origin withExtent:ext andType:type |
|
1100 |
"open my window, as previously created, optionally defining the |
|
1101 |
windows origin and/or extent. |
|
1102 |
The type argument may be #dialog or #normal, and specifies if the view |
|
1103 |
should be opened as a modal view, blocking interaction to the currently |
|
1104 |
active view, or as a normal view." |
|
1105 |
||
1106 |
^ self openAt:origin withExtent:ext andType:type |
|
1107 |
! |
|
1108 |
||
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1109 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1110 |
"open my topView, as previously created, but override |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1111 |
the extent." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1112 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1113 |
self |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1114 |
openWithExtent:aPoint |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1115 |
andType:(application defaultWindowType) |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1116 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1117 |
"Modified: 17.1.1997 / 19:58:48 / cg" |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1118 |
! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1119 |
|
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1120 |
openWithExtent:ext andType:type |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1121 |
"open my window, as previously created. The type argument |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1122 |
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
|
1123 |
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
|
1124 |
active view, or as a normal view." |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1125 |
|
428 | 1126 |
^ self openAt:nil withExtent:ext andType:type |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1127 |
|
428 | 1128 |
"Modified: 14.2.1997 / 20:22:47 / cg" |
372
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1129 |
! ! |
6d7718f3d298
more ST-80 compatibility stuff
Claus Gittinger <cg@exept.de>
parents:
223
diff
changeset
|
1130 |
|
132 | 1131 |
!WindowBuilder class methodsFor:'documentation'! |
1132 |
||
1133 |
version |
|
1031
0f80a655cf09
allow suppress of warnings if spec thinks the aspect is
Claus Gittinger <cg@exept.de>
parents:
1028
diff
changeset
|
1134 |
^ '$Header: /cvs/stx/stx/libview2/Attic/WinBuilder.st,v 1.71 1998-08-04 17:42:10 cg Exp $' |
132 | 1135 |
! ! |