eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'EventListener':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: EventListener


Inheritance:

   Object
   |
   +--EventListener
      |
      +--ActiveHelp
      |
      +--PluggableEventListener
      |
      +--ScreenLock

Package:
stx:libview2
Category:
Interface-Support-UI
Version:
rev: 1.30 date: 2016/05/04 19:08:49
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  hotkeyWithId: aHotKeyId rawKey: theRawKey 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

event handling-basic
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

events-window creation
o  postCreateView: aView
a synthetic event:
some view was created

o  preCreateView: aView
a synthetic event:
some view is about to be created;
gives me a chance to intercept and change size, origin, color, etc.

o  preCreateView: aView origin: org
Obsolete now - the system will now send a preCreateView: event (without origin arg).
not really an event:
invoked right before a view is about to be physically created.
May return a new origin.

listen
o  listen
install myself as listener

o  unlisten
uninstall myself as listener



ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 23 Jul 2018 11:21:19 GMT