UIPainterView.st
changeset 162 d3f0d5dd53b1
parent 158 6e7f892308ae
child 165 f7df2a53d042
equal deleted inserted replaced
161:12a70f62f414 162:d3f0d5dd53b1
    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'!
  1455         listHolder propertyChanged:props.
  1455         listHolder propertyChanged:props.
  1456     ]
  1456     ]
  1457 
  1457 
  1458 ! !
  1458 ! !
  1459 
  1459 
  1460 !UIPainterView::ViewProperty class methodsFor:'documentation'!
       
  1461 
       
  1462 version
       
  1463     ^ '$Header$'
       
  1464 ! !
       
  1465 
       
  1466 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1467 
       
  1468 new
       
  1469     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1470                      ifFalse:[Identifier := 1].
       
  1471 
       
  1472   ^ self basicNew initialize
       
  1473 ! !
       
  1474 
       
  1475 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1476 
       
  1477 identifier
       
  1478     "return the unique identifier assigned to property
       
  1479     "
       
  1480     ^ identifier
       
  1481 !
       
  1482 
       
  1483 identifier:anIdentifier
       
  1484     "set the unique identifier assigned to property; called after an restore of
       
  1485      a deleted instance
       
  1486     "
       
  1487     identifier := anIdentifier
       
  1488 !
       
  1489 
       
  1490 spec
       
  1491     "return the value of the instance variable 'spec' (automatically generated)"
       
  1492 
       
  1493     ^ spec!
       
  1494 
       
  1495 spec:something
       
  1496     "set the value of the instance variable 'spec' (automatically generated)"
       
  1497 
       
  1498     spec := something.!
       
  1499 
       
  1500 view
       
  1501     "return the value of the instance variable 'view' (automatically generated)"
       
  1502 
       
  1503     ^ view!
       
  1504 
       
  1505 view:something
       
  1506     "set the value of the instance variable 'view' (automatically generated)"
       
  1507 
       
  1508     view := something.! !
       
  1509 
       
  1510 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1511 
       
  1512 initialize
       
  1513     super initialize.
       
  1514     identifier := Identifier
       
  1515 ! !
       
  1516 
       
  1517 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1518 
       
  1519 extractNumberStartingAt:anIndex
       
  1520     "return the number from the name starting at anIndex or 0.
       
  1521     "
       
  1522     |val|
       
  1523 
       
  1524     val := 0.
       
  1525 
       
  1526     self name from:anIndex do:[:c|
       
  1527         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1528                  ifFalse:[^ 0]
       
  1529     ].
       
  1530     ^ val
       
  1531         
       
  1532 ! !
       
  1533 
       
  1534 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1535 
       
  1536 doesNotUnderstand:aMessage
       
  1537     spec notNil ifTrue:[
       
  1538         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1539     ].
       
  1540     ^ nil
       
  1541 !
       
  1542 
       
  1543 layout
       
  1544     spec layout
       
  1545 !
       
  1546 
       
  1547 layout:aLayout
       
  1548     spec layout:aLayout
       
  1549 !
       
  1550 
       
  1551 name
       
  1552     ^ spec name
       
  1553 !
       
  1554 
       
  1555 name:aName
       
  1556     spec name:aName
       
  1557 ! !
       
  1558 
       
  1559 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1460 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1560 
  1461 
  1561 for:aPainter
  1462 for:aPainter
  1562     ^ self new for:aPainter
  1463     ^ self new for:aPainter
  1563 ! !
  1464 ! !
  1887 
  1788 
  1888     self masterElement:masterIndex.
  1789     self masterElement:masterIndex.
  1889     super selectionIndex:aSel
  1790     super selectionIndex:aSel
  1890 ! !
  1791 ! !
  1891 
  1792 
  1892 !UIPainterView class methodsFor:'documentation'!
  1793 !UIPainterView::ViewProperty class methodsFor:'documentation'!
  1893 
  1794 
  1894 version
  1795 version
  1895     ^ '$Header$'
  1796     ^ '$Header$'
  1896 ! !
  1797 ! !
       
  1798 
       
  1799 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1800 
       
  1801 new
       
  1802     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1803                      ifFalse:[Identifier := 1].
       
  1804 
       
  1805   ^ self basicNew initialize
       
  1806 ! !
       
  1807 
       
  1808 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1809 
       
  1810 identifier
       
  1811     "return the unique identifier assigned to property
       
  1812     "
       
  1813     ^ identifier
       
  1814 !
       
  1815 
       
  1816 identifier:anIdentifier
       
  1817     "set the unique identifier assigned to property; called after an restore of
       
  1818      a deleted instance
       
  1819     "
       
  1820     identifier := anIdentifier
       
  1821 !
       
  1822 
       
  1823 spec
       
  1824     "return the value of the instance variable 'spec' (automatically generated)"
       
  1825 
       
  1826     ^ spec!
       
  1827 
       
  1828 spec:something
       
  1829     "set the value of the instance variable 'spec' (automatically generated)"
       
  1830 
       
  1831     spec := something.!
       
  1832 
       
  1833 view
       
  1834     "return the value of the instance variable 'view' (automatically generated)"
       
  1835 
       
  1836     ^ view!
       
  1837 
       
  1838 view:something
       
  1839     "set the value of the instance variable 'view' (automatically generated)"
       
  1840 
       
  1841     view := something.! !
       
  1842 
       
  1843 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1844 
       
  1845 initialize
       
  1846     super initialize.
       
  1847     identifier := Identifier
       
  1848 ! !
       
  1849 
       
  1850 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1851 
       
  1852 extractNumberStartingAt:anIndex
       
  1853     "return the number from the name starting at anIndex or 0.
       
  1854     "
       
  1855     |val|
       
  1856 
       
  1857     val := 0.
       
  1858 
       
  1859     self name from:anIndex do:[:c|
       
  1860         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1861                  ifFalse:[^ 0]
       
  1862     ].
       
  1863     ^ val
       
  1864         
       
  1865 ! !
       
  1866 
       
  1867 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1868 
       
  1869 doesNotUnderstand:aMessage
       
  1870     spec notNil ifTrue:[
       
  1871         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1872     ].
       
  1873     ^ nil
       
  1874 !
       
  1875 
       
  1876 layout
       
  1877     spec layout
       
  1878 !
       
  1879 
       
  1880 layout:aLayout
       
  1881     spec layout:aLayout
       
  1882 !
       
  1883 
       
  1884 name
       
  1885     ^ spec name
       
  1886 !
       
  1887 
       
  1888 name:aName
       
  1889     spec name:aName
       
  1890 ! !
       
  1891 
       
  1892 !UIPainterView class methodsFor:'documentation'!
       
  1893 
       
  1894 version
       
  1895     ^ '$Header$'
       
  1896 ! !