Syntax
[C/C++:]
void gGetCursorEvent(int *key, GPOINT *point);
[F90:]
subroutine gGetCursorEvent(key, point)
integer, intent(out) :: key
type (GPOINT), intent(out) :: point
Arguments
key
ASCII key code
point
Cursor position in picture coordinates
Description
The routine gGetCursorEvent() turns on the graphics cursor and waits until a key is pressed (or some other suitable trigger). If the call to gGetCursorEvent() is successful, the cursor or pointer position is returned in
point and the integer ASCII code of the key pressed is returned in
key (Refer to the specification of gGetEventRecord() for the possible return values of
key). If the call to gGetCursorEvent() is unsuccessful,
key and
point are returned set to zero.
The position of the cursor or pointer when it is turned on can be specified with a call to gSetCursorPos() or gSetMousePos(). The default for this is the centre of device limits. If the call to gGetCursorEvent() is successful, the cursor start position is set to
point. If the device does not support cursor input, an error message is output.
The cursor or pointer shape displayed when gGetCursorEvent() is called can be set using the routine gSetCursorType(). In addition some devices offer the display of rubber bands, boxes and circles while the cursor is being moved. These options can be set with the routine gSetCursorAction().
Further information on the implement providing the cursor position and key can be obtained by calling gGetEventRecord().
Appendix B should be consulted to see whether the device supports cursor input, positioning, shapes or actions.
See Also
gGetCursorEvent UsageDevice DriversgSetCursorActiongSetCursorPosgSetCursorTypegGetEventRecord