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