--- a/ObjectView.st Thu May 14 20:54:37 2009 +0200
+++ b/ObjectView.st Mon May 18 15:51:18 2009 +0200
@@ -1129,6 +1129,8 @@
Extracted into a separate method to allow easier redefinition
(different lineWidth etc)"
+ self clippedByChildren:false.
+
self xoring:[
self lineWidth:0.
"/ self lineStyle:#dashed.
@@ -1136,6 +1138,8 @@
"/ self lineStyle:#solid.
].
+ self clippedByChildren:true.
+
"Modified: 3.6.1996 / 10:02:22 / cg"
!
@@ -1391,6 +1395,12 @@
]
! !
+!ObjectView methodsFor:'enumerating'!
+
+contentsDo:aBlock
+ contents do:aBlock
+! !
+
!ObjectView methodsFor:'event handling'!
buttonCtrlPress:button x:x y:y
@@ -1457,9 +1467,11 @@
].
motionAction notNil ifTrue:[
- inMotion := true.
- motionAction value:movePoint.
- lastButt := movePoint.
+ self sensor motionEventPending ifFalse:[
+ inMotion := true.
+ motionAction value:movePoint.
+ lastButt := movePoint.
+ ].
^ self
].
lastButt := movePoint
@@ -2348,6 +2360,12 @@
^ self numberOfObjectsIntersecting:aRectangle
!
+object:anObject isContainedIn:aRectangle
+ "true, if anObject is completely inside aRectangle (for rectangle drag)"
+
+ ^ anObject isContainedIn:aRectangle
+!
+
objectsAbove:objectToBeTested do:aBlock
"do something to every object above objectToBeTested
(does not mean obscured - simply above in hierarchy)"
@@ -2386,21 +2404,21 @@
|bot|
sorted ifTrue:[
- bot := aRectangle bottom.
- contents do:[:theObject |
- (theObject isContainedIn:aRectangle) ifTrue:[
- aBlock value:theObject
- ] ifFalse:[
- theObject frame top > bot ifTrue:[^ self]
- ]
- ].
- ^ self
+ bot := aRectangle bottom.
+ self contentsDo:[:theObject |
+ (self object:theObject isContainedIn:aRectangle) ifTrue:[
+ aBlock value:theObject
+ ] ifFalse:[
+ theObject frame top > bot ifTrue:[^ self]
+ ]
+ ].
+ ^ self
].
- contents do:[:theObject |
- (theObject isContainedIn:aRectangle) ifTrue:[
- aBlock value:theObject
- ]
+ self contentsDo:[:theObject |
+ (self object:theObject isContainedIn:aRectangle) ifTrue:[
+ aBlock value:theObject
+ ]
]
!
@@ -3021,9 +3039,11 @@
|newSelection|
newSelection := OrderedCollection new.
- self objectsIn:aRectangle do:[:theObject |
- newSelection add:theObject
- ].
+ self
+ objectsIn:aRectangle
+ do:[:theObject |
+ newSelection add:theObject
+ ].
self select:newSelection.
!
@@ -3491,5 +3511,5 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.130 2009-05-10 11:02:15 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.131 2009-05-18 13:51:18 cg Exp $'
! !