UIPainterView.st
changeset 175 0b0b4d99e3e7
parent 165 f7df2a53d042
child 178 fb8451053c96
equal deleted inserted replaced
174:0e87610c2768 175:0b0b4d99e3e7
    15 	classVariableNames:'HandCursor'
    15 	classVariableNames:'HandCursor'
    16 	poolDictionaries:''
    16 	poolDictionaries:''
    17 	category:'Interface-UIPainter'
    17 	category:'Interface-UIPainter'
    18 !
    18 !
    19 
    19 
       
    20 MultiSelectionInList subclass:#ListHolder
       
    21 	instanceVariableNames:'painter propertyList masterElement disabledChanged'
       
    22 	classVariableNames:''
       
    23 	poolDictionaries:''
       
    24 	privateIn:UIPainterView
       
    25 !
       
    26 
    20 Object subclass:#ViewProperty
    27 Object subclass:#ViewProperty
    21 	instanceVariableNames:'view spec identifier'
    28 	instanceVariableNames:'view spec identifier'
    22 	classVariableNames:'Identifier'
    29 	classVariableNames:'Identifier'
    23 	poolDictionaries:''
       
    24 	privateIn:UIPainterView
       
    25 !
       
    26 
       
    27 MultiSelectionInList subclass:#ListHolder
       
    28 	instanceVariableNames:'painter propertyList masterElement disabledChanged'
       
    29 	classVariableNames:''
       
    30 	poolDictionaries:''
    30 	poolDictionaries:''
    31 	privateIn:UIPainterView
    31 	privateIn:UIPainterView
    32 !
    32 !
    33 
    33 
    34 !UIPainterView class methodsFor:'documentation'!
    34 !UIPainterView class methodsFor:'documentation'!
   576 
   576 
   577     listHolder propertiesDo:[:aProp |
   577     listHolder propertiesDo:[:aProp |
   578         |modelSelector menuSelector protoSpec thisCode|
   578         |modelSelector menuSelector protoSpec thisCode|
   579 
   579 
   580         protoSpec := aProp spec.
   580         protoSpec := aProp spec.
   581         protoSpec isNil ifTrue:[
   581 
   582             self halt.
       
   583             protoSpec := aProp view specClass basicNew.
       
   584         ].
       
   585         (modelSelector := aProp model) notNil ifTrue:[
   582         (modelSelector := aProp model) notNil ifTrue:[
   586             (cls implements:modelSelector asSymbol) ifFalse:[
   583             (cls implements:modelSelector asSymbol) ifFalse:[
   587                 skip := false.
   584                 skip := false.
   588                 (cls isSubclassOf:SimpleDialog) ifTrue:[
   585                 (cls isSubclassOf:SimpleDialog) ifTrue:[
   589                     skip := SimpleDialog implements:modelSelector asSymbol
   586                     skip := SimpleDialog implements:modelSelector asSymbol
   600             ].
   597             ].
   601         ].
   598         ].
   602 
   599 
   603         (menuSelector := aProp menu) notNil ifTrue:[
   600         (menuSelector := aProp menu) notNil ifTrue:[
   604             (cls implements:menuSelector asSymbol) ifFalse:[
   601             (cls implements:menuSelector asSymbol) ifFalse:[
   605                 "/ kludge ..
       
   606                 thisCode := (self generateAspectMethodFor:menuSelector spec:protoSpec inClass:cls).
   602                 thisCode := (self generateAspectMethodFor:menuSelector spec:protoSpec inClass:cls).
   607                 code := code , thisCode
   603                 code := code , thisCode
   608             ]
   604             ]
   609         ].
   605         ].
   610 
   606 
   611         aProp spec aspectSelectors do:[:aSel|
   607         aProp spec aspectSelectors do:[:aSel|
   612             (cls implements:aSel asSymbol) ifFalse:[
   608             (cls implements:aSel asSymbol) ifFalse:[
   613                 "/ kludge ..
       
   614                 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls).
   609                 thisCode := (self generateAspectMethodFor:aSel spec:protoSpec inClass:cls).
   615                 code := code , thisCode
   610                 code := code , thisCode
   616             ]
   611             ]
   617         ].
   612         ].
   618         aProp spec actionSelectors do:[:aSel|
   613         aProp spec actionSelectors do:[:aSel|
   619             (cls implements:aSel asSymbol) ifFalse:[
   614             (cls implements:aSel asSymbol) ifFalse:[
   620                 "/ kludge ..
       
   621                 thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls).
   615                 thisCode := (self generateActionMethodFor:aSel spec:protoSpec inClass:cls).
   622                 code := code , thisCode
   616                 code := code , thisCode
   623             ]
   617             ]
   624         ].
   618         ].
   625 
   619 
   626     ].
   620     ].
   627     ^ code
   621     ^ code
   628 
       
   629     "Modified: 17.6.1997 / 14:07:36 / cg"
       
   630 !
       
   631 
       
   632 generateClassDefinition
       
   633     |defCode|
       
   634 
       
   635     defCode := superclassName , ' subclass:#' , className , '\'.
       
   636     defCode := defCode , '  instanceVariableNames:'''.
       
   637     defCode := defCode , self subviewVariableNames , '''\'.
       
   638     defCode := defCode , '  classVariableNames:''''\'.
       
   639     defCode := defCode , '  poolDictionaries:''''\'.
       
   640     defCode := defCode , '  category:''' , categoryName , '''\'.
       
   641     defCode := defCode , Character excla asString , '\\'.
       
   642 
       
   643     ^ defCode withCRs
       
   644 
       
   645 
       
   646 
       
   647 !
       
   648 
       
   649 generateCode
       
   650     "generate code for the windowSpec method"
       
   651 
       
   652     |code|
       
   653 
       
   654     self resetModification.
       
   655 
       
   656     code := ''.
       
   657 
       
   658 "/    (Smalltalk classNamed:className asSymbol) isNil ifTrue:[
       
   659 "/        code := code , self generateClassDefinition.
       
   660 "/    ].
       
   661 "/    code := code , self generateInitMethod.
       
   662 
       
   663     code := code , self generateWindowSpecMethodSource.
       
   664 
       
   665 "/    code := code , self generateAspectMethods.
       
   666 
       
   667     ^ code withCRs
       
   668 
       
   669     "Modified: 5.9.1995 / 20:57:53 / claus"
       
   670 !
       
   671 
       
   672 generateInitCodeForView:aView
       
   673     |code c name p outlets moreCode sym typ val|
       
   674 
       
   675     " <name> := <ViewClass> in:<name-of-superview>"
       
   676 
       
   677     code := ''.
       
   678 
       
   679     p := self propertyOfView:aView.
       
   680     name := p at:#variableName.
       
   681     c := '    ' , name , ' := ' ,
       
   682          (aView class name) , ' in:' , (self uniqueNameOf:(aView superView)) , '.\'.
       
   683 
       
   684     " <name> origin:(...) extent:(...)"
       
   685 
       
   686     c := c , '    ' , name , ' origin:(', aView origin printString , ')'
       
   687                     , ' extent:(', aView extent printString , ').\'.
       
   688 
       
   689     moreCode := p at:#initCode ifAbsent:nil.
       
   690     moreCode notNil ifTrue:[
       
   691         c := c , moreCode , '\' withCRs
       
   692     ].
       
   693 
       
   694     code := code , c withCRs.
       
   695 
       
   696     " <name> <symbol>:<value>"
       
   697 
       
   698     outlets := p at:#outlets ifAbsent:[nil].
       
   699     outlets notNil ifTrue:[
       
   700         outlets do:[:selectorOutlet |
       
   701             sym := selectorOutlet at:#selector.
       
   702             typ := selectorOutlet at:#type.
       
   703             val := selectorOutlet at:#value.
       
   704             c :=  '    ' , name , ' ' , sym.
       
   705             (typ == #number) ifTrue:[
       
   706                 c := c , val printString
       
   707             ].
       
   708             (typ == #string) ifTrue:[
       
   709                 c := c , '''' , val , ''''
       
   710             ].
       
   711             (typ == #text) ifTrue:[
       
   712                 c := c , '''' , val asString , ''''
       
   713             ].
       
   714             (typ == #strings) ifTrue:[
       
   715                 c := c , '#( '.
       
   716                 val asText do:[:aString |
       
   717                     c := c , '''' , aString , ''' '
       
   718                 ].
       
   719                 c := c , ')'
       
   720             ].
       
   721             (typ == #block) ifTrue:[
       
   722                 c := c , val
       
   723             ].
       
   724             (typ == #color) ifTrue:[
       
   725                 c := c , '(Color name:''' , val , ''')'
       
   726             ].
       
   727             c := c , '.' , Character cr asString.
       
   728             code := code , c
       
   729         ]
       
   730     ].
       
   731 
       
   732     self subviewsOf:aView do:[:v |
       
   733         code := code , (self generateInitCodeForView:v)
       
   734     ].
       
   735     ^ code.
       
   736 
       
   737     "Modified: 5.9.1995 / 20:06:07 / claus"
       
   738 !
       
   739 
       
   740 generateInitMethod
       
   741     |defCode code|
       
   742 
       
   743     defCode := Character excla asString ,
       
   744                className , ' methodsFor:''initialization''' ,
       
   745                Character excla asString , '\\'.
       
   746 
       
   747     defCode := defCode , 'initialize\'.
       
   748     defCode := defCode , '    super initialize.\'.
       
   749     defCode := defCode , '    self setupSubViews.\'.
       
   750     defCode := defCode , '    self setupLocalStuff\'.
       
   751     defCode := defCode , Character excla asString , '\\'.
       
   752 
       
   753     defCode := defCode , 'setupSubViews\'.
       
   754     code := defCode withCRs.
       
   755 
       
   756     self subviewsOf:self do:[:v |
       
   757         code := code , (self generateInitCodeForView:v)
       
   758     ].
       
   759     code := code , '    ^ self\' withCRs.
       
   760 
       
   761     defCode := Character excla asString , '\\'.
       
   762     defCode := defCode , 'setupLocalStuff\'.
       
   763     defCode := defCode , '    ^ self\'.
       
   764     defCode := defCode , Character excla asString , ' ' ,
       
   765                          Character excla asString , '\\'.
       
   766 
       
   767     code := code , defCode withCRs.
       
   768     ^ code.
       
   769 
       
   770 
       
   771 
       
   772 
       
   773 !
   622 !
   774 
   623 
   775 generateWindowSpecMethodSource
   624 generateWindowSpecMethodSource
   776     |t s spec specArray str code|
   625     |t s spec specArray str code|
   777 
   626 
   817             , '\\'.
   666             , '\\'.
   818 
   667 
   819     ^ code withCRs
   668     ^ code withCRs
   820 
   669 
   821     "Modified: 5.9.1995 / 21:01:35 / claus"
   670     "Modified: 5.9.1995 / 21:01:35 / claus"
   822 !
       
   823 
       
   824 storeContentsOn:aStream
       
   825     listHolder propertiesDo:[:p| p storeOn:aStream]
       
   826 !
       
   827 
       
   828 subviewsOf:aView do:aBlock
       
   829     |subs v|
       
   830 
       
   831     (subs := aView subViews) notNil ifTrue:[
       
   832         subs do:[:v|
       
   833             (v ~~ inputView and:[v notNil]) ifTrue:[
       
   834                 (listHolder detectProperty:[:p|p view == v]) notNil ifTrue:[ 
       
   835                     (v superView == aView) ifTrue:[
       
   836                         aBlock value:v
       
   837                     ]
       
   838                 ]
       
   839             ]
       
   840         ]
       
   841     ]
       
   842 
       
   843 ! !
   671 ! !
   844 
   672 
   845 !UIPainterView methodsFor:'initialization'!
   673 !UIPainterView methodsFor:'initialization'!
   846 
   674 
   847 destroy
   675 destroy
   863     methodName     := 'windowSpec'.
   691     methodName     := 'windowSpec'.
   864     categoryName   := 'Applications'.
   692     categoryName   := 'Applications'.
   865     listHolder     := ListHolder for:self.
   693     listHolder     := ListHolder for:self.
   866     HandCursor     := Cursor leftHand.
   694     HandCursor     := Cursor leftHand.
   867 
   695 
   868 !
       
   869 
       
   870 initializeCreatedObject:anObject
       
   871     "set default properties for a created object
       
   872     "
       
   873     |props spec cls|
       
   874 
       
   875     cls   := anObject class.
       
   876     spec  := anObject specClass fromView:anObject.
       
   877     props := ViewProperty new.
       
   878     props view:anObject.
       
   879     props spec:spec.
       
   880     props name:(self uniqueNameFor:spec).
       
   881     listHolder add:props.
       
   882 
       
   883     ((spec respondsTo:#label:) and:[self supportsLabel:anObject]) ifTrue:[
       
   884         anObject label:(props name).
       
   885         spec label:(props name)
       
   886     ].
       
   887 
       
   888     undoHistory withinTransaction:#create text:(props name) do:[
       
   889         undoHistory addUndoSelector:#undoCreate: withArgs:(props identifier)
       
   890     ].
       
   891 !
   696 !
   892 
   697 
   893 setupFromSpec:specOrSpecArray
   698 setupFromSpec:specOrSpecArray
   894     |spec builder|
   699     |spec builder|
   895 
   700 
  1075         ].
   880         ].
  1076         ^ prop name
   881         ^ prop name
  1077     ].
   882     ].
  1078     ^ 'self'
   883     ^ 'self'
  1079 
   884 
  1080 ! !
       
  1081 
       
  1082 !UIPainterView methodsFor:'selection'!
       
  1083 
       
  1084 addTreeFrom:aView to:aCollection
       
  1085     "add aView and contained subcomponents to collection
       
  1086     "
       
  1087     (self propertyOfView:aView) notNil ifTrue:[
       
  1088         aCollection add:aView.
       
  1089 
       
  1090         (aView subViews notNil) ifTrue:[
       
  1091             aView subViews do:[:subView|
       
  1092                 self addTreeFrom:subView to:aCollection
       
  1093             ]
       
  1094         ].
       
  1095     ]
       
  1096 
       
  1097 !
       
  1098 
       
  1099 selectSubComponents
       
  1100     "select all subcomponents for current selection
       
  1101     "
       
  1102     |startAtView aCollection|
       
  1103 
       
  1104     aCollection := OrderedCollection new.
       
  1105     startAtView := self singleSelection.
       
  1106 
       
  1107     startAtView isNil ifTrue:[
       
  1108         self subViews notNil ifTrue:[
       
  1109             self subViews do:[:subView|
       
  1110                 subView ~~ inputView ifTrue:[
       
  1111                     self addTreeFrom:subView to:aCollection
       
  1112                 ]
       
  1113             ]
       
  1114         ]
       
  1115     ] ifFalse:[
       
  1116         self addTreeFrom:startAtView to:aCollection
       
  1117     ].
       
  1118 
       
  1119     aCollection size > 1 ifTrue:[
       
  1120         self updateSelectionFrom:aCollection.
       
  1121         self selectionChanged
       
  1122     ]
       
  1123 ! !
   885 ! !
  1124 
   886 
  1125 !UIPainterView methodsFor:'specification'!
   887 !UIPainterView methodsFor:'specification'!
  1126 
   888 
  1127 addSpec:aSpecification builder:aBuilder in:aFrame
   889 addSpec:aSpecification builder:aBuilder in:aFrame
  1243             ]
  1005             ]
  1244         ]
  1006         ]
  1245     ]
  1007     ]
  1246 ! !
  1008 ! !
  1247 
  1009 
  1248 !UIPainterView methodsFor:'testing'!
       
  1249 
       
  1250 isHorizontalResizable:aComponent
       
  1251     "returns true if instance is horizontal resizeable
       
  1252     "
       
  1253     (aComponent isKindOf:ScrollBar) ifTrue:[
       
  1254         ^ aComponent orientation == #horizontal
       
  1255     ].
       
  1256     (aComponent isKindOf:Scroller) ifTrue:[
       
  1257         ^ aComponent orientation == #horizontal
       
  1258     ].
       
  1259     (aComponent isKindOf:Slider) ifTrue:[
       
  1260         ^ aComponent orientation == #horizontal
       
  1261     ].
       
  1262     ^ true
       
  1263 
       
  1264 
       
  1265 !
       
  1266 
       
  1267 isVerticalResizable:aComponent
       
  1268     "returns true if instance is vertical resizeable
       
  1269     "
       
  1270     (aComponent isKindOf:EditField) ifTrue:[
       
  1271         ^ false
       
  1272     ].
       
  1273     (aComponent isKindOf:ComboBoxView) ifTrue:[
       
  1274         ^ false
       
  1275     ].
       
  1276     (aComponent isKindOf:CheckBox) ifTrue:[
       
  1277         ^ false
       
  1278     ].
       
  1279     (aComponent isKindOf:ScrollBar) ifTrue:[
       
  1280         ^ aComponent orientation == #vertical
       
  1281     ].
       
  1282     (aComponent isKindOf:Scroller) ifTrue:[
       
  1283         ^ aComponent orientation == #vertical
       
  1284     ].
       
  1285     (aComponent isKindOf:Slider) ifTrue:[
       
  1286         ^ aComponent orientation == #vertical
       
  1287     ].
       
  1288     ^ true
       
  1289 
       
  1290 
       
  1291 !
       
  1292 
       
  1293 supportsLabel:aComponent
       
  1294     "returns true if component supports label
       
  1295     "
       
  1296     (aComponent respondsTo:#label:) ifTrue:[
       
  1297         (    (aComponent isKindOf:ArrowButton) 
       
  1298           or:[aComponent isKindOf:CheckToggle]
       
  1299         ) ifFalse:[
       
  1300             ^ true
       
  1301         ]
       
  1302     ].
       
  1303     ^ false
       
  1304 ! !
       
  1305 
       
  1306 !UIPainterView methodsFor:'transaction'!
  1010 !UIPainterView methodsFor:'transaction'!
  1307 
  1011 
  1308 transaction:aType objects:something do:aOneArgBlock
  1012 transaction:aType objects:something do:aOneArgBlock
  1309     "opens a transaction and evaluates a block within the transaction; the
  1013     "opens a transaction and evaluates a block within the transaction; the
  1310      argument to the block is a view from derived from something
  1014      argument to the block is a view from derived from something
  1455             self elementChangedSize:view.
  1159             self elementChangedSize:view.
  1456         ].
  1160         ].
  1457         listHolder propertyChanged:props.
  1161         listHolder propertyChanged:props.
  1458     ]
  1162     ]
  1459 
  1163 
  1460 ! !
       
  1461 
       
  1462 !UIPainterView::ViewProperty class methodsFor:'documentation'!
       
  1463 
       
  1464 version
       
  1465     ^ '$Header$'
       
  1466 ! !
       
  1467 
       
  1468 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1469 
       
  1470 new
       
  1471     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1472                      ifFalse:[Identifier := 1].
       
  1473 
       
  1474   ^ self basicNew initialize
       
  1475 ! !
       
  1476 
       
  1477 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1478 
       
  1479 identifier
       
  1480     "return the unique identifier assigned to property
       
  1481     "
       
  1482     ^ identifier
       
  1483 !
       
  1484 
       
  1485 identifier:anIdentifier
       
  1486     "set the unique identifier assigned to property; called after an restore of
       
  1487      a deleted instance
       
  1488     "
       
  1489     identifier := anIdentifier
       
  1490 !
       
  1491 
       
  1492 spec
       
  1493     "return the value of the instance variable 'spec' (automatically generated)"
       
  1494 
       
  1495     ^ spec!
       
  1496 
       
  1497 spec:something
       
  1498     "set the value of the instance variable 'spec' (automatically generated)"
       
  1499 
       
  1500     spec := something.!
       
  1501 
       
  1502 view
       
  1503     "return the value of the instance variable 'view' (automatically generated)"
       
  1504 
       
  1505     ^ view!
       
  1506 
       
  1507 view:something
       
  1508     "set the value of the instance variable 'view' (automatically generated)"
       
  1509 
       
  1510     view := something.! !
       
  1511 
       
  1512 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1513 
       
  1514 initialize
       
  1515     super initialize.
       
  1516     identifier := Identifier
       
  1517 ! !
       
  1518 
       
  1519 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1520 
       
  1521 extractNumberStartingAt:anIndex
       
  1522     "return the number from the name starting at anIndex or 0.
       
  1523     "
       
  1524     |val|
       
  1525 
       
  1526     val := 0.
       
  1527 
       
  1528     self name from:anIndex do:[:c|
       
  1529         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1530                  ifFalse:[^ 0]
       
  1531     ].
       
  1532     ^ val
       
  1533         
       
  1534 ! !
       
  1535 
       
  1536 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1537 
       
  1538 doesNotUnderstand:aMessage
       
  1539     spec notNil ifTrue:[
       
  1540         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1541     ].
       
  1542     ^ nil
       
  1543 !
       
  1544 
       
  1545 layout
       
  1546     spec layout
       
  1547 !
       
  1548 
       
  1549 layout:aLayout
       
  1550     spec layout:aLayout
       
  1551 !
       
  1552 
       
  1553 name
       
  1554     ^ spec name
       
  1555 !
       
  1556 
       
  1557 name:aName
       
  1558     spec name:aName
       
  1559 ! !
  1164 ! !
  1560 
  1165 
  1561 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1166 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1562 
  1167 
  1563 for:aPainter
  1168 for:aPainter
  1889 
  1494 
  1890     self masterElement:masterIndex.
  1495     self masterElement:masterIndex.
  1891     super selectionIndex:aSel
  1496     super selectionIndex:aSel
  1892 ! !
  1497 ! !
  1893 
  1498 
  1894 !UIPainterView class methodsFor:'documentation'!
  1499 !UIPainterView::ViewProperty class methodsFor:'documentation'!
  1895 
  1500 
  1896 version
  1501 version
  1897     ^ '$Header$'
  1502     ^ '$Header$'
  1898 ! !
  1503 ! !
       
  1504 
       
  1505 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1506 
       
  1507 new
       
  1508     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1509                      ifFalse:[Identifier := 1].
       
  1510 
       
  1511   ^ self basicNew initialize
       
  1512 ! !
       
  1513 
       
  1514 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1515 
       
  1516 identifier
       
  1517     "return the unique identifier assigned to property
       
  1518     "
       
  1519     ^ identifier
       
  1520 !
       
  1521 
       
  1522 identifier:anIdentifier
       
  1523     "set the unique identifier assigned to property; called after an restore of
       
  1524      a deleted instance
       
  1525     "
       
  1526     identifier := anIdentifier
       
  1527 !
       
  1528 
       
  1529 spec
       
  1530     "return the value of the instance variable 'spec' (automatically generated)"
       
  1531 
       
  1532     ^ spec!
       
  1533 
       
  1534 spec:something
       
  1535     "set the value of the instance variable 'spec' (automatically generated)"
       
  1536 
       
  1537     spec := something.!
       
  1538 
       
  1539 view
       
  1540     "return the value of the instance variable 'view' (automatically generated)"
       
  1541 
       
  1542     ^ view!
       
  1543 
       
  1544 view:something
       
  1545     "set the value of the instance variable 'view' (automatically generated)"
       
  1546 
       
  1547     view := something.! !
       
  1548 
       
  1549 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1550 
       
  1551 initialize
       
  1552     super initialize.
       
  1553     identifier := Identifier
       
  1554 ! !
       
  1555 
       
  1556 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1557 
       
  1558 extractNumberStartingAt:anIndex
       
  1559     "return the number from the name starting at anIndex or 0.
       
  1560     "
       
  1561     |val|
       
  1562 
       
  1563     val := 0.
       
  1564 
       
  1565     self name from:anIndex do:[:c|
       
  1566         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1567                  ifFalse:[^ 0]
       
  1568     ].
       
  1569     ^ val
       
  1570         
       
  1571 ! !
       
  1572 
       
  1573 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1574 
       
  1575 doesNotUnderstand:aMessage
       
  1576     spec notNil ifTrue:[
       
  1577         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1578     ].
       
  1579     ^ nil
       
  1580 !
       
  1581 
       
  1582 layout
       
  1583     spec layout
       
  1584 !
       
  1585 
       
  1586 layout:aLayout
       
  1587     spec layout:aLayout
       
  1588 !
       
  1589 
       
  1590 name
       
  1591     ^ spec name
       
  1592 !
       
  1593 
       
  1594 name:aName
       
  1595     spec name:aName
       
  1596 ! !
       
  1597 
       
  1598 !UIPainterView class methodsFor:'documentation'!
       
  1599 
       
  1600 version
       
  1601     ^ '$Header$'
       
  1602 ! !