<<<<<<<<<<<<<<<<<

event(lymb) LYMB event(lymb)

NAME

event

SUPERCLASS

object

DESCRIPTION

The event object is used to represent interesting actions in a LYMB application. Typically, the LYMB programmer generates template events that match the event types he desires to capture. Those template events are then given to another object (such as an instance of the inputcontroller class) to specify interesting events. Events are also generated by objects of the inputcontroller class and its subclasses. Often, events are associated with graphical user interfaces, so the event object has instance variables that reflect that association.

Note that the event class is uninteresting by itself. Only set and get methods for the instance variables are available. It is simply a class used to transmit data between other objects in a LYMB application.

INSTANCE VARIABLES

type is a string representing the event type. It defaults to the null string.

button is the mouse button that caused the event. The left button is button 1, the middle button is button 2, and the right button is button 3. It defaults to 0.

x is X coordinate of the mouse when the event occurred. It defaults to 0.

y is Y coordinate of the mouse when the event occurred. It defaults to 0.

key is the key press that caused the event. It is a scalar, and currently, on X KeyPress events will set this field, so they are commonly KeySym objects. (Eventually, something more sane than X KeySyms may be necessary.)

window is the window in which the event occurred.

MESSAGES

Only set and get methods are available for the various instance variables.

EXAMPLE

See the xeventcontroller manual page for an example.

SEE ALSO

inputcontroller, xeventcontroller, inputnode


Please send comments and suggestions to
consult@rpi.edu