| 1 | |
| 2 | <refentry id="checkbox"> |
| 3 | <indexterm id="IndexCheckbox"><primary>checkbox</primary></indexterm> |
| 4 | <refentryinfo><title>Instrument Control:Sensing and Control</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>checkbox</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | |
| 10 | |
| 11 | <refnamediv> |
| 12 | <refname>checkbox</refname> |
| 13 | |
| 14 | <refpurpose> |
| 15 | Sense on-screen controls. |
| 16 | </refpurpose> |
| 17 | </refnamediv> |
| 18 | |
| 19 | <refsect1> |
| 20 | <title>Description</title> |
| 21 | <para>Plugin opcode in control.</para> |
| 22 | <para> |
| 23 | Sense on-screen controls. Requires Winsound or TCL/TK. |
| 24 | </para> |
| 25 | </refsect1> |
| 26 | |
| 27 | <refsect1> |
| 28 | <title>Syntax</title> |
| 29 | <synopsis>kres <command>checkbox</command> knum</synopsis> |
| 30 | </refsect1> |
| 31 | |
| 32 | <refsect1> |
| 33 | <title>Performance</title> |
| 34 | <para> |
| 35 | Note that this opcode is not available on Windows due to the implimentation of pipes on that system |
| 36 | </para> |
| 37 | <para> |
| 38 | <emphasis>kres</emphasis> -- value of the checkbox control. If the checkbox is set (pushed) then return 1, if not, return 0. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>knum</emphasis> -- the number of the checkbox. If it does not exist, it is made on-screen at initialization. |
| 43 | </para> |
| 44 | </refsect1> |
| 45 | |
| 46 | <refsect1> |
| 47 | <title>Examples</title> |
| 48 | <para> |
| 49 | Here is a simple example of the checkbox opcode. It uses the file <ulink url="examples/checkbox.csd"><citetitle>checkbox.csd</citetitle></ulink>. |
| 50 | |
| 51 | <example> |
| 52 | <title>Simple example of the checkbox opcode.</title> |
| 53 | |
| 54 | |
| 55 | |
| 56 | <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> |
| 57 | <xi:include href="examples-xml/checkbox.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 58 | </example> |
| 59 | </para> |
| 60 | </refsect1> |
| 61 | |
| 62 | <refsect1> |
| 63 | <title>See also</title> |
| 64 | <para><link linkend="ControlSensing"><citetitle>Sensing and Control: TCL/TK widgets</citetitle></link></para> |
| 65 | </refsect1> |
| 66 | |
| 67 | <refsect1> |
| 68 | <title>Credits</title> |
| 69 | <para> |
| 70 | <simplelist> |
| 71 | <member>Author: &namejohn;</member> |
| 72 | <member>University of Bath, Codemist. Ltd.</member> |
| 73 | <member>Bath, UK</member> |
| 74 | <member>September, 2000</member> |
| 75 | </simplelist> |
| 76 | </para> |
| 77 | <para>Example written by &namekevin;.</para> |
| 78 | |
| 79 | <para>New in Csound version 4.08</para> |
| 80 | </refsect1> |
| 81 | </refentry> |