Chapter 8 Presentation Translators in CLIM

8.3 Pointer Gestures in CLIM

A gesture is an input action by the user, such as typing a character or clicking a pointer button. A pointer gesture refers to those gestures that involve using the pointer.

An event is a CLIM object that represents a gesture by the user. (The most important pointer events are those of class pointer-button-event.)

A gesture name is a symbol that names a gesture. CLIM defines the following gesture names (the corresponding gesture appears in parentheses) and their uses:

:select (left click)
For the most commonly used translator on an object. For example, use the :select gesture while reading an argument to a command to use the indicated object as the argument.

:describe (middle click)
For translators that produce a description of an object (such as showing the current state of an object). For example, use the :describe gesture on an object in a CAD program to display the parameters of that object.

:menu (right click)
For translators that pop up a menu

:delete (SHIFT-middle click)
For translators that delete an object

:edit (META-right click)
For translators that edit an object

The special gesture name nil is used in translators that are not directly invokable by a pointer gesture. Such a translator can be invoked only from a menu.

The special gesture name t means that the translator is available on every gesture.

You can use define-gesture-name (see Section 15.3, "Gestures and Gesture Names") to define your own pointer gesture name.

Note that with the exception of the define-gesture-name forms (which you can use to map gesture names to keys and buttons), the application is independent of which platform it runs on. It uses keywords to give names to gestures, rather than making references to specific pointer buttons and keyboard keys.

The following operators can be used to add or remove new pointer gesture names. See Chapter 15, "Extended Stream Input Facilities," for details about the pointer and gestures.

add-pointer-gesture-name [Function]

gesture-name button shifts&key (action :click) (unique t)
Adds a pointer gesture named gesture-name (a symbol) for the pointer button being clicked on the pointer while the shifts shift keys are being held down on.

remove-pointer-gesture-name [Function]
Removes the pointer gesture named gesture-name.

CLIM 2.0 User's Guide - OCT 1998

Generated with Harlequin WebMaker