<?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>FLscroll</title> <link rel="stylesheet" type="text/css" href="csound.css" /> <link rel="stylesheet" type="text/css" href="syntax-highlighting.css" /> <meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /> <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="FLsavesnap.html" title="FLsavesnap" /> <link rel="next" href="FLscrollEnd.html" title="FLscrollEnd" /> </head> <body> <div class="navheader"> <table width="100%" summary="Navigation header"> <tr> <th colspan="3" align="center">FLscroll</th> </tr> <tr> <td width="20%" align="left"><a accesskey="p" href="FLsavesnap.html">Prev</a> </td> <th width="60%" align="center">Orchestra Opcodes and Operators</th> <td width="20%" align="right"> <a accesskey="n" href="FLscrollEnd.html">Next</a></td> </tr> </table> <hr /> </div> <div class="refentry"> <a id="FLscroll"></a> <div class="titlepage"></div> <a id="IndexFLscroll" class="indexterm"></a> <div class="refnamediv"> <h2> <span class="refentrytitle">FLscroll</span> </h2> <p>FLscroll — A FLTK opcode that adds scroll bars to an area. </p> </div> <div class="refsect1"> <a id="idm281472934429272"></a> <h2>Description</h2> <p> <span class="emphasis"><em>FLscroll</em></span> adds scroll bars to an area. </p> </div> <div class="refsect1"> <a id="idm281472934384952"></a> <h2>Syntax</h2> <pre class="synopsis"><span class="command"><strong>FLscroll</strong></span> iwidth, iheight [, ix] [, iy]</pre> </div> <div class="refsect1"> <a id="idm281472934382888"></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> (optional) -- 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> (optional) -- 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"> <a id="idm281472934378504"></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>FLscroll</em></span> adds scroll bars to an area. Normally you must set arguments <span class="emphasis"><em>iwidth</em></span> and <span class="emphasis"><em>iheight</em></span> equal to that of the parent window or other parent container. <span class="emphasis"><em>ix</em></span> and <span class="emphasis"><em>iy</em></span> are optional since they normally are set to zero. For example the following code: </p> <div class="informalexample"> <pre class="programlisting"> <span class="opc">FLpanel</span> "PanelPluto",400,300,100,100 <span class="opc">FLscroll</span> 400,300 gk1, ih1 <span class="opc">FLslider</span> "FLslider 1", 500, 1000, 2 ,1, -1, 300,15, 20,50 gk2, ih2 <span class="opc">FLslider</span> "FLslider 2", 300, 5000, 2 ,3, -1, 300,15, 20,100 gk3, ih3 <span class="opc">FLslider</span> "FLslider 3", 350, 1000, 2 ,5, -1, 300,15, 20,150 gk4, ih4 <span class="opc">FLslider</span> "FLslider 4", 250, 5000, 1 ,11,-1, 300,30, 20,200 <span class="opc">FLscrollEnd</span> <span class="opc">FLpanelEnd</span></pre> </div> <p> will show scroll bars, when the main window size is reduced: </p> <div class="mediaobject"> <img src="images/flscroll.png" alt="FLscroll." /> <div class="caption"> <p>FLscroll.</p> </div> </div> <p> </p> </div> <div class="refsect1"> <a id="idm281472934363208"></a> <h2>Examples</h2> <p> Here is an example of the FLscroll opcode. It uses the file <a class="ulink" href="examples/FLscroll.csd" target="_top"><em class="citetitle">FLscroll.csd</em></a>. </p> <div class="example"> <a id="idm281472934361352"></a> <p class="title"> <strong>Example 303. Example of the FLscroll 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> <div class="refsect1"> <a id="idm281472766937512"></a> <pre class="programlisting"> <span class="nt"><CsoundSynthesizer></span> <span class="nt"><CsOptions></span> <span class="c1">; Select audio/midi flags here according to platform</span> <span class="c1">; Audio out Audio in No messages</span> -odac -iadc -d <span class="c1">;;;RT audio I/O</span> <span class="c1">; For Non-realtime ouput leave only the line below:</span> <span class="c1">; -o FLscroll.wav -W ;;; for file output any platform</span> <span class="nt"></CsOptions></span> <span class="nt"><CsInstruments></span> <span class="c1">; Demonstration of the flscroll opcode which enables</span> <span class="c1">; the use of widget sizes and placings beyond the</span> <span class="c1">; dimensions of the containing panel</span> <span class="vg">sr</span> <span class="o">=</span> <span class="mi">44100</span> <span class="vg">kr</span> <span class="o">=</span> <span class="mi">441</span> <span class="vg">ksmps</span> <span class="o">=</span> <span class="mi">100</span> <span class="vg">nchnls</span> <span class="o">=</span> <span class="mi">1</span> <span class="nb">FLpanel</span> <span class="s">"Text Box"</span><span class="p">,</span> <span class="mi">420</span><span class="p">,</span> <span class="mi">200</span><span class="p">,</span> <span class="mi">50</span><span class="p">,</span> <span class="mi">50</span> i<span class="n">width</span> <span class="o">=</span> <span class="mi">420</span> i<span class="n">height</span> <span class="o">=</span> <span class="mi">200</span> i<span class="n">x</span> <span class="o">=</span> <span class="mi">0</span> i<span class="n">y</span> <span class="o">=</span> <span class="mi">0</span> <span class="nb">FLscroll</span> i<span class="n">width</span><span class="p">,</span> i<span class="n">height</span><span class="p">,</span> i<span class="n">x</span><span class="p">,</span> i<span class="n">y</span> i<span class="n">h3</span> <span class="nb">FLbox</span> <span class="s">"DRAG THE SCROLL BAR TO THE RIGHT IN ORDER TO READ THE REST OF THIS TEXT!"</span><span class="p">,</span> <span class="mi">1</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">20</span><span class="p">,</span> <span class="mi">870</span><span class="p">,</span> <span class="mi">30</span><span class="p">,</span> <span class="mi">10</span><span class="p">,</span> <span class="mi">100</span> <span class="nb">FLscrollEnd</span> <span class="c1">; End of panel contents</span> <span class="nb">FLpanelEnd</span> <span class="c1">; Run the widget thread!</span> <span class="nb">FLrun</span> <span class="kd">instr</span> <span class="nf">1</span> <span class="kd">endin</span> <span class="nt"></CsInstruments></span> <span class="nt"><CsScore></span> <span class="c1">; 'Dummy' score event of 1 hour.</span> <span class="nb">f</span> <span class="mi">0</span> <span class="mi">3600</span> <span class="nb">e</span> <span class="nt"></CsScore></span> <span class="nt"></CsoundSynthesizer></span> </pre> </div> </div> </div> <p><br class="example-break" /> </p> </div> <div class="refsect1"> <a id="idm281472934357064"></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="FLscrollEnd.html" title="FLscrollEnd"><em class="citetitle">FLscrollEnd</em></a>, <a class="link" href="FLtabs.html" title="FLtabs"><em class="citetitle">FLtabs</em></a>, <a class="link" href="FLtabsEnd.html" title="FLtabsEnd"><em class="citetitle">FLtabsEnd</em></a> </p> </div> <div class="refsect1"> <a id="idm281472934347336"></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="FLsavesnap.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="FLscrollEnd.html">Next</a></td> </tr> <tr> <td width="40%" align="left" valign="top">FLsavesnap </td> <td width="20%" align="center"> <a accesskey="h" href="index.html">Home</a> </td> <td width="40%" align="right" valign="top"> FLscrollEnd</td> </tr> </table> </div> </body> </html>