--- a/ObjectView.st Mon Apr 03 09:52:57 2006 +0200
+++ b/ObjectView.st Thu Apr 06 14:25:30 2006 +0200
@@ -3085,6 +3085,25 @@
^ nil
!
+findObjectAt:aPoint forWhich:aBlock
+ "find the last object (by looking from back to front) which is hit by
+ the argument, aPoint - this is the topmost object hit"
+
+ |hdelta|
+
+ contents isEmptyOrNil ifTrue:[^ nil].
+
+ hdelta := self hitDelta.
+ contents reverseDo:[:object |
+ (object isHitBy:aPoint withDelta:hdelta) ifTrue:[
+ (aBlock value:object) ifTrue:[
+ ^ object
+ ]
+ ]
+ ].
+ ^ nil
+!
+
findObjectAt:aPoint suchThat:aBlock
"find the last object (back to front ) which is hit by
the argument, aPoint and for which the testBlock, aBlock evaluates to
@@ -3384,5 +3403,5 @@
!ObjectView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.116 2006-03-31 17:55:09 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libwidg/ObjectView.st,v 1.117 2006-04-06 12:25:30 cg Exp $'
! !