Debian Codegraph @

opcodes/fltext.xml

raw symbols SCIP
1
2 <refentry id="FLtext">
3 <indexterm id="IndexFLtext"><primary>FLtext</primary></indexterm>
4 <refentryinfo><title>FLTK:Valuators</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>FLtext</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>FLtext</refname>
11 <refpurpose>
12 A FLTK widget opcode that creates a textbox.
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>FLtext</emphasis> allows the user to modify a parameter value by directly typing it into a text field.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis>kout, ihandle <command>FLtext</command> &quot;label&quot;, imin, imax, istep, itype, iwidth, \
29 iheight, ix, iy</synopsis>
30 </refsect1>
31
32 <refsect1>
33 <title>Initialization</title>
34 <para>
35 <emphasis>ihandle</emphasis> -- a handle value (an integer number) that unequivocally references a corresponding widget. This is used by other opcodes that modify a widget's properties (see <link linkend="ControlFltkAppearance"><citetitle>Modifying FLTK Widget Appearance</citetitle></link>). It is automatically output by <emphasis>FLtext</emphasis> and must not be set by the user label. (The user label is a double-quoted string containing some user-provided text placed near the widget.)
36 </para>
37
38 <para>
39 <emphasis><quote>label</quote></emphasis> -- a double-quoted string containing some user-provided text, placed near corresponding widget.
40 </para>
41
42 <para>
43 <emphasis>imin</emphasis> -- minimum value of output range.
44 </para>
45
46 <para>
47 <emphasis>imax</emphasis> -- maximum value of output range.
48 </para>
49
50 <para>
51 <emphasis>istep</emphasis> -- a floating-point number indicating the increment of valuator value corresponding to the mouse dragging. The <emphasis>istep</emphasis> argument allows the user to arbitrarily slow mouse motion, enabling arbitrary precision.
52 </para>
53
54 <para>
55 <emphasis>itype</emphasis> -- an integer number denoting the appearance of the valuator.
56 </para>
57
58 <para>
59 The <emphasis>itype</emphasis> argument can be set to the following values:
60
61 <itemizedlist>
62 <listitem><para>1 - normal behaviour</para></listitem>
63 <listitem><para>2 - dragging operation is suppressed, instead it will appear two arrow buttons. A mouse-click on one of these buttons can increase/decrease the output value.</para></listitem>
64 <listitem><para>3 - text editing is suppressed, only mouse dragging modifies the output value.</para></listitem>
65 </itemizedlist>
66 </para>
67
68 <para>
69 <emphasis>iwidth</emphasis> -- width of widget.
70 </para>
71
72 <para>
73 <emphasis>iheight</emphasis> -- height of widget.
74 </para>
75
76 <para>
77 <emphasis>ix</emphasis> -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
78 </para>
79
80 <para>
81 <emphasis>iy</emphasis> -- vertical position of upper left corner of the valuator, relative to the upper
82 left corner of corresponding window (expressed in pixels).
83 </para>
84 </refsect1>
85
86 <refsect1>
87 <title>Performance</title>
88 <para>
89 <emphasis>kout</emphasis> -- output value
90 </para>
91
92 <para>
93 <emphasis>FLtext</emphasis> allows the user to modify a parameter value by directly typing it into a text field:
94
95 <mediaobject>
96 <imageobject>
97 <imagedata fileref="images/fltext.png" format="PNG"/>
98 </imageobject>
99
100 <textobject>
101 <phrase>FLtext.</phrase>
102 </textobject>
103
104 <caption>
105 <para>FLtext.</para>
106 </caption>
107 </mediaobject>
108
109 Its value can also be modified by clicking on it and dragging the mouse horizontally. The <emphasis>istep</emphasis> argument allows the user to arbitrarily set the response on mouse dragging.
110 </para>
111 </refsect1>
112
113 <refsect1>
114 <title>Examples</title>
115 <para>
116 Here is an example of the FLtext opcode. It uses the file <ulink url="examples/FLtext.csd"><citetitle>FLtext.csd</citetitle></ulink>.
117
118 <example>
119 <title>Example of the FLtext opcode.</title>
120
121 <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>
122 <xi:include href="examples-xml/FLtext.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
123 </example>
124 </para>
125 </refsect1>
126
127 <refsect1>
128 <title>See Also</title>
129 <para>
130 <link linkend="FLcount"><citetitle>FLcount</citetitle></link>,
131 <link linkend="FLjoy"><citetitle>FLjoy</citetitle></link>,
132 <link linkend="FLknob"><citetitle>FLknob</citetitle></link>,
133 <link linkend="FLroller"><citetitle>FLroller</citetitle></link>,
134 <link linkend="FLslider"><citetitle>FLslider</citetitle></link>
135 </para>
136 </refsect1>
137
138 <refsect1>
139 <title>Credits</title>
140 <para>Author: &namegabriel;</para>
141 <para>New in version 4.22</para>
142 <para>Example written by Iain McCurdy, edited by &namekevin;.</para>
143 </refsect1>
144 </refentry>