インテル® Fortran コンパイラー 19.0 デベロッパー・ガイドおよびリファレンス
QuickWin Function: Registers the application-supplied callback routine to be called when a specified mouse event occurs in a specified window.
USE IFQWIN
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 IFQWIN.F90) 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. |
The result type is INTEGER(4). The result is zero or a positive integer if successful; otherwise, a negative integer that can be one of the following:
MOUSE$BADUNIT - The unit specified is not open, or is not associated with a QuickWin window.
MOUSE$BADEVENT - The event specified is not supported.
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.
The following example registers the routine CALCULATE, to be called when the user double-clicks the left mouse button while the mouse cursor is in the child window opened as unit 4:
USE IFQWIN
INTEGER(4) result
OPEN (4, FILE= 'USER')
...
result = REGISTERMOUSEEVENT (4, MOUSE$LBUTTONDBLCLK, CALCULATE)