InterViews Reference Manual -- Event
NAME
Event - input events
SYNOPSIS
#include <InterViews/event.h>
DESCRIPTION
Events represent user input. The target field of an event indicates
the interactor whose current sensor is interested in the event. For keyboard
and button events, the timestamp field indicates when the event
occured and the (x, y) fields contain the coordinates of the
input pointing device relative to the target interactor. The
eventType field specifies what kind of event occurred. The following
types of events are possible: MotionEvent
The position of the pointing device changed.
DownEvent
UpEvent
The button field identifies a button that was pressed or released.
The constants LEFTMOUSE, MIDDLEMOUSE, and RIGHTMOUSE identify up to three
buttons on the pointing device. The fields leftmouse,
middlemouse, and rightmouse are true if the
corresponding button is currently down as well (so chording can be handled).
KeyEvent
A key is pressed. Since many keyboards do not support up events for arbitrary
keys; no event is generated when the key is released. The button
field contains the key code. The keystring field points to a string
of length len that represents the ASCII mapping of the key. The
fields control, meta, shift, and shiftlock
are true if the corresponding key is currently down.
EnterEvent
LeaveEvent
The pointing device enters or leaves the canvas associated with the target
interactor.
ChannelEvent
Data is available on the file descriptors identified in the channel
field. The field is a bitset, with bit 0 set if data is ready on file
descriptor 0, bit 1 set if data ready on file descriptor 1, etc.
TimerEvent
The time limit defined by the sensor has expired without any input events
occurring.
FocusInEvent
FocusOutEvent
The canvas associated with the target interactor gains or loses focus for
keyboard events.
PUBLIC OPERATIONS
void GetAbsolute(Coord& x, Coord& y)
void
GetAbsolute(World*&, Coord& x, Coord& y)
GetAbsolute computes the event coordinates relative to the root scene and
optionally assigns a pointer to that root scene.
SEE ALSO
Sensor , World
Next: FileBrowser
| Prev: Dialog
| Up: index
| Top: index