13
13
<refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" 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:lang="en" xml:id="dragrect">
15
<refname>dragrect</refname>
16
<refpurpose> Drag rectangle(s) with mouse</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[final_rect,btn]=dragrect(initial_rect)</synopsis>
23
<title>Arguments</title>
26
<term>initial_rect</term>
28
<para>4 4xn matrix containing the initial rectangles definition. Each column contains [x_left; y_top; width; height]. If only one rectangle is present the initial_rect may also be a vector.</para>
32
<term>final_rect</term>
34
<para>a rectangle defined by [x_left, y_top, width, height]</para>
40
<para>an integer, the number of the mouse button clicked</para>
46
<title>Description</title>
48
<literal>dragrect</literal> drags one or more rectangles anywhere on the screen. The 4xn
49
matrix rect defines the rectangles. Each column of <literal>initial_rect</literal>
50
must contain the initial rectangle position as [left;top;width;height]
51
values. When a button is clicked <literal>dragrect</literal> returns the final
52
rectangles definition in <literal>final_Rect</literal>.
56
<title>Examples</title>
57
<programlisting role="example"><![CDATA[
15
<refname>dragrect</refname>
16
<refpurpose> Drag rectangle(s) with mouse</refpurpose>
19
<title>Calling Sequence</title>
20
<synopsis>[final_rect,btn]=dragrect(initial_rect)</synopsis>
23
<title>Arguments</title>
26
<term>initial_rect</term>
28
<para>4 4xn matrix containing the initial rectangles definition. Each column contains [x_left; y_top; width; height]. If only one rectangle is present the initial_rect may also be a vector.</para>
32
<term>final_rect</term>
34
<para>a rectangle defined by [x_left, y_top, width, height]</para>
40
<para>an integer, the number of the mouse button clicked</para>
46
<title>Description</title>
48
<literal>dragrect</literal> drags one or more rectangles anywhere on the screen. The 4xn
49
matrix rect defines the rectangles. Each column of <literal>initial_rect</literal>
50
must contain the initial rectangle position as [left;top;width;height]
51
values. When a button is clicked <literal>dragrect</literal> returns the final
52
rectangles definition in <literal>final_Rect</literal>.
56
<title>Examples</title>
57
<programlisting role="example"><![CDATA[
58
58
xsetech(frect=[0,0,100,100])
59
59
r=dragrect([10;10;30;10])
61
61
]]></programlisting>
63
<refsection role="see also">
64
<title>See Also</title>
65
<simplelist type="inline">
67
<link linkend="xrect">xrect</link>
70
<link linkend="xrects">xrects</link>
73
<link linkend="xclick">xclick</link>
76
<link linkend="xgetmouse">xgetmouse</link>
63
<refsection role="see also">
64
<title>See Also</title>
65
<simplelist type="inline">
67
<link linkend="xrect">xrect</link>
70
<link linkend="xrects">xrects</link>
73
<link linkend="xclick">xclick</link>
76
<link linkend="xgetmouse">xgetmouse</link>