Debian Codegraph @

opcodes/flpanel.xml

raw symbols SCIP
1
2 <refentry id="FLpanel">
3 <indexterm id="IndexFLpanel"><primary>FLpanel</primary></indexterm>
4 <refentryinfo><title>FLTK:Containers</title></refentryinfo>
5 <refmeta>
6 <refentrytitle>FLpanel</refentrytitle>
7 </refmeta>
8
9 <refnamediv>
10 <refname>FLpanel</refname>
11 <refpurpose>
12 Creates a window that contains FLTK widgets.
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 Creates a window that contains FLTK widgets.
23 </para>
24 </refsect1>
25
26 <refsect1>
27 <title>Syntax</title>
28 <synopsis><command>FLpanel</command> &quot;label&quot;, iwidth, iheight [, ix] [, iy] [, iborder] [, ikbdcapture] [, iclose]</synopsis>
29 </refsect1>
30
31 <refsect1>
32 <title>Initialization</title>
33 <para>
34 <emphasis><quote>label</quote></emphasis> -- a double-quoted string containing some user-provided text, placed near the corresponding widget.
35 </para>
36
37 <para>
38 <emphasis>iwidth</emphasis> -- width of widget.
39 </para>
40
41 <para>
42 <emphasis>iheight</emphasis> -- height of widget.
43 </para>
44
45 <para>
46 <emphasis>ix</emphasis> (optional) -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
47 </para>
48
49 <para>
50 <emphasis>iy</emphasis> (optional) -- vertical position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
51 </para>
52
53 <para>
54 <emphasis>iborder</emphasis> (optional) -- border type of the container. It is expressed by means of an integer number chosen from the following:
55
56 <itemizedlist>
57 <listitem><para>0 - no border</para></listitem>
58 <listitem><para>1 - down box border</para></listitem>
59 <listitem><para>2 - up box border</para></listitem>
60 <listitem><para>3 - engraved border</para></listitem>
61 <listitem><para>4 - embossed border</para></listitem>
62 <listitem><para>5 - black line border</para></listitem>
63 <listitem><para>6 - thin down border</para></listitem>
64 <listitem><para>7 - thin up border</para></listitem>
65 </itemizedlist>
66 </para>
67 <para>
68 <emphasis>ikbdcapture</emphasis> (default = 0) -- If this flag is set to 1, keyboard events are captured by the window (for use with <link linkend="sensekey"><citetitle>sensekey</citetitle></link> and <link linkend="FLkeyIn"><citetitle>FLkeyIn</citetitle></link>)
69 </para>
70 <para>
71 <emphasis>iclose</emphasis> (default = 0) -- If this flag is set to anything other than 0, the close button of the window is disabled, and the window cannot be closed by the user directly. It will close when csound exits.
72 </para>
73 </refsect1>
74
75 <refsect1>
76 <title>Performance</title>
77 <para>
78 Containers are useful to format the graphic appearance of the widgets. The most important container is <emphasis>FLpanel</emphasis>, that actually creates a window. It can be filled with other containers and/or valuators or other kinds of widgets.
79 </para>
80
81 <para>
82 There are no k-rate arguments in containers.
83 </para>
84
85 <para>
86 <emphasis>FLpanel</emphasis> creates a window. It must be followed by the opcode <link linkend="FLpanelEnd"><citetitle>FLpanelEnd</citetitle></link> when all widgets internal to it are declared. For example:
87 <informalexample>
88 <programlisting>
89 <emphasis role="opc">FLpanel</emphasis> "PanelPluto",450,550,100,100 <emphasis role="comment">;***** start of container</emphasis>
90 gk1, ih1 <emphasis role="opc">FLslider</emphasis> "FLslider 1", 500, 1000, 2 ,1, -1, 300,15, 20,50
91 gk2, ih2 <emphasis role="opc">FLslider</emphasis> "FLslider 2", 300, 5000, 2 ,3, -1, 300,15, 20,100
92 gk3, ih3 <emphasis role="opc">FLslider</emphasis> "FLslider 3", 350, 1000, 2 ,5, -1, 300,15, 20,150
93 gk4, ih4 <emphasis role="opc">FLslider</emphasis> "FLslider 4", 250, 5000, 1 ,11,-1, 300,30, 20,200
94 <emphasis role="opc">FLpanelEnd</emphasis> <emphasis role="comment">;***** end of container</emphasis></programlisting>
95 </informalexample>
96
97 will output the following result:
98
99 <mediaobject>
100 <imageobject>
101 <imagedata fileref="images/flpanel.png" format="PNG"/>
102 </imageobject>
103
104 <textobject>
105 <phrase>FLpanel.</phrase>
106 </textobject>
107
108 <caption>
109 <para>FLpanel.</para>
110 </caption>
111 </mediaobject>
112 </para>
113 <para>
114 If the <emphasis>ikbdcapture</emphasis> flag is set, the window captures keyboard events, and sends them to all <link linkend="sensekey"><citetitle>sensekey</citetitle></link>. This flag modifies the behavior of <link linkend="sensekey"><citetitle>sensekey</citetitle></link>, and makes it receive events from the FLTK window instead of stdin.
115 </para>
116 </refsect1>
117
118 <refsect1>
119 <title>Examples</title>
120 <para>
121 Here is an example of the FLpanel opcode. It uses the file <ulink url="examples/FLpanel.csd"><citetitle>FLpanel.csd</citetitle></ulink>.
122
123 <example>
124 <title>Example of the FLpanel opcode.</title>
125
126 <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>
127 <xi:include href="examples-xml/FLpanel.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/>
128 </example>
129 </para>
130 </refsect1>
131
132 <refsect1>
133 <title>See Also</title>
134 <para>
135 <link linkend="FLgroup"><citetitle>FLgroup</citetitle></link>,
136 <link linkend="FLgroupEnd"><citetitle>FLgroupEnd</citetitle></link>,
137 <link linkend="FLpack"><citetitle>FLpack</citetitle></link>,
138 <link linkend="FLpackEnd"><citetitle>FLpackEnd</citetitle></link>,
139 <link linkend="FLpanelEnd"><citetitle>FLpanelEnd</citetitle></link>,
140 <link linkend="FLscroll"><citetitle>FLscroll</citetitle></link>,
141 <link linkend="FLscrollEnd"><citetitle>FLscrollEnd</citetitle></link>,
142 <link linkend="FLtabs"><citetitle>FLtabs</citetitle></link>,
143 <link linkend="FLtabsEnd"><citetitle>FLtabsEnd</citetitle></link>,
144 <link linkend="sensekey"><citetitle>sensekey</citetitle></link>
145 </para>
146 </refsect1>
147
148 <refsect1>
149 <title>Credits</title>
150 <para>Author: &namegabriel;</para>
151 <para>New in version 4.22</para>
152 <para>Example written by Iain McCurdy, edited by &namekevin;.</para>
153 </refsect1>
154 </refentry>