UIPainterView.st
changeset 156 b332d7117c40
parent 154 34d5602e13d7
child 158 6e7f892308ae
equal deleted inserted replaced
155:575239b7ad0b 156:b332d7117c40
     1 "
     1 "
     2  COPYRIGHT (c) 1995 by Claus Gittinger
     2  COPYRIGHT (c) 1995 by Claus Gittinger / eXept Software AG
     3 	      All Rights Reserved
     3               All Rights Reserved
     4 
     4 
     5  This software is furnished under a license and may be used
     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
     6  only in accordance with the terms of that license and with the
     7  inclusion of the above copyright notice.   This software may not
     7  inclusion of the above copyright notice.   This software may not
     8  be provided or otherwise made available to, or used by, any
     8  be provided or otherwise made available to, or used by, any
    15 	classVariableNames:'HandCursor'
    15 	classVariableNames:'HandCursor'
    16 	poolDictionaries:''
    16 	poolDictionaries:''
    17 	category:'Interface-UIPainter'
    17 	category:'Interface-UIPainter'
    18 !
    18 !
    19 
    19 
       
    20 Object subclass:#ViewProperty
       
    21 	instanceVariableNames:'view spec identifier'
       
    22 	classVariableNames:'Identifier'
       
    23 	poolDictionaries:''
       
    24 	privateIn:UIPainterView
       
    25 !
       
    26 
    20 MultiSelectionInList subclass:#ListHolder
    27 MultiSelectionInList subclass:#ListHolder
    21 	instanceVariableNames:'painter propertyList masterElement disabledChanged'
    28 	instanceVariableNames:'painter propertyList masterElement disabledChanged'
    22 	classVariableNames:''
    29 	classVariableNames:''
    23 	poolDictionaries:''
    30 	poolDictionaries:''
    24 	privateIn:UIPainterView
    31 	privateIn:UIPainterView
    25 !
    32 !
    26 
    33 
    27 Object subclass:#ViewProperty
       
    28 	instanceVariableNames:'view spec identifier'
       
    29 	classVariableNames:'Identifier'
       
    30 	poolDictionaries:''
       
    31 	privateIn:UIPainterView
       
    32 !
       
    33 
       
    34 !UIPainterView class methodsFor:'documentation'!
    34 !UIPainterView class methodsFor:'documentation'!
    35 
    35 
    36 copyright
    36 copyright
    37 "
    37 "
    38  COPYRIGHT (c) 1995 by Claus Gittinger
    38  COPYRIGHT (c) 1995 by Claus Gittinger / eXept Software AG
    39 	      All Rights Reserved
    39               All Rights Reserved
    40 
    40 
    41  This software is furnished under a license and may be used
    41  This software is furnished under a license and may be used
    42  only in accordance with the terms of that license and with the
    42  only in accordance with the terms of that license and with the
    43  inclusion of the above copyright notice.   This software may not
    43  inclusion of the above copyright notice.   This software may not
    44  be provided or otherwise made available to, or used by, any
    44  be provided or otherwise made available to, or used by, any
    53     new application derives from.
    53     new application derives from.
    54 
    54 
    55     [see also:]
    55     [see also:]
    56         UIBuilder
    56         UIBuilder
    57         UIObjectView
    57         UIObjectView
       
    58 
       
    59     [author:]
       
    60         Claus Gittinger
       
    61         Claus Atzkern
    58 "
    62 "
    59 ! !
    63 ! !
    60 
    64 
    61 !UIPainterView class methodsFor:'defaults'!
    65 !UIPainterView class methodsFor:'defaults'!
    62 
    66 
  1444         listHolder propertyChanged:props.
  1448         listHolder propertyChanged:props.
  1445     ]
  1449     ]
  1446 
  1450 
  1447 ! !
  1451 ! !
  1448 
  1452 
       
  1453 !UIPainterView::ViewProperty class methodsFor:'documentation'!
       
  1454 
       
  1455 version
       
  1456     ^ '$Header$'
       
  1457 ! !
       
  1458 
       
  1459 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1460 
       
  1461 new
       
  1462     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1463                      ifFalse:[Identifier := 1].
       
  1464 
       
  1465   ^ self basicNew initialize
       
  1466 ! !
       
  1467 
       
  1468 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1469 
       
  1470 identifier
       
  1471     "return the unique identifier assigned to property
       
  1472     "
       
  1473     ^ identifier
       
  1474 !
       
  1475 
       
  1476 identifier:anIdentifier
       
  1477     "set the unique identifier assigned to property; called after an restore of
       
  1478      a deleted instance
       
  1479     "
       
  1480     identifier := anIdentifier
       
  1481 !
       
  1482 
       
  1483 spec
       
  1484     "return the value of the instance variable 'spec' (automatically generated)"
       
  1485 
       
  1486     ^ spec!
       
  1487 
       
  1488 spec:something
       
  1489     "set the value of the instance variable 'spec' (automatically generated)"
       
  1490 
       
  1491     spec := something.!
       
  1492 
       
  1493 view
       
  1494     "return the value of the instance variable 'view' (automatically generated)"
       
  1495 
       
  1496     ^ view!
       
  1497 
       
  1498 view:something
       
  1499     "set the value of the instance variable 'view' (automatically generated)"
       
  1500 
       
  1501     view := something.! !
       
  1502 
       
  1503 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1504 
       
  1505 initialize
       
  1506     super initialize.
       
  1507     identifier := Identifier
       
  1508 ! !
       
  1509 
       
  1510 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1511 
       
  1512 extractNumberStartingAt:anIndex
       
  1513     "return the number from the name starting at anIndex or 0.
       
  1514     "
       
  1515     |val|
       
  1516 
       
  1517     val := 0.
       
  1518 
       
  1519     self name from:anIndex do:[:c|
       
  1520         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1521                  ifFalse:[^ 0]
       
  1522     ].
       
  1523     ^ val
       
  1524         
       
  1525 ! !
       
  1526 
       
  1527 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1528 
       
  1529 doesNotUnderstand:aMessage
       
  1530     spec notNil ifTrue:[
       
  1531         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1532     ].
       
  1533     ^ nil
       
  1534 !
       
  1535 
       
  1536 layout
       
  1537     spec layout
       
  1538 !
       
  1539 
       
  1540 layout:aLayout
       
  1541     spec layout:aLayout
       
  1542 !
       
  1543 
       
  1544 name
       
  1545     ^ spec name
       
  1546 !
       
  1547 
       
  1548 name:aName
       
  1549     spec name:aName
       
  1550 ! !
       
  1551 
  1449 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1552 !UIPainterView::ListHolder class methodsFor:'instance creation'!
  1450 
  1553 
  1451 for:aPainter
  1554 for:aPainter
  1452     ^ self new for:aPainter
  1555     ^ self new for:aPainter
  1453 ! !
  1556 ! !
  1777 
  1880 
  1778     self masterElement:masterIndex.
  1881     self masterElement:masterIndex.
  1779     super selectionIndex:aSel
  1882     super selectionIndex:aSel
  1780 ! !
  1883 ! !
  1781 
  1884 
  1782 !UIPainterView::ViewProperty class methodsFor:'documentation'!
  1885 !UIPainterView class methodsFor:'documentation'!
  1783 
  1886 
  1784 version
  1887 version
  1785     ^ '$Header$'
  1888     ^ '$Header$'
  1786 ! !
  1889 ! !
  1787 
       
  1788 !UIPainterView::ViewProperty class methodsFor:'instance creation'!
       
  1789 
       
  1790 new
       
  1791     Identifier notNil ifTrue:[Identifier := Identifier + 1]
       
  1792                      ifFalse:[Identifier := 1].
       
  1793 
       
  1794   ^ self basicNew initialize
       
  1795 ! !
       
  1796 
       
  1797 !UIPainterView::ViewProperty methodsFor:'accessing'!
       
  1798 
       
  1799 identifier
       
  1800     "return the unique identifier assigned to property
       
  1801     "
       
  1802     ^ identifier
       
  1803 !
       
  1804 
       
  1805 identifier:anIdentifier
       
  1806     "set the unique identifier assigned to property; called after an restore of
       
  1807      a deleted instance
       
  1808     "
       
  1809     identifier := anIdentifier
       
  1810 !
       
  1811 
       
  1812 spec
       
  1813     "return the value of the instance variable 'spec' (automatically generated)"
       
  1814 
       
  1815     ^ spec!
       
  1816 
       
  1817 spec:something
       
  1818     "set the value of the instance variable 'spec' (automatically generated)"
       
  1819 
       
  1820     spec := something.!
       
  1821 
       
  1822 view
       
  1823     "return the value of the instance variable 'view' (automatically generated)"
       
  1824 
       
  1825     ^ view!
       
  1826 
       
  1827 view:something
       
  1828     "set the value of the instance variable 'view' (automatically generated)"
       
  1829 
       
  1830     view := something.! !
       
  1831 
       
  1832 !UIPainterView::ViewProperty methodsFor:'initialization'!
       
  1833 
       
  1834 initialize
       
  1835     super initialize.
       
  1836     identifier := Identifier
       
  1837 ! !
       
  1838 
       
  1839 !UIPainterView::ViewProperty methodsFor:'misc'!
       
  1840 
       
  1841 extractNumberStartingAt:anIndex
       
  1842     "return the number from the name starting at anIndex or 0.
       
  1843     "
       
  1844     |val|
       
  1845 
       
  1846     val := 0.
       
  1847 
       
  1848     self name from:anIndex do:[:c|
       
  1849         c isDigit ifTrue:[val := val * 10 + c digitValue]
       
  1850                  ifFalse:[^ 0]
       
  1851     ].
       
  1852     ^ val
       
  1853         
       
  1854 ! !
       
  1855 
       
  1856 !UIPainterView::ViewProperty methodsFor:'spec messages'!
       
  1857 
       
  1858 doesNotUnderstand:aMessage
       
  1859     spec notNil ifTrue:[
       
  1860         (spec respondsTo:(aMessage selector)) ifTrue:[^ aMessage sendTo:spec]
       
  1861     ].
       
  1862     ^ nil
       
  1863 !
       
  1864 
       
  1865 layout
       
  1866     spec layout
       
  1867 !
       
  1868 
       
  1869 layout:aLayout
       
  1870     spec layout:aLayout
       
  1871 !
       
  1872 
       
  1873 name
       
  1874     ^ spec name
       
  1875 !
       
  1876 
       
  1877 name:aName
       
  1878     spec name:aName
       
  1879 ! !
       
  1880 
       
  1881 !UIPainterView class methodsFor:'documentation'!
       
  1882 
       
  1883 version
       
  1884     ^ '$Header$'
       
  1885 ! !