DrawGetMouseButton

Returns location of mouse and which button was pressed. Waits for button to be pressed.

Synopsis

#include "draw.h" 
int DrawGetMouseButton(Draw draw,DrawButton *button,PetscReal* x_user,PetscReal *y_user,PetscReal *x_phys,PetscReal *y_phys)
Not collective (Use DrawSynchronizedGetMouseButton() for collective)

Input Parameter

draw -the window to be used

Output Parameters

button - one of BUTTON_LEFT, BUTTON_CENTER, BUTTON_RIGHT
x_user, y_user - user coordinates of location (user may pass in 0).
x_phys, y_phys - window coordinates (user may pass in 0).

Notes

Only processor 0 of the communicator used to create the Draw may call this routine.

See Also

DrawSynchronizedGetMouseButton()

Level:intermediate
Location:src/sys/src/draw/interface/dmouse.c
Graphics (Draw) Index
Table of Contents