--- a/ObjectView.st Wed Nov 24 13:25:23 1999 +0100
+++ b/ObjectView.st Wed Nov 24 15:54:38 1999 +0100
@@ -581,7 +581,7 @@
sel := self getSelection.
((device platformName = 'WIN32')
- or:[device getSelectionOwnerOf:(device atomIDOf:'PRIMARY') == drawableId])
+ or:[(device getSelectionOwnerOf:(device atomIDOf:'PRIMARY')) == drawableId])
ifTrue:[
"
a local selection - paste with some offset
@@ -2610,11 +2610,11 @@
hsize := self handleSize.
halfSize := hsize // 2.
- anObject handlesDo:[:point |
- self fillRectangleX:(point x - halfSize)
- y:(point y - halfSize)
- width:hsize
- height:hsize
+ self handlesOf:anObject do:[:handlePoint |
+ self fillRectangleX:(handlePoint x - halfSize)
+ y:(handlePoint y - halfSize)
+ width:hsize
+ height:hsize
]
!
@@ -2660,21 +2660,27 @@
^ hs
!
+handlesOf:anObject do:aBlock
+ anObject handlesDo:aBlock
+!
+
invertHandle:aHandle
self xoring:[self drawHandle:aHandle]
!
invertHandlesOf:aSelection
aSelection notNil ifTrue:[
- self xoring:[
- self forEach:aSelection do:[:anObject |
- (anObject respondsTo:#handlesDo:) ifTrue:[
- self drawHandlesFor:anObject
- ] ifFalse:[
- anObject drawOutlineIn:self
- ]
- ]
- ]
+ self clippedTo:nil do:[
+ self xoring:[
+ self forEach:aSelection do:[:anObject |
+ (anObject respondsTo:#handlesDo:) ifTrue:[
+ self drawHandlesFor:anObject
+ ] ifFalse:[
+ anObject drawOutlineIn:self
+ ]
+ ]
+ ]
+ ]
]
!
@@ -2682,21 +2688,21 @@
|found|
found := false.
- anObject handlesDo:[:handlePoint |
- (self handle:handlePoint isHitBy:aPoint) ifTrue:[
- found := true
- ]
+ self handlesOf:anObject do:[:handlePoint |
+ (self handle:handlePoint isHitBy:aPoint) ifTrue:[
+ found := true
+ ]
].
^ found
!
selectionHandlesDo:aBlock
self forEach:selection do:[:theObject |
- (theObject respondsTo:#handlesDo:) ifTrue:[
- theObject handlesDo:[:theHandle |
- aBlock value:theObject value:theHandle
- ]
- ]
+ (theObject respondsTo:#handlesDo:) ifTrue:[
+ self handlesOf:theObject do:[:handlePoint |
+ aBlock value:theObject value:handlePoint
+ ]
+ ]
]
! !
@@ -2871,7 +2877,7 @@
unselect
"unselect - hide selection; clear selection"
- selection size ~~ 0 ifTrue:[
+ selection notNil ifTrue:[
self hideSelection.
selection := nil.
self changed:#selection.
@@ -3232,5 +3238,5 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.77 1999-11-23 21:21:03 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.78 1999-11-24 14:54:38 cg Exp $'
! !