xgetmouse(September  1994)

NAME
xgetmouse - get current position of the mouse

CALLING SEQUENCE
rep=xgetmouse()

PARAMETERS

rep : a three vector: [x,y,ibutton]

DESCRIPTION
If the mouse is located in the current graphic window xgetmouse returns in rep the current mouse position (x,y) and the value ibutton. The ibutton value indicate the button action at this point
 if ibutton==-1 then no button clicked
 if ibutton==0,1 or 2 then the left, middle or right button cliked If the mouse is not located in the current graphic window xgetmouse waits

Example
xselect();xbasc();xsetech([0 0 1 1],[0 0 100 100])
xset('alufunction',6)
[b,x0,y0]=xclick();rep=[x0,y0,-1];x=x0;y=y0
plot2d([x0;x0;x;x;x0],[y0;y;y;y0;y0],-1,'000')
while rep(3)==-1 then
    rep=xgetmouse()
    plot2d([x0;x0;x;x;x0],[y0;y;y;y0;y0],-1,'000');
    x=rep(1);y=rep(2);
    plot2d([x0;x0;x;x;x0],[y0;y;y;y0;y0],-1,'000');
end
xset('alufunction',3)

SEE ALSO
locate,xclick.

AUTHOR
S. Steer