Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b707d9a4ee443103660a75ccb6e51334 > files > 84

csound-doc-5.19.01-10.mga5.noarch.rpm

<?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" />
    <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="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" title="FLscroll">
      <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" title="Description">
        <a id="idp21702256"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>FLscroll</em></span> adds scroll bars to an area.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp21703056"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>FLscroll</strong></span> iwidth, iheight [, ix] [, iy]</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp21696864"></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" title="Performance">
        <a id="idp21780328"></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" title="Examples">
        <a id="idp21788392"></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="idp21789376"></a>
          <p class="title">
            <strong>Example 255. 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>
            <pre class="programlisting">
<span class="csdtag">&lt;CsoundSynthesizer&gt;</span>
<span class="csdtag">&lt;CsOptions&gt;</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 FLscroll.wav -W ;;; for file output any platform</span>
<span class="csdtag">&lt;/CsOptions&gt;</span>
<span class="csdtag">&lt;CsInstruments&gt;</span>

<span class="comment">; Demonstration of the flscroll opcode which enables</span>
<span class="comment">; the use of widget sizes and placings beyond the</span>
<span class="comment">; dimensions of the containing panel</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> 1

<span class="opc">FLpanel</span> "Text Box", 420, 200, 50, 50
    iwidth <span class="op">=</span> 420
    iheight <span class="op">=</span> 200
    ix <span class="op">=</span> 0
    iy <span class="op">=</span> 0
    <span class="opc">FLscroll</span> iwidth, iheight, ix, iy
    ih3 <span class="opc">FLbox</span> "DRAG THE SCROLL BAR TO THE RIGHT IN ORDER TO READ THE REST OF THIS TEXT!", 1, 10, 20, 870, 30, 10, 100
    <span class="opc">FLscrollEnd</span> 
<span class="comment">; End of panel contents</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
<span class="oblock">endin</span>


<span class="csdtag">&lt;/CsInstruments&gt;</span>
<span class="csdtag">&lt;CsScore&gt;</span>

<span class="comment">; 'Dummy' score event of 1 hour.</span>
<span class="stamnt">f</span> 0 3600
<span class="stamnt">e</span>


<span class="csdtag">&lt;/CsScore&gt;</span>
<span class="csdtag">&lt;/CsoundSynthesizer&gt;</span>
</pre>
          </div>
        </div>
        <p><br class="example-break" />
    </p>
      </div>
      <div class="refsect1" title="See Also">
        <a id="idp21791656"></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" title="Credits">
        <a id="idp21796512"></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>