eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'InputView':

Home

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

Class: InputView


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--InputView

Package:
stx:libview2
Category:
Views-Special
Version:
rev: 1.26 date: 2021/01/20 15:59:33
user: cg
file: InputView.st directory: libview2
module: stx stc-classLibrary: libview2

Description:


a view for input only - forwarding all events to another object.
This kind of view can be used to be laid on top of another view to catch all
input. (Interface builder)
NOTICE: the event forwarding is a leftover from times when no delegation mechanism
        existed - it will vanish - use delegates for new code.

[caveat:]
    do not use
    it seems to (no longer) work on the desktop (at least with win10).

copyright

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

Instance protocol:

accessing
o  eventReceiver: aView
set the view to which input events are forwarded

o  isInputOnly
return true, since this is a transparent input-only view

drag & drop
o  canDrop: aDropContext
return true, if aCollectionOfDropObjects can be dropped here.
Delegated to my eventReceiving view

o  canDrop: aDropContext at: aPoint
return true, if aCollectionOfDropObjects can be dropped here.
Delegated to my eventReceiving view

o  canDropObjects: aCollectionOfDropObjects
return true, if aCollectionOfDropObjects can be dropped here.
Delegated to my eventReceiving view

o  canDropObjects: aCollectionOfDropObjects at: aPoint
return true, if aCollectionOfDropObjects can be dropped here.
Delegated to my eventReceiving view

o  drop: aDropContext
drop aCollectionOfDropObjects here.
Delegated to my eventReceiving view

o  drop: aDropContext at: aPoint
drop aCollectionOfDropObjects here.
Delegated to my eventReceiving view

o  dropObjects: aCollectionOfDropObjects
drop aCollectionOfDropObjects here.
Delegated to my eventReceiving view

o  dropObjects: aCollectionOfDropObjects at: aPoint
drop aCollectionOfDropObjects here.
Delegated to my eventReceiving view

event handling
o  buttonMotion: state x: x y: y
redefined to forward the event to my eventReceiver

o  buttonPress: button x: x y: y
redefined to forward the event to my eventReceiver

o  buttonRelease: button x: x y: y
redefined to forward the event to my eventReceiver

o  exposeX: x y: y width: w height: h
dummy - will never be received

o  focusIn
redefined to forward the event to my eventReceiver

o  focusOut
redefined to forward the event to my eventReceiver

o  keyPress: key x: x y: y
redefined to forward the event to my eventReceiver

o  keyRelease: key x: x y: y
redefined to forward the event to my eventReceiver

o  pointerEnter: state x: x y: y
redefined to forward the event to my eventReceiver

o  pointerLeave: state
redefined to forward the event to my eventReceiver

initialization
o  initialize
(comment from inherited method)
initialize all state of the view - usually redefined in subclasses,
but always doing a 'super initialize'. Each class should setup its
locals - and not forget the others.
View setup is separated into two parts, the general setup done here
and the style specific setup in initStyle. Each view should be prepared
for a stylechange by being sent another initStyle with a new style value.
(in this case, it should set all of its style-dependent things, but
leave the state and contents as-is)

redefined dummy
o  setViewBackground
dummy - inputviews have no background


Examples:


|v|

v := InputView origin:0@0 extent:Display extent.
[Delay waitForSeconds:5. v destroy] fork.
v open.


ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 16:45:27 GMT