REGISTERMOUSEEVENT

QuickWin Function: Registers the application-supplied callback routine to be called when a specified mouse event occurs in a specified window.

Module: USE DFLIB

Syntax

result = REGISTERMOUSEEVENT (unit, mouseevents, callbackroutine)

unit
(Input) INTEGER(4). Unit number of the window whose callback routine on mouse events is to be registered.


mouseevents
(Input) INTEGER(4). One or more mouse events to be handled by the callback routine to be registered. Symbolic constants (defined in DFLIB.F90 in the \DF98\INCLUDE subdirectory) for the possible mouse events are:



callbackroutine
(Input) Routine to be called on the specified mouse event in the specified window. It must be declared EXTERNAL. For a prototype mouse callback routine, see Using QuickWin in the Programmer's Guide.

Results:

The result is of type INTEGER(4). The result is zero or a positive integer if successful; otherwise, a negative integer that can be one of the following:

For every BUTTONDOWN or BUTTONDBLCLK event there is an associated BUTTONUP event. When the user double clicks, four events happen: BUTTONDOWN and BUTTONUP for the first click, and BUTTONDBLCLK and BUTTONUP for the second click. The difference between getting BUTTONDBLCLK and BUTTONDOWN for the second click depends on whether the second click occurs in the double click interval, set in the system's CONTROL PANEL/MOUSE.

Compatibility

QUICKWIN GRAPHICS LIB

See Also: Using QuickWin, UNREGISTERMOUSEEVENT, WAITONMOUSEEVENT