UIGalleryView.st
changeset 3081 feb178704671
parent 2563 c2298d24621d
child 3260 f7b43e21cef8
equal deleted inserted replaced
3080:918f79c8b30d 3081:feb178704671
   505     anEvent isButtonReleaseEvent ifTrue:[ ^ true ].
   505     anEvent isButtonReleaseEvent ifTrue:[ ^ true ].
   506 
   506 
   507     anEvent isButtonMotionEvent ifTrue:[
   507     anEvent isButtonMotionEvent ifTrue:[
   508         (lastClickPoint notNil and:[anEvent state ~~ 0]) ifTrue:[
   508         (lastClickPoint notNil and:[anEvent state ~~ 0]) ifTrue:[
   509             p := Point x:(anEvent x) y:(anEvent y).
   509             p := Point x:(anEvent x) y:(anEvent y).
   510             p := device translatePoint:p fromView:evView toView:self.
   510             p := self graphicsDevice translatePoint:p fromView:evView toView:self.
   511 
   511 
   512             (lastClickPoint dist:p) > 20.0 ifTrue:[
   512             (lastClickPoint dist:p) > 20.0 ifTrue:[
   513                 self startDragFrom:evView.
   513                 self startDragFrom:evView.
   514                 lastClickPoint := nil.
   514                 lastClickPoint := nil.
   515             ]
   515             ]
   522 
   522 
   523         button := anEvent button.
   523         button := anEvent button.
   524 
   524 
   525         (button == 1 or:[button == #select]) ifTrue:[
   525         (button == 1 or:[button == #select]) ifTrue:[
   526             p := Point x:(anEvent x) y:(anEvent y).
   526             p := Point x:(anEvent x) y:(anEvent y).
   527             p := device translatePoint:p fromView:evView toView:self.
   527             p := self graphicsDevice translatePoint:p fromView:evView toView:self.
   528 
   528 
   529             self selection:(self findObjectAt:p).
   529             self selection:(self findObjectAt:p).
   530 
   530 
   531             selection notNil ifTrue:[
   531             selection notNil ifTrue:[
   532                 lastClickPoint := p.
   532                 lastClickPoint := p.
   586 findObjectAt:aPoint
   586 findObjectAt:aPoint
   587     |seeIfWidgetIsHit p x y|
   587     |seeIfWidgetIsHit p x y|
   588 
   588 
   589     seeIfWidgetIsHit := 
   589     seeIfWidgetIsHit := 
   590         [:v |
   590         [:v |
   591             p := device translatePoint:aPoint fromView:self toView:v.
   591             p := self graphicsDevice translatePoint:aPoint fromView:self toView:v.
   592             x := p x.
   592             x := p x.
   593             y := p y.
   593             y := p y.
   594 
   594 
   595             (     x >= 0 and:[x <= v width
   595             (     x >= 0 and:[x <= v width
   596              and:[y >= 0 and:[y <= v height
   596              and:[y >= 0 and:[y <= v height
   779 !UIGalleryView class methodsFor:'documentation'!
   779 !UIGalleryView class methodsFor:'documentation'!
   780 
   780 
   781 version
   781 version
   782     ^ '$Header$'
   782     ^ '$Header$'
   783 ! !
   783 ! !
       
   784