42
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
3 |
All Rights Reserved
|
|
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 |
|
|
13 |
ApplicationModel subclass:#UIPainter
|
|
14 |
instanceVariableNames:'menu nameField elementMenu workView treeView outletView stringBox
|
|
15 |
actionBox listBox fileBox currentFileName topView propertyFrame
|
|
16 |
whichProperty changeSelectorHolder changeChannel
|
|
17 |
aspectSelectorHolder aspectChannel nameChannel fgChannel
|
|
18 |
bgChannel applyAction leftFractionHolder leftOffsetHolder
|
|
19 |
rightFractionHolder rightOffsetHolder topFractionHolder
|
|
20 |
topOffsetHolder bottomFractionHolder bottomOffsetHolder specClass
|
|
21 |
specSelector leftAlignmentFractionHolder
|
50
|
22 |
topAlignmentFractionHolder classNameHolder methodNameHolder
|
|
23 |
aspectHolders propertyShown specShown'
|
42
|
24 |
classVariableNames:''
|
|
25 |
poolDictionaries:''
|
|
26 |
category:'Interface-UIPainter'
|
|
27 |
!
|
|
28 |
|
|
29 |
!UIPainter class methodsFor:'documentation'!
|
|
30 |
|
|
31 |
copyright
|
|
32 |
"
|
|
33 |
COPYRIGHT (c) 1995 by Claus Gittinger
|
|
34 |
All Rights Reserved
|
|
35 |
|
|
36 |
This software is furnished under a license and may be used
|
|
37 |
only in accordance with the terms of that license and with the
|
|
38 |
inclusion of the above copyright notice. This software may not
|
|
39 |
be provided or otherwise made available to, or used by, any
|
|
40 |
other person. No title to or ownership of the software is
|
|
41 |
hereby transferred.
|
|
42 |
"
|
|
43 |
!
|
|
44 |
|
|
45 |
documentation
|
|
46 |
"
|
|
47 |
not yet finished, not yet published, not yet released.
|
|
48 |
|
|
49 |
[start with:]
|
46
|
50 |
UIPainter open
|
42
|
51 |
"
|
|
52 |
! !
|
|
53 |
|
|
54 |
!UIPainter class methodsFor:'interface specs'!
|
|
55 |
|
|
56 |
actionButtonModelSpec
|
|
57 |
"UIPainter new openOnClass:self andSelector:#actionButtonModelSpec"
|
|
58 |
|
|
59 |
<resource: #canvas>
|
|
60 |
|
|
61 |
^
|
|
62 |
|
|
63 |
#(#FullSpec
|
|
64 |
#'component:'
|
|
65 |
#(#SpecCollection
|
|
66 |
#'collection:'
|
|
67 |
#(
|
|
68 |
#(#FramedBoxSpec
|
|
69 |
#'layout:' #(#LayoutFrame 0 0 -1 0 251 0 289 0)
|
|
70 |
#'component:'
|
|
71 |
#(#SpecCollection
|
|
72 |
#'collection:'
|
|
73 |
#(
|
|
74 |
#(#VerticalPanelViewSpec
|
|
75 |
#'layout:' #(#LayoutFrame 6 0 26 0 78 0 216 0)
|
|
76 |
#'component:'
|
|
77 |
#(#SpecCollection
|
|
78 |
#'collection:'
|
|
79 |
#(
|
|
80 |
#(#LabelSpec
|
|
81 |
#'name:' 'label'
|
|
82 |
#'layout:' #(#LayoutFrame 0 0 47 0 57 0 71 0)
|
|
83 |
#'label:' 'aspect:'
|
|
84 |
)
|
|
85 |
#(#LabelSpec
|
|
86 |
#'name:' 'label'
|
|
87 |
#'layout:' #(#LayoutFrame 0 0 119 0 62 0 143 0)
|
|
88 |
#'label:' 'change:'
|
|
89 |
)
|
|
90 |
)
|
|
91 |
)
|
|
92 |
#'horizontalLayout:' #left
|
|
93 |
#'verticalLayout:' #spreadSpace
|
|
94 |
)
|
|
95 |
#(#VerticalPanelViewSpec
|
|
96 |
#'layout:' #(#LayoutFrame 80 0 24 0 231 0 214 0)
|
|
97 |
#'component:'
|
|
98 |
#(#SpecCollection
|
|
99 |
#'collection:'
|
|
100 |
#(
|
|
101 |
#(#InputFieldSpec
|
|
102 |
#'name:' 'aspectInput'
|
|
103 |
#'layout:' #(#LayoutFrame 0 0 49 0 163 0 69 0)
|
|
104 |
#model: #aspectChannel
|
|
105 |
#acceptOnLostFocus: true
|
|
106 |
#tabable: true
|
|
107 |
)
|
|
108 |
#(#InputFieldSpec
|
|
109 |
#'name:' 'changeInput'
|
|
110 |
#'layout:' #(#LayoutFrame 0 0 119 0 163 0 142 0)
|
|
111 |
#model: #changeChannel
|
|
112 |
#acceptOnLostFocus: true
|
|
113 |
#tabable: true
|
|
114 |
)
|
|
115 |
)
|
|
116 |
)
|
|
117 |
#'horizontalLayout:' #fit
|
|
118 |
#'verticalLayout:' #spreadSpace
|
|
119 |
)
|
|
120 |
#(#ActionButtonSpec
|
|
121 |
#'name:' 'button'
|
|
122 |
#'layout:' #(#LayoutFrame 102 0 246 0 153 0 272 0)
|
|
123 |
#'label:' 'apply'
|
|
124 |
#'model:' #setModelAspects
|
|
125 |
)
|
|
126 |
)
|
|
127 |
)
|
|
128 |
#'labelPosition:' #topLeft
|
|
129 |
#'showFrame:' false
|
|
130 |
)
|
|
131 |
)
|
|
132 |
)
|
|
133 |
#'window:'
|
|
134 |
#(#WindowSpec
|
|
135 |
#'label:' 'unnamed'
|
|
136 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
137 |
)
|
|
138 |
)
|
|
139 |
!
|
|
140 |
|
|
141 |
colorSpec
|
|
142 |
"UIBuilder new openOnClass:self andSelector:#colorSpec"
|
|
143 |
"Builder new openInterface:#colorSpec"
|
|
144 |
|
|
145 |
<resource: #canvas>
|
|
146 |
|
|
147 |
^
|
|
148 |
|
|
149 |
#(#FullSpec
|
|
150 |
#'component:'
|
|
151 |
#(#SpecCollection
|
|
152 |
#'collection:'
|
|
153 |
#(
|
|
154 |
#(#FramedBoxSpec
|
|
155 |
#'layout:' #(#LayoutFrame 0 0 -1 0 252 0 290 0)
|
|
156 |
#'component:'
|
|
157 |
#(#SpecCollection
|
|
158 |
#'collection:'
|
|
159 |
#(
|
|
160 |
#(#VerticalPanelViewSpec
|
|
161 |
#'layout:' #(#LayoutFrame 6 0 26 0 100 0 215 0)
|
|
162 |
#'component:'
|
|
163 |
#(#SpecCollection
|
|
164 |
#'collection:'
|
|
165 |
#(
|
|
166 |
#(#LabelSpec
|
|
167 |
#'name:' 'label'
|
|
168 |
#'layout:' #(#LayoutFrame 0 0 47 0 87 0 71 0)
|
|
169 |
#'label:' 'foreground:'
|
|
170 |
)
|
|
171 |
#(#LabelSpec
|
|
172 |
#'name:' 'label'
|
|
173 |
#'layout:' #(#LayoutFrame 0 0 119 0 93 0 143 0)
|
|
174 |
#'label:' 'background:'
|
|
175 |
)
|
|
176 |
)
|
|
177 |
)
|
|
178 |
#'horizontalLayout:' #left
|
|
179 |
#'verticalLayout:' #spreadSpace
|
|
180 |
)
|
|
181 |
#(#VerticalPanelViewSpec
|
|
182 |
#'layout:' #(#LayoutFrame 114 0 24 0 233 0 213 0)
|
|
183 |
#'component:'
|
|
184 |
#(#SpecCollection
|
|
185 |
#'collection:'
|
|
186 |
#(
|
|
187 |
#(#InputFieldSpec
|
|
188 |
#'layout:' #(#LayoutFrame 0 0 49 0 163 0 69 0)
|
|
189 |
#model: #foregroundChannel
|
|
190 |
)
|
|
191 |
#(#InputFieldSpec
|
|
192 |
#'layout:' #(#LayoutFrame 0 0 119 0 163 0 142 0)
|
|
193 |
#model: #backgroundChannel
|
|
194 |
)
|
|
195 |
)
|
|
196 |
)
|
|
197 |
#'horizontalLayout:' #fit
|
|
198 |
#'verticalLayout:' #spreadSpace
|
|
199 |
)
|
|
200 |
#(#ActionButtonSpec
|
|
201 |
#'name:' 'button'
|
|
202 |
#'layout:' #(#LayoutFrame 102 0 246 0 153 0 272 0)
|
|
203 |
#'label:' 'apply'
|
|
204 |
#'model:' #setColors
|
|
205 |
)
|
|
206 |
)
|
|
207 |
)
|
|
208 |
#'labelPosition:' #topLeft
|
|
209 |
#'showFrame:' false
|
|
210 |
)
|
|
211 |
)
|
|
212 |
)
|
|
213 |
#'window:'
|
|
214 |
#(#WindowSpec
|
|
215 |
#'label:' 'unnamed'
|
|
216 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
217 |
)
|
|
218 |
)
|
|
219 |
!
|
|
220 |
|
|
221 |
geometrySpecForAlignmentOrigin
|
|
222 |
"UIBuilder new openOnClass:self andSelector:#geometrySpecForAlignmentOrigin"
|
|
223 |
"Builder new openInterface:#geometrySpecForAlignmentOrigin"
|
|
224 |
|
|
225 |
<resource: #canvas>
|
|
226 |
|
|
227 |
^
|
|
228 |
|
|
229 |
#(#FullSpec
|
|
230 |
#'component:'
|
|
231 |
#(#SpecCollection
|
|
232 |
#'collection:'
|
|
233 |
#(
|
|
234 |
#(#FramedBoxSpec
|
|
235 |
#'layout:' #(#LayoutFrame 0 0 -1 0 253 0 291 0)
|
|
236 |
#'component:'
|
|
237 |
#(#SpecCollection
|
|
238 |
#'collection:'
|
|
239 |
#(
|
|
240 |
#(#VerticalPanelViewSpec
|
|
241 |
#'layout:' #(#LayoutFrame 6 0 26 0 85 0 219 0)
|
|
242 |
#'component:'
|
|
243 |
#(#SpecCollection
|
|
244 |
#'collection:'
|
|
245 |
#(
|
|
246 |
#(#LabelSpec
|
|
247 |
#'layout:' #(#LayoutFrame 0 0 19 0 30 0 43 0)
|
|
248 |
#'label:' 'left'
|
|
249 |
#'adjust:' #left
|
|
250 |
)
|
|
251 |
#(#LabelSpec
|
|
252 |
#'layout:' #(#LayoutFrame 0 0 63 0 31 0 87 0)
|
|
253 |
#'label:' 'top'
|
|
254 |
#'adjust:' #left
|
|
255 |
)
|
|
256 |
#(#LabelSpec
|
|
257 |
#'layout:' #(#LayoutFrame 0 0 107 0 41 0 131 0)
|
|
258 |
#'label:' 'align H'
|
|
259 |
#'adjust:' #left
|
|
260 |
)
|
|
261 |
#(#LabelSpec
|
|
262 |
#'layout:' #(#LayoutFrame 0 0 151 0 61 0 175 0)
|
|
263 |
#'label:' 'align V'
|
|
264 |
#'adjust:' #left
|
|
265 |
)
|
|
266 |
)
|
|
267 |
)
|
|
268 |
#'horizontalLayout:' #left
|
|
269 |
#'verticalLayout:' #spreadSpace
|
|
270 |
)
|
|
271 |
#(#VerticalPanelViewSpec
|
|
272 |
#'layout:' #(#LayoutFrame 80 0 24 0 124 0 217 0)
|
|
273 |
#'component:'
|
|
274 |
#(#SpecCollection
|
|
275 |
#'collection:'
|
|
276 |
#(
|
|
277 |
#(#InputFieldSpec
|
|
278 |
#'layout:' #(#LayoutFrame 0 0 21 0 71 0 42 0)
|
|
279 |
#'type:' #numberOrNil
|
|
280 |
#model: #leftFractionChannel
|
|
281 |
#acceptOnLostFocus: true
|
|
282 |
#tabable: true
|
|
283 |
)
|
|
284 |
#(#InputFieldSpec
|
|
285 |
#'layout:' #(#LayoutFrame 0 0 64 0 71 0 85 0)
|
|
286 |
#'type:' #numberOrNil
|
|
287 |
#'model:' #'topFractionChannel'
|
|
288 |
#acceptOnLostFocus: true
|
|
289 |
#tabable: true
|
|
290 |
)
|
|
291 |
#(#InputFieldSpec
|
|
292 |
#'layout:' #(#LayoutFrame 0 0 107 0 71 0 128 0)
|
|
293 |
#'type:' #numberOrNil
|
|
294 |
#model: #'leftAlignmentFractionChannel'
|
|
295 |
#acceptOnLostFocus: true
|
|
296 |
#tabable: true
|
|
297 |
)
|
|
298 |
#(#InputFieldSpec
|
|
299 |
#'layout:' #(#LayoutFrame 0 0 150 0 71 0 171 0)
|
|
300 |
#'type:' #numberOrNil
|
|
301 |
#'model:' #'topAlignmentFractionChannel'
|
|
302 |
#acceptOnLostFocus: true
|
|
303 |
#tabable: true
|
|
304 |
)
|
|
305 |
)
|
|
306 |
)
|
|
307 |
#'horizontalLayout:' #fit
|
|
308 |
#'verticalLayout:' #spreadSpace
|
|
309 |
)
|
|
310 |
#(#VerticalPanelViewSpec
|
|
311 |
#'layout:' #(#LayoutFrame 150 0 24 0 220 0 216 0)
|
|
312 |
#'component:'
|
|
313 |
#(#SpecCollection
|
|
314 |
#'collection:'
|
|
315 |
#(
|
|
316 |
#(#InputFieldSpec
|
|
317 |
#'layout:' #(#LayoutFrame 0 0 21 0 114 0 42 0)
|
|
318 |
#'type:' #numberOrNil
|
|
319 |
#model: #leftOffsetChannel
|
|
320 |
#acceptOnLostFocus: true
|
|
321 |
#tabable: true
|
|
322 |
)
|
|
323 |
#(#InputFieldSpec
|
|
324 |
#'layout:' #(#LayoutFrame 0 0 64 0 114 0 85 0)
|
|
325 |
#'type:' #numberOrNil
|
|
326 |
#model: #topOffsetChannel
|
|
327 |
#acceptOnLostFocus: true
|
|
328 |
#tabable: true
|
|
329 |
)
|
|
330 |
)
|
|
331 |
)
|
|
332 |
#'horizontalLayout:' #fit
|
|
333 |
#'verticalLayout:' #spreadSpace
|
|
334 |
)
|
|
335 |
#(#ActionButtonSpec
|
|
336 |
#'name:' 'button'
|
|
337 |
#'layout:' #(#LayoutFrame 16 0 210 0 76 0 240 0)
|
|
338 |
#'label:' 'frame'
|
|
339 |
#'model:' #setLayoutFrame
|
|
340 |
)
|
|
341 |
#(#ActionButtonSpec
|
|
342 |
#'name:' 'button'
|
|
343 |
#'layout:' #(#LayoutFrame 96 0 210 0 156 0 240 0)
|
|
344 |
#'label:' 'origin'
|
|
345 |
#'model:' #setLayoutOrigin
|
|
346 |
)
|
|
347 |
#(#ActionButtonSpec
|
|
348 |
#'name:' 'button'
|
|
349 |
#'layout:' #(#LayoutFrame 176 0 210 0 236 0 240 0)
|
|
350 |
#'label:' 'align'
|
|
351 |
#'model:' #setAlignmentOrigin
|
|
352 |
#'initiallyDisabled:' true
|
|
353 |
)
|
|
354 |
|
|
355 |
#(#ActionButtonSpec
|
|
356 |
#'layout:' #(#LayoutFrame 96 0 260 0 156 0 290 0)
|
|
357 |
#'label:' 'apply'
|
|
358 |
#'model:' #setDimensionForAlignmentOrigin
|
|
359 |
#tabable: true
|
|
360 |
)
|
|
361 |
#(#LabelSpec
|
|
362 |
#'layout:' #(#LayoutFrame 77 0 9 0 137 0 31 0)
|
|
363 |
#'label:' 'relative'
|
|
364 |
)
|
|
365 |
#(#LabelSpec
|
|
366 |
#'layout:' #(#LayoutFrame 167 0 9 0 213 0 30 0)
|
|
367 |
#'label:' 'offset'
|
|
368 |
)
|
|
369 |
)
|
|
370 |
)
|
|
371 |
#'labelPosition:' #topLeft
|
|
372 |
#'showFrame:' false
|
|
373 |
)
|
|
374 |
)
|
|
375 |
)
|
|
376 |
#'window:'
|
|
377 |
#(#WindowSpec
|
|
378 |
#'label:' 'indy: unnamed'
|
|
379 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
380 |
)
|
|
381 |
)
|
|
382 |
!
|
|
383 |
|
|
384 |
geometrySpecForLayoutFrame
|
|
385 |
"UIBuilder new openOnClass:self andSelector:#geometrySpecForLayoutFrame"
|
|
386 |
"Builder new openInterface:#geometrySpecForLayoutFrame"
|
|
387 |
|
|
388 |
<resource: #canvas>
|
|
389 |
|
|
390 |
^
|
|
391 |
|
|
392 |
#(#FullSpec
|
|
393 |
#'component:'
|
|
394 |
#(#SpecCollection
|
|
395 |
#'collection:'
|
|
396 |
#(
|
|
397 |
#(#FramedBoxSpec
|
|
398 |
#'layout:' #(#LayoutFrame 0 0 -1 0 253 0 291 0)
|
|
399 |
#'component:'
|
|
400 |
#(#SpecCollection
|
|
401 |
#'collection:'
|
|
402 |
#(
|
|
403 |
#(#VerticalPanelViewSpec
|
|
404 |
#'layout:' #(#LayoutFrame 6 0 26 0 85 0 219 0)
|
|
405 |
#'component:'
|
|
406 |
#(#SpecCollection
|
|
407 |
#'collection:'
|
|
408 |
#(
|
|
409 |
#(#LabelSpec
|
|
410 |
#'layout:' #(#LayoutFrame 0 0 19 0 30 0 43 0)
|
|
411 |
#'label:' 'left'
|
|
412 |
#'adjust:' #left
|
|
413 |
)
|
|
414 |
#(#LabelSpec
|
|
415 |
#'layout:' #(#LayoutFrame 0 0 63 0 30 0 87 0)
|
|
416 |
#'label:' 'top'
|
|
417 |
#'adjust:' #left
|
|
418 |
)
|
|
419 |
#(#LabelSpec
|
|
420 |
#'layout:' #(#LayoutFrame 0 0 107 0 40 0 131 0)
|
|
421 |
#'label:' 'right'
|
|
422 |
#'adjust:' #left
|
|
423 |
)
|
|
424 |
#(#LabelSpec
|
|
425 |
#'layout:' #(#LayoutFrame 0 0 151 0 40 0 175 0)
|
|
426 |
#'label:' 'bottom'
|
|
427 |
#'adjust:' #left
|
|
428 |
)
|
|
429 |
)
|
|
430 |
)
|
|
431 |
#'horizontalLayout:' #left
|
|
432 |
#'verticalLayout:' #spreadSpace
|
|
433 |
)
|
|
434 |
#(#VerticalPanelViewSpec
|
|
435 |
#'layout:' #(#LayoutFrame 80 0 24 0 124 0 217 0)
|
|
436 |
#'component:'
|
|
437 |
#(#SpecCollection
|
|
438 |
#'collection:'
|
|
439 |
#(
|
|
440 |
#(#InputFieldSpec
|
|
441 |
#'layout:' #(#LayoutFrame 0 0 21 0 71 0 42 0)
|
|
442 |
#'type:' #numberOrNil
|
|
443 |
#model: #leftFractionChannel
|
|
444 |
#acceptOnLostFocus: true
|
|
445 |
#tabable: true
|
|
446 |
)
|
|
447 |
#(#InputFieldSpec
|
|
448 |
#'layout:' #(#LayoutFrame 0 0 64 0 71 0 85 0)
|
|
449 |
#'type:' #numberOrNil
|
|
450 |
#'model:' #'topFractionChannel'
|
|
451 |
#acceptOnLostFocus: true
|
|
452 |
#tabable: true
|
|
453 |
)
|
|
454 |
#(#InputFieldSpec
|
|
455 |
#'layout:' #(#LayoutFrame 0 0 107 0 71 0 128 0)
|
|
456 |
#'type:' #numberOrNil
|
|
457 |
#model: #'rightFractionChannel'
|
|
458 |
#acceptOnLostFocus: true
|
|
459 |
#tabable: true
|
|
460 |
)
|
|
461 |
#(#InputFieldSpec
|
|
462 |
#'layout:' #(#LayoutFrame 0 0 150 0 71 0 171 0)
|
|
463 |
#'type:' #numberOrNil
|
|
464 |
#'model:' #'bottomFractionChannel'
|
|
465 |
#acceptOnLostFocus: true
|
|
466 |
#tabable: true
|
|
467 |
)
|
|
468 |
)
|
|
469 |
)
|
|
470 |
#'horizontalLayout:' #fit
|
|
471 |
#'verticalLayout:' #spreadSpace
|
|
472 |
)
|
|
473 |
#(#VerticalPanelViewSpec
|
|
474 |
#'layout:' #(#LayoutFrame 150 0 24 0 220 0 216 0)
|
|
475 |
#'component:'
|
|
476 |
#(#SpecCollection
|
|
477 |
#'collection:'
|
|
478 |
#(
|
|
479 |
#(#InputFieldSpec
|
|
480 |
#'layout:' #(#LayoutFrame 0 0 21 0 114 0 42 0)
|
|
481 |
#'type:' #numberOrNil
|
|
482 |
#model: #leftOffsetChannel
|
|
483 |
#acceptOnLostFocus: true
|
|
484 |
#tabable: true
|
|
485 |
)
|
|
486 |
#(#InputFieldSpec
|
|
487 |
#'layout:' #(#LayoutFrame 0 0 64 0 114 0 85 0)
|
|
488 |
#'type:' #numberOrNil
|
|
489 |
#model: #topOffsetChannel
|
|
490 |
#acceptOnLostFocus: true
|
|
491 |
#tabable: true
|
|
492 |
)
|
|
493 |
#(#InputFieldSpec
|
|
494 |
#'layout:' #(#LayoutFrame 0 0 107 0 114 0 128 0)
|
|
495 |
#'type:' #numberOrNil
|
|
496 |
#'model:' #rightOffsetChannel
|
|
497 |
#acceptOnLostFocus: true
|
|
498 |
#tabable: true
|
|
499 |
)
|
|
500 |
#(#InputFieldSpec
|
|
501 |
#'layout:' #(#LayoutFrame 0 0 150 0 114 0 171 0)
|
|
502 |
#'type:' #numberOrNil
|
|
503 |
#'model:' #bottomOffsetChannel
|
|
504 |
#acceptOnLostFocus: true
|
|
505 |
#tabable: true
|
|
506 |
)
|
|
507 |
)
|
|
508 |
)
|
|
509 |
#'horizontalLayout:' #fit
|
|
510 |
#'verticalLayout:' #spreadSpace
|
|
511 |
)
|
|
512 |
|
|
513 |
#(#ActionButtonSpec
|
|
514 |
#'name:' 'button'
|
|
515 |
#'layout:' #(#LayoutFrame 16 0 210 0 76 0 240 0)
|
|
516 |
#'label:' 'frame'
|
|
517 |
#'model:' #setLayoutFrame
|
|
518 |
#'initiallyDisabled:' true
|
|
519 |
)
|
|
520 |
#(#ActionButtonSpec
|
|
521 |
#'name:' 'button'
|
|
522 |
#'layout:' #(#LayoutFrame 96 0 210 0 156 0 240 0)
|
|
523 |
#'label:' 'origin'
|
|
524 |
#'model:' #setLayoutOrigin
|
|
525 |
)
|
|
526 |
#(#ActionButtonSpec
|
|
527 |
#'name:' 'button'
|
|
528 |
#'layout:' #(#LayoutFrame 176 0 210 0 236 0 240 0)
|
|
529 |
#'label:' 'align'
|
|
530 |
#'model:' #setAlignmentOrigin
|
|
531 |
)
|
|
532 |
|
|
533 |
#(#ActionButtonSpec
|
|
534 |
#'layout:' #(#LayoutFrame 96 0 260 0 156 0 290 0)
|
|
535 |
#'label:' 'apply'
|
|
536 |
#'model:' #setDimensionForLayoutFrame
|
|
537 |
#tabable: true
|
|
538 |
)
|
|
539 |
#(#LabelSpec
|
|
540 |
#'layout:' #(#LayoutFrame 77 0 9 0 137 0 31 0)
|
|
541 |
#'label:' 'relative'
|
|
542 |
)
|
|
543 |
#(#LabelSpec
|
|
544 |
#'layout:' #(#LayoutFrame 167 0 9 0 213 0 30 0)
|
|
545 |
#'label:' 'offset'
|
|
546 |
)
|
|
547 |
)
|
|
548 |
)
|
|
549 |
#'labelPosition:' #topLeft
|
|
550 |
#'showFrame:' false
|
|
551 |
)
|
|
552 |
)
|
|
553 |
)
|
|
554 |
#'window:'
|
|
555 |
#(#WindowSpec
|
|
556 |
#'label:' 'indy: unnamed'
|
|
557 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
558 |
)
|
|
559 |
)
|
|
560 |
!
|
|
561 |
|
|
562 |
geometrySpecForLayoutOrigin
|
|
563 |
"UIPainter new openOnClass:self andSelector:#geometrySpecForLayoutOrigin"
|
|
564 |
"Builder new openInterface:#geometrySpecForLayoutOrigin"
|
|
565 |
|
|
566 |
<resource: #canvas>
|
|
567 |
|
|
568 |
^
|
|
569 |
|
|
570 |
#(#FullSpec
|
|
571 |
#'component:'
|
|
572 |
#(#SpecCollection
|
|
573 |
#'collection:'
|
|
574 |
#(
|
|
575 |
#(#FramedBoxSpec
|
|
576 |
#'name:' 'framedBox'
|
|
577 |
#'layout:' #(#LayoutFrame 0 0 -1 0 253 0 291 0)
|
|
578 |
#'component:'
|
|
579 |
#(#SpecCollection
|
|
580 |
#'collection:'
|
|
581 |
#(
|
|
582 |
#(#VerticalPanelViewSpec
|
|
583 |
#'name:' 'verticalPanelView'
|
|
584 |
#'layout:' #(#LayoutFrame 6 0 26 0 85 0 219 0)
|
|
585 |
#'component:'
|
|
586 |
#(#SpecCollection
|
|
587 |
#'collection:'
|
|
588 |
#(
|
|
589 |
#(#LabelSpec
|
|
590 |
#'name:' 'label'
|
|
591 |
#'layout:' #(#LayoutFrame 0 0 19 0 30 0 43 0)
|
|
592 |
#'label:' 'left'
|
|
593 |
#'adjust:' #left
|
|
594 |
)
|
|
595 |
#(#LabelSpec
|
|
596 |
#'name:' 'label'
|
|
597 |
#'layout:' #(#LayoutFrame 0 0 63 0 31 0 87 0)
|
|
598 |
#'label:' 'top'
|
|
599 |
#'adjust:' #left
|
|
600 |
)
|
|
601 |
)
|
|
602 |
)
|
|
603 |
#'horizontalLayout:' #left
|
|
604 |
#'verticalLayout:' #spreadSpace
|
|
605 |
)
|
|
606 |
#(#VerticalPanelViewSpec
|
|
607 |
#'name:' 'verticalPanelView'
|
|
608 |
#'layout:' #(#LayoutFrame 80 0 24 0 124 0 217 0)
|
|
609 |
#'component:'
|
|
610 |
#(#SpecCollection
|
|
611 |
#'collection:'
|
|
612 |
#(
|
|
613 |
#(#InputFieldSpec
|
|
614 |
#'layout:' #(#LayoutFrame 0 0 21 0 71 0 42 0)
|
|
615 |
#'type:' #numberOrNil
|
|
616 |
#model: #leftFractionChannel
|
|
617 |
#'acceptOnLostFocus:' true
|
|
618 |
#tabable: true
|
|
619 |
)
|
|
620 |
#(#InputFieldSpec
|
|
621 |
#'layout:' #(#LayoutFrame 0 0 64 0 71 0 85 0)
|
|
622 |
#'type:' #numberOrNil
|
|
623 |
#'model:' #'topFractionChannel'
|
|
624 |
#acceptOnLostFocus: true
|
|
625 |
#tabable: true
|
|
626 |
)
|
|
627 |
)
|
|
628 |
)
|
|
629 |
#'horizontalLayout:' #fit
|
|
630 |
#'verticalLayout:' #spreadSpace
|
|
631 |
)
|
|
632 |
#(#VerticalPanelViewSpec
|
|
633 |
#'name:' 'verticalPanelView'
|
|
634 |
#'layout:' #(#LayoutFrame 150 0 24 0 220 0 216 0)
|
|
635 |
#'component:'
|
|
636 |
#(#SpecCollection
|
|
637 |
#'collection:'
|
|
638 |
#(
|
|
639 |
#(#InputFieldSpec
|
|
640 |
#'layout:' #(#LayoutFrame 0 0 21 0 114 0 42 0)
|
|
641 |
#'type:' #numberOrNil
|
|
642 |
#model: #leftOffsetChannel
|
|
643 |
#acceptOnLostFocus: true
|
|
644 |
#tabable: true
|
|
645 |
)
|
|
646 |
#(#InputFieldSpec
|
|
647 |
#'layout:' #(#LayoutFrame 0 0 64 0 114 0 85 0)
|
|
648 |
#'type:' #numberOrNil
|
|
649 |
#model: #topOffsetChannel
|
|
650 |
#acceptOnLostFocus: true
|
|
651 |
#tabable: true
|
|
652 |
)
|
|
653 |
)
|
|
654 |
)
|
|
655 |
#'horizontalLayout:' #fit
|
|
656 |
#'verticalLayout:' #spreadSpace
|
|
657 |
)
|
|
658 |
#(#ActionButtonSpec
|
|
659 |
#'name:' 'button'
|
|
660 |
#'layout:' #(#LayoutFrame 16 0 210 0 76 0 240 0)
|
|
661 |
#'label:' 'frame'
|
|
662 |
#'model:' #setLayoutFrame
|
|
663 |
)
|
|
664 |
#(#ActionButtonSpec
|
|
665 |
#'name:' 'button'
|
|
666 |
#'layout:' #(#LayoutFrame 96 0 210 0 156 0 240 0)
|
|
667 |
#'label:' 'origin'
|
|
668 |
#'model:' #setLayoutOrigin
|
|
669 |
#'initiallyDisabled:' true
|
|
670 |
)
|
|
671 |
#(#ActionButtonSpec
|
|
672 |
#'name:' 'button'
|
|
673 |
#'layout:' #(#LayoutFrame 176 0 210 0 236 0 240 0)
|
|
674 |
#'label:' 'align'
|
|
675 |
#'model:' #setAlignmentOrigin
|
|
676 |
)
|
|
677 |
#(#ActionButtonSpec
|
|
678 |
#'name:' 'button'
|
|
679 |
#'layout:' #(#LayoutFrame 96 0 260 0 156 0 290 0)
|
|
680 |
#'label:' 'apply'
|
|
681 |
#'model:' #setDimensionForLayoutOrigin
|
|
682 |
)
|
|
683 |
#(#LabelSpec
|
|
684 |
#'name:' 'label'
|
|
685 |
#'layout:' #(#LayoutFrame 77 0 9 0 137 0 31 0)
|
|
686 |
#'label:' 'relative'
|
|
687 |
)
|
|
688 |
#(#LabelSpec
|
|
689 |
#'name:' 'label'
|
|
690 |
#'layout:' #(#LayoutFrame 159 0 9 0 205 0 30 0)
|
|
691 |
#'label:' 'offset'
|
|
692 |
)
|
|
693 |
)
|
|
694 |
)
|
|
695 |
#'labelPosition:' #topLeft
|
|
696 |
#'showFrame:' false
|
|
697 |
)
|
|
698 |
)
|
|
699 |
)
|
|
700 |
#'window:'
|
|
701 |
#(#WindowSpec
|
|
702 |
#'label:' 'indy: unnamed'
|
|
703 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
704 |
)
|
|
705 |
)
|
|
706 |
|
|
707 |
!
|
|
708 |
|
|
709 |
miscSpec
|
|
710 |
"UIBuilder new openOnClass:self andSelector:#miscSpec"
|
|
711 |
"Builder new openInterface:#miscSpec"
|
|
712 |
|
|
713 |
<resource: #canvas>
|
|
714 |
|
|
715 |
^
|
|
716 |
|
|
717 |
#(#FullSpec
|
|
718 |
#'component:'
|
|
719 |
#(#SpecCollection
|
|
720 |
#'collection:'
|
|
721 |
#(
|
|
722 |
#(#FramedBoxSpec
|
|
723 |
#'layout:' #(#LayoutFrame 0 0 -1 0 251 0 289 0)
|
|
724 |
#'component:'
|
|
725 |
#(#SpecCollection
|
|
726 |
#'collection:'
|
|
727 |
#(
|
|
728 |
#(#VerticalPanelViewSpec
|
|
729 |
#'layout:' #(#LayoutFrame 6 0 26 0 61 0 215 0)
|
|
730 |
#'component:'
|
|
731 |
#(#SpecCollection
|
|
732 |
#'collection:'
|
|
733 |
#(
|
|
734 |
#(#LabelSpec
|
|
735 |
#'layout:' #(#LayoutFrame 0 0 47 0 57 0 71 0)
|
|
736 |
#'label:' 'name:'
|
|
737 |
)
|
|
738 |
)
|
|
739 |
)
|
|
740 |
#'horizontalLayout:' #left
|
|
741 |
#'verticalLayout:' #spreadSpace
|
|
742 |
)
|
|
743 |
#(#VerticalPanelViewSpec
|
|
744 |
#'layout:' #(#LayoutFrame 60 0 24 0 230 0 213 0)
|
|
745 |
#'component:'
|
|
746 |
#(#SpecCollection
|
|
747 |
#'collection:'
|
|
748 |
#(
|
|
749 |
#(#InputFieldSpec
|
|
750 |
#model: #nameChannel
|
|
751 |
#'layout:' #(#LayoutFrame 0 0 49 0 163 0 69 0)
|
|
752 |
#acceptOnLostFocus: true
|
|
753 |
#tabable: true
|
|
754 |
)
|
|
755 |
)
|
|
756 |
)
|
|
757 |
#'horizontalLayout:' #fit
|
|
758 |
#'verticalLayout:' #spreadSpace
|
|
759 |
)
|
|
760 |
#(#ActionButtonSpec
|
|
761 |
#'layout:' #(#LayoutFrame 102 0 246 0 153 0 272 0)
|
|
762 |
#'label:' 'apply'
|
|
763 |
#'model:' #setMiscAspects
|
|
764 |
#tabable: true
|
|
765 |
)
|
|
766 |
)
|
|
767 |
)
|
|
768 |
#'labelPosition:' #topLeft
|
|
769 |
#'showFrame:' false
|
|
770 |
)
|
|
771 |
)
|
|
772 |
)
|
|
773 |
#'window:'
|
|
774 |
#(#WindowSpec
|
|
775 |
#'label:' 'unnamed'
|
|
776 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
777 |
)
|
|
778 |
)
|
|
779 |
!
|
|
780 |
|
|
781 |
modelSpec
|
|
782 |
"UIBuilder new openOnClass:self andSelector:#modelSpec"
|
|
783 |
"Builder new openInterface:#modelSpec"
|
|
784 |
|
|
785 |
<resource: #canvas>
|
|
786 |
|
|
787 |
^
|
|
788 |
|
|
789 |
#(#FullSpec
|
|
790 |
#'component:'
|
|
791 |
#(#SpecCollection
|
|
792 |
#'collection:'
|
|
793 |
#(
|
|
794 |
#(#FramedBoxSpec
|
|
795 |
#'layout:' #(#LayoutFrame 0 0 -1 0 251 0 289 0)
|
|
796 |
#'component:'
|
|
797 |
#(#SpecCollection
|
|
798 |
#'collection:'
|
|
799 |
#(
|
|
800 |
#(#VerticalPanelViewSpec
|
|
801 |
#'layout:' #(#LayoutFrame 6 0 26 0 78 0 216 0)
|
|
802 |
#'component:'
|
|
803 |
#(#SpecCollection
|
|
804 |
#'collection:'
|
|
805 |
#(
|
|
806 |
#(#LabelSpec
|
|
807 |
#'name:' 'label'
|
|
808 |
#'layout:' #(#LayoutFrame 0 0 47 0 57 0 71 0)
|
|
809 |
#'label:' 'aspect:'
|
|
810 |
)
|
|
811 |
#(#LabelSpec
|
|
812 |
#'name:' 'label'
|
|
813 |
#'layout:' #(#LayoutFrame 0 0 119 0 62 0 143 0)
|
|
814 |
#'label:' 'change:'
|
|
815 |
)
|
|
816 |
)
|
|
817 |
)
|
|
818 |
#'horizontalLayout:' #left
|
|
819 |
#'verticalLayout:' #spreadSpace
|
|
820 |
)
|
|
821 |
#(#VerticalPanelViewSpec
|
|
822 |
#'layout:' #(#LayoutFrame 80 0 24 0 231 0 214 0)
|
|
823 |
#'component:'
|
|
824 |
#(#SpecCollection
|
|
825 |
#'collection:'
|
|
826 |
#(
|
|
827 |
#(#InputFieldSpec
|
|
828 |
#'name:' 'aspectInput'
|
|
829 |
#'layout:' #(#LayoutFrame 0 0 49 0 163 0 69 0)
|
|
830 |
#model: #aspectChannel
|
|
831 |
#acceptOnLostFocus: true
|
|
832 |
#tabable: true
|
|
833 |
)
|
|
834 |
#(#InputFieldSpec
|
|
835 |
#'name:' 'changeInput'
|
|
836 |
#'layout:' #(#LayoutFrame 0 0 119 0 163 0 142 0)
|
|
837 |
#model: #changeChannel
|
|
838 |
#acceptOnLostFocus: true
|
|
839 |
#tabable: true
|
|
840 |
)
|
|
841 |
)
|
|
842 |
)
|
|
843 |
#'horizontalLayout:' #fit
|
|
844 |
#'verticalLayout:' #spreadSpace
|
|
845 |
)
|
|
846 |
#(#ActionButtonSpec
|
|
847 |
#'name:' 'button'
|
|
848 |
#'layout:' #(#LayoutFrame 102 0 246 0 153 0 272 0)
|
|
849 |
#'label:' 'apply'
|
|
850 |
#'model:' #setModelAspects
|
|
851 |
)
|
|
852 |
)
|
|
853 |
)
|
|
854 |
#'labelPosition:' #topLeft
|
|
855 |
#'showFrame:' false
|
|
856 |
)
|
|
857 |
)
|
|
858 |
)
|
|
859 |
#'window:'
|
|
860 |
#(#WindowSpec
|
|
861 |
#'label:' 'unnamed'
|
|
862 |
#'bounds:' #(#Rectangle 0 0 255 292)
|
|
863 |
)
|
|
864 |
)
|
50
|
865 |
!
|
|
866 |
|
|
867 |
nameAndSelectorSpec
|
|
868 |
"this window spec was automatically generated by the ST/X UIPainter"
|
|
869 |
|
|
870 |
"do not manually edit this - the painter/builder may not be able to
|
|
871 |
handle the specification if its corrupted."
|
|
872 |
|
|
873 |
"UIPainter new openOnClass:NewApplication andSelector:#windowSpec"
|
|
874 |
"NewApplication new openInterface:#windowSpec"
|
|
875 |
"NewApplication open"
|
|
876 |
|
|
877 |
<resource: #canvas>
|
|
878 |
|
|
879 |
^
|
|
880 |
|
|
881 |
#(#FullSpec
|
|
882 |
#'window:'
|
|
883 |
#(#WindowSpec
|
|
884 |
#'layout:' #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
885 |
#'label:' 'unnamed'
|
|
886 |
#'bounds:' #(#Rectangle 0 0 300 300)
|
|
887 |
)
|
|
888 |
#'component:'
|
|
889 |
#(#SpecCollection
|
|
890 |
#'collection:'
|
|
891 |
#(
|
|
892 |
#(#LabelSpec
|
|
893 |
#'name:' 'label1'
|
|
894 |
#'layout:' #(#LayoutFrame 10 0 50 0 110 0 70 0)
|
|
895 |
#'label:' 'class:'
|
|
896 |
#'adjust:' #right
|
|
897 |
)
|
|
898 |
#(#LabelSpec
|
|
899 |
#'name:' 'label2'
|
|
900 |
#'layout:' #(#LayoutFrame 10 0 90 0 110 0 110 0)
|
|
901 |
#'label:' 'superclass:'
|
|
902 |
#'adjust:' #right
|
|
903 |
)
|
|
904 |
#(#LabelSpec
|
|
905 |
#'name:' 'label3'
|
|
906 |
#'layout:' #(#LayoutFrame 10 0 130 0 110 0 150 0)
|
|
907 |
#'label:' 'selector:'
|
|
908 |
#'adjust:' #right
|
|
909 |
)
|
|
910 |
#(#InputFieldSpec
|
|
911 |
#'name:' 'classNameField'
|
|
912 |
#'layout:' #(#LayoutFrame 120 0 50 0 289 0 69 0)
|
|
913 |
#'model:' #classNameChannel
|
|
914 |
#'immediateAccept:' false
|
|
915 |
#'acceptOnLeave:' true
|
|
916 |
#'acceptOnReturn:' true
|
|
917 |
#'acceptOnTab:' true
|
|
918 |
)
|
|
919 |
#(#InputFieldSpec
|
|
920 |
#'name:' 'superclassNameField'
|
|
921 |
#'layout:' #(#LayoutFrame 120 0 90 0 289 0 109 0)
|
|
922 |
#'model:' #superclassNameChannel
|
|
923 |
#'immediateAccept:' false
|
|
924 |
#'acceptOnLeave:' true
|
|
925 |
#'acceptOnReturn:' true
|
|
926 |
#'acceptOnTab:' true
|
|
927 |
)
|
|
928 |
#(#InputFieldSpec
|
|
929 |
#'name:' 'methodNameField'
|
|
930 |
#'layout:' #(#LayoutFrame 120 0 130 0 289 0 149 0)
|
|
931 |
#'model:' #methodNameChannel
|
|
932 |
#'immediateAccept:' false
|
|
933 |
#'acceptOnLeave:' true
|
|
934 |
#'acceptOnReturn:' true
|
|
935 |
#'acceptOnTab:' true
|
|
936 |
)
|
|
937 |
#(#ActionButtonSpec
|
|
938 |
#'name:' 'button1'
|
|
939 |
#'layout:' #(#LayoutFrame 30 0 250 0 129 0 279 0)
|
|
940 |
#'label:' 'cancel'
|
|
941 |
#'model:' #cancelClicked
|
|
942 |
)
|
|
943 |
#(#ActionButtonSpec
|
|
944 |
#'name:' 'button2'
|
|
945 |
#'layout:' #(#LayoutFrame 160 0 250 0 259 0 279 0)
|
|
946 |
#'label:' 'ok'
|
|
947 |
#'model:' #okClicked
|
|
948 |
)
|
|
949 |
)
|
|
950 |
)
|
|
951 |
)
|
|
952 |
|
|
953 |
|
|
954 |
|
42
|
955 |
! !
|
|
956 |
|
|
957 |
!UIPainter methodsFor:'BuilderView interface'!
|
|
958 |
|
|
959 |
setUndoLabel:aString
|
|
960 |
aString isNil ifTrue:[
|
|
961 |
(menu menuAt:#edit) labelAt:#undoAction put:'undo'.
|
|
962 |
(menu menuAt:#edit) disable:#undoAction
|
|
963 |
] ifFalse:[
|
|
964 |
(menu menuAt:#edit) labelAt:#undoAction put:'undo: ' , aString.
|
|
965 |
(menu menuAt:#edit) enable:#undoAction
|
|
966 |
]
|
|
967 |
!
|
|
968 |
|
|
969 |
update:something with:parameter
|
|
970 |
|singleSelection|
|
|
971 |
|
|
972 |
elementMenu deselect.
|
|
973 |
|
|
974 |
something == #undoHistory ifTrue:[
|
|
975 |
^ self setUndoLabel:parameter
|
|
976 |
].
|
|
977 |
|
|
978 |
singleSelection := workView singleSelection.
|
|
979 |
|
|
980 |
(something == #layout or:[something == #any]) ifTrue:[
|
|
981 |
singleSelection notNil ifTrue:[
|
|
982 |
self fetchLayoutFrom:singleSelection
|
|
983 |
].
|
|
984 |
^ self
|
|
985 |
].
|
|
986 |
|
|
987 |
(something == #aspects or:[something == #any]) ifTrue:[
|
|
988 |
singleSelection notNil ifTrue:[
|
|
989 |
self fetchModelAspectsFrom:singleSelection
|
|
990 |
].
|
|
991 |
^ self
|
|
992 |
].
|
|
993 |
|
|
994 |
(something == #selection or:[something == #any]) ifTrue:[
|
|
995 |
self showPropertyView.
|
|
996 |
self showOutletsFor:(workView selection).
|
|
997 |
|
|
998 |
singleSelection isNil ifFalse:[
|
|
999 |
nameChannel isNil ifTrue:[self nameChannel].
|
|
1000 |
nameChannel value:singleSelection name.
|
|
1001 |
|
|
1002 |
self fetchLayoutFrom:singleSelection.
|
|
1003 |
self fetchModelAspectsFrom:singleSelection.
|
|
1004 |
].
|
|
1005 |
^ self
|
|
1006 |
].
|
|
1007 |
! !
|
|
1008 |
|
|
1009 |
!UIPainter methodsFor:'aspects'!
|
|
1010 |
|
50
|
1011 |
aspectFor:aKey
|
|
1012 |
^ aspectHolders at:aKey ifAbsent:[super aspectFor:aKey]
|
42
|
1013 |
!
|
|
1014 |
|
|
1015 |
backgroundChannel
|
|
1016 |
^ bgChannel
|
|
1017 |
!
|
|
1018 |
|
|
1019 |
bottomFractionChannel
|
|
1020 |
^ bottomFractionHolder
|
|
1021 |
!
|
|
1022 |
|
|
1023 |
bottomOffsetChannel
|
|
1024 |
^ bottomOffsetHolder
|
|
1025 |
|
|
1026 |
!
|
|
1027 |
|
|
1028 |
foregroundChannel
|
|
1029 |
^ fgChannel
|
|
1030 |
!
|
|
1031 |
|
|
1032 |
leftAlignmentFractionChannel
|
|
1033 |
^ leftAlignmentFractionHolder
|
|
1034 |
|
|
1035 |
!
|
|
1036 |
|
|
1037 |
leftFractionChannel
|
|
1038 |
^ leftFractionHolder
|
|
1039 |
|
|
1040 |
!
|
|
1041 |
|
|
1042 |
leftOffsetChannel
|
|
1043 |
^ leftOffsetHolder
|
|
1044 |
|
|
1045 |
!
|
|
1046 |
|
|
1047 |
nameChannel
|
|
1048 |
nameChannel isNil ifTrue:[
|
|
1049 |
nameChannel := '' asValue.
|
|
1050 |
].
|
|
1051 |
^ nameChannel
|
|
1052 |
|
|
1053 |
"Modified: 6.9.1995 / 00:38:00 / claus"
|
|
1054 |
!
|
|
1055 |
|
|
1056 |
rightFractionChannel
|
|
1057 |
^ rightFractionHolder
|
|
1058 |
|
|
1059 |
!
|
|
1060 |
|
|
1061 |
rightOffsetChannel
|
|
1062 |
^ rightOffsetHolder
|
|
1063 |
|
|
1064 |
!
|
|
1065 |
|
|
1066 |
topAlignmentFractionChannel
|
|
1067 |
^ topAlignmentFractionHolder
|
|
1068 |
|
|
1069 |
!
|
|
1070 |
|
|
1071 |
topFractionChannel
|
|
1072 |
^ topFractionHolder
|
|
1073 |
|
|
1074 |
!
|
|
1075 |
|
|
1076 |
topOffsetChannel
|
|
1077 |
^ topOffsetHolder
|
|
1078 |
|
|
1079 |
! !
|
|
1080 |
|
|
1081 |
!UIPainter methodsFor:'filein & fileout'!
|
|
1082 |
|
|
1083 |
openFile:aFileName
|
|
1084 |
|aStream |
|
|
1085 |
|
|
1086 |
aStream := FileStream readonlyFileNamed:aFileName.
|
|
1087 |
aStream notNil ifTrue:[
|
|
1088 |
workView fileInContentsFrom:aStream.
|
|
1089 |
aStream close.
|
|
1090 |
currentFileName := aFileName
|
|
1091 |
]
|
|
1092 |
|
|
1093 |
!
|
|
1094 |
|
|
1095 |
saveAs:aFileName
|
|
1096 |
|aStream|
|
|
1097 |
|
|
1098 |
aStream := FileStream newFileNamed:aFileName.
|
|
1099 |
aStream notNil ifTrue:[
|
|
1100 |
workView storeContentsOn:aStream.
|
|
1101 |
aStream close
|
|
1102 |
].
|
|
1103 |
currentFileName := aFileName
|
|
1104 |
|
|
1105 |
! !
|
|
1106 |
|
|
1107 |
!UIPainter methodsFor:'help'!
|
|
1108 |
|
|
1109 |
helpTextFor:aComponent
|
|
1110 |
|sel|
|
|
1111 |
|
|
1112 |
(aComponent isKindOf:Button) ifTrue:[
|
|
1113 |
(sel := aComponent changeMessage) notNil ifTrue:[
|
|
1114 |
"/ take the buttons change symbol as resource-key
|
|
1115 |
^ resources string:(sel asString)
|
|
1116 |
]
|
|
1117 |
].
|
|
1118 |
^ nil
|
|
1119 |
|
|
1120 |
"Modified: 31.8.1995 / 20:49:58 / claus"
|
|
1121 |
! !
|
|
1122 |
|
|
1123 |
!UIPainter methodsFor:'initialization'!
|
|
1124 |
|
|
1125 |
buttonPanelSpec
|
|
1126 |
"return a spec for the buttons in the panel;
|
|
1127 |
entries consists of selector and bitmap-filename.
|
|
1128 |
nil selectors are taken as separators (see setupButtonPanel)"
|
|
1129 |
|
|
1130 |
^ #(
|
|
1131 |
#(alignSelectionLeft true 'b_alignL.xbm' nil false)
|
|
1132 |
#(alignSelectionRight true 'b_alignR.xbm' nil false)
|
|
1133 |
#(alignSelectionLeftAndRight true 'b_alignLR.xbm' nil false)
|
|
1134 |
#(nil nil nil nil)
|
|
1135 |
#(alignSelectionTop true 'b_alignT.xbm' nil false)
|
|
1136 |
#(alignSelectionBottom true 'b_alignB.xbm' nil false)
|
|
1137 |
#(alignSelectionTopAndBottom true 'b_alignTB.xbm' nil false)
|
|
1138 |
#(nil nil nil nil)
|
|
1139 |
#(alignSelectionCenterHor true 'b_alignCH.xbm' nil false)
|
|
1140 |
#(alignSelectionCenterVer true 'b_alignCV.xbm' nil false)
|
|
1141 |
#(nil nil nil nil)
|
|
1142 |
#(moveSelectionLeft true 'b_moveLeft.xbm' nil true)
|
|
1143 |
#(moveSelectionRight true 'b_moveRight.xbm' nil true)
|
|
1144 |
#(moveSelectionUp true 'b_moveUp.xbm' nil true)
|
|
1145 |
#(moveSelectionDown true 'b_moveDown.xbm' nil true)
|
|
1146 |
#(moveSelectionLeft10 true 'b_moveLeft2.xbm' nil true)
|
|
1147 |
#(moveSelectionRight10 true 'b_moveRight2.xbm' nil true)
|
|
1148 |
#(moveSelectionUp10 true 'b_moveUp2.xbm' nil true)
|
|
1149 |
#(moveSelectionDown10 true 'b_moveDown2.xbm' nil true)
|
|
1150 |
)
|
|
1151 |
|
|
1152 |
"Modified: 5.9.1995 / 22:20:36 / claus"
|
|
1153 |
!
|
|
1154 |
|
|
1155 |
createCanvas
|
|
1156 |
|topView|
|
|
1157 |
|
|
1158 |
super initialize.
|
|
1159 |
|
|
1160 |
topView := StandardSystemView new.
|
|
1161 |
topView label:'unnamed'.
|
|
1162 |
topView extent:300@300.
|
|
1163 |
|
|
1164 |
workView := UIPainterView in:topView.
|
|
1165 |
workView layout:(0.0 @ 0.0 corner:1.0 @ 1.0) asLayout.
|
|
1166 |
|
|
1167 |
^ workView.
|
|
1168 |
|
|
1169 |
"Builder new createCanvas open"
|
|
1170 |
!
|
|
1171 |
|
|
1172 |
createPaletteIn:aViewOrNil
|
|
1173 |
|topView v|
|
|
1174 |
|
|
1175 |
aViewOrNil isNil ifTrue:[
|
|
1176 |
topView := StandardSystemView new.
|
|
1177 |
topView label:'element palette'.
|
|
1178 |
topView extent:200@400.
|
|
1179 |
] ifFalse:[
|
|
1180 |
topView := aViewOrNil
|
|
1181 |
].
|
|
1182 |
v := HVScrollableView for:SelectionInListView miniScrollerH:true in:topView.
|
|
1183 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
|
|
1184 |
elementMenu := v scrolledView.
|
|
1185 |
|
|
1186 |
^ elementMenu.
|
|
1187 |
|
|
1188 |
"(Builder new createPaletteIn:nil) topView open"
|
|
1189 |
|
|
1190 |
"Modified: 5.9.1995 / 23:52:57 / claus"
|
|
1191 |
!
|
|
1192 |
|
|
1193 |
initChannels
|
50
|
1194 |
aspectHolders := IdentityDictionary new.
|
|
1195 |
|
|
1196 |
aspectHolders at:#classNameChannel put:((specClass notNil ifTrue:[specClass name] ifFalse:['NewApplication']) asValue).
|
|
1197 |
aspectHolders at:#superclassNameChannel put:((specClass notNil ifTrue:[specClass superclass] ifFalse:[ApplicationModel]) name asValue).
|
|
1198 |
aspectHolders at:#methodNameChannel put:(specSelector asValue).
|
|
1199 |
|
|
1200 |
aspectHolders at:#aspectChannel put:(ValueHolder new).
|
|
1201 |
aspectHolders at:#changeChannel put:(ValueHolder new).
|
|
1202 |
|
|
1203 |
aspectHolders at:#foregroundChannel put:(ValueHolder new).
|
|
1204 |
aspectHolders at:#backgroundChannel put:(ValueHolder new).
|
|
1205 |
|
42
|
1206 |
|
|
1207 |
bottomFractionHolder := nil asValue.
|
|
1208 |
bottomOffsetHolder := nil asValue.
|
|
1209 |
leftFractionHolder := nil asValue.
|
|
1210 |
leftOffsetHolder := nil asValue.
|
|
1211 |
rightFractionHolder := nil asValue.
|
|
1212 |
rightOffsetHolder := nil asValue.
|
|
1213 |
topFractionHolder := nil asValue.
|
|
1214 |
topOffsetHolder := nil asValue.
|
|
1215 |
leftAlignmentFractionHolder := nil asValue.
|
|
1216 |
topAlignmentFractionHolder := nil asValue.
|
|
1217 |
|
|
1218 |
!
|
|
1219 |
|
|
1220 |
initPullDownMenu
|
|
1221 |
menu labels:(resources array:#(
|
|
1222 |
'file'
|
|
1223 |
'edit'
|
|
1224 |
'font'
|
|
1225 |
'type'
|
|
1226 |
'align'
|
|
1227 |
'dimension'
|
|
1228 |
'form'
|
|
1229 |
'special'
|
|
1230 |
'code'
|
|
1231 |
'debug'
|
|
1232 |
'test'
|
|
1233 |
)).
|
|
1234 |
|
|
1235 |
menu selectors:#(#file
|
|
1236 |
#edit
|
|
1237 |
#font
|
|
1238 |
#type
|
|
1239 |
#align
|
|
1240 |
#dimension
|
|
1241 |
#form
|
|
1242 |
#special
|
|
1243 |
#code
|
|
1244 |
#debugging
|
|
1245 |
#test
|
|
1246 |
).
|
|
1247 |
|
|
1248 |
menu at:#file
|
|
1249 |
putLabels:(resources array:
|
|
1250 |
#('new'
|
|
1251 |
'from class'
|
|
1252 |
'pick a view '
|
|
1253 |
'-'
|
|
1254 |
'save'
|
|
1255 |
'save as ...'
|
|
1256 |
'-'
|
|
1257 |
'compile'
|
|
1258 |
'-'
|
|
1259 |
'source'
|
|
1260 |
'windowSpec'
|
|
1261 |
'inspect me'
|
|
1262 |
'-'
|
|
1263 |
'print'
|
|
1264 |
'-'
|
|
1265 |
'quit'
|
|
1266 |
))
|
|
1267 |
selectors:#(doNew
|
|
1268 |
doFromClass
|
|
1269 |
doPickAView
|
|
1270 |
nil
|
|
1271 |
doSave
|
|
1272 |
doSaveAs
|
|
1273 |
nil
|
|
1274 |
doCompile
|
|
1275 |
nil
|
|
1276 |
doSource
|
|
1277 |
doWindowSpec
|
|
1278 |
inspect
|
|
1279 |
nil
|
|
1280 |
doPrint
|
|
1281 |
nil
|
|
1282 |
doFinish
|
|
1283 |
)
|
|
1284 |
receiver:self.
|
|
1285 |
|
|
1286 |
menu at:#edit
|
|
1287 |
putLabels:(resources array:#(
|
|
1288 |
'undo'
|
|
1289 |
"/ 'copy'
|
|
1290 |
'cut'
|
|
1291 |
"/ 'paste'
|
|
1292 |
))
|
|
1293 |
selectors:#(
|
|
1294 |
undoAction
|
|
1295 |
"/ copySelection
|
|
1296 |
deleteSelection
|
|
1297 |
"/ pasteBuffer
|
|
1298 |
)
|
|
1299 |
receiver:workView.
|
|
1300 |
|
|
1301 |
menu at:#font
|
|
1302 |
putLabels:(resources array:#(
|
|
1303 |
'larger'
|
|
1304 |
'smaller'
|
|
1305 |
'-'
|
|
1306 |
'normal'
|
|
1307 |
'bold'
|
|
1308 |
'italic'
|
|
1309 |
'bold italic'
|
|
1310 |
'-'
|
|
1311 |
'font panel'
|
|
1312 |
) )
|
|
1313 |
selectors:#(largerFont
|
|
1314 |
smallerFont
|
|
1315 |
nil
|
|
1316 |
normalFont
|
|
1317 |
boldFont
|
|
1318 |
italicFont
|
|
1319 |
boldItalicFont
|
|
1320 |
nil
|
|
1321 |
showFontPanel
|
|
1322 |
)
|
|
1323 |
receiver:workView.
|
|
1324 |
|
|
1325 |
menu at:#type
|
|
1326 |
putLabels:(resources array:#(
|
|
1327 |
'basic widgets'
|
|
1328 |
'layout'
|
|
1329 |
'text'
|
|
1330 |
'interactors'
|
|
1331 |
'modal'
|
|
1332 |
'other'
|
|
1333 |
'-'
|
|
1334 |
'all'
|
|
1335 |
) )
|
|
1336 |
selectors:#(showBasicWidgets
|
|
1337 |
showLayoutWidgets
|
|
1338 |
showTextWidgets
|
|
1339 |
showInteractorWidgets
|
|
1340 |
showModalWidgets
|
|
1341 |
showOtherWidgets
|
|
1342 |
nil
|
|
1343 |
showAllWidgets
|
|
1344 |
)
|
|
1345 |
receiver:self.
|
|
1346 |
|
|
1347 |
menu at:#align
|
|
1348 |
putLabels:(resources array:#(
|
|
1349 |
"/ 'raise'
|
|
1350 |
"/ 'lower'
|
|
1351 |
"/ '-'
|
|
1352 |
'align left'
|
|
1353 |
'align right'
|
|
1354 |
'align left & right'
|
|
1355 |
'align top'
|
|
1356 |
'align bottom'
|
|
1357 |
'align centered vertical'
|
|
1358 |
'align centered horizontal'
|
|
1359 |
'-'
|
|
1360 |
'spread horizontal'
|
|
1361 |
'spread vertical'
|
|
1362 |
'center horizontal in frame'
|
|
1363 |
'center vertical in frame'
|
|
1364 |
) )
|
|
1365 |
selectors:#(
|
|
1366 |
"/ raiseSelection
|
|
1367 |
"/ lowerSelection
|
|
1368 |
"/ nil
|
|
1369 |
alignSelectionLeft
|
|
1370 |
alignSelectionRight
|
|
1371 |
alignSelectionLeftAndRight
|
|
1372 |
alignSelectionTop
|
|
1373 |
alignSelectionBottom
|
|
1374 |
alignSelectionCenterHor
|
|
1375 |
alignSelectionCenterVer
|
|
1376 |
nil
|
|
1377 |
spreadSelectionHor
|
|
1378 |
spreadSelectionVer
|
|
1379 |
centerSelectionHor
|
|
1380 |
centerSelectionVer
|
|
1381 |
)
|
|
1382 |
receiver:workView.
|
|
1383 |
|
|
1384 |
menu at:#dimension
|
|
1385 |
putLabels:(resources array:#(
|
|
1386 |
'default extent'
|
|
1387 |
'default width'
|
|
1388 |
'default height'
|
|
1389 |
'-'
|
|
1390 |
'copy extent'
|
|
1391 |
'paste extent'
|
|
1392 |
'paste width'
|
|
1393 |
'paste height'
|
|
1394 |
'-'
|
|
1395 |
'insert'
|
|
1396 |
) )
|
|
1397 |
selectors:#(
|
|
1398 |
setToDefaultExtent
|
|
1399 |
setToDefaultWidth
|
|
1400 |
setToDefaultHeight
|
|
1401 |
nil
|
|
1402 |
copyExtent
|
|
1403 |
pasteExtent
|
|
1404 |
pasteWidth
|
|
1405 |
pasteHeight
|
|
1406 |
nil
|
|
1407 |
insertSelection
|
|
1408 |
)
|
|
1409 |
receiver:workView.
|
|
1410 |
|
|
1411 |
menu at:#form
|
|
1412 |
putLabels:(resources array:#(
|
|
1413 |
'align to grid'
|
|
1414 |
'show grid'
|
|
1415 |
) )
|
|
1416 |
selectors:#(
|
|
1417 |
alignOn
|
|
1418 |
toggleGrid
|
|
1419 |
)
|
|
1420 |
receiver:self.
|
|
1421 |
|
|
1422 |
menu at:#special
|
|
1423 |
putLabels:(resources array:#(
|
|
1424 |
'group radioButtons'
|
|
1425 |
'group enterFields'
|
|
1426 |
) )
|
|
1427 |
selectors:#(
|
|
1428 |
groupRadioButtons
|
|
1429 |
groupEnterFields
|
|
1430 |
)
|
|
1431 |
receiver:workView.
|
|
1432 |
|
|
1433 |
menu at:#code
|
|
1434 |
putLabels:(resources array:#(
|
50
|
1435 |
'class & method'
|
42
|
1436 |
) )
|
|
1437 |
selectors:#(
|
50
|
1438 |
defineClassAndSelector
|
42
|
1439 |
)
|
|
1440 |
receiver:self.
|
|
1441 |
|
|
1442 |
menu at:#debugging
|
|
1443 |
putLabels:(resources array:#(
|
|
1444 |
'inspect'
|
|
1445 |
'inspect attributes'
|
|
1446 |
) )
|
|
1447 |
selectors:#(
|
|
1448 |
inspectSelection
|
|
1449 |
inspectAttributes
|
|
1450 |
)
|
|
1451 |
receiver:workView.
|
|
1452 |
|
|
1453 |
menu at:#test
|
|
1454 |
putLabels:(resources array:#(
|
|
1455 |
'test on'
|
|
1456 |
) )
|
|
1457 |
selectors:#(toggleTest
|
|
1458 |
)
|
|
1459 |
receiver:self.
|
|
1460 |
|
|
1461 |
self setUndoLabel:nil.
|
|
1462 |
!
|
|
1463 |
|
|
1464 |
openInterface
|
|
1465 |
|list panel topPane botPanel v
|
|
1466 |
leftPanel middlePanel rightPanel buttonPanel propSelector|
|
|
1467 |
|
|
1468 |
super initialize.
|
|
1469 |
|
|
1470 |
self initChannels.
|
|
1471 |
|
|
1472 |
whichProperty := SelectionInList new.
|
|
1473 |
whichProperty list:#('dimension' 'colors' 'model' 'misc' 'attribute list').
|
|
1474 |
whichProperty onChangeSend:#propertySelectionChanged to:self.
|
|
1475 |
|
|
1476 |
workView :=self createCanvas.
|
|
1477 |
|
|
1478 |
topView := StandardSystemView new.
|
|
1479 |
topView label:'Interface Builder'.
|
|
1480 |
topView icon:(Image fromFile:'bitmaps/Builder.xbm' resolution:100).
|
|
1481 |
topView extent:(600 @ 400).
|
|
1482 |
|
|
1483 |
menu := PullDownMenu in:topView.
|
|
1484 |
|
|
1485 |
buttonPanel := self setupButtonPanelIn:topView below:menu.
|
|
1486 |
|
|
1487 |
leftPanel := View in:topView.
|
|
1488 |
leftPanel origin:(0.0 @ 0.0) corner:0.3@1.0.
|
|
1489 |
leftPanel topInset:menu height + buttonPanel height + View viewSpacing.
|
|
1490 |
|
|
1491 |
middlePanel := View in:topView.
|
|
1492 |
middlePanel origin:(0.3 @ 0.0) corner:0.6@1.0.
|
|
1493 |
middlePanel topInset:menu height + buttonPanel height + View viewSpacing.
|
|
1494 |
|
|
1495 |
rightPanel := View in:topView.
|
|
1496 |
rightPanel origin:(0.6 @ 0.0) corner:1.0@1.0.
|
|
1497 |
rightPanel topInset:menu height + buttonPanel height + View viewSpacing.
|
|
1498 |
|
46
|
1499 |
v := HVScrollableView for:UIPainterTreeView miniScrollerH:true in:middlePanel.
|
42
|
1500 |
v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
|
|
1501 |
treeView := v scrolledView.
|
|
1502 |
|
|
1503 |
propSelector := PopUpList label:'properties' in:rightPanel.
|
|
1504 |
propSelector origin:(0.0 @ 0.0) corner:1.0@(propSelector preferredExtent y).
|
|
1505 |
propSelector horizontalInset:View viewSpacing.
|
|
1506 |
propSelector model:whichProperty.
|
|
1507 |
|
|
1508 |
propertyFrame := View in:rightPanel.
|
|
1509 |
propertyFrame origin:(0.0 @ 0.0) corner:1.0@1.0.
|
|
1510 |
propertyFrame topInset:propSelector height + View viewSpacing.
|
|
1511 |
|
|
1512 |
"/ panel := VariableVerticalPanel in:topView.
|
|
1513 |
"/ panel origin:(0.0 @ 0.0) corner:0.5@1.0.
|
|
1514 |
"/ panel topInset:menu height + buttonPanel height + View viewSpacing.
|
|
1515 |
|
|
1516 |
"/ topPane := View in:panel.
|
|
1517 |
"/ topPane origin:(0.0 @ 0.0) corner:(1.0 @ 0.5).
|
|
1518 |
"/ topPane borderWidth:0.
|
|
1519 |
|
|
1520 |
"/ botPanel := VariableHorizontalPanel in:panel.
|
|
1521 |
"/ botPanel origin:(0.0 @ 0.5) corner:(1.0 @ 1.0).
|
|
1522 |
"/ botPanel borderWidth:0.
|
|
1523 |
|
|
1524 |
elementMenu := self createPaletteIn:leftPanel.
|
|
1525 |
|
46
|
1526 |
"/ v := ScrollableView for:UIPainterTreeView in:botPanel.
|
42
|
1527 |
"/ v origin:(0.0 @ 0.0) corner:(0.5 @ 1.0).
|
|
1528 |
"/ treeView := v scrolledView.
|
|
1529 |
|
|
1530 |
"/ v := ScrollableView for:SelectionInListView in:botPanel.
|
|
1531 |
"/ v origin:(0.5 @ 0.0) corner:(1.0 @ 1.0).
|
|
1532 |
"/ outletView := v scrolledView.
|
|
1533 |
"/ outletView action:[:lineNr | self selectOutlet:lineNr].
|
|
1534 |
|
|
1535 |
"/ v := ScrollableView for:TextCollector in:topPane.
|
|
1536 |
"/ v origin:(0.0 @ 0.0) corner:(1.0 @ 1.0).
|
|
1537 |
"/ infoView := v scrolledView.
|
|
1538 |
|
|
1539 |
treeView builderView:workView. "link workview with treeview"
|
|
1540 |
|
|
1541 |
workView addDependent:treeView.
|
|
1542 |
workView addDependent:self.
|
|
1543 |
|
|
1544 |
self initPullDownMenu.
|
|
1545 |
|
|
1546 |
elementMenu action:[:selection |
|
|
1547 |
workView testMode ifTrue:[
|
|
1548 |
elementMenu deselect
|
|
1549 |
] ifFalse:[
|
|
1550 |
selection notNil ifTrue:[
|
|
1551 |
workView createWidgetWithClass:
|
|
1552 |
(Smalltalk at:(elementMenu selectionValue asSymbol))
|
|
1553 |
]
|
|
1554 |
]
|
|
1555 |
].
|
|
1556 |
topView application:self.
|
|
1557 |
builder window:topView.
|
|
1558 |
|
|
1559 |
topView beMaster.
|
|
1560 |
workView topView beSlave.
|
|
1561 |
|
|
1562 |
"/ can be created as embedded or side-menu
|
|
1563 |
elementMenu topView ~~ topView ifTrue:[
|
|
1564 |
elementMenu topView beSlave.
|
|
1565 |
].
|
|
1566 |
|
|
1567 |
topView open.
|
|
1568 |
workView topView openInGroup:(topView windowGroup).
|
|
1569 |
elementMenu topView ~~ topView ifTrue:[
|
|
1570 |
elementMenu topView openInGroup:(topView windowGroup).
|
|
1571 |
]
|
|
1572 |
|
|
1573 |
"
|
|
1574 |
Builder open
|
|
1575 |
"
|
|
1576 |
|
|
1577 |
"Modified: 6.9.1995 / 00:26:59 / claus"
|
|
1578 |
!
|
|
1579 |
|
|
1580 |
openNewWindowCanvas
|
|
1581 |
self open.
|
|
1582 |
|
|
1583 |
|
|
1584 |
!
|
|
1585 |
|
|
1586 |
openOnClass:aClass andSelector:aSelector
|
|
1587 |
"open up an interface builder, fetching a spec from someClass
|
|
1588 |
via some selector"
|
|
1589 |
|
|
1590 |
|specArray|
|
|
1591 |
|
|
1592 |
specClass := aClass.
|
|
1593 |
specSelector := aSelector.
|
50
|
1594 |
|
42
|
1595 |
self openInterface.
|
|
1596 |
workView className:aClass name.
|
|
1597 |
workView methodName:aSelector.
|
|
1598 |
workView setupFromSpec:(aClass perform:aSelector).
|
|
1599 |
!
|
|
1600 |
|
|
1601 |
openOnSpec:aSpecOrSpecArray
|
|
1602 |
"open up an interface builder, given some specArray"
|
|
1603 |
|
|
1604 |
|newBuilder|
|
|
1605 |
|
|
1606 |
newBuilder := self new.
|
|
1607 |
!
|
|
1608 |
|
|
1609 |
setupButtonPanelIn:aTopView below:aMenu
|
|
1610 |
"create the buttonPanel"
|
|
1611 |
|
|
1612 |
|spc mh buttonPanel|
|
|
1613 |
|
|
1614 |
spc := View viewSpacing // 2.
|
|
1615 |
buttonPanel := HorizontalPanelView in:aTopView.
|
|
1616 |
buttonPanel level:-1; borderWidth:0.
|
|
1617 |
buttonPanel horizontalLayout:#leftSpace.
|
|
1618 |
|
|
1619 |
self buttonPanelSpec do:[:entry |
|
|
1620 |
|sel toCanvas imgFile label b sep autoRepeat|
|
|
1621 |
|
|
1622 |
sel := entry at:1.
|
|
1623 |
sel isNil ifTrue:[
|
|
1624 |
sep := View in:buttonPanel.
|
|
1625 |
sep extent:20@1; borderWidth:0.
|
|
1626 |
] ifFalse:[
|
|
1627 |
toCanvas := entry at:2.
|
|
1628 |
imgFile := entry at:3.
|
|
1629 |
label := entry at:4.
|
|
1630 |
autoRepeat := entry at:5.
|
|
1631 |
b := Button in:buttonPanel.
|
|
1632 |
autoRepeat ifTrue:[
|
|
1633 |
b autoRepeat:autoRepeat.
|
|
1634 |
b controller beTriggerOnDown.
|
|
1635 |
].
|
|
1636 |
imgFile notNil ifTrue:[
|
|
1637 |
b logo:(Image fromFile:imgFile).
|
|
1638 |
] ifFalse:[
|
|
1639 |
b logo:label
|
|
1640 |
].
|
|
1641 |
toCanvas ifTrue:[
|
|
1642 |
b model:workView
|
|
1643 |
] ifFalse:[
|
|
1644 |
b model:self
|
|
1645 |
].
|
|
1646 |
b changeMessage:sel
|
|
1647 |
]
|
|
1648 |
].
|
|
1649 |
|
|
1650 |
mh := aMenu height.
|
|
1651 |
buttonPanel origin:0.0 @ (mh + spc)
|
|
1652 |
corner:(1.0 @ (mh + spc + buttonPanel preferredExtent y)).
|
|
1653 |
|
|
1654 |
buttonPanel leftInset:spc; rightInset:spc.
|
|
1655 |
^ buttonPanel
|
|
1656 |
|
|
1657 |
"Modified: 5.9.1995 / 22:23:13 / claus"
|
|
1658 |
! !
|
|
1659 |
|
|
1660 |
!UIPainter methodsFor:'misc'!
|
|
1661 |
|
|
1662 |
listOfOutletsFor:aViewClass
|
|
1663 |
"return a list of outlets for a view-class"
|
|
1664 |
|
|
1665 |
|l1 l2 all rej|
|
|
1666 |
|
|
1667 |
(aViewClass == Object) ifTrue:[^ nil].
|
|
1668 |
|
|
1669 |
l1 := self listOfOutletsFor:(aViewClass superclass).
|
|
1670 |
l2 := self listOfOutletsForClass:aViewClass.
|
|
1671 |
|
|
1672 |
l2 isNil ifTrue:[
|
|
1673 |
all := l1
|
|
1674 |
] ifFalse:[
|
|
|