Sophie

Sophie

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

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>FLsetColor</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="FLsetBox.html" title="FLsetBox" />
    <link rel="next" href="FLsetColor2.html" title="FLsetColor2" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">FLsetColor</th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="FLsetBox.html">Prev</a> </td>
          <th width="60%" align="center">Orchestra Opcodes and Operators</th>
          <td width="20%" align="right"> <a accesskey="n" href="FLsetColor2.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="refentry" title="FLsetColor">
      <a id="FLsetColor"></a>
      <div class="titlepage"></div>
      <a id="IndexFLsetColor" class="indexterm"></a>
      <div class="refnamediv">
        <h2>
          <span class="refentrytitle">FLsetColor</span>
        </h2>
        <p>FLsetColor — 
      Sets the primary color of a FLTK widget.
          </p>
      </div>
      <div class="refsect1" title="Description">
        <a id="idp21889248"></a>
        <h2>Description</h2>
        <p>
      <span class="emphasis"><em>FLsetColor</em></span> sets the primary color of the target widget.
    </p>
      </div>
      <div class="refsect1" title="Syntax">
        <a id="idp21939504"></a>
        <h2>Syntax</h2>
        <pre class="synopsis"><span class="command"><strong>FLsetColor</strong></span> ired, igreen, iblue, ihandle</pre>
      </div>
      <div class="refsect1" title="Initialization">
        <a id="idp21940504"></a>
        <h2>Initialization</h2>
        <p>
      <span class="emphasis"><em>ired</em></span> -- The red color of the target widget. The range for each RGB component is 0-255
    </p>
        <p>
      <span class="emphasis"><em>igreen</em></span> -- The green color of the target widget. The range for each RGB component is 0-255
    </p>
        <p>
      <span class="emphasis"><em>iblue</em></span> -- The blue color of the target widget. The range for each RGB component is 0-255
    </p>
        <p>
      <span class="emphasis"><em>ihandle</em></span> -- an integer number (used as unique identifier) taken from the output of a previously located widget opcode (which corresponds to the target widget). It is used to unequivocally identify the widget when modifying its appearance with this class of opcodes. The user must not set the <span class="emphasis"><em>ihandle</em></span> value directly, otherwise a Csound crash will occur.
    </p>
      </div>
      <div class="refsect1" title="Examples">
        <a id="idp21943760"></a>
        <h2>Examples</h2>
        <p>
      Here is an example of the FLsetcolor opcode. It uses the file <a class="ulink" href="examples/FLsetcolor.csd" target="_top"><em class="citetitle">FLsetcolor.csd</em></a>.

      </p>
        <div class="example">
          <a id="idp21944760"></a>
          <p class="title">
            <strong>Example 256. Example of the FLsetcolor 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 FLsetcolor.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">; Using the opcode flsetcolor to change from the</span>
<span class="comment">; default colours for widgets</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> "Coloured Sliders", 900, 360, 50, 50
    gkfreq, ihandle <span class="opc">FLslider</span> "A Red Slider", 200, 5000, <span class="op">-</span>1, 5, <span class="op">-</span>1, 750, 30, 85, 50
    ired1 <span class="op">=</span> 255
    igreen1 <span class="op">=</span> 0
    iblue1 <span class="op">=</span> 0
    <span class="opc">FLsetColor</span> ired1, igreen1, iblue1, ihandle

    gkfreq, ihandle <span class="opc">FLslider</span> "A Green Slider", 200, 5000, <span class="op">-</span>1, 5, <span class="op">-</span>1, 750, 30, 85, 150
    ired1 <span class="op">=</span> 0
    igreen1 <span class="op">=</span> 255
    iblue1 <span class="op">=</span> 0
    <span class="opc">FLsetColor</span> ired1, igreen1, iblue1, ihandle

    gkfreq, ihandle <span class="opc">FLslider</span> "A Blue Slider", 200, 5000, <span class="op">-</span>1, 5, <span class="op">-</span>1, 750, 30, 85, 250
    ired1 <span class="op">=</span> 0
    igreen1 <span class="op">=</span> 0
    iblue1 <span class="op">=</span> 255
    <span class="opc">FLsetColor</span> ired1, igreen1, iblue1, ihandle
<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 for 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="idp21947056"></a>
        <h2>See Also</h2>
        <p>
        <a class="link" href="FLcolor2.html" title="FLcolor2"><em class="citetitle">FLcolor2</em></a>, 
        <a class="link" href="FLhide.html" title="FLhide"><em class="citetitle">FLhide</em></a>, 
        <a class="link" href="FLlabel.html" title="FLlabel"><em class="citetitle">FLlabel</em></a>, 
        <a class="link" href="FLsetAlign.html" title="FLsetAlign"><em class="citetitle">FLsetAlign</em></a>, 
        <a class="link" href="FLsetBox.html" title="FLsetBox"><em class="citetitle">FLsetBox</em></a>, 
        <a class="link" href="FLsetColor.html" title="FLsetColor"><em class="citetitle">FLsetColor</em></a>, 
        <a class="link" href="FLsetColor2.html" title="FLsetColor2"><em class="citetitle">FLsetColor2</em></a>, 
        <a class="link" href="FLsetFont.html" title="FLsetFont"><em class="citetitle">FLsetFont</em></a>, 
        <a class="link" href="FLsetPosition.html" title="FLsetPosition"><em class="citetitle">FLsetPosition</em></a>, 
        <a class="link" href="FLsetSize.html" title="FLsetSize"><em class="citetitle">FLsetSize</em></a>, 
        <a class="link" href="FLsetText.html" title="FLsetText"><em class="citetitle">FLsetText</em></a>, 
        <a class="link" href="FLsetTextColor.html" title="FLsetTextColor"><em class="citetitle">FLsetTextColor</em></a>, 
        <a class="link" href="FLsetTextSize.html" title="FLsetTextSize"><em class="citetitle">FLsetTextSize</em></a>, 
        <a class="link" href="FLsetTextType.html" title="FLsetTextType"><em class="citetitle">FLsetTextType</em></a>, 
        <a class="link" href="FLsetVal_i.html" title="FLsetVal_i"><em class="citetitle">FLsetVal_i</em></a>, 
        <a class="link" href="FLsetVal.html" title="FLsetVal"><em class="citetitle">FLsetVal</em></a>, 
        <a class="link" href="FLshow.html" title="FLshow"><em class="citetitle">FLshow</em></a>
    </p>
      </div>
      <div class="refsect1" title="Credits">
        <a id="idp21956136"></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="FLsetBox.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="FLsetColor2.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">FLsetBox </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> FLsetColor2</td>
        </tr>
      </table>
    </div>
  </body>
</html>