| 1 | |
| 2 | <refentry id="FLtabs"> |
| 3 | <indexterm id="IndexFLtabs"><primary>FLtabs</primary></indexterm> |
| 4 | <refentryinfo><title>FLTK:Containers</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>FLtabs</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>FLtabs</refname> |
| 11 | <refpurpose> |
| 12 | Creates a tabbed FLTK interface. |
| 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>FLtabs</emphasis> is a <quote>file card tabs</quote> interface that is useful to display several areas containing widgets in the same windows, alternatively. It must be used together with <link linkend="FLgroup"><citetitle>FLgroup</citetitle></link>, another container that groups child widgets. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>FLtabs</command> iwidth, iheight, ix, iy</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>iwidth</emphasis> -- width of widget. |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>iheight</emphasis> -- height of widget. |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>ix</emphasis> -- horizontal position of upper left corner of the valuator, relative |
| 43 | to the upper left corner of corresponding window. Expressed in pixels. |
| 44 | </para> |
| 45 | |
| 46 | <para> |
| 47 | <emphasis>iy</emphasis> -- vertical position of upper left corner of the valuator, relative to the upper left corner of corresponding window. Expressed in pixels. |
| 48 | </para> |
| 49 | </refsect1> |
| 50 | |
| 51 | <refsect1> |
| 52 | <title>Performance</title> |
| 53 | <para> |
| 54 | Containers are useful to format the graphic appearance of the widgets. The most important container is <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link>, that actually creates a window. It can be filled with other containers and/or valuators or other kinds of widgets. |
| 55 | </para> |
| 56 | |
| 57 | <para> |
| 58 | There are no k-rate arguments in containers. |
| 59 | </para> |
| 60 | |
| 61 | <para> |
| 62 | <emphasis>FLtabs</emphasis> is a <quote>file card tabs</quote> interface that is useful to display several alternate areas containing widgets in the same window. |
| 63 | |
| 64 | <mediaobject> |
| 65 | <imageobject> |
| 66 | <imagedata fileref="images/fltabs.png" format="PNG"/> |
| 67 | </imageobject> |
| 68 | |
| 69 | <textobject> |
| 70 | <phrase>FLtabs.</phrase> |
| 71 | </textobject> |
| 72 | |
| 73 | <caption> |
| 74 | <para>FLtabs.</para> |
| 75 | </caption> |
| 76 | </mediaobject> |
| 77 | </para> |
| 78 | |
| 79 | <para> |
| 80 | It must be used together with <link linkend="FLgroup"><citetitle>FLgroup</citetitle></link>, another FLTK container opcode that groups child widgets. |
| 81 | </para> |
| 82 | </refsect1> |
| 83 | |
| 84 | <refsect1> |
| 85 | <title>Examples</title> |
| 86 | <para> |
| 87 | The following example code: |
| 88 | |
| 89 | <informalexample> |
| 90 | <programlisting> |
| 91 | <emphasis role="opc">FLpanel</emphasis> "Panel1", 450, 550, 100, 100 |
| 92 | <emphasis role="opc">FLscroll</emphasis> 450, 550, 0, 0 |
| 93 | <emphasis role="opc">FLtabs</emphasis> 400, 550, 5, 5 |
| 94 | |
| 95 | <emphasis role="opc">FLgroup</emphasis> "sliders", 380, 500, 10, 40, 1 |
| 96 | gk1, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 1", 500, 1000, 2 ,1, -1, 300,15, 20,50 |
| 97 | gk2, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 2", 300, 5000, 2 ,3, -1, 300,15, 20,100 |
| 98 | gk3, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 3", 350, 1000, 2 ,5, -1, 300,15, 20,150 |
| 99 | gk4, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 4", 250, 5000, 1 ,11, -1, 300,30, 20,200 |
| 100 | gk5, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 5", 220, 8000, 2 ,1, -1, 300,15, 20,250 |
| 101 | gk6, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 6", 1, 5000, 1 ,13, -1, 300,15, 20,300 |
| 102 | gk7, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 7", 870, 5000, 1 ,15, -1, 300,30, 20,350 |
| 103 | gk8, ihs <emphasis role="opc">FLslider</emphasis> "FLslider 8", 20, 20000, 2 ,6, -1, 30,400, 350,50 |
| 104 | <emphasis role="opc">FLgroupEnd</emphasis> |
| 105 | |
| 106 | <emphasis role="opc">FLgroup</emphasis> "rollers", 380, 500, 10, 30, 2 |
| 107 | gk1, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 1", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,50 |
| 108 | gk2, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 2", 80, 5000,1,2 ,1 ,-1, 200,22, 20,100 |
| 109 | gk3, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 3", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,150 |
| 110 | gk4, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 4", 80, 5000,1,2 ,1 ,-1, 200,22, 20,200 |
| 111 | gk5, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 5", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,250 |
| 112 | gk6, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 6", 80, 5000,1,2 ,1 ,-1, 200,22, 20,300 |
| 113 | gk7, ihr <emphasis role="opc">FLroller</emphasis> "FLroller 7",50, 5000,1,1 ,2 ,-1, 30,300, 280,50 |
| 114 | <emphasis role="opc">FLgroupEnd</emphasis> |
| 115 | |
| 116 | <emphasis role="opc">FLgroup</emphasis> "joysticks", 380, 500, 10, 40, 3 |
| 117 | gk1, gk2, ihj1, ihj2 <emphasis role="opc">FLjoy</emphasis> "FLjoy", 50, 18000, 50, 18000, 2, 2, -1, -1, 300, 300, 30, 60 |
| 118 | <emphasis role="opc">FLgroupEnd</emphasis> |
| 119 | |
| 120 | <emphasis role="opc">FLtabsEnd</emphasis> |
| 121 | <emphasis role="opc">FLscrollEnd</emphasis> |
| 122 | <emphasis role="opc">FLpanelEnd</emphasis></programlisting> |
| 123 | </informalexample> |
| 124 | |
| 125 | ...will produce the following result: |
| 126 | |
| 127 | <mediaobject> |
| 128 | <imageobject> |
| 129 | <imagedata fileref="images/fltabs_sliders-tab.png" format="PNG"/> |
| 130 | </imageobject> |
| 131 | |
| 132 | <textobject> |
| 133 | <phrase>FLtabs example, sliders tab.</phrase> |
| 134 | </textobject> |
| 135 | |
| 136 | <caption> |
| 137 | <para>FLtabs example, sliders tab.</para> |
| 138 | </caption> |
| 139 | </mediaobject> |
| 140 | |
| 141 | <mediaobject> |
| 142 | <imageobject> |
| 143 | <imagedata fileref="images/fltabs_rollers-tab.png" format="PNG"/> |
| 144 | </imageobject> |
| 145 | |
| 146 | <textobject> |
| 147 | <phrase>FLtabs example, rollers tab.</phrase> |
| 148 | </textobject> |
| 149 | |
| 150 | <caption> |
| 151 | <para>FLtabs example, rollers tab.</para> |
| 152 | </caption> |
| 153 | </mediaobject> |
| 154 | |
| 155 | <mediaobject> |
| 156 | <imageobject> |
| 157 | <imagedata fileref="images/fltabs_joysticks-tab.png" format="PNG"/> |
| 158 | </imageobject> |
| 159 | |
| 160 | <textobject> |
| 161 | <phrase>FLtabs example, joysticks tab.</phrase> |
| 162 | </textobject> |
| 163 | |
| 164 | <caption> |
| 165 | <para>FLtabs example, joysticks tab.</para> |
| 166 | </caption> |
| 167 | </mediaobject> |
| 168 | |
| 169 | (Each picture shows a different tab selection inside the same window.) |
| 170 | </para> |
| 171 | </refsect1> |
| 172 | |
| 173 | <refsect1> |
| 174 | <title>Examples</title> |
| 175 | <para> |
| 176 | Here is an example of the FLtabs opcode. It uses the file <ulink url="examples/FLtabs.csd"><citetitle>FLtabs.csd</citetitle></ulink>. |
| 177 | |
| 178 | <example> |
| 179 | <title>Example of the FLtabs opcode.</title> |
| 180 | |
| 181 | <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> |
| 182 | <xi:include href="examples-xml/FLtabs.csd.xml" xmlns:xi="http://www.w3.org/2001/XInclude"/> |
| 183 | </example> |
| 184 | </para> |
| 185 | </refsect1> |
| 186 | |
| 187 | <refsect1> |
| 188 | <title>See Also</title> |
| 189 | <para> |
| 190 | <link linkend="FLgroup"><citetitle>FLgroup</citetitle></link>, |
| 191 | <link linkend="FLgroupEnd"><citetitle>FLgroupEnd</citetitle></link>, |
| 192 | <link linkend="FLpack"><citetitle>FLpack</citetitle></link>, |
| 193 | <link linkend="FLpackEnd"><citetitle>FLpackEnd</citetitle></link>, |
| 194 | <link linkend="FLpanel"><citetitle>FLpanel</citetitle></link>, |
| 195 | <link linkend="FLpanelEnd"><citetitle>FLpanelEnd</citetitle></link>, |
| 196 | <link linkend="FLscroll"><citetitle>FLscroll</citetitle></link>, |
| 197 | <link linkend="FLscrollEnd"><citetitle>FLscrollEnd</citetitle></link>, |
| 198 | <link linkend="FLtabsEnd"><citetitle>FLtabsEnd</citetitle></link> |
| 199 | </para> |
| 200 | </refsect1> |
| 201 | |
| 202 | <refsect1> |
| 203 | <title>Credits</title> |
| 204 | <para>Author: &namegabriel;</para> |
| 205 | <para>New in version 4.22</para> |
| 206 | <para>Example written by Iain McCurdy, edited by &namekevin;.</para> |
| 207 | </refsect1> |
| 208 | </refentry> |