66
|
1 |
'From Smalltalk/X, Version:2.10.5 on 11-apr-1995 at 9:42:52 am'!
|
|
2 |
|
|
3 |
WindowBuilder subclass:#UIBuilder
|
|
4 |
instanceVariableNames:''
|
|
5 |
classVariableNames:'Verbose'
|
|
6 |
poolDictionaries:''
|
|
7 |
category:'Interface-Support'
|
|
8 |
!
|
|
9 |
|
|
10 |
!UIBuilder class methodsFor:'documentation'!
|
|
11 |
|
|
12 |
documentation
|
|
13 |
"
|
|
14 |
this class will (eventually) allow parsing windowSpecs as
|
|
15 |
created by ST-80's UIPainter, and thereby allow to run applications
|
|
16 |
built with this tool.
|
|
17 |
It was created to allow execution of PD applications which were
|
|
18 |
written using that tool (and more and more are appearing ...).
|
|
19 |
|
|
20 |
The class is not completed yet and certainly not bug free.
|
|
21 |
Also, it is not quaranteed that all winSpecs are understood.
|
|
22 |
"
|
|
23 |
! !
|
|
24 |
|
|
25 |
!UIBuilder class methodsFor:'initialization'!
|
|
26 |
|
|
27 |
initialize
|
|
28 |
Verbose := false "/ debugging flag
|
|
29 |
! !
|
|
30 |
|
|
31 |
!UIBuilder methodsFor:'operation'!
|
|
32 |
|
|
33 |
buildFromSpec:aSpec
|
|
34 |
self readSpec:aSpec.
|
|
35 |
^ topView
|
|
36 |
! !
|
|
37 |
|
|
38 |
!UIBuilder methodsFor:'private spec component parsing'!
|
|
39 |
|
|
40 |
xLabelSpec:aSpec view:aView
|
|
41 |
|l|
|
|
42 |
|
|
43 |
l := Label in:aView.
|
|
44 |
self fixFontFor:l.
|
|
45 |
self doSpec:aSpec for:l
|
|
46 |
|
|
47 |
!
|
|
48 |
|
|
49 |
xFullSpec:aSpec
|
|
50 |
topView := StandardSystemView new.
|
|
51 |
topView controller:(ApplicationController new).
|
|
52 |
topView application:application.
|
|
53 |
|
|
54 |
self doSpec:aSpec for:topView.
|
|
55 |
^ topView
|
|
56 |
!
|
|
57 |
|
|
58 |
xSpecCollection:aSpec view:aView
|
|
59 |
self doSpec:aSpec for:aView
|
|
60 |
|
|
61 |
!
|
|
62 |
|
|
63 |
xWindowSpec:aSpec view:aView
|
|
64 |
self doSpec:aSpec for:aView
|
|
65 |
|
|
66 |
!
|
|
67 |
|
|
68 |
xInputFieldSpec:aSpec view:aView
|
|
69 |
|l|
|
|
70 |
|
|
71 |
l := EditField in:aView.
|
|
72 |
self fixFontFor:l.
|
|
73 |
l aspect:#value; change:#value:.
|
|
74 |
self doSpec:aSpec for:l
|
|
75 |
!
|
|
76 |
|
|
77 |
xActionButtonSpec:aSpec view:aView
|
|
78 |
|b|
|
|
79 |
|
|
80 |
b := Button in:aView.
|
|
81 |
self fixFontFor:b.
|
|
82 |
self doSpec:aSpec for:b
|
|
83 |
!
|
|
84 |
|
|
85 |
xSequenceViewSpec:aSpec view:aView
|
|
86 |
|f s|
|
|
87 |
|
|
88 |
f := ScrollableView for:SelectionInListView in:aView.
|
|
89 |
s := f scrolledView.
|
|
90 |
self doSpec:aSpec for:s frame:f.
|
|
91 |
s
|
|
92 |
aspect:#value;
|
|
93 |
change:#value:;
|
|
94 |
listSymbol:#list
|
|
95 |
!
|
|
96 |
|
|
97 |
xScrollerSpec:aSpec view:aView
|
|
98 |
|s idx orientation|
|
|
99 |
|
|
100 |
idx := aSpec indexOf:#orientation:.
|
|
101 |
idx == 0 ifTrue:[
|
|
102 |
orientation := #vertical
|
|
103 |
] ifFalse:[
|
|
104 |
orientation := aSpec at:(idx + 1)
|
|
105 |
].
|
|
106 |
orientation == #horizontal ifTrue:[
|
|
107 |
s := HorizontalScroller in:aView
|
|
108 |
] ifFalse:[
|
|
109 |
s := Scroller in:aView
|
|
110 |
].
|
|
111 |
self doSpec:aSpec for:s
|
|
112 |
!
|
|
113 |
|
|
114 |
xProgressIndicatorSpec:aSpec view:aView
|
|
115 |
|s|
|
|
116 |
|
|
117 |
s := ProgressIndicator in:aView.
|
|
118 |
self doSpec:aSpec for:s
|
|
119 |
!
|
|
120 |
|
|
121 |
xSliderSpec:aSpec view:aView
|
|
122 |
|s idx orientation|
|
|
123 |
|
|
124 |
idx := aSpec indexOf:#orientation:.
|
|
125 |
idx == 0 ifTrue:[
|
|
126 |
orientation := #vertical
|
|
127 |
] ifFalse:[
|
|
128 |
orientation := aSpec at:(idx + 1)
|
|
129 |
].
|
|
130 |
orientation == #horizontal ifTrue:[
|
|
131 |
s := HorizontalSlider in:aView
|
|
132 |
] ifFalse:[
|
|
133 |
s := Slider in:aView
|
|
134 |
].
|
|
135 |
self doSpec:aSpec for:s
|
|
136 |
!
|
|
137 |
|
|
138 |
xCompositeSpecCollection:aSpec view:aView
|
|
139 |
|v|
|
|
140 |
|
|
141 |
"/ 'compositeSpecCollection ignoed' printNL.
|
|
142 |
"/ ^ self.
|
|
143 |
v := View in:aView.
|
|
144 |
self doSpec:aSpec for:v
|
|
145 |
|
|
146 |
!
|
|
147 |
|
|
148 |
xArbitraryComponentSpec:aSpec view:aView
|
|
149 |
|v|
|
|
150 |
|
|
151 |
"/ v := View in:aView.
|
|
152 |
v := Label label:'ArbitraryView' in:aView.
|
|
153 |
v level:-1.
|
|
154 |
self doSpec:aSpec for:v
|
|
155 |
!
|
|
156 |
|
|
157 |
xCheckBoxSpec:aSpec view:aView
|
|
158 |
|b|
|
|
159 |
|
|
160 |
b := CheckBox in:aView.
|
|
161 |
self fixFontFor:b.
|
|
162 |
self doSpec:aSpec for:b
|
|
163 |
|
|
164 |
!
|
|
165 |
|
|
166 |
xTableViewSpec:aSpec view:aView
|
|
167 |
|l|
|
|
168 |
|
|
169 |
'tableView ignored' printNL.
|
|
170 |
l := Label label:'TableView' in:aView.
|
|
171 |
l level:-1.
|
|
172 |
self doSpec:aSpec for:l
|
|
173 |
!
|
|
174 |
|
|
175 |
xGroupBoxSpec:aSpec view:aView
|
|
176 |
|l|
|
|
177 |
|
|
178 |
l := FramedBox in:aView.
|
|
179 |
self doSpec:aSpec for:l
|
|
180 |
!
|
|
181 |
|
|
182 |
xDividerSpec:aSpec view:aView
|
|
183 |
|l|
|
|
184 |
|
|
185 |
l := View in:aView.
|
|
186 |
self doSpec:aSpec for:l
|
|
187 |
! !
|
|
188 |
|
|
189 |
!UIBuilder methodsFor:'private spec attribute parsing'!
|
|
190 |
|
|
191 |
yMultipleSelections:args view:aView
|
|
192 |
aView multipleSelectOk:args
|
|
193 |
!
|
|
194 |
|
|
195 |
yBounds:args view:aView frame:frameView
|
|
196 |
|value r|
|
|
197 |
|
|
198 |
value := self getArg:args.
|
|
199 |
(value at:1) == #rectangle ifTrue:[
|
|
200 |
r := value at:2.
|
|
201 |
aView origin:r origin corner:r corner.
|
|
202 |
^ self
|
|
203 |
].
|
|
204 |
self halt:'unimplemented'.
|
|
205 |
!
|
|
206 |
|
|
207 |
yCollection:args view:aView frame:frameView
|
|
208 |
args do:[:aSpec |
|
|
209 |
self readSpec:aSpec view:aView frame:frameView.
|
|
210 |
].
|
|
211 |
!
|
|
212 |
|
|
213 |
yComponent:args view:aView frame:frameView
|
|
214 |
|v|
|
|
215 |
|
|
216 |
args isSymbol ifTrue:[
|
|
217 |
v := application perform:args.
|
|
218 |
aView addSubView:v
|
|
219 |
] ifFalse:[
|
|
220 |
v := View origin:0.0@0.0 corner:1.0@1.0 in:aView.
|
|
221 |
self readSpec:args view:v frame:frameView.
|
|
222 |
]
|
|
223 |
!
|
|
224 |
|
|
225 |
yColors:args view:aView frame:frameView
|
|
226 |
|value|
|
|
227 |
|
|
228 |
value := self getArg:args.
|
|
229 |
self halt:'unimplemented'.
|
|
230 |
!
|
|
231 |
|
|
232 |
yCompositeSpec:args view:aView frame:frameView
|
|
233 |
|value r|
|
|
234 |
|
|
235 |
self doSpec:args for:aView.
|
|
236 |
"
|
|
237 |
value := self getArg:args.
|
|
238 |
(value at:1) == #rectangle ifTrue:[
|
|
239 |
r := value at:2.
|
|
240 |
aView origin:r origin corner:r corner.
|
|
241 |
^ self
|
|
242 |
].
|
|
243 |
|
|
244 |
self halt.
|
|
245 |
"
|
|
246 |
!
|
|
247 |
|
|
248 |
yDefaultable:args view:aView frame:frameView
|
|
249 |
'defaultable ignored' printNL
|
|
250 |
!
|
|
251 |
|
|
252 |
yLabel:args view:aView frame:frameView
|
|
253 |
aView label:args.
|
|
254 |
|
|
255 |
!
|
|
256 |
|
|
257 |
yLayout:args view:aView frame:frameView
|
|
258 |
|value r org corn orgInset cornInset what|
|
|
259 |
|
|
260 |
value := self getArg:args.
|
|
261 |
|
|
262 |
what := value at:1.
|
|
263 |
what == #point ifTrue:[
|
|
264 |
Verbose ifTrue:[frameView print. ' ' print. 'origin: ' print. (value at:2) printNL].
|
|
265 |
frameView origin:(value at:2).
|
|
266 |
^ self
|
|
267 |
].
|
|
268 |
what == #rectangle ifTrue:[
|
|
269 |
r := value at:2.
|
|
270 |
Verbose ifTrue:[
|
|
271 |
frameView print. ' ' print. 'origin: ' print. r origin print.
|
|
272 |
' corner: ' print. r corner printNL.
|
|
273 |
].
|
|
274 |
frameView origin:r origin corner:r corner.
|
|
275 |
^ self
|
|
276 |
].
|
|
277 |
what == #layoutOrigin ifTrue:[
|
|
278 |
"/ #layoutOrigin relOrg orgInset
|
|
279 |
org := value at:2. "/ relative origin
|
|
280 |
org := org x asFloat @ org y asFloat.
|
|
281 |
orgInset := self fixExtentFor:(value at:3).
|
|
282 |
Verbose ifTrue:[
|
|
283 |
frameView print. ' ' print. 'origin: ' print. org printNL
|
|
284 |
].
|
|
285 |
frameView origin:org.
|
|
286 |
frameView
|
|
287 |
leftInset:orgInset x;
|
|
288 |
topInset:orgInset y.
|
|
289 |
^ self
|
|
290 |
].
|
|
291 |
what == #layoutFrame ifTrue:[
|
|
292 |
"/ #layoutFrame orgInset cornInset relOrg relCorner
|
|
293 |
|
|
294 |
org := value at:4. "/ relative origin
|
|
295 |
orgInset := self fixExtentFor:(value at:2).
|
|
296 |
|
|
297 |
org := org x asFloat @ org y asFloat.
|
|
298 |
"/ org = (0@0) ifTrue:[
|
|
299 |
"/ org := value at:2 "/ absolute origin
|
|
300 |
"/ ].
|
|
301 |
|
|
302 |
corn := value at:5. "/ relative corner
|
|
303 |
cornInset := self fixExtentFor:(value at:3).
|
|
304 |
corn := corn x asFloat @ corn y asFloat.
|
|
305 |
"/ corn = (0@0) ifTrue:[
|
|
306 |
"/ corn := value at:3 "/ absolute corner
|
|
307 |
"/ ].
|
|
308 |
Verbose ifTrue:[
|
|
309 |
frameView print. ' ' print. 'origin: ' print. org print.
|
|
310 |
' corner: ' print. corn printNL.
|
|
311 |
].
|
|
312 |
frameView origin:org corner:corn.
|
|
313 |
frameView leftInset:orgInset x;
|
|
314 |
topInset:orgInset y;
|
|
315 |
rightInset:cornInset x negated;
|
|
316 |
bottomInset:cornInset y negated.
|
|
317 |
frameView sizeFixed:true.
|
|
318 |
^ self
|
|
319 |
].
|
|
320 |
what == #alignmentOrigin ifTrue:[
|
|
321 |
org := value at:3. "/ relative origin
|
|
322 |
org = (0@0) ifTrue:[
|
|
323 |
org := value at:2 "/ absolute origin
|
|
324 |
].
|
|
325 |
Verbose ifTrue:[frameView print. ' ' print. 'origin: ' print. org printNL].
|
|
326 |
frameView origin:org.
|
|
327 |
^ self
|
|
328 |
].
|
|
329 |
|
|
330 |
self halt:'unimplemented'.
|
|
331 |
!
|
|
332 |
|
|
333 |
yFlags:args view:aView frame:frameView
|
|
334 |
'flags ignored' printNL
|
|
335 |
!
|
|
336 |
|
|
337 |
yIsDefault:args view:aView frame:frameView
|
|
338 |
aView isReturnButton:args
|
|
339 |
!
|
|
340 |
|
|
341 |
yMin:args view:aView frame:frameView
|
|
342 |
|value|
|
|
343 |
|
|
344 |
value := self getArg:args.
|
|
345 |
(value at:1) == #point ifTrue:[
|
|
346 |
aView minExtent:(value at:2).
|
|
347 |
^ self
|
|
348 |
].
|
|
349 |
self halt:'unimplemented'.
|
|
350 |
!
|
|
351 |
|
|
352 |
yModel:args view:aView frame:frameView
|
|
353 |
|model|
|
|
354 |
|
|
355 |
(aspects notNil and:[aspects includesKey:args]) ifTrue:[
|
|
356 |
model := aspects at:args
|
|
357 |
] ifFalse:[
|
|
358 |
model := application perform:args
|
|
359 |
].
|
|
360 |
aView model:model.
|
|
361 |
!
|
|
362 |
|
|
363 |
yIsOpaque:args view:aView frame:frameView
|
|
364 |
'isOpaque ignored' printNL.
|
|
365 |
!
|
|
366 |
|
|
367 |
yIsReadOnly:args view:aView frame:frameView
|
|
368 |
args ifTrue:[
|
|
369 |
aView readOnly
|
|
370 |
]
|
|
371 |
!
|
|
372 |
|
|
373 |
yMax:args view:aView frame:frameView
|
|
374 |
|value|
|
|
375 |
|
|
376 |
value := self getArg:args.
|
|
377 |
(value at:1) == #point ifTrue:[
|
|
378 |
aView maxExtent:(value at:2).
|
|
379 |
^ self
|
|
380 |
].
|
|
381 |
self halt:'unimplemented'.
|
|
382 |
!
|
|
383 |
|
|
384 |
yMenu:args view:aView frame:frameView
|
|
385 |
'menu ignored' printNL
|
|
386 |
!
|
|
387 |
|
|
388 |
yName:args view:aView frame:frameView
|
|
389 |
components isNil ifTrue:[
|
|
390 |
components := Dictionary new.
|
|
391 |
].
|
|
392 |
components at:args put:aView
|
|
393 |
|
|
394 |
!
|
|
395 |
|
|
396 |
yOrientation:args view:aView frame:frameView
|
|
397 |
'orientation ignored' printNL.
|
|
398 |
!
|
|
399 |
|
|
400 |
ySelectionStyle:args view:aView frame:frameView
|
|
401 |
'selectionStyle ignored' printNL.
|
|
402 |
|
|
403 |
!
|
|
404 |
|
|
405 |
yTabable:args view:aView frame:frameView
|
|
406 |
args == true ifTrue:[
|
|
407 |
focusSequence isNil ifTrue:[
|
|
408 |
focusSequence := OrderedCollection new.
|
|
409 |
].
|
|
410 |
focusSequence add:aView.
|
|
411 |
'tabable element added' printNL.
|
|
412 |
]
|
|
413 |
!
|
|
414 |
|
|
415 |
yStart:args view:aView frame:frameView
|
|
416 |
'start ignored' printNL.
|
|
417 |
|
|
418 |
!
|
|
419 |
|
|
420 |
yStep:args view:aView frame:frameView
|
|
421 |
'step ignored' printNL.
|
|
422 |
|
|
423 |
!
|
|
424 |
|
|
425 |
yWindow:args view:aView frame:frameView
|
|
426 |
self readSpec:args view:aView frame:frameView.
|
|
427 |
!
|
|
428 |
|
|
429 |
yStop:args view:aView frame:frameView
|
|
430 |
'stop ignored' printNL.
|
|
431 |
|
|
432 |
!
|
|
433 |
|
|
434 |
yStyle:args view:aView frame:frameView
|
|
435 |
'name ignored' printNL.
|
|
436 |
|
|
437 |
!
|
|
438 |
|
|
439 |
yType:args view:aView frame:frameView
|
|
440 |
'type ignored' printNL.
|
|
441 |
! !
|
|
442 |
|
|
443 |
!UIBuilder methodsFor:'private arg parsing'!
|
|
444 |
|
|
445 |
getArg:spec
|
|
446 |
"take something like #(Point 50 100) and return the value"
|
|
447 |
|
|
448 |
|what|
|
|
449 |
|
|
450 |
what := spec at:1.
|
|
451 |
^ self perform:('get' , what , ':') asSymbol with:spec
|
|
452 |
!
|
|
453 |
|
|
454 |
getPoint:spec
|
|
455 |
"called for #(Point x y)"
|
|
456 |
|
|
457 |
^ Array with:#point
|
|
458 |
with:((spec at:2) @ (spec at:3))
|
|
459 |
!
|
|
460 |
|
|
461 |
getLayoutFrame:spec
|
|
462 |
"called for #(LayoutFrame absOrgX relOrgX absOrgY relOrgY absCornX relCornX absCornY relCornY)"
|
|
463 |
" 1 2 3 4 5 6 7 8 9"
|
|
464 |
^ Array with:#layoutFrame
|
|
465 |
with:((spec at:2) @ (spec at:4)) "/ org inset
|
|
466 |
with:((spec at:6) @ (spec at:8)) "/ corner inset
|
|
467 |
with:((spec at:3) @ (spec at:5)) "/ rel org
|
|
468 |
with:((spec at:7) @ (spec at:9)) "/ rel corn
|
|
469 |
|
|
470 |
!
|
|
471 |
|
|
472 |
getRectangle:spec
|
|
473 |
"called for #(Rectangle x y)"
|
|
474 |
|
|
475 |
^ Array with:#rectangle
|
|
476 |
with:(((spec at:2) @ (spec at:3)) corner:((spec at:4) @ (spec at:5)))
|
|
477 |
!
|
|
478 |
|
|
479 |
getLayoutOrigin:spec
|
|
480 |
"called for #(LayoutOrigin xInset relX yInset relY)"
|
|
481 |
|
|
482 |
^ Array with:#layoutOrigin
|
|
483 |
with:((spec at:3) @ (spec at:5)) "/ rels
|
|
484 |
with:((spec at:2) @ (spec at:4)) "/ insets
|
|
485 |
!
|
|
486 |
|
|
487 |
getCompositeSpec:spec
|
|
488 |
"called for #(CompositeSpec layout: #(orgx orgy cornx corny)"
|
|
489 |
|
|
490 |
|layout|
|
|
491 |
|
|
492 |
(spec at:2) == #layout: ifTrue:[
|
|
493 |
layout := spec at:3.
|
|
494 |
(layout at:1) == #Rectangle ifTrue:[
|
|
495 |
^ Rectangle
|
|
496 |
origin:(layout at:2) @ (layout at:3)
|
|
497 |
corner:(layout at:4) @ (layout at:5)
|
|
498 |
].
|
|
499 |
].
|
|
500 |
self halt:'unimplemented'.
|
|
501 |
!
|
|
502 |
|
|
503 |
getAlignmentOrigin:spec
|
|
504 |
"called for #(AlignmentOrigin ?x ?relX ?x ?y ?relY ?y)"
|
|
505 |
|
|
506 |
^ Array with:#alignmentOrigin
|
|
507 |
with:((spec at:2) @ (spec at:5)) "/ ?
|
|
508 |
with:((spec at:3) @ (spec at:6)) "/ rels ?
|
|
509 |
with:((spec at:4) @ (spec at:7)) "/ insets ?
|
|
510 |
|
|
511 |
|
|
512 |
!
|
|
513 |
|
|
514 |
getLookPreferences:spec
|
|
515 |
"called for #(LookPreferences setForegroundColor: (...) setBackgroundColor: (...) ...)"
|
|
516 |
|
|
517 |
|coll|
|
|
518 |
|
|
519 |
coll := OrderedCollection new.
|
|
520 |
2 to:spec size by:2 do:[:index |
|
|
521 |
coll add:
|
|
522 |
(Array with:(spec at:index)
|
|
523 |
with:(self getArg:(spec at:index+1)))
|
|
524 |
].
|
|
525 |
^ coll.
|
|
526 |
!
|
|
527 |
|
|
528 |
getColorValue:spec
|
|
529 |
"called for #(ColorValue #sym)
|
|
530 |
or #(ColorValue red green blue)"
|
|
531 |
|
|
532 |
|clr arg|
|
|
533 |
|
|
534 |
(arg := spec at:2) isSymbol ifTrue:[
|
|
535 |
(Color respondsTo:arg) ifTrue:[
|
|
536 |
^ Color perform:arg
|
|
537 |
].
|
|
538 |
^ Color name:arg asString ifIllegal:[Color black]
|
|
539 |
].
|
|
540 |
arg isInteger ifTrue:[
|
|
541 |
^ ColorValue scaledRed:arg
|
|
542 |
scaledGreen:(spec at:3)
|
|
543 |
scaledBlue:(spec at:4)
|
|
544 |
].
|
|
545 |
^ ColorValue red:arg
|
|
546 |
green:(spec at:3)
|
|
547 |
blue:(spec at:4)
|
|
548 |
|
|
549 |
|
|
550 |
! !
|
|
551 |
|
|
552 |
!UIBuilder methodsFor:'private spec parsing'!
|
|
553 |
|
|
554 |
doSpec:aSpec for:aView
|
|
555 |
^ self doSpec:aSpec for:aView frame:aView
|
|
556 |
!
|
|
557 |
|
|
558 |
add:aSpec
|
|
559 |
self readSpec:aSpec
|
|
560 |
!
|
|
561 |
|
|
562 |
readSpec:aSpec
|
|
563 |
|what|
|
|
564 |
|
|
565 |
what := aSpec first.
|
|
566 |
^ self perform:('x' , what , ':') asSymbol with:aSpec
|
|
567 |
!
|
|
568 |
|
|
569 |
doSpec:aSpec for:aView frame:frame
|
|
570 |
|state selector args argsToRead|
|
|
571 |
|
|
572 |
argsToRead := 0.
|
|
573 |
args := #().
|
|
574 |
aSpec from:2 to:(aSpec size) do:[:element |
|
|
575 |
argsToRead > 1 ifTrue:[
|
|
576 |
self halt.
|
|
577 |
] ifFalse:[
|
|
578 |
argsToRead == 1 ifTrue:[
|
|
579 |
args := element.
|
|
580 |
argsToRead := argsToRead - 1
|
|
581 |
] ifFalse:[
|
|
582 |
selector := element.
|
|
583 |
argsToRead := selector numArgs.
|
|
584 |
].
|
|
585 |
].
|
|
586 |
argsToRead == 0 ifTrue:[
|
|
587 |
self doSingleSpec:selector args:args for:aView frame:frame
|
|
588 |
]
|
|
589 |
]
|
|
590 |
!
|
|
591 |
|
|
592 |
readSpec:aSpec view:aView frame:frameView
|
|
593 |
|what|
|
|
594 |
|
|
595 |
what := aSpec first.
|
|
596 |
self perform:('x' , what , ':view:') asSymbol with:aSpec with:aView
|
|
597 |
!
|
|
598 |
|
|
599 |
doSingleSpec:selector args:args for:aView frame:frame
|
|
600 |
Verbose ifTrue:[
|
|
601 |
'doSingle (' print. aView print. ' -> ' print. selector print.
|
|
602 |
' ' print. args printString printNL.
|
|
603 |
].
|
|
604 |
|
|
605 |
self perform:('y' , selector asString asUppercaseFirst , 'view:frame:') asSymbol
|
|
606 |
with:args
|
|
607 |
with:aView
|
|
608 |
with:frame.
|
|
609 |
|
|
610 |
! !
|
|
611 |
|
|
612 |
!UIBuilder methodsFor:'private special kludges'!
|
|
613 |
|
|
614 |
fixFontFor:aComponent
|
|
615 |
"since ST-80 seems to use a smaller default font,
|
|
616 |
and component sizes are often given in pixels in winSpecs,
|
|
617 |
make the font smaller for less ugly looking components."
|
|
618 |
|
|
619 |
"/ aComponent font:(aComponent font size:8)
|
|
620 |
!
|
|
621 |
|
|
622 |
fixExtentFor:aPoint
|
|
623 |
^ aPoint "/ (aPoint * (1 @ 1.5)) truncated
|
|
624 |
! !
|
|
625 |
|
|
626 |
UIBuilder initialize!
|