xclick — Wait for a mouse click.
[ibutton,xcoord,yxcoord,iwin,cbmenu]=xclick([flag])
Real scalar (integer value): mouse button number, key code... (See description below).
Real scalar: x-ccordinate of the mouse pointer when the clic occured, in current graphic scale.
Real scalar: x-ccordinate of the mouse pointer when the clic occured, in current graphic scale.
Real scalar (integer value): number of the window where the action occured.
String: callback associated to a menu if
xclick
returns due to a click on a menu. In this
case, ibutton
, xcoord
,
ycoord
, and iwin
take
arbitrary values.
Real scalar (integer value): If present, the click event queue is not cleared when entering xclick.
xclick
waits for a mouse click in the graphics
window.
If it is called with 3 left hand side arguments, it waits for a mouse click in the current graphics window.
If it is called with 4 or 5 left hand side arguments, it waits for a mouse click in any graphics window.
The values of ibutton
are described below.
Left mouse button has been pressed.
Middle mouse button has been pressed.
Right mouse button has been pressed.
Left mouse button has been clicked.
Middle mouse button has been clicked.
Right mouse button has been clicked.
Left mouse button has been double-clicked.
Middle mouse button has been double-clicked.
Right mouse button has been double-clicked.
key with ASCII code ibutton
has been
pressed.
key with ASCII code -ibutton
has been
released.
key with ASCII code ibutton-1000
has been
pressed while CTRL key pressed.
graphic window has been closed.
WARNING: ibutton
was equal to -100 for
graphic window closure up to Scilab 4.1.2, but this code has been
changed (in Scilab 5.0) because it was also the code returned for
d
key release.
A dynamic menu has been selected and its callback is returned
in cbmenu
.