Wait for a mouse click or an event in a graphic window.
[ibutton,xcoord,yxcoord,iwin,cbmenu]=xclick([flag])
ibutton Real scalar (integer value): | |
---|---|
mouse button number, event code... (See description below). |
:
xclick waits for a mouse click or other events 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.
Warning, the returned coordinates xcoord, ycoord are relative to the current axes (see `gca()`_).
The values of ibutton are described below.
:ibutton==0 Left mouse button has been pressed. : :ibutton==1 Middle mouse button has been pressed. : :ibutton==2 Right mouse button has been pressed. : :ibutton==3 Left mouse button has been clicked. : :ibutton==4 Middle mouse button has been clicked. : :ibutton==5 Right mouse button has been clicked. : :ibutton==10 Left mouse button has been double-clicked. : :ibutton==11 Middle mouse button has been double-clicked. : :ibutton==12 Right mouse button has been double-clicked. : :ibutton >=32 key with ASCII code ibutton has been pressed. : :ibutton <=32 key with ASCII code -ibutton has been released. : :ibutton >=1000+32 key with ASCII code ibutton-1000 has been
pressed while CTRL key pressed.
: