Debian Codegraph @

opcodes/flxyin.xml

raw symbols SCIP
1
2 <refentry id="FLxyin">
3 <indexterm id="IndexFLxyin"><primary>FLxyin</primary></indexterm>
4 <refentryinfo><title>FLTK:Other</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>FLxyin</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>FLxyin</refname>
11 <refpurpose>
12 Senses the mouse cursor position in a user-defined area inside an FLpanel.
13 </refpurpose>
14 </refnamediv>
15
16 <refsect1>
17 <title>Description</title>
18 <para>
19 Plugin opcode in widgets. This opcode is part of the plugin repository and has to be installed separately. These FLTK widgets do not work on the Mac.
20 The plugin repository can be found here: <ulink url="https://github.com/csound/plugins"><citetitle>https://github.com/csound/plugins</citetitle></ulink></para>
21 <para>
22 Similar to <link linkend="xyin"><citetitle>xyin</citetitle></link>, sense the mouse cursor position in a user-defined area inside an FLpanel.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis>koutx, kouty, kinside <command>FLxyin</command> ioutx_min, ioutx_max, iouty_min, iouty_max, \
29 iwindx_min, iwindx_max, iwindy_min, iwindy_max [, iexpx, iexpy, ioutx, iouty]</synopsis>
30 </refsect1>
31
32 <refsect1>
33 <title>Initialization</title>
34 <para>
35 <emphasis>ioutx_min, ioutx_max</emphasis> - the minimum and maximum limits of the interval to be output (X or horizontal axis).
36 </para>
37 <para>
38 <emphasis>iouty_min, iouty_max </emphasis> - the minimum and maximum limits of the interval to be output (Y or vertical axis).
39 </para>
40 <para>
41 <emphasis>iwindx_min, iwindx_max</emphasis> - the X coordinate of the horizontal edges of the sensible area, relative to the FLpanel ,in pixels.
42 </para>
43 <para>
44 <emphasis>iwindy_min, iwindy_max</emphasis> - the Y coordinates of the vertical edges of the sensible area, relative to the FLpanel, in pixels.
45 </para>
46 <para>
47 <emphasis>iexpx, iexpy</emphasis> - (optional) integer numbers denoting the behavior of the x or y output: 0 -> output is linear; -1 -> output is exponential; any other number indicates the number of an existing table that is used for indexing. With a positive value for table number, linear interpolation is provided in table indexing. A negative table number suppresses interpolation. Notice that in normal operations, the table should be normalized and unipolar (i.e. all table elements should be in the zero to one range). In this case all table elements will be rescaled according to imax and imin. Anyway, it is possible to use non-normalized tables (created with a negative table number, that can contain elements of any value), in order to access the actual values of table elements, without rescaling, by assigning 0 to iout_min and 1 to iout_max.
48 </para>
49 <para>
50 <emphasis>ioutx, iouty</emphasis> – (optional) initial output values.
51 </para>
52 </refsect1>
53
54 <refsect1>
55 <title>Performance</title>
56 <para>
57 <emphasis>koutx, kouty</emphasis> - output values, scaled according to user choices.
58 </para>
59 <para>
60 <emphasis>kinside</emphasis> - a flag that informs if the mouse cursor falls out of the rectangle of the user-defined area. If it is out of the area, kinside is set to zero.
61 </para>
62
63
64 <para>
65 <emphasis>FLxyin</emphasis> senses the mouse cursor position in a user-defined area inside an <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link>. When <emphasis>FLxyin</emphasis> is called, the position of the mouse within the chosen area is returned at k-rate. It is possible to define the sensible area, as well the minimum and maximum values corresponding to the minimum and maximum mouse positions. Mouse buttons don’t need to be pressed to make <emphasis>FLxyin</emphasis> to operate. It is able to function correctly even if other widgets (present in the <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link>) overlap the sensible area.
66 </para>
67 <para>
68 <emphasis>FLxyin</emphasis> unlike most other FLTK opcodes cannot be used inside the header, since it is not a widget. It is just a definition of an area for mouse sensing within an FLTK panel.
69 </para>
70
71 </refsect1>
72 <refsect1>
73 <title>Examples</title>
74 <para>
75 Here is an example of the FLxyin opcode. It uses the file <ulink url="examples/FLxyin.csd"><citetitle>FLxyin.csd</citetitle></ulink>.
76
77 <example>
78 <title>Example of the FLxyin opcode.</title>
79
80 <para>See the sections <link linkend="UsingRealTime"><citetitle>Real-time Audio</citetitle></link> and <link linkend="CommandFlags"><citetitle>Command Line Flags</citetitle></link> for more information on using command line flags.</para>
81 <xi:include href="examples-xml/FLxyin.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
82 </example>
83 </para>
84 <para>
85 Here is another example of the FLxyin opcode. It uses the file <ulink url="examples/FLxyin-2.csd"><citetitle>FLxyin-2.csd</citetitle></ulink>.
86
87 <example>
88 <title>Example of the FLxyin opcode.</title>
89 <xi:include href="examples-xml/FLxyin-2.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
90 </example>
91 </para>
92 </refsect1>
93
94 <refsect1>
95 <title>See Also</title>
96 <para>
97 <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link>
98 </para>
99 </refsect1>
100
101 <refsect1>
102 <title>Credits</title>
103 <para>Author: &namegabriel;</para>
104 <para>New in version 5.06</para>
105 </refsect1>
106 </refentry>