14
14
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:ns3="http://www.w3.org/1999/xhtml" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" version="5.0-subset Scilab" xml:id="xclick" xml:lang="en">
16
<refname>xclick</refname>
17
<refpurpose>Wait for a mouse click or an event in a graphic window.</refpurpose>
20
<title>Calling Sequence</title>
21
<synopsis>[ibutton,xcoord,yxcoord,iwin,cbmenu]=xclick([flag])</synopsis>
24
<title>Arguments</title>
29
<para>Real scalar (integer value): mouse button number, event code...
30
(See description below).
37
<para>Real scalar: x-ccordinate of the mouse pointer when
38
the click or event occurred, in current graphic scale (see <link linkend="gca">gca()</link>).
45
<para>Real scalar: x-ccordinate of the mouse pointer when
46
the click or event occurred, in current graphic scale (see <link linkend="gca">gca()</link>).
53
<para>Real scalar (integer value): number of the window where the
61
<para>String: callback associated to a menu if
62
<literal>xclick</literal> returns due to a click on a menu. In this
63
case, <literal>ibutton</literal>, <literal>xcoord</literal>,
64
<literal>ycoord</literal>, and <literal>iwin</literal> take
72
<para>Real scalar (integer value): If present, the click event queue
73
is not cleared when entering xclick.
80
<title>Description</title>
82
<literal>xclick</literal> waits for a mouse click or other events in the graphics
85
<para>If it is called with 3 left hand side arguments, it waits for a
86
mouse click in the current graphics window.
88
<para>If it is called with 4 or 5 left hand side arguments, it waits for a
89
mouse click in any graphics window.
92
Warning, the returned coordinates <literal>xcoord</literal>,
93
<literal>ycoord</literal> are relative to the current axes (see <link linkend="gca">gca()</link>).
96
The values of <literal>ibutton</literal> are described below.
100
<term>ibutton==0</term>
102
<para>Left mouse button has been pressed.</para>
106
<term>ibutton==1</term>
108
<para>Middle mouse button has been pressed.</para>
112
<term>ibutton==2</term>
114
<para>Right mouse button has been pressed.</para>
119
<term>ibutton==3</term>
121
<para>Left mouse button has been clicked.</para>
125
<term>ibutton==4</term>
127
<para>Middle mouse button has been clicked.</para>
131
<term>ibutton==5</term>
133
<para>Right mouse button has been clicked.</para>
138
<term>ibutton==10</term>
140
<para>Left mouse button has been double-clicked.</para>
144
<term>ibutton==11</term>
146
<para>Middle mouse button has been double-clicked.</para>
150
<term>ibutton==12</term>
152
<para>Right mouse button has been double-clicked.</para>
157
<term>ibutton >=32</term>
160
key with ASCII code <literal>ibutton</literal> has been
166
<term>ibutton <=32</term>
169
key with ASCII code <literal>-ibutton</literal> has been
175
<term>ibutton >=1000+32</term>
178
key with ASCII code <literal>ibutton-1000</literal> has been
179
pressed while CTRL key pressed.
184
<term>ibutton==-1000</term>
186
<para>graphic window has been closed.</para>
188
WARNING: <literal>ibutton</literal> was equal to -100 for
189
graphic window closure up to Scilab 4.1.2, but this code has been
190
changed (in Scilab 5.0) because it was also the code returned for
191
<literal>d</literal> key release.
196
<term>ibutton==-2</term>
198
<para>A dynamic menu has been selected and its callback is returned
199
in <literal>cbmenu</literal>.
205
<refsection role="see also">
206
<title>See Also</title>
207
<simplelist type="inline">
209
<link linkend="gca">gca</link>
212
<link linkend="locate">locate</link>
215
<link linkend="xgetmouse">xgetmouse</link>
218
<link linkend="seteventhandler">seteventhandler</link>
16
<refname>xclick</refname>
17
<refpurpose>Wait for a mouse click or an event in a graphic window.</refpurpose>
20
<title>Calling Sequence</title>
21
<synopsis>[ibutton,xcoord,yxcoord,iwin,cbmenu]=xclick([flag])</synopsis>
24
<title>Arguments</title>
29
<para>Real scalar (integer value): mouse button number, event code...
30
(See description below).
37
<para>Real scalar: x-ccordinate of the mouse pointer when
38
the click or event occurred, in current graphic scale (see <link linkend="gca">gca()</link>).
45
<para>Real scalar: x-ccordinate of the mouse pointer when
46
the click or event occurred, in current graphic scale (see <link linkend="gca">gca()</link>).
53
<para>Real scalar (integer value): number of the window where the
61
<para>String: callback associated to a menu if
62
<literal>xclick</literal> returns due to a click on a menu. In this
63
case, <literal>ibutton</literal>, <literal>xcoord</literal>,
64
<literal>ycoord</literal>, and <literal>iwin</literal> take
72
<para>Real scalar (integer value): If present, the click event queue
73
is not cleared when entering xclick.
80
<title>Description</title>
82
<literal>xclick</literal> waits for a mouse click or other events in the graphics
85
<para>If it is called with 3 left hand side arguments, it waits for a
86
mouse click in the current graphics window.
88
<para>If it is called with 4 or 5 left hand side arguments, it waits for a
89
mouse click in any graphics window.
92
Warning, the returned coordinates <literal>xcoord</literal>,
93
<literal>ycoord</literal> are relative to the current axes (see <link linkend="gca">gca()</link>).
96
The values of <literal>ibutton</literal> are described below.
100
<term>ibutton==0</term>
102
<para>Left mouse button has been pressed.</para>
106
<term>ibutton==1</term>
108
<para>Middle mouse button has been pressed.</para>
112
<term>ibutton==2</term>
114
<para>Right mouse button has been pressed.</para>
119
<term>ibutton==3</term>
121
<para>Left mouse button has been clicked.</para>
125
<term>ibutton==4</term>
127
<para>Middle mouse button has been clicked.</para>
131
<term>ibutton==5</term>
133
<para>Right mouse button has been clicked.</para>
138
<term>ibutton==10</term>
140
<para>Left mouse button has been double-clicked.</para>
144
<term>ibutton==11</term>
146
<para>Middle mouse button has been double-clicked.</para>
150
<term>ibutton==12</term>
152
<para>Right mouse button has been double-clicked.</para>
157
<term>ibutton >=32</term>
160
key with ASCII code <literal>ibutton</literal> has been
166
<term>ibutton <=32</term>
169
key with ASCII code <literal>-ibutton</literal> has been
175
<term>ibutton >=1000+32</term>
178
key with ASCII code <literal>ibutton-1000</literal> has been
179
pressed while CTRL key pressed.
184
<term>ibutton==-1000</term>
186
<para>graphic window has been closed.</para>
188
WARNING: <literal>ibutton</literal> was equal to -100 for
189
graphic window closure up to Scilab 4.1.2, but this code has been
190
changed (in Scilab 5.0) because it was also the code returned for
191
<literal>d</literal> key release.
196
<term>ibutton==-2</term>
198
<para>A dynamic menu has been selected and its callback is returned
199
in <literal>cbmenu</literal>.
205
<refsection role="see also">
206
<title>See Also</title>
207
<simplelist type="inline">
209
<link linkend="gca">gca</link>
212
<link linkend="locate">locate</link>
215
<link linkend="xgetmouse">xgetmouse</link>
218
<link linkend="seteventhandler">seteventhandler</link>