<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE MAN SYSTEM "../../manrev.dtd">
<MAN>
  <LANGUAGE>eng</LANGUAGE>
  <TITLE>xclick</TITLE>
  <TYPE>Scilab Function</TYPE>
  <DATE>April 1993</DATE>
  <SHORT_DESCRIPTION name="xclick"> wait for a mouse click</SHORT_DESCRIPTION>
  <CALLING_SEQUENCE>
    <CALLING_SEQUENCE_ITEM>[c_i,c_x,c_y,c_w,c_m]=xclick([flag])  </CALLING_SEQUENCE_ITEM>
  </CALLING_SEQUENCE>
  <PARAM>
    <PARAM_INDENT>
      <PARAM_ITEM>
        <PARAM_NAME>c_i</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer, mouse button number.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>c_x,c_y</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: real scalars, position of the mouse.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>c_w</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer, window number.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>c_m</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: string, menu callback.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
      <PARAM_ITEM>
        <PARAM_NAME>flag</PARAM_NAME>
        <PARAM_DESCRIPTION>
          <SP>: integer. If present, the click event queue is not cleared when entering  xclick.</SP>
        </PARAM_DESCRIPTION>
      </PARAM_ITEM>
    </PARAM_INDENT>
  </PARAM>
  <DESCRIPTION>
    <P><VERB>xclick</VERB> waits for a mouse click in the graphics window.
  </P>
    <P>
    If it is called with 3 left hand side arguments, it waits for a mouse click 
    in the current graphics window.
  </P>
    <P>
    If it is called with 4 or 5 left hand side arguments, it waits for a mouse 
    click in any graphics window.
  </P>
    <P>
    The returned values are described below.
  </P>
    <DESCRIPTION_INDENT>
      <DESCRIPTION_ITEM label="c_i">
        <SP>: an integer which gives the number of the mouse button or key that was
	  pressed  .</SP>
	
	<DESCRIPTION_INDENT>
          <DESCRIPTION_ITEM label="ibutton==0">
            <SP>: Left mouse button has been pressed</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==1">
            <SP>: Middle mouse button has been pressed</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==2">
            <SP>: Right mouse button has been pressed</SP>
	    <P></P>
          </DESCRIPTION_ITEM>

	  <DESCRIPTION_ITEM label="ibutton==3">
            <SP>: Left mouse button has been clicked</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==4">
            <SP>: Middle mouse button has been clicked</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==5">
            <SP>: Right mouse button has been clicked</SP>
	    <P></P>
          </DESCRIPTION_ITEM>

	  <DESCRIPTION_ITEM label="ibutton==10">
            <SP>: Left mouse button has been double-clicked</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==11">
            <SP>: Middle mouse button has been double-clicked</SP>
          </DESCRIPTION_ITEM>
	  <DESCRIPTION_ITEM label="ibutton==12">
            <SP>: Right mouse button has been double-clicked</SP>
	    <P></P>
          </DESCRIPTION_ITEM>

          <DESCRIPTION_ITEM label="ibutton &gt; =32">
            <SP>: key with ascii code ascii(ibutton) has been pressed</SP>
          </DESCRIPTION_ITEM>
	
          <DESCRIPTION_ITEM label="ibutton &gt; =1000+32">
            <SP>: key with ascii code ascii(ibutton-1000) has been pressed while CTRL
	    key pressed</SP>
          </DESCRIPTION_ITEM>
          <DESCRIPTION_ITEM label="ibutton==-100">
            <SP>: graphic window has been closed</SP>
          </DESCRIPTION_ITEM>
          <DESCRIPTION_ITEM label="ibutton==-2">
            <SP>: a dynamic menu has been selected</SP>
          </DESCRIPTION_ITEM>
	</DESCRIPTION_INDENT>

      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="c_x,c_y">
        <SP>: the coordinates of the position of the mouse click in the current graphics  scale.</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="c_w">
        <SP>: the window number where the click has occurred.</SP>
      </DESCRIPTION_ITEM>
      <DESCRIPTION_ITEM label="c_m">
        <SP>: string associated with a dynamic menu. If xclick returns due to a click on a menu, <VERB>c_i</VERB>, <VERB>c_x</VERB>, <VERB>c_y,</VERB> and <VERB>c_w</VERB> take arbitrary values.</SP>
      </DESCRIPTION_ITEM>
    </DESCRIPTION_INDENT>
  </DESCRIPTION>

  <SEE_ALSO>
    <SEE_ALSO_ITEM>
      <LINK>locate</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>xgetmouse</LINK>
    </SEE_ALSO_ITEM>
    <SEE_ALSO_ITEM>
      <LINK>seteventhandler</LINK>
    </SEE_ALSO_ITEM>
  </SEE_ALSO>
  <AUTHOR>J.Ph.C.  </AUTHOR>
</MAN>
