Debian Codegraph @

opcodes/flmouse.xml

raw symbols SCIP
1
2 <refentry id="FLmouse">
3 <indexterm id="IndexFLmouse"><primary>FLmouse</primary></indexterm>
4 <refentryinfo><title>FLTK:Other</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>FLmouse</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>FLmouse</refname>
11 <refpurpose>
12 Returns the mouse position and the state of the three mouse buttons.
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 <emphasis>FLmouse</emphasis> returns the coordinates of the mouse position within an FLTK panel and the state of the three mouse buttons.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis>kx, ky, kb1, kb2, kb3 <command>FLmouse</command> [imode]</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis>imode</emphasis> – (optional, default = 0) Determines the mode for mouse location reporting.
35 <itemizedlist>
36 <listitem><para>0 - Absolute position normalized to range 0-1</para></listitem>
37 <listitem><para>1 - Absolute raw pixel position</para></listitem>
38 <listitem><para>2 - Raw pixel position, relative to FLTK panel</para></listitem>
39 </itemizedlist>
40 </para>
41 </refsect1>
42
43 <refsect1>
44 <title>Performance</title>
45 <para>
46 <emphasis>kx, ky</emphasis> – the mouse coordinates, whose range depends on the <emphasis>imode</emphasis> argument (see above).
47 </para>
48 <para><emphasis>kb1, kb2, kb3</emphasis> – the states of the mouse buttons, 1 when corresponding button is pressed, 0 when the button is not pressed.
49 </para>
50 <para>
51 <emphasis>FLmouse</emphasis> returns the coordinates of the mouse position and the state of the three mouse buttons. The coordinates can be retrieved in three modes depending on the <emphasis>imode</emphasis> argument value (see above). Modes 0 and 1 report mouse position in relation to the complete screen (Absolute mode), while mode 2, reports the pixel position within an FLTK panel. Notice that FLmouse is only active when the mouse cursor passes on an <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link> area.
52 </para>
53 </refsect1>
54 <refsect1>
55 <title>Examples</title>
56 <para>
57 Here is an example of the FLmouse opcode. It uses the file <ulink url="examples/FLmouse.csd"><citetitle>FLmouse.csd</citetitle></ulink>.
58
59 <example>
60 <title>Example of the FLmouse opcode.</title>
61 <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>
62 <xi:include href="examples-xml/FLmouse.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
63 </example>
64 </para>
65 </refsect1>
66 <!-- <refsect1>
67 <title>See Also</title>
68 <para>
69 <link linkend="FLgetsnap"><citetitle>FLgetsnap</citetitle></link>
70 </para>
71 </refsect1>-->
72
73 <refsect1>
74 <title>Credits</title>
75 <para>Author: &namegabriel;</para>
76 <para>New in version 5.06</para>
77 </refsect1>
78 </refentry>