author | tz |
Mon, 30 Mar 1998 14:43:22 +0200 | |
changeset 753 | 45be0e91a172 |
parent 744 | 20cbba6d7e96 |
child 754 | 04e802a6a920 |
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 |
|
742 | 7 |
inclusion of the above copyright notice. This software may not |
60 | 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' |
|
742 | 16 |
classVariableNames:'HandCursor RedefineAspectMethods' |
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 |
|
742 | 37 |
inclusion of the above copyright notice. This software may not |
60 | 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 |
||
742 | 61 |
redefineAspectMethods |
698 | 62 |
"redefine methods yes or no. If a method is defined in super class |
63 |
should the message be reinstalled ? |
|
64 |
" |
|
742 | 65 |
^ RedefineAspectMethods ? false |
698 | 66 |
|
67 |
! |
|
68 |
||
742 | 69 |
redefineAspectMethods:aBoolean |
698 | 70 |
"redefine methods yes or no. If a method is defined in super class |
71 |
should the message be reinstalled ? |
|
72 |
" |
|
742 | 73 |
RedefineAspectMethods := aBoolean |
698 | 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 |
||
723 | 198 |
deleteSelection |
698 | 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 |
||
723 | 223 |
deleteTotalSelection |
698 | 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 |
||
744 | 717 |
self class redefineAspectMethods ifTrue:[ |
698 | 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 , '\' |
|
742 | 868 |
, ((ResourceSpecEditor codeGenerationCommentForClass: UIPainter) replChar:$!! withString:'!!!!') |
869 |
, '\\ "\' |
|
655
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
870 |
, (' UIPainter new openOnClass:' , className , ' andSelector:#' , methodName , '\') |
093cba68e10a
simplified to make microsoft cc happy
Claus Gittinger <cg@exept.de>
parents:
588
diff
changeset
|
871 |
, (' ' , className , ' new openInterface:#' , methodName , '\') |
742 | 872 |
,(methodName = 'windowSpec' |
873 |
ifTrue:[' ' , className , ' open\'] ifFalse: ['']) |
|
60 | 874 |
, ' "\'. |
875 |
||
876 |
code := code |
|
877 |
, '\' |
|
878 |
, ' <resource: #canvas>\\' |
|
879 |
, ' ^\' |
|
457 | 880 |
, ' ', specCode |
60 | 881 |
, '\' |
238 | 882 |
, '!! !!' |
60 | 883 |
, '\\'. |
884 |
||
885 |
^ code withCRs |
|
886 |
||
887 |
"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
|
888 |
"Modified: 24.6.1997 / 19:12:44 / cg" |
60 | 889 |
! ! |
890 |
||
891 |
!UIPainterView methodsFor:'initialization'! |
|
892 |
||
893 |
initialize |
|
62 | 894 |
"setup attributes |
895 |
" |
|
60 | 896 |
super initialize. |
897 |
superclassName := 'ApplicationModel'. |
|
898 |
className := 'NewApplication'. |
|
899 |
methodName := 'windowSpec'. |
|
900 |
categoryName := 'Applications'. |
|
901 |
HandCursor := Cursor leftHand. |
|
902 |
||
712 | 903 |
self backgroundColor: self class defaultViewBackgroundColor. |
60 | 904 |
! |
905 |
||
906 |
setupFromSpec:specOrSpecArray |
|
78 | 907 |
|spec builder| |
60 | 908 |
|
238 | 909 |
treeView cvsSetupListDo:[ |
111 | 910 |
self removeAll. |
911 |
spec := UISpecification from:specOrSpecArray. |
|
395 | 912 |
builder := UIBuilder new isEditing:true. |
588
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
913 |
"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
|
914 |
className notNil ifTrue:[ |
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
915 |
builder applicationClass:(self resolveName:className). |
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
916 |
]. |
111 | 917 |
spec window setupView:self topView for:builder. |
918 |
self addSpec:(spec component) builder:builder in:self. |
|
919 |
self realizeAllSubViews. |
|
920 |
inputView raise. |
|
310 | 921 |
treeView setAttributesFromWindowSpec:(spec window). |
111 | 922 |
] |
588
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
923 |
|
daead6079de7
Set builders applicationClass (for retrieving subSpecifications)
Stefan Vogel <sv@exept.de>
parents:
568
diff
changeset
|
924 |
"Modified: / 5.2.1998 / 11:42:39 / stefan" |
223 | 925 |
! |
926 |
||
927 |
treeView:aTreeView |
|
361 | 928 |
treeView := aTreeView. |
929 |
||
930 |
treeView delegate:( |
|
376 | 931 |
"/ |
932 |
"/ I want to handle everything typed |
|
933 |
"/ in the treeView, except for Return and Cursor-keys |
|
934 |
"/ |
|
935 |
KeyboardForwarder |
|
936 |
toView:self |
|
937 |
condition:nil |
|
938 |
filter:[:k | (k isSymbol |
|
939 |
and:[k ~~ #Return |
|
940 |
and:[(k startsWith:#Cursor) not]]) |
|
941 |
] |
|
361 | 942 |
) |
943 |
||
376 | 944 |
"Modified: / 31.10.1997 / 20:22:09 / cg" |
60 | 945 |
! ! |
946 |
||
947 |
!UIPainterView methodsFor:'menus'! |
|
948 |
||
121 | 949 |
showMiddleButtonMenu |
950 |
"show the middle button menu; this returns nil |
|
62 | 951 |
" |
223 | 952 |
self enabled ifTrue:[ |
445 | 953 |
(MenuPanel fromSpec:(UIPainter menuEdit) receiver:self) startUp |
111 | 954 |
]. |
121 | 955 |
^ nil |
60 | 956 |
|
62 | 957 |
|
958 |
||
60 | 959 |
! ! |
960 |
||
335 | 961 |
!UIPainterView methodsFor:'queries'! |
962 |
||
963 |
resolveName:aName |
|
964 |
|appl| |
|
965 |
||
966 |
appl := self application. |
|
967 |
||
968 |
appl notNil ifTrue:[ |
|
969 |
^ appl resolveName:aName |
|
970 |
]. |
|
971 |
^ Smalltalk resolveName:aName inClass:self class |
|
972 |
! ! |
|
973 |
||
60 | 974 |
!UIPainterView methodsFor:'removing components'! |
975 |
||
78 | 976 |
remove:anObject |
977 |
"remove anObject from the contents do redraw |
|
60 | 978 |
" |
134 | 979 |
anObject notNil ifTrue:[ |
238 | 980 |
treeView removeView:anObject. |
134 | 981 |
] |
60 | 982 |
! |
983 |
||
984 |
removeAll |
|
62 | 985 |
"remove all objects and properties |
986 |
" |
|
238 | 987 |
treeView cvsEventsDisabledDo:[ |
223 | 988 |
self select:nil. |
238 | 989 |
treeView removeAll. |
223 | 990 |
self removeUndoHistory. |
111 | 991 |
] |
60 | 992 |
! ! |
993 |
||
994 |
!UIPainterView methodsFor:'searching'! |
|
995 |
||
285 | 996 |
findContainerOfView:aView |
997 |
"returns the super view assigned to a view |
|
89 | 998 |
" |
285 | 999 |
|p| |
89 | 1000 |
|
285 | 1001 |
(p := self propertyOfParentForView:aView) isNil ifTrue:[ |
89 | 1002 |
^ self |
1003 |
]. |
|
285 | 1004 |
^ p view |
89 | 1005 |
! |
1006 |
||
60 | 1007 |
findObjectAt:aPoint |
1008 |
"find the origin/corner of the currentWidget |
|
1009 |
" |
|
285 | 1010 |
|view prop| |
60 | 1011 |
|
1012 |
view := super findObjectAt:aPoint. |
|
285 | 1013 |
prop := self propertyRespondsToView:view. |
60 | 1014 |
|
285 | 1015 |
prop notNil ifTrue:[^ prop view]. |
1016 |
^ nil |
|
60 | 1017 |
! |
1018 |
||
1019 |
findViewWithId:aViewId |
|
62 | 1020 |
"finds view assigned to identifier and returns the view or nil |
60 | 1021 |
" |
1022 |
|prop| |
|
1023 |
||
1024 |
prop := self propertyOfIdentifier:aViewId. |
|
1025 |
||
1026 |
prop notNil ifTrue:[^ prop view] |
|
1027 |
ifFalse:[^ nil] |
|
78 | 1028 |
! |
1029 |
||
1030 |
propertyOfIdentifier:anId |
|
1031 |
"returns property assigned to unique identifier |
|
1032 |
" |
|
1033 |
anId notNil ifTrue:[ |
|
238 | 1034 |
^ treeView propertyDetect:[:p| p identifier == anId ] |
78 | 1035 |
]. |
1036 |
^ nil |
|
1037 |
! |
|
1038 |
||
1039 |
propertyOfName:aString |
|
1040 |
"returns property assigned to name |
|
1041 |
" |
|
111 | 1042 |
|name| |
1043 |
||
1044 |
aString isNil ifFalse:[ |
|
1045 |
name := aString string withoutSeparators. |
|
238 | 1046 |
^ treeView propertyDetect:[:p| p name = name ]. |
78 | 1047 |
]. |
1048 |
^ nil |
|
1049 |
! |
|
1050 |
||
285 | 1051 |
propertyOfParentForView:aSubView |
1052 |
"returns the property of the parent or nil |
|
1053 |
" |
|
1054 |
|item| |
|
1055 |
||
1056 |
(item := treeView detectItemRespondsToView:aSubView) notNil ifTrue:[ |
|
1057 |
(item := item parent) notNil ifTrue:[^ item contents] |
|
1058 |
]. |
|
1059 |
^ nil |
|
1060 |
! |
|
1061 |
||
78 | 1062 |
propertyOfView:aView |
1063 |
"returns property assigned to view |
|
1064 |
" |
|
1065 |
(aView isNil or:[aView == self]) ifFalse:[ |
|
238 | 1066 |
^ treeView propertyDetect:[:p| p view == aView ] |
78 | 1067 |
]. |
1068 |
^ nil |
|
1069 |
! |
|
1070 |
||
285 | 1071 |
propertyRespondsToView:aView |
1072 |
"detect the property responding to the argument a view. The property of the view or |
|
1073 |
the first subview providing the properties is returned. If no property is detected |
|
1074 |
nil is returned. |
|
1075 |
" |
|
1076 |
|item| |
|
1077 |
||
1078 |
item := treeView detectItemRespondsToView:aView. |
|
1079 |
||
1080 |
(item notNil and:[item parent notNil]) ifTrue:[ |
|
1081 |
^ item contents |
|
1082 |
]. |
|
1083 |
^ nil |
|
1084 |
! |
|
1085 |
||
111 | 1086 |
uniqueNameFor:aSpecOrString |
78 | 1087 |
"generate and return an unique name for a class |
1088 |
" |
|
1089 |
|next name size| |
|
1090 |
||
712 | 1091 |
aSpecOrString isString ifFalse:[name := aSpecOrString userFriendlyName] |
111 | 1092 |
ifTrue:[name := aSpecOrString]. |
78 | 1093 |
|
111 | 1094 |
size := name size + 1. |
1095 |
next := 0. |
|
78 | 1096 |
|
238 | 1097 |
treeView propertiesDo:[:p| |
111 | 1098 |
|n| |
78 | 1099 |
n := p name. |
1100 |
||
1101 |
(n size >= size and:[n startsWith:name]) ifTrue:[ |
|
1102 |
next := next max:(p extractNumberStartingAt:size) |
|
1103 |
] |
|
1104 |
]. |
|
1105 |
next := next + 1. |
|
1106 |
name := name, next printString. |
|
1107 |
^ name |
|
1108 |
||
1109 |
||
1110 |
||
662 | 1111 |
|
78 | 1112 |
! |
1113 |
||
1114 |
uniqueNameOf:aView |
|
111 | 1115 |
|prop| |
78 | 1116 |
|
111 | 1117 |
(prop := self propertyOfView:aView) notNil ifTrue:[ |
1118 |
prop name isNil ifTrue:[ |
|
1119 |
prop name:(self uniqueNameFor:(prop spec)). |
|
1120 |
]. |
|
1121 |
^ prop name |
|
78 | 1122 |
]. |
111 | 1123 |
^ 'self' |
78 | 1124 |
|
60 | 1125 |
! ! |
1126 |
||
223 | 1127 |
!UIPainterView methodsFor:'selection basics'! |
1128 |
||
1129 |
addToSelection:anObject |
|
1130 |
"add an object to the selection |
|
1131 |
" |
|
1132 |
(self enabled and:[(self isSelected:anObject) not]) ifTrue:[ |
|
1133 |
selection isCollection ifFalse:[ |
|
1134 |
selection isNil ifTrue:[ |
|
1135 |
selection := anObject |
|
1136 |
] ifFalse:[ |
|
1137 |
selection := OrderedCollection with:selection with:anObject |
|
1138 |
] |
|
1139 |
] ifTrue:[ |
|
1140 |
selection add:anObject |
|
1141 |
]. |
|
1142 |
self showSelected:anObject. |
|
238 | 1143 |
treeView cvsSelectionAdd:anObject. |
223 | 1144 |
] |
1145 |
||
1146 |
||
1147 |
! |
|
1148 |
||
1149 |
removeFromSelection:anObject |
|
1150 |
"remove an object from the selection |
|
1151 |
" |
|
1152 |
(self isSelected:anObject) ifTrue:[ |
|
1153 |
self showUnselected:anObject. |
|
1154 |
||
1155 |
selection size > 1 ifTrue:[ |
|
1156 |
selection remove:anObject ifAbsent:nil. |
|
1157 |
self showSelection. |
|
1158 |
] ifFalse:[ |
|
1159 |
selection := nil |
|
1160 |
]. |
|
238 | 1161 |
treeView cvsSelectionRemove:anObject. |
223 | 1162 |
] |
1163 |
||
1164 |
! |
|
1165 |
||
1166 |
select:something |
|
1167 |
"change selection to something |
|
1168 |
" |
|
1169 |
(self enabled and:[something ~= self selection]) ifTrue:[ |
|
1170 |
self setSelection:something withRedraw:true. |
|
238 | 1171 |
treeView cvsSelection:something |
223 | 1172 |
] |
1173 |
||
1174 |
! |
|
1175 |
||
285 | 1176 |
updateSelectionFromModel:aSelOrNil |
223 | 1177 |
"update selection from a new selection |
1178 |
" |
|
1179 |
selectionHiddenLevel == 0 ifTrue:[ |
|
285 | 1180 |
aSelOrNil size ~~ 0 ifTrue:[ |
1181 |
self selectionDo:[:el| (aSelOrNil includes:el) ifFalse:[self showUnselected:el] ] |
|
1182 |
] ifFalse:[ |
|
1183 |
self selectionDo:[:el| self showUnselected:el ] |
|
1184 |
] |
|
223 | 1185 |
]. |
285 | 1186 |
self setSelection:aSelOrNil withRedraw:false. |
223 | 1187 |
self showSelection |
1188 |
||
1189 |
! ! |
|
1190 |
||
78 | 1191 |
!UIPainterView methodsFor:'specification'! |
1192 |
||
1193 |
addSpec:aSpecification builder:aBuilder in:aFrame |
|
1194 |
"build view and subviews from aSpecification into a frame. The top view |
|
1195 |
is returned. The contained components of a spec are set to nil |
|
1196 |
" |
|
330 | 1197 |
|cls| |
212 | 1198 |
|
330 | 1199 |
cls := self resolveName:className. |
1200 |
||
1201 |
cls notNil ifTrue:[ |
|
1202 |
aBuilder applicationClass:cls. |
|
212 | 1203 |
]. |
78 | 1204 |
|
111 | 1205 |
aBuilder componentCreationHook:[:aView :aSpec :aBdr||sv p s n| |
78 | 1206 |
p := ViewProperty new. |
1207 |
s := aSpec copy. |
|
1208 |
p spec:s. |
|
1209 |
p view:aView. |
|
1210 |
||
1211 |
s class supportsSubComponents ifTrue:[ |
|
1212 |
s component:nil |
|
1213 |
]. |
|
1214 |
||
111 | 1215 |
n := s name. |
1216 |
||
1217 |
(n isNil or:[(self propertyOfName:n) notNil]) ifTrue:[ |
|
1218 |
s name:(self uniqueNameFor:s) |
|
78 | 1219 |
]. |
238 | 1220 |
treeView addProperty:p. |
78 | 1221 |
]. |
1222 |
||
1223 |
^ aSpecification buildViewWithLayoutFor:aBuilder in:aFrame. |
|
60 | 1224 |
|
212 | 1225 |
"Modified: 4.7.1997 / 23:48:55 / cg" |
78 | 1226 |
! |
1227 |
||
1228 |
fullSpecFor:anObject |
|
1229 |
"generate a full spec for an object |
|
62 | 1230 |
" |
78 | 1231 |
|mySpec subSpecs| |
1232 |
||
1233 |
mySpec := self specFor:anObject. |
|
1234 |
||
1235 |
(mySpec notNil and:[mySpec class supportsSubComponents]) ifTrue:[ |
|
1236 |
(anObject subViews notNil) ifTrue:[ |
|
1237 |
anObject subViews do:[:aSubView||spec| |
|
1238 |
spec := self fullSpecFor:aSubView. |
|
1239 |
spec notNil ifTrue:[ |
|
1240 |
subSpecs isNil ifTrue:[ |
|
1241 |
subSpecs := OrderedCollection new |
|
1242 |
]. |
|
1243 |
subSpecs add:spec. |
|
1244 |
]. |
|
1245 |
]. |
|
1246 |
subSpecs notNil ifTrue:[ |
|
1247 |
mySpec component:(SpecCollection new collection:subSpecs) |
|
1248 |
] |
|
1249 |
] |
|
1250 |
]. |
|
1251 |
^ mySpec |
|
1252 |
||
60 | 1253 |
|
1254 |
||
1255 |
||
1256 |
||
1257 |
||
1258 |
! |
|
1259 |
||
285 | 1260 |
rebuildView:aView fromSpec:aSpec withBuilder:aBuilder |
1261 |
|v| |
|
1262 |
||
1263 |
aSpec needsRebuildForAttributes ifTrue:[ |
|
1264 |
v := aSpec buildViewWithLayoutFor:aBuilder in:(self findContainerOfView:aView). |
|
1265 |
v realize. |
|
1266 |
aView destroy. |
|
1267 |
device sync. |
|
1268 |
device flush. |
|
1269 |
aView becomeSameAs:v. |
|
1270 |
inputView raise. |
|
1271 |
] ifFalse:[ |
|
1272 |
aSpec setAttributesIn:aView with:aBuilder. |
|
1273 |
self elementChangedSize:aView. |
|
1274 |
]. |
|
1275 |
||
1276 |
! |
|
1277 |
||
78 | 1278 |
specFor:anObject |
1279 |
"returns spec assigned to an object |
|
62 | 1280 |
" |
78 | 1281 |
|prop spec| |
60 | 1282 |
|
78 | 1283 |
(prop := self propertyOfView:anObject) notNil ifTrue:[ |
1284 |
spec := prop spec copy. |
|
1285 |
spec layoutFromView:anObject |
|
60 | 1286 |
]. |
78 | 1287 |
^ spec |
1288 |
||
1289 |
||
1290 |
||
60 | 1291 |
! |
1292 |
||
146 | 1293 |
specForSelection |
1294 |
"returns spec assigned to current single selection or nil |
|
1295 |
" |
|
1296 |
^ self specFor:(self singleSelection) |
|
1297 |
||
1298 |
||
1299 |
! |
|
1300 |
||
78 | 1301 |
updateFromSpec:aSpec |
1302 |
"update current selected view from specification |
|
62 | 1303 |
" |
327
0040d47658c6
check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
1304 |
|props name builder| |
78 | 1305 |
|
281 | 1306 |
aSpec class == WindowSpec ifTrue:[ |
698 | 1307 |
^ treeView canvasSpec:aSpec |
281 | 1308 |
]. |
1309 |
||
78 | 1310 |
self singleSelection notNil ifTrue:[ |
1311 |
self withSelectionHiddenDo:[ |
|
1312 |
self transaction:#specification selectionDo:[:aView| |
|
395 | 1313 |
builder := UIBuilder new isEditing:true. |
212 | 1314 |
className notNil ifTrue:[ |
330 | 1315 |
builder applicationClass:(self resolveName:className). |
212 | 1316 |
]. |
78 | 1317 |
props := self propertyOfView:aView. |
82 | 1318 |
name := (aSpec name) withoutSeparators. |
78 | 1319 |
|
82 | 1320 |
name = props name ifFalse:[ |
1321 |
(self propertyOfName:name) notNil ifTrue:[ |
|
1322 |
name := props name |
|
78 | 1323 |
] |
1324 |
]. |
|
82 | 1325 |
aSpec name:name. |
134 | 1326 |
self createUndoSpecModify:props. |
285 | 1327 |
self rebuildView:aView fromSpec:aSpec withBuilder:builder. |
78 | 1328 |
props spec:(aSpec copy). |
238 | 1329 |
treeView propertyChanged:props. |
78 | 1330 |
] |
111 | 1331 |
] |
82 | 1332 |
] |
212 | 1333 |
|
1334 |
"Modified: 4.7.1997 / 23:49:44 / cg" |
|
60 | 1335 |
! ! |
1336 |
||
285 | 1337 |
!UIPainterView methodsFor:'testing'! |
1338 |
||
1339 |
canChangeLayoutOfView:aView |
|
1340 |
"returns true if the view can change its layout which is dependant on |
|
1341 |
its parent view. |
|
1342 |
" |
|
1343 |
|item prnt| |
|
1344 |
||
1345 |
( (item := treeView itemOfView:aView) isNil |
|
1346 |
or:[(prnt := item parent) isNil] |
|
1347 |
) ifTrue:[ |
|
1348 |
^ false |
|
1349 |
]. |
|
1350 |
^ (prnt parent isNil or:[prnt contents spec class isLayoutContainer not]) |
|
1351 |
! |
|
1352 |
||
1353 |
canKeepLayoutInSelection |
|
1354 |
"returns true if layout can be kept during a paste operation |
|
1355 |
" |
|
1356 |
|prop| |
|
1357 |
||
1358 |
prop := self propertyOfView:(self singleSelection). |
|
1359 |
^ (prop isNil or:[prop spec class isLayoutContainer not]) |
|
1360 |
! |
|
1361 |
||
1362 |
canMove:something |
|
1363 |
"checks whether something is not nil and if all widgets derived from |
|
1364 |
something can change their layout ( move, align, ... operation ). |
|
1365 |
" |
|
1366 |
something notNil ifTrue:[ |
|
1367 |
self forEach:something do:[:aView| |
|
1368 |
(self canChangeLayoutOfView:aView) ifFalse:[^ false] |
|
1369 |
]. |
|
1370 |
^ true |
|
1371 |
]. |
|
1372 |
^ false |
|
1373 |
! |
|
1374 |
||
1375 |
canMoveOrAlignSelection |
|
1376 |
"returns true if a selection exists and all elements in the selection |
|
1377 |
can be moved or aligned |
|
1378 |
" |
|
1379 |
^ self canMove:(self selection) |
|
1380 |
||
1381 |
! ! |
|
1382 |
||
60 | 1383 |
!UIPainterView methodsFor:'transaction'! |
1384 |
||
1385 |
transaction:aType objects:something do:aOneArgBlock |
|
1386 |
"opens a transaction and evaluates a block within the transaction; the |
|
1387 |
argument to the block is a view from derived from something |
|
1388 |
" |
|
134 | 1389 |
self withinTransaction:aType objects:something do:[ |
1390 |
self forEach:something do:aOneArgBlock |
|
60 | 1391 |
] |
1392 |
! |
|
1393 |
||
134 | 1394 |
withinTransaction:aType objects:objects do:aNoneArgBlock |
1395 |
"evaluate a block with no arguments within a transaction |
|
60 | 1396 |
" |
134 | 1397 |
|text size prop| |
1398 |
||
1399 |
objects isNil ifTrue:[ ^ self ]. |
|
1400 |
||
1401 |
size := objects size. |
|
60 | 1402 |
|
134 | 1403 |
objects isCollection ifTrue:[ |
1404 |
size == 0 ifTrue:[ ^ self ]. |
|
1405 |
size == 1 ifTrue:[ prop := self propertyOfView:(objects first) ] |
|
1406 |
] ifFalse:[ |
|
1407 |
prop := self propertyOfView:objects |
|
1408 |
]. |
|
60 | 1409 |
|
134 | 1410 |
prop notNil ifTrue:[ |
1411 |
text := prop name |
|
1412 |
] ifFalse:[ |
|
1413 |
text := size printString, ' elements' |
|
60 | 1414 |
]. |
134 | 1415 |
|
1416 |
undoHistory withinTransaction:aType text:text do:[ |
|
1417 |
aNoneArgBlock value |
|
1418 |
] |
|
60 | 1419 |
! ! |
1420 |
||
1421 |
!UIPainterView methodsFor:'undo actions'! |
|
1422 |
||
134 | 1423 |
createUndoLayout:aView |
1424 |
"create undo action before changing a views layout |
|
60 | 1425 |
" |
134 | 1426 |
|lyt args prop| |
60 | 1427 |
|
1428 |
undoHistory isTransactionOpen ifTrue:[ |
|
1429 |
prop := self propertyOfView:aView. |
|
134 | 1430 |
|
60 | 1431 |
prop notNil ifTrue:[ |
134 | 1432 |
args := Array new:3. |
1433 |
args at:1 put:(prop identifier). |
|
1434 |
||
1435 |
(lyt := aView geometryLayout) notNil ifTrue:[ |
|
1436 |
args at:2 put:#geometryLayout: |
|
1437 |
] ifFalse:[ |
|
146 | 1438 |
lyt := aView extent. |
134 | 1439 |
args at:2 put:#extent: |
1440 |
]. |
|
1441 |
args at:3 put:(lyt copy). |
|
1442 |
undoHistory addUndoSelector:#undoLayout: withArgs:args. |
|
60 | 1443 |
] |
1444 |
] |
|
1445 |
! |
|
1446 |
||
134 | 1447 |
createUndoRemove:aView |
1448 |
"create undo method before deleting views |
|
60 | 1449 |
" |
285 | 1450 |
|prop pid| |
134 | 1451 |
|
1452 |
(prop := self propertyOfView:aView) notNil ifTrue:[ |
|
285 | 1453 |
(pid := self propertyOfParentForView:aView) notNil ifTrue:[ |
1454 |
pid := pid identifier |
|
1455 |
]. |
|
60 | 1456 |
|
134 | 1457 |
undoHistory addUndoSelector:#undoRemove: |
285 | 1458 |
withArgs:(Array with:(self fullSpecFor:aView) |
1459 |
with:(prop identifier) |
|
1460 |
with:pid) |
|
134 | 1461 |
] |
1462 |
! |
|
60 | 1463 |
|
134 | 1464 |
createUndoSpecModify:aProp |
1465 |
"undo method when changing the specification for an object |
|
1466 |
" |
|
1467 |
aProp notNil ifTrue:[ |
|
1468 |
undoHistory addUndoSelector:#undoSpecModify: |
|
1469 |
withArgs:(Array with:(aProp spec) with:(aProp identifier)) |
|
1470 |
] |
|
1471 |
! |
|
60 | 1472 |
|
134 | 1473 |
undoCreate:something |
1474 |
"undo method for creating or pasting an object |
|
1475 |
" |
|
1476 |
self forEach:something do:[:anId|self remove:(self findViewWithId:anId)]. |
|
1477 |
! |
|
60 | 1478 |
|
134 | 1479 |
undoLayout:args |
1480 |
"undo method to set the old layout; see 'createUndoLayout:' |
|
1481 |
" |
|
1482 |
|view| |
|
1483 |
||
1484 |
(view := self findViewWithId:(args at:1)) notNil ifTrue:[ |
|
146 | 1485 |
view perform:(args at:2) with:(args at:3). |
223 | 1486 |
self layoutChanged. |
60 | 1487 |
] |
1488 |
! |
|
1489 |
||
134 | 1490 |
undoRemove:args |
1491 |
"undo method when removing an object; see 'createUndoRemove:' |
|
1492 |
" |
|
1493 |
|frame prop view| |
|
1494 |
||
1495 |
(args at:3) notNil ifTrue:[ |
|
1496 |
frame := self findViewWithId:(args at:3). |
|
1497 |
]. |
|
1498 |
frame isNil ifTrue:[ |
|
1499 |
frame := self |
|
1500 |
]. |
|
395 | 1501 |
view := self addSpec:(args at:1) builder:(UIBuilder new isEditing:true) in:frame. |
134 | 1502 |
view realize. |
1503 |
inputView raise. |
|
1504 |
||
1505 |
prop := self propertyOfView:view. |
|
1506 |
prop identifier:(args at:2). |
|
1507 |
||
1508 |
! |
|
1509 |
||
1510 |
undoSpecModify:args |
|
1511 |
"undo method when changing a spec; see 'createUndoSpecModify:' |
|
60 | 1512 |
" |
327
0040d47658c6
check - warnings eliminated. Fix in InspectorList.st
Claus Gittinger <cg@exept.de>
parents:
316
diff
changeset
|
1513 |
|builder view spec props| |
60 | 1514 |
|
134 | 1515 |
props := self propertyOfIdentifier:(args at:2). |
60 | 1516 |
|
134 | 1517 |
props notNil ifTrue:[ |
1518 |
view := props view. |
|
1519 |
spec := args at:1. |
|
395 | 1520 |
builder := UIBuilder new isEditing:true. |
1521 |
||
212 | 1522 |
className notNil ifTrue:[ |
330 | 1523 |
builder applicationClass:(self resolveName:className). |
212 | 1524 |
]. |
134 | 1525 |
props spec:spec. |
285 | 1526 |
self rebuildView:view fromSpec:spec withBuilder:builder. |
238 | 1527 |
treeView propertyChanged:props. |
211 | 1528 |
] |
1529 |
! ! |
|
1530 |
||
1531 |
!UIPainterView::ViewProperty class methodsFor:'instance creation'! |
|
1532 |
||
1533 |
new |
|
1534 |
Identifier notNil ifTrue:[Identifier := Identifier + 1] |
|
1535 |
ifFalse:[Identifier := 1]. |
|
1536 |
||
1537 |
^ self basicNew initialize |
|
1538 |
! ! |
|
1539 |
||
1540 |
!UIPainterView::ViewProperty methodsFor:'accessing'! |
|
1541 |
||
1542 |
identifier |
|
1543 |
"return the unique identifier assigned to property |
|
1544 |
" |
|
1545 |
^ identifier |
|
1546 |
! |
|
1547 |
||
1548 |
identifier:anIdentifier |
|
1549 |
"set the unique identifier assigned to property; called after an restore of |
|
1550 |
a deleted instance |
|
1551 |
" |
|
1552 |
identifier := anIdentifier |
|
1553 |
! |
|
1554 |
||
1555 |
spec |
|
1556 |
"return the value of the instance variable 'spec' (automatically generated)" |
|
1557 |
||
1558 |
^ spec! |
|
1559 |
||
1560 |
spec:something |
|
1561 |
"set the value of the instance variable 'spec' (automatically generated)" |
|
1562 |
||
1563 |
spec := something.! |
|
1564 |
||
1565 |
view |
|
1566 |
"return the value of the instance variable 'view' (automatically generated)" |
|
1567 |
||
1568 |
^ view! |
|
1569 |
||
1570 |
view:something |
|
1571 |
"set the value of the instance variable 'view' (automatically generated)" |
|
1572 |
||
1573 |
view := something.! ! |
|
1574 |
||
1575 |
!UIPainterView::ViewProperty methodsFor:'initialization'! |
|
1576 |
||
1577 |
initialize |
|
1578 |
super initialize. |
|
1579 |
identifier := Identifier |
|
1580 |
! ! |
|
1581 |
||
1582 |
!UIPainterView::ViewProperty methodsFor:'misc'! |
|
1583 |
||
1584 |
extractNumberStartingAt:anIndex |
|
1585 |
"return the number from the name starting at anIndex or 0. |
|
1586 |
" |
|
1587 |
|val| |
|
1588 |
||
1589 |
val := 0. |
|
1590 |
||
1591 |
self name from:anIndex do:[:c| |
|
1592 |
c isDigit ifTrue:[val := val * 10 + c digitValue] |
|
1593 |
ifFalse:[^ 0] |
|
1594 |
]. |
|
1595 |
^ val |
|
1596 |
||
1597 |
! ! |
|
1598 |
||
1599 |
!UIPainterView::ViewProperty methodsFor:'spec messages'! |
|
1600 |
||
1601 |
doesNotUnderstand:aMessage |
|
1602 |
spec notNil ifTrue:[ |
|
1603 |
(spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec] |
|
1604 |
]. |
|
1605 |
^ nil |
|
1606 |
! |
|
1607 |
||
1608 |
layout |
|
1609 |
spec layout |
|
1610 |
! |
|
1611 |
||
1612 |
layout:aLayout |
|
1613 |
spec layout:aLayout |
|
1614 |
! |
|
1615 |
||
1616 |
name |
|
1617 |
^ spec name |
|
1618 |
! |
|
1619 |
||
1620 |
name:aName |
|
1621 |
spec name:aName |
|
1622 |
! ! |
|
1623 |
||
60 | 1624 |
!UIPainterView class methodsFor:'documentation'! |
1625 |
||
1626 |
version |
|
1627 |
^ '$Header$' |
|
1628 |
! ! |