author | tz |
Fri, 06 Mar 1998 16:45:37 +0100 | |
changeset 710 | 8c968790c885 |
parent 708 | b5f3169a0ba7 |
child 712 | bf8aa59e82b6 |
permissions | -rw-r--r-- |
60 | 1 |
" |
156 | 2 |
COPYRIGHT (c) 1995 by Claus Gittinger / eXept Software AG |
3 |
All Rights Reserved |
|
60 | 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 |
UIObjectView subclass:#UIPainterView |
|
278 | 14 |
instanceVariableNames:'treeView listHolder superclassName className methodName |
15 |
categoryName' |
|
698 | 16 |
classVariableNames:'HandCursor RedefineMethods' |
60 | 17 |
poolDictionaries:'' |
18 |
category:'Interface-UIPainter' |
|
19 |
! |
|
20 |
||
211 | 21 |
Object subclass:#ViewProperty |
22 |
instanceVariableNames:'view spec identifier' |
|
23 |
classVariableNames:'Identifier' |
|
24 |
poolDictionaries:'' |
|
25 |
privateIn:UIPainterView |
|
26 |
! |
|
27 |
||
60 | 28 |
!UIPainterView class methodsFor:'documentation'! |
29 |
||
30 |
copyright |
|
31 |
" |
|
156 | 32 |
COPYRIGHT (c) 1995 by Claus Gittinger / eXept Software AG |
33 |
All Rights Reserved |
|
60 | 34 |
|
35 |
This software is furnished under a license and may be used |
|
36 |
only in accordance with the terms of that license and with the |
|
37 |
inclusion of the above copyright notice. This software may not |
|
38 |
be provided or otherwise made available to, or used by, any |
|
39 |
other person. No title to or ownership of the software is |
|
40 |
hereby transferred. |
|
41 |
" |
|
42 |
! |
|
43 |
||
44 |
documentation |
|
45 |
" |
|
128 | 46 |
buildIn view used by the UIPainter; from this view, the layout of the |
47 |
new application derives from. |
|
48 |
||
49 |
[see also:] |
|
50 |
UIBuilder |
|
51 |
UIObjectView |
|
156 | 52 |
|
53 |
[author:] |
|
54 |
Claus Gittinger |
|
55 |
Claus Atzkern |
|
60 | 56 |
" |
57 |
! ! |
|
58 |
||
698 | 59 |
!UIPainterView class methodsFor:'code generation mode'! |
60 |
||
61 |
redefineMethods |
|
62 |
"redefine methods yes or no. If a method is defined in super class |
|
63 |
should the message be reinstalled ? |
|
64 |
" |
|
65 |
^ RedefineMethods ? false |
|
66 |
||
67 |
! |
|
68 |
||
69 |
redefineMethods:aBool |
|
70 |
"redefine methods yes or no. If a method is defined in super class |
|
71 |
should the message be reinstalled ? |
|
72 |
" |
|
73 |
RedefineMethods := aBool |
|
74 |
||
75 |
||
76 |
! ! |
|
77 |
||
60 | 78 |
!UIPainterView class methodsFor:'defaults'! |
79 |
||
80 |
defaultMenuMessage |
|
81 |
"This message is the default yo be sent to the menuHolder to get a menu |
|
82 |
" |
|
121 | 83 |
^ #showMiddleButtonMenu |
60 | 84 |
|
85 |
||
86 |
! ! |
|
87 |
||
88 |
!UIPainterView methodsFor:'accessing'! |
|
89 |
||
90 |
application |
|
91 |
^ nil |
|
92 |
||
93 |
"Modified: 6.9.1995 / 00:46:44 / claus" |
|
94 |
! |
|
95 |
||
78 | 96 |
applicationName |
97 |
^ self className |
|
98 |
! |
|
99 |
||
100 |
applicationName:aName |
|
101 |
self className:aName |
|
102 |
! |
|
103 |
||
60 | 104 |
className |
105 |
^ className |
|
106 |
! |
|
107 |
||
78 | 108 |
className:aName |
109 |
className := aName |
|
60 | 110 |
! |
111 |
||
112 |
className:aClassName superclassName:aSuperclassName selector:aSelector |
|
78 | 113 |
className := aClassName. |
60 | 114 |
superclassName := aSuperclassName. |
78 | 115 |
methodName := aSelector. |
60 | 116 |
|
117 |
! |
|
118 |
||
223 | 119 |
findInputViewIn:aSuperView |
120 |
"returns index of input view into superview or nil |
|
121 |
" |
|
122 |
aSuperView == self ifTrue:[ |
|
123 |
^ self subViews findFirst:[:v| v == inputView ] |
|
124 |
]. |
|
125 |
^ 0 |
|
126 |
! |
|
127 |
||
128 |
inputView |
|
129 |
^ inputView |
|
111 | 130 |
! |
131 |
||
60 | 132 |
methodName |
133 |
^ methodName |
|
134 |
! |
|
135 |
||
78 | 136 |
methodName:aName |
137 |
methodName := aName |
|
60 | 138 |
! |
139 |
||
140 |
selectNames:aStringOrCollection |
|
141 |
|prop coll s| |
|
142 |
||
143 |
(aStringOrCollection isNil or:[aStringOrCollection isEmpty]) ifTrue:[ |
|
131 | 144 |
^ self select:nil |
60 | 145 |
]. |
146 |
||
147 |
(s := aStringOrCollection) isString ifFalse:[ |
|
148 |
s size == 1 ifTrue:[ |
|
149 |
s := s first |
|
150 |
] ifFalse:[ |
|
151 |
coll := OrderedCollection new. |
|
152 |
||
153 |
s do:[:aName| |
|
154 |
(prop := self propertyOfName:aName) notNil ifTrue:[ |
|
155 |
coll add:(prop view) |
|
156 |
] |
|
157 |
]. |
|
158 |
coll size == 1 ifTrue:[ ^ self select:(coll at:1) ]. |
|
131 | 159 |
coll size == 0 ifTrue:[ ^ self select:nil ]. |
60 | 160 |
|
161 |
^ self select:coll. |
|
162 |
] |
|
163 |
]. |
|
164 |
||
165 |
prop := self propertyOfName:s. |
|
131 | 166 |
prop isNil ifTrue:[^ self select:nil] |
60 | 167 |
ifFalse:[^ self select:(prop view)] |
168 |
||
169 |
! ! |
|
170 |
||
111 | 171 |
!UIPainterView methodsFor:'change & update'! |
172 |
||
223 | 173 |
layoutChanged |
238 | 174 |
treeView layoutChanged |
111 | 175 |
! ! |
176 |
||
60 | 177 |
!UIPainterView methodsFor:'copy & cut & paste'! |
178 |
||
179 |
copySelection |
|
180 |
"copy the selection into the cut&paste-buffer |
|
181 |
" |
|
698 | 182 |
|specs coll sel| |
183 |
||
184 |
sel := treeView selection. |
|
71 | 185 |
|
128 | 186 |
coll := self minSetOfSuperViews:(self selection). |
60 | 187 |
|
71 | 188 |
coll notNil ifTrue:[ |
131 | 189 |
self select:nil. |
78 | 190 |
specs := coll collect:[:aView| self fullSpecFor:aView ]. |
698 | 191 |
self setSelection:specs. |
192 |
treeView selection: sel |
|
60 | 193 |
]. |
78 | 194 |
|
195 |
||
60 | 196 |
! |
197 |
||
698 | 198 |
cutSelection |
199 |
"cut the selection into the cut&paste-buffer |
|
62 | 200 |
and open a transaction |
60 | 201 |
" |
134 | 202 |
|specs coll| |
71 | 203 |
|
128 | 204 |
coll := self minSetOfSuperViews:(self selection). |
60 | 205 |
|
78 | 206 |
coll notNil ifTrue:[ |
238 | 207 |
treeView cvsEventsDisabledDo:[ |
131 | 208 |
self select:nil. |
111 | 209 |
specs := coll collect:[:aView| self fullSpecFor:aView ]. |
60 | 210 |
|
134 | 211 |
self withinTransaction:#cut objects:coll do:[ |
212 |
coll reverseDo:[:aView| |
|
213 |
self createUndoRemove:aView. |
|
214 |
self remove:aView |
|
111 | 215 |
] |
216 |
]. |
|
217 |
self setSelection:specs. |
|
698 | 218 |
treeView selection: (Array with: 1) |
219 |
] |
|
220 |
] |
|
221 |
! |
|
222 |
||
223 |
deleteSelection |
|
224 |
"delete the selection; copy the selection into the cut&paste-buffer |
|
225 |
and open a transaction |
|
226 |
" |
|
227 |
|specs coll| |
|
228 |
||
229 |
coll := self minSetOfSuperViews:(self selection). |
|
230 |
||
231 |
coll notNil ifTrue:[ |
|
232 |
treeView cvsEventsDisabledDo:[ |
|
233 |
self select:nil. |
|
234 |
specs := coll collect:[:aView| self fullSpecFor:aView ]. |
|
235 |
||
236 |
self withinTransaction:#cut objects:coll do:[ |
|
237 |
coll reverseDo:[:aView| |
|
238 |
self remove:aView |
|
239 |
] |
|
240 |
]. |
|
241 |
treeView selection: (Array with: 1) |
|
111 | 242 |
] |
60 | 243 |
] |
244 |
! |
|
245 |
||
246 |
pasteBuffer |
|
62 | 247 |
"add the objects in the paste-buffer to the object view |
60 | 248 |
" |
223 | 249 |
|sel| |
250 |
||
251 |
sel := self pasteSpecifications:(self getSelection) keepLayout:false. |
|
252 |
||
253 |
sel notNil ifTrue:[ |
|
254 |
self select:sel. |
|
255 |
]. |
|
89 | 256 |
|
257 |
! |
|
258 |
||
392 | 259 |
pasteFromClipBoard:aString |
260 |
^ self |
|
261 |
||
262 |
||
263 |
! |
|
264 |
||
89 | 265 |
pasteSpecifications:aSpecificationOrList keepLayout:keepLayout |
223 | 266 |
"add the specs to the object view; returns list of pasted components |
89 | 267 |
" |
278 | 268 |
|
269 |
^ self |
|
270 |
pasteSpecifications:aSpecificationOrList |
|
271 |
keepLayout:keepLayout |
|
272 |
at:nil |
|
273 |
||
274 |
"Modified: 11.8.1997 / 01:00:35 / cg" |
|
275 |
! |
|
276 |
||
277 |
pasteSpecifications:aSpecificationOrList keepLayout:keepLayout at:aPointOrNil |
|
278 |
"add the specs to the object view; returns list of pasted components |
|
279 |
" |
|
312 | 280 |
|paste frame pasteOrigin pasteOffset builder newSel bounds| |
60 | 281 |
|
89 | 282 |
(self canPaste:aSpecificationOrList) ifFalse:[ |
223 | 283 |
^ nil |
89 | 284 |
]. |
223 | 285 |
|
238 | 286 |
treeView cvsSetupListDo:[ |
165 | 287 |
aSpecificationOrList isCollection ifTrue:[ |
288 |
paste := aSpecificationOrList |
|
289 |
] ifFalse:[ |
|
290 |
paste := Array with:aSpecificationOrList |
|
291 |
]. |
|
223 | 292 |
(frame := self singleSelection) isNil ifTrue:[ |
165 | 293 |
frame := self |
294 |
]. |
|
295 |
self setSelection:nil withRedraw:true. |
|
60 | 296 |
|
165 | 297 |
newSel := OrderedCollection new. |
395 | 298 |
builder := UIBuilder new isEditing:true. |
299 |
||
212 | 300 |
className notNil ifTrue:[ |
330 | 301 |
builder applicationClass:(self resolveName:className) |
212 | 302 |
]. |
89 | 303 |
|
165 | 304 |
keepLayout ifFalse:[ |
305 |
pasteOffset := 0@0. |
|
312 | 306 |
|
278 | 307 |
aPointOrNil isNil ifTrue:[ |
308 |
pasteOrigin := self sensor mousePoint. |
|
312 | 309 |
pasteOrigin := device translatePoint:pasteOrigin |
310 |
from:device rootView id |
|
311 |
to:frame id. |
|
278 | 312 |
] ifFalse:[ |
312 | 313 |
pasteOrigin := device translatePoint:aPointOrNil |
314 |
from:self id |
|
315 |
to:frame id. |
|
316 |
] |
|
317 |
]. |
|
318 |
keepLayout ifFalse:[ |
|
319 |
bounds := Rectangle origin:0@0 extent:(frame bounds extent) |
|
165 | 320 |
]. |
60 | 321 |
|
223 | 322 |
paste do:[:aSpec| |
323 |
|view| |
|
60 | 324 |
|
223 | 325 |
view := self addSpec:aSpec builder:builder in:frame. |
60 | 326 |
|
223 | 327 |
keepLayout ifFalse:[ |
312 | 328 |
(bounds containsPoint:pasteOrigin) ifFalse:[ |
315 | 329 |
self moveObject:view to:pasteOffset. |
223 | 330 |
] ifTrue:[ |
331 |
self moveObject:view to:pasteOrigin + pasteOffset. |
|
111 | 332 |
]. |
223 | 333 |
pasteOffset := pasteOffset + 4 |
89 | 334 |
]. |
223 | 335 |
view realize. |
336 |
newSel add:view. |
|
60 | 337 |
]. |
338 |
||
165 | 339 |
self withinTransaction:#paste objects:newSel do:[ |
340 |
undoHistory addUndoSelector:#undoCreate: |
|
341 |
withArgs:(newSel collect:[:v|(self propertyOfView:v) identifier]) |
|
342 |
]. |
|
134 | 343 |
|
165 | 344 |
self realizeAllSubViews. |
285 | 345 |
newSel do:[:v| v raise]. |
165 | 346 |
inputView raise. |
347 |
self elementChangedSize:frame. |
|
285 | 348 |
|
349 |
newSel size == 1 ifTrue:[newSel := newSel at:1]. |
|
223 | 350 |
]. |
351 |
^ newSel |
|
89 | 352 |
! |
353 |
||
354 |
pasteWithLayout |
|
355 |
"add the objects in the paste-buffer to the object view; don't change the |
|
356 |
layout |
|
357 |
" |
|
223 | 358 |
|sel| |
359 |
||
360 |
sel := self pasteSpecifications:(self getSelection) keepLayout:true. |
|
89 | 361 |
|
223 | 362 |
sel notNil ifTrue:[ |
363 |
self select:sel. |
|
364 |
]. |
|
60 | 365 |
! ! |
366 |
||
367 |
!UIPainterView methodsFor:'drag & drop'! |
|
368 |
||
288 | 369 |
canDrop:something |
370 |
"returns true if something can be droped |
|
698 | 371 |
" |
288 | 372 |
(something size == 1 and:[self enabled and:[self numberOfSelections <= 1]]) ifTrue:[ |
373 |
^ something first theObject isKindOf:UISpecification |
|
223 | 374 |
]. |
375 |
^ false |
|
376 |
! |
|
377 |
||
285 | 378 |
canPaste |
379 |
"returns true if something to be past exists and can be paste into |
|
380 |
the selection if exists |
|
381 |
" |
|
382 |
^ self canPaste:(self getSelection) |
|
383 |
! |
|
384 |
||
223 | 385 |
canPaste:something |
386 |
"returns true if something could be paste |
|
387 |
" |
|
388 |
|el size| |
|
389 |
||
390 |
((size := self numberOfSelections) <= 1 and:[self enabled]) ifFalse:[ |
|
391 |
^ false |
|
392 |
]. |
|
393 |
something isCollection ifTrue:[something notEmpty ifTrue:[el := something first]] |
|
394 |
ifFalse:[el := something]. |
|
395 |
||
396 |
(el isKindOf:UISpecification) ifFalse:[ |
|
397 |
^ false |
|
398 |
]. |
|
399 |
||
400 |
size == 1 ifTrue:[ |
|
401 |
^ self canPasteInto:(self singleSelection) |
|
402 |
]. |
|
403 |
^ true |
|
404 |
! |
|
405 |
||
406 |
canPasteInto:aView |
|
407 |
"can paste into a view |
|
408 |
" |
|
285 | 409 |
|prop| |
60 | 410 |
|
223 | 411 |
aView notNil ifTrue:[ |
285 | 412 |
(prop := self propertyRespondsToView:aView) notNil ifTrue:[ |
413 |
^ prop spec class supportsSubComponents |
|
414 |
]. |
|
415 |
^ aView specClass supportsSubComponents. |
|
89 | 416 |
]. |
417 |
^ false |
|
96
73725336b4fe
dont paste into scrollable selectionInListViews ...
Claus Gittinger <cg@exept.de>
parents:
89
diff
changeset
|
418 |
|
60 | 419 |
! |
420 |
||
421 |
drop:anObjectOrCollection at:aPoint |
|
278 | 422 |
|spec newSel oldSel dragOffset| |
423 |
||
288 | 424 |
self selection notNil ifTrue:[ |
425 |
oldSel := self singleSelection. |
|
426 |
||
427 |
(self canPasteInto:oldSel) ifFalse:[ |
|
428 |
oldSel := nil. |
|
429 |
self setSelection:nil withRedraw:true |
|
430 |
] |
|
231 | 431 |
]. |
89 | 432 |
spec := (anObjectOrCollection at:1) theObject. |
278 | 433 |
dragOffset := DragAndDropManager dragOffsetQuerySignal raise. |
434 |
newSel := self pasteSpecifications:spec keepLayout:false at:aPoint - dragOffset. |
|
60 | 435 |
|
223 | 436 |
oldSel isNil ifTrue:[self select:newSel] |
437 |
ifFalse:[self select:oldSel] |
|
60 | 438 |
! ! |
439 |
||
361 | 440 |
!UIPainterView methodsFor:'event handling'! |
441 |
||
442 |
keyPress:key x:x y:y view:aView |
|
376 | 443 |
"a delegated keyEvent from aView" |
444 |
||
361 | 445 |
self keyPress:key x:x y:y |
446 |
||
376 | 447 |
"Modified: / 31.10.1997 / 20:27:22 / cg" |
361 | 448 |
! |
449 |
||
450 |
keyRelease:key x:x y:y view:aView |
|
376 | 451 |
"a delegated keyEvent from aView" |
452 |
||
361 | 453 |
self keyRelease:key x:x y:y |
454 |
||
376 | 455 |
"Modified: / 31.10.1997 / 20:27:32 / cg" |
361 | 456 |
! ! |
457 |
||
78 | 458 |
!UIPainterView methodsFor:'generating output'! |
459 |
||
352 | 460 |
aspectMethods |
461 |
"extract a list of aspect methods - for browsing" |
|
462 |
||
463 |
|cls methods skip selector protoSpec| |
|
464 |
||
465 |
className isNil ifTrue:[ |
|
466 |
self warn:'set the class first'. |
|
467 |
^ #() |
|
468 |
]. |
|
469 |
||
470 |
cls := self resolveName:className. |
|
471 |
methods := IdentitySet new. |
|
472 |
||
473 |
treeView propertiesDo:[:aProp| |
|
474 |
|selector| |
|
475 |
||
476 |
(selector := aProp model) notNil ifTrue:[ |
|
477 |
selector isArray ifFalse:[ |
|
478 |
selector := selector asSymbol. |
|
479 |
(cls implements:selector) ifTrue:[ |
|
480 |
skip := false. |
|
481 |
(cls isSubclassOf:SimpleDialog) ifTrue:[ |
|
482 |
skip := SimpleDialog implements:selector asSymbol |
|
483 |
]. |
|
484 |
skip ifFalse:[ |
|
485 |
methods add:(cls compiledMethodAt:selector) |
|
486 |
]. |
|
487 |
]. |
|
488 |
]. |
|
489 |
]. |
|
490 |
||
491 |
(selector := aProp menu) notNil ifTrue:[ |
|
492 |
selector isArray ifFalse:[ |
|
493 |
selector := selector asSymbol. |
|
494 |
(cls implements:selector) ifTrue:[ |
|
495 |
methods add:(cls compiledMethodAt:selector) |
|
496 |
] |
|
497 |
]. |
|
498 |
]. |
|
499 |
||
500 |
(aProp spec aspectSelectors) do:[:aSel | |
|
501 |
|selector| |
|
502 |
||
503 |
aSel isArray ifFalse:[ |
|
504 |
selector := aSel asSymbol. |
|
505 |
(cls implements:selector) ifTrue:[ |
|
506 |
methods add:(cls compiledMethodAt:selector) |
|
507 |
] |
|
508 |
]. |
|
509 |
]. |
|
510 |
aProp spec actionSelectors do:[:aSel| |
|
511 |
|selector| |
|
512 |
||
513 |
aSel isArray ifFalse:[ |
|
514 |
selector := aSel asSymbol. |
|
515 |
(cls implements:selector) ifTrue:[ |
|
516 |
methods add:(cls compiledMethodAt:selector) |
|
517 |
] |
|
518 |
]. |
|
519 |
]. |
|
520 |
aProp spec valueSelectors do:[:aSel| |
|
521 |
|selector| |
|
522 |
||
523 |
aSel isArray ifFalse:[ |
|
524 |
selector := aSel asSymbol. |
|
525 |
(cls implements:selector) ifTrue:[ |
|
526 |
methods add:(cls compiledMethodAt:selector) |
|
527 |
] |
|
528 |
]. |
|
529 |
] |
|
530 |
]. |
|
531 |
||
532 |
protoSpec := treeView canvasSpec. |
|
533 |
||
534 |
(selector := protoSpec menu) notNil ifTrue:[ |
|
535 |
selector isArray ifFalse:[ |
|
536 |
selector := selector asSymbol. |
|
537 |
(cls implements:selector) ifTrue:[ |
|
538 |
methods add:(cls compiledMethodAt:selector) |
|
539 |
] |
|
540 |
]. |
|
541 |
]. |
|
542 |
||
543 |
^ methods |
|
544 |
||
545 |
"Created: / 25.10.1997 / 18:58:25 / cg" |
|
546 |
"Modified: / 26.10.1997 / 15:06:18 / cg" |
|
547 |
! |
|
548 |
||
60 | 549 |
generateActionMethodFor:aspect spec:protoSpec inClass:targetClass |
568 | 550 |
|selector args showIt code alreadyInSuperclass numArgs method| |
288 | 551 |
|
552 |
selector := aspect asSymbol. |
|
141 | 553 |
|
288 | 554 |
alreadyInSuperclass := targetClass superclass canUnderstand:selector. |
555 |
||
568 | 556 |
numArgs := selector numArgs. |
557 |
method := aspect. |
|
558 |
||
559 |
numArgs == 1 ifTrue:[ |
|
560 |
args := 'anArgument'. |
|
561 |
showIt := ''' , anArgument printString , '' ...''.\'. |
|
562 |
] ifFalse:[ |
|
288 | 563 |
args := ''. |
149 | 564 |
showIt := ' ...''.\'. |
568 | 565 |
|
566 |
numArgs ~~ 0 ifTrue:[ |
|
567 |
method := ''. |
|
568 |
||
569 |
selector keywords keysAndValuesDo:[:i :key| |
|
570 |
method := method, key, 'arg', i printString, ' ' |
|
571 |
] |
|
572 |
] |
|
149 | 573 |
]. |
141 | 574 |
|
288 | 575 |
code := '!!' , targetClass name , ' methodsFor:''actions''!!\\' , |
568 | 576 |
method , args , '\' , |
352 | 577 |
' "automatically generated by UIPainter ..."\\' , |
578 |
' "*** the code below performs no action"\' , |
|
579 |
' "*** (except for some feedback on the Transcript)"\' , |
|
580 |
' "*** Please change as required and accept in the browser."\' , |
|
288 | 581 |
'\' . |
582 |
||
583 |
alreadyInSuperclass ifTrue:[ |
|
584 |
code := code , |
|
585 |
' "action for ' , aspect , ' is already provided in a superclass."\' , |
|
586 |
' "It may be redefined here ..."\\'. |
|
587 |
] ifFalse:[ |
|
588 |
code := code , |
|
589 |
' "action to be added ..."\\'. |
|
590 |
]. |
|
591 |
||
592 |
code := code , |
|
593 |
' Transcript showCR:self class name, '': '. |
|
594 |
alreadyInSuperclass ifTrue:[ |
|
595 |
code := code , 'inherited '. |
|
596 |
]. |
|
597 |
code := code , 'action for ' , aspect , showIt. |
|
598 |
||
599 |
alreadyInSuperclass ifTrue:[ |
|
600 |
code := code , |
|
601 |
' super ' , aspect , args , '.\'. |
|
602 |
]. |
|
603 |
||
604 |
code := code , |
|
605 |
'!! !!\\'. |
|
606 |
^ code withCRs |
|
607 |
||
352 | 608 |
"Modified: / 25.10.1997 / 19:18:50 / cg" |
60 | 609 |
! |
610 |
||
611 |
generateAspectMethodFor:aspect spec:protoSpec inClass:targetClass |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
612 |
|modelClass modelValue modelGen code| |
134 | 613 |
|
149 | 614 |
modelClass := protoSpec defaultModelClassFor:aspect. |
352 | 615 |
modelValue := protoSpec defaultModelValueFor:aspect. |
616 |
||
617 |
modelValue isNil ifTrue:[ |
|
618 |
modelGen := modelClass name , ' new' |
|
619 |
] ifFalse:[ |
|
620 |
modelGen := modelValue storeString , ' asValue' |
|
621 |
]. |
|
134 | 622 |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
623 |
code := '!!' , targetClass name , ' methodsFor:''aspects''!!\\' , |
60 | 624 |
aspect , '\' , |
352 | 625 |
' "automatically generated by UIPainter ..."\\' , |
626 |
' "*** the code below creates a default model when invoked."\' , |
|
627 |
' "*** (which may not be the one you wanted)"\' , |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
628 |
' "*** Please change as required and accept in the browser."\'. |
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
629 |
|
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
630 |
code := (code , |
60 | 631 |
'\' , |
632 |
' |holder|\' , |
|
633 |
'\' , |
|
634 |
' (holder := builder bindingAt:#' , aspect , ') isNil ifTrue:[\' , |
|
352 | 635 |
' builder aspectAt:#' , aspect , ' put:(holder := ' , ' ' , modelGen , ').\' , |
60 | 636 |
' ].\' , |
637 |
' ^ holder\' , |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
638 |
'!! !!\\') withCRs. |
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
639 |
^ code |
352 | 640 |
|
641 |
"Modified: / 26.10.1997 / 19:01:15 / cg" |
|
60 | 642 |
! |
643 |
||
644 |
generateAspectMethods |
|
352 | 645 |
"generate aspect, action & menu methods |
646 |
- but do not overwrite existing ones. |
|
647 |
Return a string ready to compile into the application class." |
|
648 |
||
649 |
|cls code skip menuSelector protoSpec thisCode| |
|
60 | 650 |
|
78 | 651 |
code := ''. |
652 |
||
60 | 653 |
className isNil ifTrue:[ |
698 | 654 |
self warn:'Set first the class!!'. |
78 | 655 |
^ code |
60 | 656 |
]. |
698 | 657 |
|
658 |
(cls := self resolveName:className) isNil ifTrue:[ |
|
659 |
self warn:'Class ', className asString, ' does not exist!!'. |
|
660 |
^ code |
|
661 |
]. |
|
60 | 662 |
|
316 | 663 |
treeView propertiesDo:[:aProp| |
352 | 664 |
|modelSelector menuSelector| |
665 |
||
134 | 666 |
protoSpec := aProp spec. |
175 | 667 |
|
78 | 668 |
(modelSelector := aProp model) notNil ifTrue:[ |
698 | 669 |
self generateCodeFrom:(Array with:modelSelector) in:cls |
670 |
do:[:aSel| |
|
352 | 671 |
skip := false. |
698 | 672 |
|
352 | 673 |
(cls isSubclassOf:SimpleDialog) ifTrue:[ |
698 | 674 |
skip := SimpleDialog implements:aSel asSymbol |
158
6e7f892308ae
do not generate accept/cancel and help action methods,
Claus Gittinger <cg@exept.de>
parents:
156
diff
changeset
|
675 |
]. |
698 | 676 |
|
352 | 677 |
skip ifFalse:[ |
678 |
"/ kludge .. |
|
501 | 679 |
(protoSpec isKindOf:ActionButtonSpec) ifTrue:[ |
698 | 680 |
thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls). |
352 | 681 |
] ifFalse:[ |
698 | 682 |
thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
352 | 683 |
]. |
698 | 684 |
code := code, thisCode |
685 |
] |
|
686 |
] |
|
62 | 687 |
]. |
688 |
||
698 | 689 |
self generateCodeFrom:(aProp spec aspectSelectors) in:cls |
690 |
do:[:aSel| |
|
352 | 691 |
thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls). |
692 |
code := code , thisCode |
|
698 | 693 |
]. |
694 |
||
695 |
self generateCodeFrom:(aProp spec actionSelectors) in:cls |
|
696 |
do:[:aSel| |
|
352 | 697 |
thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls). |
698 |
code := code , thisCode |
|
698 | 699 |
]. |
700 |
||
701 |
self generateCodeFrom:(aProp spec valueSelectors) in:cls |
|
702 |
do:[:aSel| |
|
703 |
"/ uppercase: - assume its a globals name. |
|
704 |
aSel first isUppercase ifFalse:[ |
|
376 | 705 |
thisCode := (self generateValueMethodFor:aSel spec:protoSpec inClass:cls). |
706 |
code := code , thisCode |
|
707 |
] |
|
698 | 708 |
]. |
316 | 709 |
]. |
710 |
||
352 | 711 |
^ code |
698 | 712 |
|
713 |
! |
|
714 |
||
715 |
generateCodeFrom:aListOfSelectors in:aClass do:aBlock |
|
716 |
||
717 |
self class redefineMethods ifTrue:[ |
|
718 |
aListOfSelectors do:[:aSelector| |
|
719 |
(aSelector isArray or:[aClass implements:aSelector]) ifFalse:[ |
|
720 |
aBlock value:aSelector |
|
721 |
] |
|
722 |
] |
|
723 |
] ifFalse:[ |
|
724 |
aListOfSelectors do:[:aSelector| |
|
725 |
(aSelector isArray or:[aClass canUnderstand:aSelector]) ifFalse:[ |
|
726 |
aBlock value:aSelector |
|
727 |
] |
|
728 |
] |
|
729 |
] |
|
730 |
||
731 |
||
376 | 732 |
! |
733 |
||
734 |
generateHookMethodFor:selectorSpec comment:commentWhen note:noteOrNil defaultCode:defaultCode inClass:targetClass |
|
735 |
^ ('!!' , targetClass name , ' methodsFor:''hooks''!!\\' , |
|
736 |
selectorSpec , '\' , |
|
737 |
' "automatically generated by UIPainter ..."\\' , |
|
738 |
' "*** the code here does nothing. It is invoked when"\' , |
|
739 |
' "*** ' , commentWhen , '"\' , |
|
740 |
' "*** Please change as required and accept in the browser."\' , |
|
741 |
'\' , |
|
742 |
' "specific code to be added below ..."\' , |
|
743 |
' "' , (noteOrNil ? '') , '"\' , |
|
744 |
'\' , |
|
745 |
(defaultCode ? '^ self.') , |
|
746 |
'!! !!\\') withCRs |
|
747 |
||
748 |
"Modified: / 25.10.1997 / 19:22:17 / cg" |
|
749 |
"Created: / 31.10.1997 / 17:31:53 / cg" |
|
750 |
! |
|
751 |
||
752 |
generateHookMethods |
|
753 |
"generate hook methods |
|
754 |
- but do not overwrite existing ones. |
|
755 |
Return a string ready to compile into the application class." |
|
756 |
||
757 |
|cls code skip menuSelector protoSpec thisCode| |
|
758 |
||
759 |
code := ''. |
|
760 |
||
761 |
className isNil ifTrue:[ |
|
762 |
self warn:'set the class first'. |
|
763 |
^ code |
|
764 |
]. |
|
765 |
cls := self resolveName:className. |
|
766 |
||
767 |
code := code , (self generateHookMethodsInClass:cls). |
|
768 |
||
769 |
^ code |
|
770 |
||
771 |
"Created: / 31.10.1997 / 17:21:29 / cg" |
|
772 |
"Modified: / 31.10.1997 / 17:38:11 / cg" |
|
773 |
! |
|
774 |
||
775 |
generateHookMethodsInClass:targetClass |
|
776 |
|code| |
|
777 |
||
778 |
code := ''. |
|
779 |
||
780 |
(targetClass implements:#postBuildWith:) ifFalse:[ |
|
781 |
code := code |
|
782 |
, (self |
|
783 |
generateHookMethodFor:'postBuildWith:aBuilder' |
|
784 |
comment:'the widgets have been built, but before the view is opened' |
|
708 | 785 |
note:'or after the super send' |
786 |
defaultCode:' super postBuildWith:aBuilder' |
|
376 | 787 |
inClass:targetClass) |
788 |
]. |
|
789 |
(targetClass implements:#postOpenWith:) ifFalse:[ |
|
790 |
code := code |
|
791 |
, (self |
|
792 |
generateHookMethodFor:'postOpenWith:aBuilder' |
|
793 |
comment:'the topView has been opened, but before events are dispatched for it' |
|
708 | 794 |
note:'or after the super send' |
795 |
defaultCode:' super postOpenWith:aBuilder' |
|
376 | 796 |
inClass:targetClass) |
797 |
]. |
|
798 |
(targetClass implements:#closeRequest) ifFalse:[ |
|
799 |
code := code |
|
800 |
, (self |
|
801 |
generateHookMethodFor:'closeRequest' |
|
802 |
comment:'the topView has been asked to close' |
|
803 |
note:'return without the ''super closeRequest'' to stay open' |
|
708 | 804 |
defaultCode:' ^super closeRequest' |
376 | 805 |
inClass:targetClass) |
806 |
]. |
|
807 |
^ code |
|
808 |
||
809 |
"Modified: / 31.10.1997 / 17:30:34 / cg" |
|
810 |
"Created: / 31.10.1997 / 17:32:49 / cg" |
|
316 | 811 |
! |
812 |
||
188
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
813 |
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
814 |
^ ('!!' , targetClass name , ' methodsFor:''values''!!\\' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
815 |
aspect , '\' , |
352 | 816 |
' "automatically generated by UIPainter ..."\\' , |
817 |
' "*** the code below returns a default value when invoked."\' , |
|
818 |
' "*** (which may not be the one you wanted)"\' , |
|
819 |
' "*** Please change as required and accept in the browser."\' , |
|
188
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
820 |
'\' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
821 |
' "value to be added below ..."\' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
822 |
' Transcript showCR:self class name , '': no value yet for ' , aspect , ' ...''.\' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
823 |
'\' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
824 |
'^ nil.' , |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
825 |
'!! !!\\') withCRs |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
826 |
|
352 | 827 |
"Modified: / 25.10.1997 / 19:22:17 / cg" |
188
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
828 |
! |
8091a35bccf1
generateValueMethodFor:aspect spec:protoSpec inClass:targetClass
ca
parents:
180
diff
changeset
|
829 |
|
78 | 830 |
generateWindowSpecMethodSource |
457 | 831 |
|spec str code category cls mthd specCode| |
60 | 832 |
|
310 | 833 |
spec := OrderedCollection new. |
60 | 834 |
|
78 | 835 |
self subViews do:[:aView| |
836 |
aView ~~ inputView ifTrue:[ |
|
310 | 837 |
spec add:(self fullSpecFor:aView) |
60 | 838 |
] |
839 |
]. |
|
310 | 840 |
spec := treeView generateFullSpecForComponents:spec. |
841 |
str := WriteStream on:String new. |
|
842 |
UISpecification prettyPrintSpecArray:spec on:str indent:5. |
|
464 | 843 |
specCode := str contents. |
457 | 844 |
|
845 |
(specCode includes:$!!) ifTrue:[ |
|
846 |
"/ oops - must be chunk format ... |
|
847 |
str := WriteStream on:String new. |
|
848 |
str nextPutAllAsChunk:specCode. |
|
849 |
specCode := str contents. |
|
850 |
]. |
|
60 | 851 |
|
178
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
852 |
"/ if that method already exists, do not overwrite the category |
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
853 |
|
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
854 |
category := 'interface specs'. |
330 | 855 |
cls := self resolveName:className. |
856 |
||
857 |
cls notNil ifTrue:[ |
|
178
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
858 |
(mthd := cls class compiledMethodAt:methodName asSymbol) notNil ifTrue:[ |
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
859 |
category := mthd category. |
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
860 |
] |
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
861 |
]. |
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
862 |
|
238 | 863 |
code := '!!' |
178
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
864 |
, className , ' class methodsFor:' , category storeString |
238 | 865 |
, '!!' , '\\' |
60 | 866 |
|
867 |
, methodName , '\' |
|
868 |
, ' "this window spec was automatically generated by the ST/X UIPainter"\\' |
|
869 |
, ' "do not manually edit this - the painter/builder may not be able to\' |
|
870 |
, ' handle the specification if its corrupted."\\' |
|
871 |
, ' "\' |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
872 |
, (' UIPainter new openOnClass:' , className , ' andSelector:#' , methodName , '\') |
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
873 |
, (' ' , className , ' new openInterface:#' , methodName , '\') |
60 | 874 |
, ' "\'. |
875 |
||
876 |
methodName = 'windowSpec' ifTrue:[ |
|
877 |
code := code , ' "' , className , ' open"\' |
|
878 |
]. |
|
879 |
code := code |
|
880 |
, '\' |
|
881 |
, ' <resource: #canvas>\\' |
|
882 |
, ' ^\' |
|
457 | 883 |
, ' ', specCode |
60 | 884 |
, '\' |
238 | 885 |
, '!! !!' |
60 | 886 |
, '\\'. |
887 |
||
888 |
^ code withCRs |
|
889 |
||
890 |
"Modified: 5.9.1995 / 21:01:35 / claus" |
|
178
fb8451053c96
keep windowSpec methods category if it already exists
Claus Gittinger <cg@exept.de>
parents:
175
diff
changeset
|
891 |
"Modified: 24.6.1997 / 19:12:44 / cg" |
60 | 892 |
! ! |
893 |
||
894 |
!UIPainterView methodsFor:'initialization'! |
|
895 |
||
896 |
initialize |
|
62 | 897 |
"setup attributes |
898 |
" |
|
60 | 899 |
super initialize. |
900 |
||
901 |
superclassName := 'ApplicationModel'. |
|
902 |
className := 'NewApplication'. |
|
903 |
methodName := 'windowSpec'. |
|
904 |
categoryName := 'Applications'. |
|
905 |
HandCursor := Cursor leftHand. |
|
906 |
||
698 | 907 |
self backgroundColor: self class defaultViewBackgroundColor |
60 | 908 |
! |
909 |
||
910 |
setupFromSpec:specOrSpecArray |
|
78 | 911 |
|spec builder| |
60 | 912 |
|
238 | 913 |
treeView cvsSetupListDo:[ |
111 | 914 |
self removeAll. |
915 |
spec := UISpecification from:specOrSpecArray. |
|
395 | 916 |
builder := UIBuilder new isEditing:true. |
588
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
917 |
"set applicationClass, in order that subspecifications may be resolved" |
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
918 |
className notNil ifTrue:[ |
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
919 |
builder applicationClass:(self resolveName:className). |
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
920 |
]. |
111 | 921 |
spec window setupView:self topView for:builder. |
922 |
self addSpec:(spec component) builder:builder in:self. |
|
923 |
self realizeAllSubViews. |
|
924 |
inputView raise. |
|
310 | 925 |
treeView setAttributesFromWindowSpec:(spec window). |
111 | 926 |
] |
588
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
927 |
|
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
928 |
"Modified: / 5.2.1998 / 11:42:39 / stefan" |
223 | 929 |
! |
930 |
||
931 |
treeView:aTreeView |
|
361 | 932 |
treeView := aTreeView. |
933 |
||
934 |
treeView delegate:( |
|
376 | 935 |
"/ |
936 |
"/ I want to handle everything typed |
|
937 |
"/ in the treeView, except for Return and Cursor-keys |
|
938 |
"/ |
|
939 |
KeyboardForwarder |
|
940 |
toView:self |
|
941 |
condition:nil |
|
942 |
filter:[:k | (k isSymbol |
|
943 |
and:[k ~~ #Return |
|
944 |
and:[(k startsWith:#Cursor) not]]) |
|
945 |
] |
|
361 | 946 |
) |
947 |
||
376 | 948 |
"Modified: / 31.10.1997 / 20:22:09 / cg" |
60 | 949 |
! ! |
950 |
||
951 |
!UIPainterView methodsFor:'menus'! |
|
952 |
||
121 | 953 |
showMiddleButtonMenu |
954 |
"show the middle button menu; this returns nil |
|
62 | 955 |
" |
223 | 956 |
self enabled ifTrue:[ |
445 | 957 |
(MenuPanel fromSpec:(UIPainter menuEdit) receiver:self) startUp |
111 | 958 |
]. |
121 | 959 |
^ nil |
60 | 960 |
|
62 | 961 |
|
962 |
||
60 | 963 |
! ! |
964 |
||
335 | 965 |
!UIPainterView methodsFor:'queries'! |
966 |
||
967 |
resolveName:aName |
|
968 |
|appl| |
|
969 |
||
970 |
appl := self application. |
|
971 |
||
972 |
appl notNil ifTrue:[ |
|
973 |
^ appl resolveName:aName |
|
974 |
]. |
|
975 |
^ Smalltalk resolveName:aName inClass:self class |
|
976 |
! ! |
|
977 |
||
60 | 978 |
!UIPainterView methodsFor:'removing components'! |
979 |
||
78 | 980 |
remove:anObject |
981 |
"remove anObject from the contents do redraw |
|
60 | 982 |
" |
134 | 983 |
anObject notNil ifTrue:[ |
238 | 984 |
treeView removeView:anObject. |
134 | 985 |
] |
60 | 986 |
! |
987 |
||
988 |
removeAll |
|
62 | 989 |
"remove all objects and properties |
990 |
" |
|
238 | 991 |
treeView cvsEventsDisabledDo:[ |
223 | 992 |
self select:nil. |
238 | 993 |
treeView removeAll. |
223 | 994 |
self removeUndoHistory. |
111 | 995 |
] |
60 | 996 |
! ! |
997 |
||
998 |
!UIPainterView methodsFor:'searching'! |
|
999 |
||
285 | 1000 |
findContainerOfView:aView |
1001 |
"returns the super view assigned to a view |
|
89 | 1002 |
" |
285 | 1003 |
|p| |
89 | 1004 |
|
285 | 1005 |
(p := self propertyOfParentForView:aView) isNil ifTrue:[ |
89 | 1006 |
^ self |
1007 |
]. |
|
285 | 1008 |
^ p view |
89 | 1009 |
! |
1010 |
||
60 | 1011 |
findObjectAt:aPoint |
1012 |
"find the origin/corner of the currentWidget |
|
1013 |
" |
|
285 | 1014 |
|view prop| |
60 | 1015 |
|
1016 |
view := super findObjectAt:aPoint. |
|
285 | 1017 |
prop := self propertyRespondsToView:view. |
60 | 1018 |
|
285 | 1019 |
prop notNil ifTrue:[^ prop view]. |
1020 |
^ nil |
|
60 | 1021 |
! |
1022 |
||
1023 |
findViewWithId:aViewId |
|
62 | 1024 |
"finds view assigned to identifier and returns the view or nil |
60 | 1025 |
" |
1026 |
|prop| |
|
1027 |
||
1028 |
prop := self propertyOfIdentifier:aViewId. |
|
1029 |
||
1030 |
prop notNil ifTrue:[^ prop view] |
|
1031 |
ifFalse:[^ nil] |
|
78 | 1032 |
! |
1033 |
||
1034 |
propertyOfIdentifier:anId |
|
1035 |
"returns property assigned to unique identifier |
|
1036 |
" |
|
1037 |
anId notNil ifTrue:[ |
|
238 | 1038 |
^ treeView propertyDetect:[:p| p identifier == anId ] |
78 | 1039 |
]. |
1040 |
^ nil |
|
1041 |
! |
|
1042 |
||
1043 |
propertyOfName:aString |
|
1044 |
"returns property assigned to name |
|
1045 |
" |
|
111 | 1046 |
|name| |
1047 |
||
1048 |
aString isNil ifFalse:[ |
|
1049 |
name := aString string withoutSeparators. |
|
238 | 1050 |
^ treeView propertyDetect:[:p| p name = name ]. |
78 | 1051 |
]. |
1052 |
^ nil |
|
1053 |
! |
|
1054 |
||
285 | 1055 |
propertyOfParentForView:aSubView |
1056 |
"returns the property of the parent or nil |
|
1057 |
" |
|
1058 |
|item| |
|
1059 |
||
1060 |
(item := treeView detectItemRespondsToView:aSubView) notNil ifTrue:[ |
|
1061 |
(item := item parent) notNil ifTrue:[^ item contents] |
|
1062 |
]. |
|
1063 |
^ nil |
|
1064 |
! |
|
1065 |
||
78 | 1066 |
propertyOfView:aView |
1067 |
"returns property assigned to view |
|
1068 |
" |
|
1069 |
(aView isNil or:[aView == self]) ifFalse:[ |
|
238 | 1070 |
^ treeView propertyDetect:[:p| p view == aView ] |
78 | 1071 |
]. |
1072 |
^ nil |
|
1073 |
! |
|
1074 |
||
285 | 1075 |
propertyRespondsToView:aView |
1076 |
"detect the property responding to the argument a view. The property of the view or |
|
1077 |
the first subview providing the properties is returned. If no property is detected |
|
1078 |
nil is returned. |
|
1079 |
" |
|
1080 |
|item| |
|
1081 |
||
1082 |
item := treeView detectItemRespondsToView:aView. |
|
1083 |
||
1084 |
(item notNil and:[item parent notNil]) ifTrue:[ |
|
1085 |
^ item contents |
|
1086 |
]. |
|
1087 |
^ nil |
|
1088 |
! |
|
1089 |
||
111 | 1090 |
uniqueNameFor:aSpecOrString |
78 | 1091 |
"generate and return an unique name for a class |
1092 |
" |
|
1093 |
|next name size| |
|
1094 |
||
111 | 1095 |
aSpecOrString isString ifFalse:[name := aSpecOrString className asString] |
1096 |
ifTrue:[name := aSpecOrString]. |
|
78 | 1097 |
|
111 | 1098 |
(name endsWith:'Spec') ifTrue:[ |
1099 |
name := name copyFrom:1 to:(name size - 4). |
|
1100 |
] ifFalse:[ |
|
1101 |
name := name copy |
|
1102 |
]. |
|
1103 |
size := name size + 1. |
|
1104 |
next := 0. |
|
78 | 1105 |
|
238 | 1106 |
treeView propertiesDo:[:p| |
111 | 1107 |
|n| |
78 | 1108 |
n := p name. |
1109 |
||
1110 |
(n size >= size and:[n startsWith:name]) ifTrue:[ |
|
1111 |
next := next max:(p extractNumberStartingAt:size) |
|
1112 |
] |
|
1113 |
]. |
|
1114 |
next := next + 1. |
|
1115 |
name := name, next printString. |
|
1116 |
^ name |
|
1117 |
||
1118 |
||
1119 |
||
662 | 1120 |
|
78 | 1121 |
! |
1122 |
||
1123 |
uniqueNameOf:aView |
|
111 | 1124 |
|prop| |
78 | 1125 |
|
111 | 1126 |
(prop := self propertyOfView:aView) notNil ifTrue:[ |
1127 |
prop name isNil ifTrue:[ |
|
1128 |
prop name:(self uniqueNameFor:(prop spec)). |
|
1129 |
]. |
|
1130 |
^ prop name |
|
78 | 1131 |
]. |
111 | 1132 |
^ 'self' |
78 | 1133 |
|
60 | 1134 |
! ! |
1135 |
||
223 | 1136 |
!UIPainterView methodsFor:'selection basics'! |
1137 |
||
1138 |
addToSelection:anObject |
|
1139 |
"add an object to the selection |
|
1140 |
" |
|
1141 |
(self enabled and:[(self isSelected:anObject) not]) ifTrue:[ |
|
1142 |
selection isCollection ifFalse:[ |
|
1143 |
selection isNil ifTrue:[ |
|
1144 |
selection := anObject |
|
1145 |
] ifFalse:[ |
|
1146 |
selection := OrderedCollection with:selection with:anObject |
|
1147 |
] |
|
1148 |
] ifTrue:[ |
|
1149 |
selection add:anObject |
|
1150 |
]. |
|
1151 |
self showSelected:anObject. |
|
238 | 1152 |
treeView cvsSelectionAdd:anObject. |
223 | 1153 |
] |
1154 |
||
1155 |
||
1156 |
! |
|
1157 |
||
1158 |
removeFromSelection:anObject |
|
1159 |
"remove an object from the selection |
|
1160 |
" |
|
1161 |
(self isSelected:anObject) ifTrue:[ |
|
1162 |
self showUnselected:anObject. |
|
1163 |
||
1164 |
selection size > 1 ifTrue:[ |
|
1165 |
selection remove:anObject ifAbsent:nil. |
|
1166 |
self showSelection. |
|
1167 |
] ifFalse:[ |
|
1168 |
selection := nil |
|
1169 |
]. |
|
238 | 1170 |
treeView cvsSelectionRemove:anObject. |
223 | 1171 |
] |
1172 |
||
1173 |
! |
|
1174 |
||
1175 |
select:something |
|
1176 |
"change selection to something |
|
1177 |
" |
|
1178 |
(self enabled and:[something ~= self selection]) ifTrue:[ |
|
1179 |
self setSelection:something withRedraw:true. |
|
238 | 1180 |
treeView cvsSelection:something |
223 | 1181 |
] |
1182 |
||
1183 |
! |
|
1184 |
||
285 | 1185 |
updateSelectionFromModel:aSelOrNil |
223 | 1186 |
"update selection from a new selection |
1187 |
" |
|
1188 |
selectionHiddenLevel == 0 ifTrue:[ |
|
285 | 1189 |
aSelOrNil size ~~ 0 ifTrue:[ |
1190 |
self selectionDo:[:el| (aSelOrNil includes:el) ifFalse:[self showUnselected:el] ] |
|
1191 |
] ifFalse:[ |
|
1192 |
self selectionDo:[:el| self showUnselected:el ] |
|
1193 |
] |
|
223 | 1194 |
]. |
285 | 1195 |
self setSelection:aSelOrNil withRedraw:false. |
223 | 1196 |
self showSelection |
1197 |
||
1198 |
! ! |
|
1199 |
||
78 | 1200 |
!UIPainterView methodsFor:'specification'! |
1201 |
||
1202 |
addSpec:aSpecification builder:aBuilder in:aFrame |
|
1203 |
"build view and subviews from aSpecification into a frame. The top view |
|
1204 |
is returned. The contained components of a spec are set to nil |
|
1205 |
" |
|
330 | 1206 |
|cls| |
212 | 1207 |
|
330 | 1208 |
cls := self resolveName:className. |
1209 |
||
1210 |
cls notNil ifTrue:[ |
|
1211 |
aBuilder applicationClass:cls. |
|
212 | 1212 |
]. |
78 | 1213 |
|
111 | 1214 |
aBuilder componentCreationHook:[:aView :aSpec :aBdr||sv p s n| |
78 | 1215 |
p := ViewProperty new. |
1216 |
s := aSpec copy. |
|
1217 |
p spec:s. |
|
1218 |
p view:aView. |
|
1219 |
||
1220 |
s class supportsSubComponents ifTrue:[ |
|
1221 |
s component:nil |
|
1222 |
]. |
|
1223 |
||
111 | 1224 |
n := s name. |
1225 |
||
1226 |
(n isNil or:[(self propertyOfName:n) notNil]) ifTrue:[ |
|
1227 |
s name:(self uniqueNameFor:s) |
|
78 | 1228 |
]. |
238 | 1229 |
treeView addProperty:p. |
78 | 1230 |
]. |
1231 |
||
1232 |
^ aSpecification buildViewWithLayoutFor:aBuilder in:aFrame. |
|
60 | 1233 |
|
212 | 1234 |
"Modified: 4.7.1997 / 23:48:55 / cg" |
78 | 1235 |
! |
1236 |
||
1237 |
fullSpecFor:anObject |
|
1238 |
"generate a full spec for an object |
|
62 | 1239 |
" |
78 | 1240 |
|mySpec subSpecs| |
1241 |
||
1242 |
mySpec := self specFor:anObject. |
|
1243 |
||
1244 |
(mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[ |
|
1245 |
(anObject subViews notNil) ifTrue:[ |
|
1246 |
anObject subViews do:[:aSubView||spec| |
|
1247 |
spec := self fullSpecFor:aSubView. |
|
1248 |
spec notNil ifTrue:[ |
|
1249 |
subSpecs isNil ifTrue:[ |
|
1250 |
subSpecs := OrderedCollection new |
|
1251 |
]. |
|
1252 |
subSpecs add:spec. |
|
1253 |
]. |
|
1254 |
]. |
|
1255 |
subSpecs notNil ifTrue:[ |
|
1256 |
mySpec component:(SpecCollection new collection:subSpecs) |
|
1257 |
] |
|
1258 |
] |
|
1259 |
]. |
|
1260 |
^ mySpec |
|
1261 |
||
60 | 1262 |
|
1263 |
||
1264 |
||
1265 |
||
1266 |
||
1267 |
! |
|
1268 |
||
285 | 1269 |
rebuildView:aView fromSpec:aSpec withBuilder:aBuilder |
1270 |
|v| |
|
1271 |
||
1272 |
aSpec needsRebuildForAttributes ifTrue:[ |
|
1273 |
v := aSpec buildViewWithLayoutFor:aBuilder in:(self findContainerOfView:aView). |
|
1274 |
v realize. |
|
1275 |
aView destroy. |
|
1276 |
device sync. |
|
1277 |
device flush. |
|
1278 |
aView becomeSameAs:v. |
|
1279 |
inputView raise. |
|
1280 |
] ifFalse:[ |
|
1281 |
aSpec setAttributesIn:aView with:aBuilder. |
|
1282 |
self elementChangedSize:aView. |
|
1283 |
]. |
|
1284 |
||
1285 |
! |
|
1286 |
||
78 | 1287 |
specFor:anObject |
1288 |
"returns spec assigned to an object |
|
62 | 1289 |
" |
78 | 1290 |
|prop spec| |
60 | 1291 |
|
78 | 1292 |
(prop := self propertyOfView:anObject) notNil ifTrue:[ |
1293 |
spec := prop spec copy. |
|
1294 |
spec layoutFromView:anObject |
|
60 | 1295 |
]. |
78 | 1296 |
^ spec |
1297 |
||
1298 |
||
1299 |
||
60 | 1300 |
! |
1301 |
||
146 | 1302 |
specForSelection |
1303 |
"returns spec assigned to current single selection or nil |
|
1304 |
" |
|
1305 |
^ self specFor:(self singleSelection) |
|
1306 |
||
1307 |
||
1308 |
! |
|
1309 |
||
78 | 1310 |
updateFromSpec:aSpec |
1311 |
"update current selected view from specification |
|
62 | 1312 |
" |
327
0040d47658c6
check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
1313 |
|props name builder| |
78 | 1314 |
|
281 | 1315 |
aSpec class == WindowSpec ifTrue:[ |
698 | 1316 |
^ treeView canvasSpec:aSpec |
281 | 1317 |
]. |
1318 |
||
78 | 1319 |
self singleSelection notNil ifTrue:[ |
1320 |
self withSelectionHiddenDo:[ |
|
1321 |
self transaction:#specification selectionDo:[:aView| |
|
395 | 1322 |
builder := UIBuilder new isEditing:true. |
212 | 1323 |
className notNil ifTrue:[ |
330 | 1324 |
builder applicationClass:(self resolveName:className). |
212 | 1325 |
]. |
78 | 1326 |
props := self propertyOfView:aView. |
82 | 1327 |
name := (aSpec name) withoutSeparators. |
78 | 1328 |
|
82 | 1329 |
name = props name ifFalse:[ |
1330 |
(self propertyOfName:name) notNil ifTrue:[ |
|
1331 |
name := props name |
|
78 | 1332 |
] |
1333 |
]. |
|
82 | 1334 |
aSpec name:name. |
134 | 1335 |
self createUndoSpecModify:props. |
285 | 1336 |
self rebuildView:aView fromSpec:aSpec withBuilder:builder. |
78 | 1337 |
props spec:(aSpec copy). |
238 | 1338 |
treeView propertyChanged:props. |
78 | 1339 |
] |
111 | 1340 |
] |
82 | 1341 |
] |
212 | 1342 |
|
1343 |
"Modified: 4.7.1997 / 23:49:44 / cg" |
|
60 | 1344 |
! ! |
1345 |
||
285 | 1346 |
!UIPainterView methodsFor:'testing'! |
1347 |
||
1348 |
canChangeLayoutOfView:aView |
|
1349 |
"returns true if the view can change its layout which is dependant on |
|
1350 |
its parent view. |
|
1351 |
" |
|
1352 |
|item prnt| |
|
1353 |
||
1354 |
( (item := treeView itemOfView:aView) isNil |
|
1355 |
or:[(prnt := item parent) isNil] |
|
1356 |
) ifTrue:[ |
|
1357 |
^ false |
|
1358 |
]. |
|
1359 |
^ (prnt parent isNil or:[prnt contents spec class isLayoutContainer not]) |
|
1360 |
! |
|
1361 |
||
1362 |
canKeepLayoutInSelection |
|
1363 |
"returns true if layout can be kept during a paste operation |
|
1364 |
" |
|
1365 |
|prop| |
|
1366 |
||
1367 |
prop := self propertyOfView:(self singleSelection). |
|
1368 |
^ (prop isNil or:[prop spec class isLayoutContainer not]) |
|
1369 |
! |
|
1370 |
||
1371 |
canMove:something |
|
1372 |
"checks whether something is not nil and if all widgets derived from |
|
1373 |
something can change their layout ( move, align, ... operation ). |
|
1374 |
" |
|
1375 |
something notNil ifTrue:[ |
|
1376 |
self forEach:something do:[:aView| |
|
1377 |
(self canChangeLayoutOfView:aView) ifFalse:[^ false] |
|
1378 |
]. |
|
1379 |
^ true |
|
1380 |
]. |
|
1381 |
^ false |
|
1382 |
! |
|
1383 |
||
1384 |
canMoveOrAlignSelection |
|
1385 |
"returns true if a selection exists and all elements in the selection |
|
1386 |
can be moved or aligned |
|
1387 |
" |
|
1388 |
^ self canMove:(self selection) |
|
1389 |
||
1390 |
! ! |
|
1391 |
||
60 | 1392 |
!UIPainterView methodsFor:'transaction'! |
1393 |
||
1394 |
transaction:aType objects:something do:aOneArgBlock |
|
1395 |
"opens a transaction and evaluates a block within the transaction; the |
|
1396 |
argument to the block is a view from derived from something |
|
1397 |
" |
|
134 | 1398 |
self withinTransaction:aType objects:something do:[ |
1399 |
self forEach:something do:aOneArgBlock |
|
60 | 1400 |
] |
1401 |
! |
|
1402 |
||
134 | 1403 |
withinTransaction:aType objects:objects do:aNoneArgBlock |
1404 |
"evaluate a block with no arguments within a transaction |
|
60 | 1405 |
" |
134 | 1406 |
|text size prop| |
1407 |
||
1408 |
objects isNil ifTrue:[ ^ self ]. |
|
1409 |
||
1410 |
size := objects size. |
|
60 | 1411 |
|
134 | 1412 |
objects isCollection ifTrue:[ |
1413 |
size == 0 ifTrue:[ ^ self ]. |
|
1414 |
size == 1 ifTrue:[ prop := self propertyOfView:(objects first) ] |
|
1415 |
] ifFalse:[ |
|
1416 |
prop := self propertyOfView:objects |
|
1417 |
]. |
|
60 | 1418 |
|
134 | 1419 |
prop notNil ifTrue:[ |
1420 |
text := prop name |
|
1421 |
] ifFalse:[ |
|
1422 |
text := size printString, ' elements' |
|
60 | 1423 |
]. |
134 | 1424 |
|
1425 |
undoHistory withinTransaction:aType text:text do:[ |
|
1426 |
aNoneArgBlock value |
|
1427 |
] |
|
60 | 1428 |
! ! |
1429 |
||
1430 |
!UIPainterView methodsFor:'undo actions'! |
|
1431 |
||
134 | 1432 |
createUndoLayout:aView |
1433 |
"create undo action before changing a views layout |
|
60 | 1434 |
" |
134 | 1435 |
|lyt args prop| |
60 | 1436 |
|
1437 |
undoHistory isTransactionOpen ifTrue:[ |
|
1438 |
prop := self propertyOfView:aView. |
|
134 | 1439 |
|
60 | 1440 |
prop notNil ifTrue:[ |
134 | 1441 |
args := Array new:3. |
1442 |
args at:1 put:(prop identifier). |
|
1443 |
||
1444 |
(lyt := aView geometryLayout) notNil ifTrue:[ |
|
1445 |
args at:2 put:#geometryLayout: |
|
1446 |
] ifFalse:[ |
|
146 | 1447 |
lyt := aView extent. |
134 | 1448 |
args at:2 put:#extent: |
1449 |
]. |
|
1450 |
args at:3 put:(lyt copy). |
|
1451 |
undoHistory addUndoSelector:#undoLayout: withArgs:args. |
|
60 | 1452 |
] |
1453 |
] |
|
1454 |
! |
|
1455 |
||
134 | 1456 |
createUndoRemove:aView |
1457 |
"create undo method before deleting views |
|
60 | 1458 |
" |
285 | 1459 |
|prop pid| |
134 | 1460 |
|
1461 |
(prop := self propertyOfView:aView) notNil ifTrue:[ |
|
285 | 1462 |
(pid := self propertyOfParentForView:aView) notNil ifTrue:[ |
1463 |
pid := pid identifier |
|
1464 |
]. |
|
60 | 1465 |
|
134 | 1466 |
undoHistory addUndoSelector:#undoRemove: |
285 | 1467 |
withArgs:(Array with:(self fullSpecFor:aView) |
1468 |
with:(prop identifier) |
|
1469 |
with:pid) |
|
134 | 1470 |
] |
1471 |
! |
|
60 | 1472 |
|
134 | 1473 |
createUndoSpecModify:aProp |
1474 |
"undo method when changing the specification for an object |
|
1475 |
" |
|
1476 |
aProp notNil ifTrue:[ |
|
1477 |
undoHistory addUndoSelector:#undoSpecModify: |
|
1478 |
withArgs:(Array with:(aProp spec) with:(aProp identifier)) |
|
1479 |
] |
|
1480 |
! |
|
60 | 1481 |
|
134 | 1482 |
undoCreate:something |
1483 |
"undo method for creating or pasting an object |
|
1484 |
" |
|
1485 |
self forEach:something do:[:anId|self remove:(self findViewWithId:anId)]. |
|
1486 |
! |
|
60 | 1487 |
|
134 | 1488 |
undoLayout:args |
1489 |
"undo method to set the old layout; see 'createUndoLayout:' |
|
1490 |
" |
|
1491 |
|view| |
|
1492 |
||
1493 |
(view := self findViewWithId:(args at:1)) notNil ifTrue:[ |
|
146 | 1494 |
view perform:(args at:2) with:(args at:3). |
223 | 1495 |
self layoutChanged. |
60 | 1496 |
] |
1497 |
! |
|
1498 |
||
134 | 1499 |
undoRemove:args |
1500 |
"undo method when removing an object; see 'createUndoRemove:' |
|
1501 |
" |
|
1502 |
|frame prop view| |
|
1503 |
||
1504 |
(args at:3) notNil ifTrue:[ |
|
1505 |
frame := self findViewWithId:(args at:3). |
|
1506 |
]. |
|
1507 |
frame isNil ifTrue:[ |
|
1508 |
frame := self |
|
1509 |
]. |
|
395 | 1510 |
view := self addSpec:(args at:1) builder:(UIBuilder new isEditing:true) in:frame. |
134 | 1511 |
view realize. |
1512 |
inputView raise. |
|
1513 |
||
1514 |
prop := self propertyOfView:view. |
|
1515 |
prop identifier:(args at:2). |
|
1516 |
||
1517 |
! |
|
1518 |
||
1519 |
undoSpecModify:args |
|
1520 |
"undo method when changing a spec; see 'createUndoSpecModify:' |
|
60 | 1521 |
" |
327
0040d47658c6
check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
1522 |
|builder view spec props| |
60 | 1523 |
|
134 | 1524 |
props := self propertyOfIdentifier:(args at:2). |
60 | 1525 |
|
134 | 1526 |
props notNil ifTrue:[ |
1527 |
view := props view. |
|
1528 |
spec := args at:1. |
|
395 | 1529 |
builder := UIBuilder new isEditing:true. |
1530 |
||
212 | 1531 |
className notNil ifTrue:[ |
330 | 1532 |
builder applicationClass:(self resolveName:className). |
212 | 1533 |
]. |
134 | 1534 |
props spec:spec. |
285 | 1535 |
self rebuildView:view fromSpec:spec withBuilder:builder. |
238 | 1536 |
treeView propertyChanged:props. |
211 | 1537 |
] |
1538 |
! ! |
|
1539 |
||
1540 |
!UIPainterView::ViewProperty class methodsFor:'instance creation'! |
|
1541 |
||
1542 |
new |
|
1543 |
Identifier notNil ifTrue:[Identifier := Identifier + 1] |
|
1544 |
ifFalse:[Identifier := 1]. |
|
1545 |
||
1546 |
^ self basicNew initialize |
|
1547 |
! ! |
|
1548 |
||
1549 |
!UIPainterView::ViewProperty methodsFor:'accessing'! |
|
1550 |
||
1551 |
identifier |
|
1552 |
"return the unique identifier assigned to property |
|
1553 |
" |
|
1554 |
^ identifier |
|
1555 |
! |
|
1556 |
||
1557 |
identifier:anIdentifier |
|
1558 |
"set the unique identifier assigned to property; called after an restore of |
|
1559 |
a deleted instance |
|
1560 |
" |
|
1561 |
identifier := anIdentifier |
|
1562 |
! |
|
1563 |
||
1564 |
spec |
|
1565 |
"return the value of the instance variable 'spec' (automatically generated)" |
|
1566 |
||
1567 |
^ spec! |
|
1568 |
||
1569 |
spec:something |
|
1570 |
"set the value of the instance variable 'spec' (automatically generated)" |
|
1571 |
||
1572 |
spec := something.! |
|
1573 |
||
1574 |
view |
|
1575 |
"return the value of the instance variable 'view' (automatically generated)" |
|
1576 |
||
1577 |
^ view! |
|
1578 |
||
1579 |
view:something |
|
1580 |
"set the value of the instance variable 'view' (automatically generated)" |
|
1581 |
||
1582 |
view := something.! ! |
|
1583 |
||
1584 |
!UIPainterView::ViewProperty methodsFor:'initialization'! |
|
1585 |
||
1586 |
initialize |
|
1587 |
super initialize. |
|
1588 |
identifier := Identifier |
|
1589 |
! ! |
|
1590 |
||
1591 |
!UIPainterView::ViewProperty methodsFor:'misc'! |
|
1592 |
||
1593 |
extractNumberStartingAt:anIndex |
|
1594 |
"return the number from the name starting at anIndex or 0. |
|
1595 |
" |
|
1596 |
|val| |
|
1597 |
||
1598 |
val := 0. |
|
1599 |
||
1600 |
self name from:anIndex do:[:c| |
|
1601 |
c isDigit ifTrue:[val := val * 10 + c digitValue] |
|
1602 |
ifFalse:[^ 0] |
|
1603 |
]. |
|
1604 |
^ val |
|
1605 |
||
1606 |
! ! |
|
1607 |
||
1608 |
!UIPainterView::ViewProperty methodsFor:'spec messages'! |
|
1609 |
||
1610 |
doesNotUnderstand:aMessage |
|
1611 |
spec notNil ifTrue:[ |
|
1612 |
(spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec] |
|
1613 |
]. |
|
1614 |
^ nil |
|
1615 |
! |
|
1616 |
||
1617 |
layout |
|
1618 |
spec layout |
|
1619 |
! |
|
1620 |
||
1621 |
layout:aLayout |
|
1622 |
spec layout:aLayout |
|
1623 |
! |
|
1624 |
||
1625 |
name |
|
1626 |
^ spec name |
|
1627 |
! |
|
1628 |
||
1629 |
name:aName |
|
1630 |
spec name:aName |
|
1631 |
! ! |
|
1632 |
||
60 | 1633 |
!UIPainterView class methodsFor:'documentation'! |
1634 |
||
1635 |
version |
|
1636 |
^ '$Header$' |
|
1637 |
! ! |