GINO Graphics Suite - GINO v9.0  

gSetMousePos

Syntax

[C/C++:]
void gSetMousePos(int env, int xpos, int ypos);
[F90:]
subroutine gSetMousePos(env, xpos, ypos)
integer, intent(in) :: env,xpos,ypos

Arguments

env
Mouse position environment

GSCREEN, Relative to screen or display area
GDRAWINGAREA, Relative to current window or drawing area

xpos,ypos
Mouse position in pixels

Description

A call to gSetMousePos() moves the graphics pointer or mouse to the position specified in xpos, ypos. The actual position is measured in pixels and is relative to the top left corner of the specified environment set in env.

Note that it is considered bad practice to continually move the mouse position in an interactive graphics application, so this routine should only be used when assisting the user to take some action by positioning the pointer over an item to be selected.

The routine gEnqPixelPos() can be used to translate a picture position on the current window or drawing area into pixels and the routine gEnqMousePos() can be used to enquire the current mouse position.

The routine gSetMousePos() differs from gSetCursorPos() in that the movement takes place immediately and is not dependent on any action or event that has or is about to take place.

See Also

gSetMousePos Usage
Device Drivers
gSetCursorPos
gEnqMousePos
gEnqPixelPos