| 1 | |
| 2 | <refentry id="FLcolor"> |
| 3 | <indexterm id="IndexFLcolor"><primary>FLcolor</primary></indexterm> |
| 4 | <refentryinfo><title>FLTK:Appearance</title></refentryinfo> |
| 5 | <refmeta> |
| 6 | <refentrytitle>FLcolor</refentrytitle> |
| 7 | </refmeta> |
| 8 | |
| 9 | <refnamediv> |
| 10 | <refname>FLcolor</refname> |
| 11 | <refpurpose> |
| 12 | A FLTK opcode that sets the primary colors. |
| 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 | Sets the primary colors to RGB values given by the user. |
| 23 | </para> |
| 24 | </refsect1> |
| 25 | |
| 26 | <refsect1> |
| 27 | <title>Syntax</title> |
| 28 | <synopsis><command>FLcolor</command> ired, igreen, iblue [, ired2, igreen2, iblue2]</synopsis> |
| 29 | </refsect1> |
| 30 | |
| 31 | <refsect1> |
| 32 | <title>Initialization</title> |
| 33 | <para> |
| 34 | <emphasis>ired</emphasis> -- The red color of the target widget. The range for each RGB component is 0-255 |
| 35 | </para> |
| 36 | |
| 37 | <para> |
| 38 | <emphasis>igreen</emphasis> -- The green color of the target widget. The range for each RGB component is 0-255 |
| 39 | </para> |
| 40 | |
| 41 | <para> |
| 42 | <emphasis>iblue</emphasis> -- The blue color of the target widget. The range for each RGB component is 0-255 |
| 43 | </para> |
| 44 | <para> |
| 45 | <emphasis>ired2</emphasis> -- The red component for the secondary color of the target widget. The range for each RGB component is 0-255 |
| 46 | </para> |
| 47 | |
| 48 | <para> |
| 49 | <emphasis>igreen2</emphasis> -- The green component for the secondary color of the target widget. The range for each RGB component is 0-255 |
| 50 | </para> |
| 51 | |
| 52 | <para> |
| 53 | <emphasis>iblue2</emphasis> -- The blue component for the secondary color of the target widget. The range for each RGB component is 0-255 |
| 54 | </para> |
| 55 | </refsect1> |
| 56 | |
| 57 | <refsect1> |
| 58 | <title>Performance</title> |
| 59 | <para> |
| 60 | These opcodes modify the appearance of other widgets. There are |
| 61 | two types of such opcodes, those that do not contain the <emphasis>ihandle</emphasis> argument which affect all subsequently declared widgets, and those with <emphasis>ihandle</emphasis> which affect only a target widget previously defined. |
| 62 | </para> |
| 63 | |
| 64 | <para> |
| 65 | <emphasis>FLcolor</emphasis> sets the primary colors to RGB values given by the user. This opcode affects the primary color of (almost) all widgets defined next its location. User can put several instances of <emphasis>FLcolor</emphasis> in front of each widget he intend to modify. However, to modify a single widget, it would be better to use the opcode belonging to the second type (i.e. those containing <emphasis>ihandle</emphasis> argument). |
| 66 | </para> |
| 67 | |
| 68 | <para> |
| 69 | <emphasis>FLcolor</emphasis> is designed to modify the colors of a group of related widgets that assume the same color. The influence of <emphasis>FLcolor</emphasis> on subsequent widgets can be turned off by using -1 as the only argument of the opcode. Also, using -2 (or -3) as the only value of <emphasis>FLcolor</emphasis> makes all next widget colors randomly selected. The difference is that -2 selects a light random color, while -3 selects a dark random color. |
| 70 | </para> |
| 71 | <para> |
| 72 | Using <emphasis>ired2</emphasis>, <emphasis>igreen2</emphasis>, <emphasis>iblue2</emphasis> is equivalent to using a separate <link linkend="FLcolor2"><citetitle>FLcolor2</citetitle></link>. |
| 73 | </para> |
| 74 | </refsect1> |
| 75 | |
| 76 | <refsect1> |
| 77 | <title>See Also</title> |
| 78 | <para> |
| 79 | <link linkend="FLcolor2"><citetitle>FLcolor2</citetitle></link>, |
| 80 | <link linkend="FLhide"><citetitle>FLhide</citetitle></link>, |
| 81 | <link linkend="FLlabel"><citetitle>FLlabel</citetitle></link>, |
| 82 | <link linkend="FLsetAlign"><citetitle>FLsetAlign</citetitle></link>, |
| 83 | <link linkend="FLsetBox"><citetitle>FLsetBox</citetitle></link>, |
| 84 | <link linkend="FLsetColor"><citetitle>FLsetColor</citetitle></link>, |
| 85 | <link linkend="FLsetColor2"><citetitle>FLsetColor2</citetitle></link>, |
| 86 | <link linkend="FLsetFont"><citetitle>FLsetFont</citetitle></link>, |
| 87 | <link linkend="FLsetPosition"><citetitle>FLsetPosition</citetitle></link>, |
| 88 | <link linkend="FLsetSize"><citetitle>FLsetSize</citetitle></link>, |
| 89 | <link linkend="FLsetText"><citetitle>FLsetText</citetitle></link>, |
| 90 | <link linkend="FLsetTextColor"><citetitle>FLsetTextColor</citetitle></link>, |
| 91 | <link linkend="FLsetTextSize"><citetitle>FLsetTextSize</citetitle></link>, |
| 92 | <link linkend="FLsetTextType"><citetitle>FLsetTextType</citetitle></link>, |
| 93 | <link linkend="FLsetVal_i"><citetitle>FLsetVal_i</citetitle></link>, |
| 94 | <link linkend="FLsetVal"><citetitle>FLsetVal</citetitle></link>, |
| 95 | <link linkend="FLshow"><citetitle>FLshow</citetitle></link> |
| 96 | </para> |
| 97 | </refsect1> |
| 98 | |
| 99 | <refsect1> |
| 100 | <title>Credits</title> |
| 101 | <para>Author: &namegabriel;</para> |
| 102 | <para>New in version 4.22</para> |
| 103 | </refsect1> |
| 104 | </refentry> |