eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'EventListener':

Home

everywhere
www.exept.de
for:
[back]

Class: EventListener


Inheritance:

   Object
   |
   +--EventListener
      |
      +--ActiveHelp

Package:
stx:libview2
Category:
Interface-Support-UI
Version:
rev: 1.27 date: 2009/06/01 08:43:48
user: cg
file: EventListener.st directory: libview2
module: stx stc-classLibrary: libview2
Author:
Claus Gittinger

Description:


abstract class for event listeners. EventListeners can be used to intercept
incoming events (keyboard & mouse) directly from a sensor, or even
for a complete display device.
A concrete application is the bubble help, which tracks entering/leaving
views, and pops up some help message. 
See concrete code in ActiveHelp.

For each intercepted event, a corresponding method is called for in instances
of myself - these MUST return true, if the event is to be ignored (i.e.
assumed to be processed and consumed by the reader, 
and MUST return false, if the normal event procedure should be performed. 
Since this is an abstract class,
all of my intercept methods return false. 
They are meant to be redefined in concrete subclasses.


Related information:

    WindowSensor
    WindowEvent
    WindowGroup

Instance protocol:

event handling
o  buttonMotion: buttonAndModifierState x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  buttonMultiPress: button x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  buttonPress: button x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  buttonRelease: button x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  focusInView: aView
not handled here - should be redefined in a concrete subclass

o  focusOutView: aView
not handled here - should be redefined in a concrete subclass

o  hasKeyboardFocus: aBoolean view: aView
not handled here - should be redefined in a concrete subclass

o  keyPress: key x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  keyRelease: key x: x y: y view: aView
not handled here - should be redefined in a concrete subclass

o  mouseWheelMotion: state x: x y: y amount: amount deltaTime: dTime view: aView
not handled here - can be redefined in a concrete subclass

o  pointerEnter: state x: x y: y view: view
not handled here - should be redefined in a concrete subclass

o  pointerLeave: state view: view
not handled here - should be redefined in a concrete subclass

events-window creation
o  postCreateView: aView

o  preCreateView: aView

o  preCreateView: aView origin: org
invoked right before a view is about to be physically created.
May return a new origin.

listen
o  listen
install myself as listener

o  processEvent: ev
process an event; if true is returned, the event is considered to be
'eaten' by the listener, and not passed to the view.
If false is returned, the event is processed as usual.
Here, the event is dispatched into one of the button*/key* etc. methods

o  unlisten
uninstall myself as listener



ST/X 6.1.1; WebServer 1.620 at exept:8081; Mon, 21 May 2012 16:26:51 GMT