equal
deleted
inserted
replaced
411 ]. |
411 ]. |
412 ] ifFalse:[ |
412 ] ifFalse:[ |
413 "/ ignore the selection and paste where we drop!! |
413 "/ ignore the selection and paste where we drop!! |
414 pastePoint := aPointOrNilOrKeep. |
414 pastePoint := aPointOrNilOrKeep. |
415 pastePoint isNil ifTrue:[ |
415 pastePoint isNil ifTrue:[ |
416 pastePoint := device |
416 pastePoint := self graphicsDevice |
417 translatePoint:(sensor mousePoint) |
417 translatePoint:(sensor mousePoint) |
418 fromView:nil |
418 fromView:nil |
419 toView:self. |
419 toView:self. |
420 ]. |
420 ]. |
421 containerToPasteInto isNil ifTrue:[ |
421 containerToPasteInto isNil ifTrue:[ |
491 aPointOrNilOrKeep == #keep ifTrue:[ |
491 aPointOrNilOrKeep == #keep ifTrue:[ |
492 newOrigin := uiPainterAttributes at:#origin. |
492 newOrigin := uiPainterAttributes at:#origin. |
493 ] ifFalse:[ |
493 ] ifFalse:[ |
494 thisAbsOrigin := uiPainterAttributes at:#absOrigin. |
494 thisAbsOrigin := uiPainterAttributes at:#absOrigin. |
495 |
495 |
496 newOrigin := device |
496 newOrigin := self graphicsDevice |
497 translatePoint:thisAbsOrigin |
497 translatePoint:thisAbsOrigin |
498 fromView:self |
498 fromView:self |
499 toView:containerToPasteInto. |
499 toView:containerToPasteInto. |
500 ]. |
500 ]. |
501 ] ifFalse:[ |
501 ] ifFalse:[ |
502 pastePoint isNil ifTrue:[ pastePoint := 0@0 ]. |
502 pastePoint isNil ifTrue:[ pastePoint := 0@0 ]. |
503 newOrigin := device |
503 newOrigin := self graphicsDevice |
504 translatePoint:pastePoint |
504 translatePoint:pastePoint |
505 fromView:self |
505 fromView:self |
506 toView:containerToPasteInto. |
506 toView:containerToPasteInto. |
507 ]. |
507 ]. |
508 |
508 |
1828 |
1828 |
1829 gridPixmap := nil. |
1829 gridPixmap := nil. |
1830 defaultViewBackground := self class defaultViewBackgroundColor. |
1830 defaultViewBackground := self class defaultViewBackgroundColor. |
1831 |
1831 |
1832 shown ifTrue:[ |
1832 shown ifTrue:[ |
1833 self viewBackground: (defaultViewBackground isColor |
1833 self viewBackground: (defaultViewBackground isColor |
1834 ifTrue: [defaultViewBackground] |
1834 ifTrue: [defaultViewBackground] |
1835 ifFalse:[Black]). |
1835 ifFalse:[self blackColor]). |
1836 self clear. |
1836 self clear. |
1837 ]. |
1837 ]. |
1838 |
1838 |
1839 gridShown ifTrue:[ |
1839 gridShown ifTrue:[ |
1840 self defineGrid. |
1840 self defineGrid. |
1841 gridPixmap colorMap: (defaultViewBackground isColor |
1841 gridPixmap colorMap: (defaultViewBackground isColor |
1842 ifTrue: [Array with:defaultViewBackground with:Color darkGray] |
1842 ifTrue: [Array with:defaultViewBackground with:Color darkGray] |
1843 ifFalse:[Array with:White with:Black]). |
1843 ifFalse:[Array with:self whiteColor with:self blackColor]). |
1844 self viewBackground:gridPixmap. |
1844 self viewBackground:gridPixmap. |
1845 ]. |
1845 ]. |
1846 |
1846 |
1847 self invalidate |
1847 self invalidate |
1848 |
|
1849 ! ! |
1848 ! ! |
1850 |
1849 |
1851 !UIPainterView methodsFor:'group & ungroup'! |
1850 !UIPainterView methodsFor:'group & ungroup'! |
1852 |
1851 |
1853 group |
1852 group |
1977 |
1976 |
1978 create |
1977 create |
1979 "colors on device" |
1978 "colors on device" |
1980 |
1979 |
1981 super create. |
1980 super create. |
1982 handleColorBlack := handleColorBlack onDevice:device. |
1981 handleColorBlack := handleColorBlack onDevice:self graphicsDevice. |
1983 handleColorWhite := handleColorWhite onDevice:device. |
1982 handleColorWhite := handleColorWhite onDevice:self graphicsDevice. |
1984 handleMasterColor := handleMasterColor onDevice:device. |
1983 handleMasterColor := handleMasterColor onDevice:self graphicsDevice. |
1985 ! |
1984 ! |
1986 |
1985 |
1987 initialize |
1986 initialize |
1988 "setup attributes |
1987 "setup attributes |
1989 " |
1988 " |
2574 (forceNewView or:[aSpec needsRebuildForAttributes]) ifTrue:[ |
2573 (forceNewView or:[aSpec needsRebuildForAttributes]) ifTrue:[ |
2575 "/ needs a full rebuild (in case view class depends upon spec-attribute) |
2574 "/ needs a full rebuild (in case view class depends upon spec-attribute) |
2576 v := aSpec buildViewWithLayoutFor:builder in:(self findContainerOfView:aView). |
2575 v := aSpec buildViewWithLayoutFor:builder in:(self findContainerOfView:aView). |
2577 v realize. |
2576 v realize. |
2578 aView destroy. |
2577 aView destroy. |
2579 device sync. |
2578 self sync. |
2580 device flush. |
|
2581 aView becomeSameAs:v. |
2579 aView becomeSameAs:v. |
2582 "/ inputView raise. |
2580 "/ inputView raise. |
2583 ] ifFalse:[ |
2581 ] ifFalse:[ |
2584 aSpec setAttributesIn:aView with:builder. |
2582 aSpec setAttributesIn:aView with:builder. |
2585 self elementChangedSize:aView. |
2583 self elementChangedSize:aView. |