<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>FLtabs</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <meta name="generator" content="DocBook XSL Stylesheets V1.76.1" /> <link rel="home" href="index.html" title="The Canonical Csound Reference Manual" /> <link rel="up" href="OpcodesTop.html" title="Orchestra Opcodes and Operators" /> <link rel="prev" href="FLslider.html" title="FLslider" /> <link rel="next" href="FLtabsEnd.html" title="FLtabsEnd" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">FLtabs</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="FLslider.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="FLtabsEnd.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry" title="FLtabs"> <a id="FLtabs"></a> <div class="titlepage"></div> <a id="IndexFLtabs" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">FLtabs</span> </h2> <p>FLtabs — Creates a tabbed FLTK interface. </p> </div> <div class="refsect1" title="Description"> <a id="idp22828648"></a> <h2>Description</h2> <p> <span class="emphasis"><em>FLtabs</em></span> is a <span class="quote">“<span class="quote">file card tabs</span>”</span> interface that is useful to display several areas containing widgets in the same windows, alternatively. It must be used together with <a class="link" href="FLgroup.html" title="FLgroup"><em class="citetitle">FLgroup</em></a>, another container that groups child widgets. </p> </div> <div class="refsect1" title="Syntax"> <a id="idp22864184"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>FLtabs</strong></span> iwidth, iheight, ix, iy</pre> </div> <div class="refsect1" title="Initialization"> <a id="idp22865232"></a> <h2>Initialization</h2> <p> <span class="emphasis"><em>iwidth</em></span> -- width of widget. </p> <p> <span class="emphasis"><em>iheight</em></span> -- height of widget. </p> <p> <span class="emphasis"><em>ix</em></span> -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window. Expressed in pixels. </p> <p> <span class="emphasis"><em>iy</em></span> -- vertical position of upper left corner of the valuator, relative to the upper left corner of corresponding window. Expressed in pixels. </p> </div> <div class="refsect1" title="Performance"> <a id="idp22867576"></a> <h2>Performance</h2> <p> Containers are useful to format the graphic appearance of the widgets. The most important container is <a class="link" href="FLpanel.html" title="FLpanel"><em class="citetitle">FLpanel</em></a>, that actually creates a window. It can be filled with other containers and/or valuators or other kinds of widgets. </p> <p> There are no k-rate arguments in containers. </p> <p> <span class="emphasis"><em>FLtabs</em></span> is a <span class="quote">“<span class="quote">file card tabs</span>”</span> interface that is useful to display several alternate areas containing widgets in the same window. </p> <div class="mediaobject"> <img src="images/fltabs.png" alt="FLtabs." /> <div class="caption"> <p>FLtabs.</p> </div> </div> <p> </p> <p> It must be used together with <a class="link" href="FLgroup.html" title="FLgroup"><em class="citetitle">FLgroup</em></a>, another FLTK container opcode that groups child widgets. </p> </div> <div class="refsect1" title="Examples"> <a id="idp22872232"></a> <h2>Examples</h2> <p> The following example code: </p> <div class="informalexample"> <pre class="programlisting"> <span class="opc">FLpanel</span> "Panel1", 450, 550, 100, 100 <span class="opc">FLscroll</span> 450, 550, 0, 0 <span class="opc">FLtabs</span> 400, 550, 5, 5 <span class="opc">FLgroup</span> "sliders", 380, 500, 10, 40, 1 gk1, ihs <span class="opc">FLslider</span> "FLslider 1", 500, 1000, 2 ,1, -1, 300,15, 20,50 gk2, ihs <span class="opc">FLslider</span> "FLslider 2", 300, 5000, 2 ,3, -1, 300,15, 20,100 gk3, ihs <span class="opc">FLslider</span> "FLslider 3", 350, 1000, 2 ,5, -1, 300,15, 20,150 gk4, ihs <span class="opc">FLslider</span> "FLslider 4", 250, 5000, 1 ,11, -1, 300,30, 20,200 gk5, ihs <span class="opc">FLslider</span> "FLslider 5", 220, 8000, 2 ,1, -1, 300,15, 20,250 gk6, ihs <span class="opc">FLslider</span> "FLslider 6", 1, 5000, 1 ,13, -1, 300,15, 20,300 gk7, ihs <span class="opc">FLslider</span> "FLslider 7", 870, 5000, 1 ,15, -1, 300,30, 20,350 gk8, ihs <span class="opc">FLslider</span> "FLslider 8", 20, 20000, 2 ,6, -1, 30,400, 350,50 <span class="opc">FLgroupEnd</span> <span class="opc">FLgroup</span> "rollers", 380, 500, 10, 30, 2 gk1, ihr <span class="opc">FLroller</span> "FLroller 1", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,50 gk2, ihr <span class="opc">FLroller</span> "FLroller 2", 80, 5000,1,2 ,1 ,-1, 200,22, 20,100 gk3, ihr <span class="opc">FLroller</span> "FLroller 3", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,150 gk4, ihr <span class="opc">FLroller</span> "FLroller 4", 80, 5000,1,2 ,1 ,-1, 200,22, 20,200 gk5, ihr <span class="opc">FLroller</span> "FLroller 5", 50, 1000,.1,2 ,1 ,-1, 200,22, 20,250 gk6, ihr <span class="opc">FLroller</span> "FLroller 6", 80, 5000,1,2 ,1 ,-1, 200,22, 20,300 gk7, ihr <span class="opc">FLroller</span> "FLroller 7",50, 5000,1,1 ,2 ,-1, 30,300, 280,50 <span class="opc">FLgroupEnd</span> <span class="opc">FLgroup</span> "joysticks", 380, 500, 10, 40, 3 gk1, gk2, ihj1, ihj2 <span class="opc">FLjoy</span> "FLjoy", 50, 18000, 50, 18000, 2, 2, -1, -1, 300, 300, 30, 60 <span class="opc">FLgroupEnd</span> <span class="opc">FLtabsEnd</span> <span class="opc">FLscrollEnd</span> <span class="opc">FLpanelEnd</span></pre> </div> <p> ...will produce the following result: </p> <div class="mediaobject"> <img src="images/fltabs_sliders-tab.png" alt="FLtabs example, sliders tab." /> <div class="caption"> <p>FLtabs example, sliders tab.</p> </div> </div> <p> </p> <div class="mediaobject"> <img src="images/fltabs_rollers-tab.png" alt="FLtabs example, rollers tab." /> <div class="caption"> <p>FLtabs example, rollers tab.</p> </div> </div> <p> </p> <div class="mediaobject"> <img src="images/fltabs_joysticks-tab.png" alt="FLtabs example, joysticks tab." /> <div class="caption"> <p>FLtabs example, joysticks tab.</p> </div> </div> <p> (Each picture shows a different tab selection inside the same window.) </p> </div> <div class="refsect1" title="Examples"> <a id="idp22889048"></a> <h2>Examples</h2> <p> Here is an example of the FLtabs opcode. It uses the file <a class="ulink" href="examples/FLtabs.csd" target="_top"><em class="citetitle">FLtabs.csd</em></a>. </p> <div class="example"> <a id="idp22890016"></a> <p class="title"> <strong>Example 263. Example of the FLtabs opcode.</strong> </p> <div class="example-contents"> <p>See the sections <a class="link" href="UsingRealTime.html" title="Real-Time Audio"><em class="citetitle">Real-time Audio</em></a> and <a class="link" href="CommandFlags.html" title="Csound command line"><em class="citetitle">Command Line Flags</em></a> for more information on using command line flags.</p> <pre class="programlisting"> <span class="csdtag"><CsoundSynthesizer></span> <span class="csdtag"><CsOptions></span> <span class="comment">; Select audio/midi flags here according to platform</span> <span class="comment">; Audio out Audio in No messages</span> -odac -iadc -d <span class="comment">;;;RT audio I/O</span> <span class="comment">; For Non-realtime ouput leave only the line below:</span> <span class="comment">; -o FLtabs.wav -W ;;; for file output any platform</span> <span class="csdtag"></CsOptions></span> <span class="csdtag"><CsInstruments></span> <span class="comment">; A single oscillator with frequency, amplitude and</span> <span class="comment">; panning controls on separate file tab cards</span> <span class="ohdr">sr</span> <span class="op">=</span> 44100 <span class="ohdr">kr</span> <span class="op">=</span> 441 <span class="ohdr">ksmps</span> <span class="op">=</span> 100 <span class="ohdr">nchnls</span> <span class="op">=</span> 2 <span class="opc">FLpanel</span> "Tabs", 300, 350, 100, 100 itabswidth <span class="op">=</span> 280 itabsheight <span class="op">=</span> 330 ix <span class="op">=</span> 5 iy <span class="op">=</span> 5 <span class="opc">FLtabs</span> itabswidth,itabsheight, ix,iy itab1width <span class="op">=</span> 280 itab1height <span class="op">=</span> 300 itab1x <span class="op">=</span> 10 itab1y <span class="op">=</span> 40 <span class="opc">FLgroup</span> "Tab 1", itab1width, itab1height, itab1x, itab1y gkfreq, i1 <span class="opc">FLknob</span> "Frequency", 200, 5000, <span class="op">-</span>1, 1, <span class="op">-</span>1, 70, 70, 130 <span class="opc">FLsetVal_i</span> 400, i1 <span class="opc">FLgroupEnd</span> itab2width <span class="op">=</span> 280 itab2height <span class="op">=</span> 300 itab2x <span class="op">=</span> 10 itab2y <span class="op">=</span> 40 <span class="opc">FLgroup</span> "Tab 2", itab2width, itab2height, itab2x, itab2y gkamp, i2 <span class="opc">FLknob</span> "Amplitude", 0, 15000, 0, 1, <span class="op">-</span>1, 70, 70, 130 <span class="opc">FLsetVal_i</span> 15000, i2 <span class="opc">FLgroupEnd</span> itab3width <span class="op">=</span> 280 itab3height <span class="op">=</span> 300 itab3x <span class="op">=</span> 10 itab3y <span class="op">=</span> 40 <span class="opc">FLgroup</span> "Tab 3", itab3width, itab3height, itab3x, itab3y gkpan, i3 <span class="opc">FLknob</span> "Pan position", 0, 1, 0, 1, <span class="op">-</span>1, 70, 70, 130 <span class="opc">FLsetVal_i</span> 0.5, i3 <span class="opc">FLgroupEnd</span> <span class="opc">FLtabsEnd</span> <span class="opc">FLpanelEnd</span> <span class="comment">; Run the widget thread!</span> <span class="opc">FLrun</span> <span class="oblock">instr</span> 1 ifn <span class="op">=</span> 1 asig <span class="opc">oscili</span> gkamp, gkfreq, ifn <span class="opc">outs</span> asig<span class="op">*</span>(1<span class="op">-</span>gkpan), asig<span class="op">*</span>gkpan <span class="oblock">endin</span> <span class="csdtag"></CsInstruments></span> <span class="csdtag"><CsScore></span> <span class="comment">; Function table that defines a single cycle</span> <span class="comment">; of a sine wave.</span> <span class="stamnt">f</span> 1 0 1024 10 1 <span class="comment">; Instrument 1 will play a note for 1 hour.</span> <span class="stamnt">i</span> 1 0 3600 <span class="stamnt">e</span> <span class="csdtag"></CsScore></span> <span class="csdtag"></CsoundSynthesizer></span> </pre> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1" title="See Also"> <a id="idp22892288"></a> <h2>See Also</h2> <p> <a class="link" href="FLgroup.html" title="FLgroup"><em class="citetitle">FLgroup</em></a>, <a class="link" href="FLgroupEnd.html" title="FLgroupEnd"><em class="citetitle">FLgroupEnd</em></a>, <a class="link" href="FLpack.html" title="FLpack"><em class="citetitle">FLpack</em></a>, <a class="link" href="FLpackEnd.html" title="FLpackEnd"><em class="citetitle">FLpackEnd</em></a>, <a class="link" href="FLpanel.html" title="FLpanel"><em class="citetitle">FLpanel</em></a>, <a class="link" href="FLpanelEnd.html" title="FLpanelEnd"><em class="citetitle">FLpanelEnd</em></a>, <a class="link" href="FLscroll.html" title="FLscroll"><em class="citetitle">FLscroll</em></a>, <a class="link" href="FLscrollEnd.html" title="FLscrollEnd"><em class="citetitle">FLscrollEnd</em></a>, <a class="link" href="FLtabsEnd.html" title="FLtabsEnd"><em class="citetitle">FLtabsEnd</em></a> </p> </div> <div class="refsect1" title="Credits"> <a id="idp22897144"></a> <h2>Credits</h2> <p>Author: Gabriel Maldonado</p> <p>New in version 4.22</p> <p>Example written by Iain McCurdy, edited by Kevin Conder.</p> </div> </div> <div class="navfooter"> <hr /> <table width="100%" summary="Navigation footer"> <tr> <td width="40%" align="left"><a accesskey="p" href="FLslider.html">Prev</a> </td> <td width="20%" align="center"> <a accesskey="u" href="OpcodesTop.html">Up</a> </td> <td width="40%" align="right"> <a accesskey="n" href="FLtabsEnd.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">FLslider </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> FLtabsEnd</td> </tr> </table> </div> </body> </html>