MotionButton.st
author claus
Fri, 16 Jul 1993 11:44:30 +0200
changeset 0 0fd7841626f6
child 2 ab6002adaee1
permissions -rw-r--r--
Initial revision

"
 COPYRIGHT (c) 1989/90/91 by Claus Gittinger
	      All Rights Reserved

 This software is furnished under a license and may be used
 only in accordance with the terms of that license and with the
 inclusion of the above copyright notice.   This software may not
 be provided or otherwise made available to, or used by, any
 other person.  No title to or ownership of the software is
 hereby transferred.
"

Button subclass:#MotionButton
    instanceVariableNames:'oldBorderWidth'
    classVariableNames:''
    poolDictionaries:''
    category:'Views-Interactors'
!

MotionButton comment:'

COPYRIGHT (c) 1989/90/91 by Claus Gittinger
	      All Rights Reserved

a motionButton highlights itself whenever the cursor
walks into it ...

@(#)MtnButt.st	3.1 92/08/23
written spring/summer 89 by claus
'!

!MotionButton methodsFor:'initialization'!

initEvents
    super initEvents.
    self enableEnterLeaveEvents
! !

!MotionButton methodsFor:'events'!

pointerEnter:state x:x y:y
    oldBorderWidth := self borderWidth.
    self borderWidth:(oldBorderWidth * 2)
!

pointerLeave:state
    self borderWidth:oldBorderWidth
! !