EventListener.st
author claus
Tue, 29 Aug 1995 19:45:43 +0200
changeset 96 948318b2fbd4
parent 83 97fd04d167c8
child 98 ab8ed9e213d0
permissions -rw-r--r--
.

"
 COPYRIGHT (c) 1995 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.
"



'From Smalltalk/X, Version:2.10.5 on 25-mar-1995 at 11:44:17 am'!

Object subclass:#EventListener
	 instanceVariableNames:''
	 classVariableNames:''
	 poolDictionaries:''
	 category:'Interface-Support'
!

!EventListener class methodsFor:'documentation'!

version
"
$Header: /cvs/stx/stx/libview2/EventListener.st,v 1.4 1995-08-29 17:43:34 claus Exp $
"
!

documentation
"
    abstract class for event listeners. See example use in ActiveHelp.
"
!

copyright
"
 COPYRIGHT (c) 1995 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.
"


! !

!EventListener methodsFor:'events'!

buttonRelease:button x:x y:y view:aView
    ^ false

!

keyPress:key x:x y:y view:aView
    ^ false

!

buttonMultiPress:button x:x y:y view:aView
    ^ false

!

buttonPress:button x:x y:y view:aView
    ^ false

!

buttonMotion:state x:x y:y view:aView
    ^ false
!

pointerLeave:state view:view
    ^ false

!

pointerEnter:state x:x y:y view:view
    ^ false

!

buttonShiftPress:button x:x y:y view:aView
    ^ false

!

keyRelease:key x:x y:y view:aView
    ^ false

! !

!EventListener methodsFor:'listen'!

listen
    "install myself as listener"

    WindowSensor eventListener:self

    "
     |listener|

     listener := EventListener new.
     listener listen.
     (Delay forSeconds:20) wait.
     listener unlisten
    "
!

unlisten
    "uninstall myself as listener"

    WindowSensor eventListener:nil 
! !