equal
deleted
inserted
replaced
1 "{ Encoding: utf8 }" |
|
2 |
|
3 " |
1 " |
4 COPYRIGHT (c) 1995 by eXept Software AG |
2 COPYRIGHT (c) 1995 by eXept Software AG |
5 All Rights Reserved |
3 All Rights Reserved |
6 |
4 |
7 This software is furnished under a license and may be used |
5 This software is furnished under a license and may be used |
620 |
618 |
621 anEvent isButtonMotionEvent ifTrue:[ |
619 anEvent isButtonMotionEvent ifTrue:[ |
622 "/ use current point - layout of underlaying view might change |
620 "/ use current point - layout of underlaying view might change |
623 "/ and computation dependent on origin is wrong |
621 "/ and computation dependent on origin is wrong |
624 p := self sensor mousePoint. |
622 p := self sensor mousePoint. |
625 p := self graphicsDevice translatePoint:p fromView:nil toView:self. |
623 p := device translatePoint:p fromView:nil toView:self. |
626 ] ifFalse:[ |
624 ] ifFalse:[ |
627 p := (anEvent x) @ (anEvent y). |
625 p := (anEvent x) @ (anEvent y). |
628 p := self graphicsDevice translatePoint:p fromView:evView toView:self. |
626 p := device translatePoint:p fromView:evView toView:self. |
629 ]. |
627 ]. |
630 |
628 |
631 "/ patch the event |
629 "/ patch the event |
632 anEvent x:p x. |
630 anEvent x:p x. |
633 anEvent y:p y. |
631 anEvent y:p y. |
931 ^ self |
929 ^ self |
932 ] |
930 ] |
933 ]. |
931 ]. |
934 viewOperatedUpon := selectedView. |
932 viewOperatedUpon := selectedView. |
935 |
933 |
936 pView := self graphicsDevice translatePoint:aPoint fromView:self toView:selectedView superView. |
934 pView := device translatePoint:aPoint fromView:self toView:selectedView superView. |
937 (selectedView bounds containsPoint:pView) ifFalse:[ |
935 (selectedView bounds containsPoint:pView) ifFalse:[ |
938 "/ clicked outside the selection |
936 "/ clicked outside the selection |
939 (self sensor ctrlDown and:[self canChangeLayoutOfView:selectedView]) ifFalse:[ |
937 (self sensor ctrlDown and:[self canChangeLayoutOfView:selectedView]) ifFalse:[ |
940 viewOperatedUpon := nil |
938 viewOperatedUpon := nil |
941 ] |
939 ] |
1470 "/ reverse search, to find covering ones first. |
1468 "/ reverse search, to find covering ones first. |
1471 aView subViews reverseDo:[:aSubView | |
1469 aView subViews reverseDo:[:aSubView | |
1472 |innerObject relPoint| |
1470 |innerObject relPoint| |
1473 |
1471 |
1474 ((aSubView origin extent:aSubView extent) containsPoint:aPoint) ifTrue:[ |
1472 ((aSubView origin extent:aSubView extent) containsPoint:aPoint) ifTrue:[ |
1475 relPoint := self graphicsDevice translatePoint:aPoint fromView:aView toView:aSubView. |
1473 relPoint := device translatePoint:aPoint fromView:aView toView:aSubView. |
1476 innerObject := self findObjectAt:relPoint in:aSubView. |
1474 innerObject := self findObjectAt:relPoint in:aSubView. |
1477 innerObject notNil ifTrue:[ ^ innerObject ]. |
1475 innerObject notNil ifTrue:[ ^ innerObject ]. |
1478 lastHit := aSubView. |
1476 lastHit := aSubView. |
1479 lastRelPoint := relPoint. |
1477 lastRelPoint := relPoint. |
1480 ] |
1478 ] |