Scilab Function

xgetmouse - get the mouse events and current position

Calling Sequence

rep=xgetmouse([flag], [sel])

Parameters

Description

If the mouse pointer is located in the current graphics window, xgetmouse returns in rep the current pointer position (x,y) and the value ibutton. The ibutton value indicates the event type:

  • - if ibutton is -1 then a mouse motion was got (if getmotion has been set to %t) .
  • - if ibutton is -5 -4 or -2 then left , middle or right button was released (if getrelease has been set to %t).
  • - if ibutton is 0, 1 or 2, then the left, middle or right button was pressed. If the mouse is not located in the current graphics window, xgetmouse waits. Moreover, xgetmouse works in a synchonous way, i.e. waits for a mouse event (click or pointer movement) to occur before exiting.
  • Examples

    See Also

    Author