<!-- Converted to DocBook/SGML by Kevin Conder -->
<refentry id="fltext">
  <refmeta>
    <refentrytitle>FLtext</refentrytitle>
  </refmeta>

  <refnamediv>
    <refname>FLtext</refname>
    <refpurpose>
      A FLTK widget opcode that creates a textbox.
      <indexterm id="IndexFltext"><primary>FLtext</primary></indexterm>
    </refpurpose>
  </refnamediv>
  
  <refsect1>
    <title>Description</title>
    <para>
      <emphasis><emphasis>FLtext</emphasis> allows the user to modify a parameter value by directly typing it into a text field.</emphasis>
    </para>
  </refsect1>

  <refsect1>
    <title>Syntax</title>
    <synopsis>kout, ihandle <command>FLtext</command> &quot;label&quot;, imin, imax, istep, itype, iwidth, iheight, ix, iy</synopsis>
  </refsect1>

  <refsect1>
    <title>Initialization</title>
    <para>
      <emphasis>ihandle</emphasis> -- a handle value (an integer number) that unequivocally references a corresponding widget. This is used by other opcodes that modify a widget's properties (see <link linkend="ControlFltkAppearance"><citetitle>Modifying FLTK Widget Appearance</citetitle></link>). It is automatically output by <emphasis>FLtext</emphasis> and must not be set by the user label. (The user label is a double-quoted string containing some user-provided text placed near the widget.)
    </para>

    <para>
      <emphasis><quote>label</quote></emphasis> -- a double-quoted string containing some user-provided text, placed near corresponding widget.
    </para>

    <para>
      <emphasis>imin</emphasis> -- minimum value of output range.
    </para>

    <para>
      <emphasis>imax</emphasis> -- maximum value of output range.
    </para>

    <para>
      <emphasis>istep</emphasis> -- a floating-point number indicating the increment of valuator value corresponding to of each mouse click. The <emphasis>istep</emphasis> argument allows the user to arbitrarily slow roller's motion, enabling arbitrary precision.
    </para>

    <para>
      <emphasis>itype</emphasis> -- an integer number denoting the appearance of the valuator.
    </para>

    <para>
      The <emphasis>itype</emphasis> argument can be set to the following values:

      <itemizedlist>
        <listitem><para>1 - normal behaviour</para></listitem>
        <listitem><para>2 - dragging operation is suppressed, instead it will appear two arrow buttons. A mouse-click on one of these buttons can increase/decrease the output value.</para></listitem>
        <listitem><para>3 - text editing is suppressed, only mouse dragging modifies the output value.</para></listitem>
      </itemizedlist>
    </para>

    <para>
      <emphasis>iwidth</emphasis> -- width of widget.
    </para>

    <para>
      <emphasis>iheight</emphasis> -- height of widget.
    </para>

    <para>
      <emphasis>ix</emphasis> -- horizontal position of upper left corner of the valuator, relative to the upper left corner of corresponding window (expressed in pixels).
    </para>

    <para>
      <emphasis>iy</emphasis> -- vertical position of upper left corner of the valuator, relative to the upper
left corner of corresponding window (expressed in pixels).
    </para>
  </refsect1>

  <refsect1>
    <title>Performance</title>
   <para>
      <emphasis>kout</emphasis> -- output value
    </para>

    <para>
      <emphasis>FLtext</emphasis> allows the user to modify a parameter value by directly typing it into a text field:

      <mediaobject>
        <imageobject>
          <imagedata fileref="images/fltext.png" format="PNG">
        </imageobject>

        <textobject>
          <phrase>FLtext.</phrase>
        </textobject>

        <caption>
          <para>FLtext.</para>
        </caption>
      </mediaobject>

      Its value can also be modified by clicking on it and dragging the mouse horizontally. The <emphasis>istep</emphasis> argument allows the user to arbitrarily set the response on mouse dragging.
    </para>
  </refsect1>

  <refsect1>
    <title>Examples</title>
    <para>
      Here is an example of the fltext opcode. It uses the files <ulink url="examples/fltext.orc"><citetitle>fltext.orc</citetitle></ulink> and <ulink url="examples/fltext.sco"><citetitle>fltext.sco</citetitle></ulink>.

      <example>
        <title>Example of the fltext opcode.</title>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/fltext.orc" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>

        <programlisting>
<inlinemediaobject>
            <imageobject>
              <imagedata fileref="examples/fltext.sco" format="linespecific">
            </imageobject>
          </inlinemediaobject>
        </programlisting>
      </example>
    </para>
  </refsect1>

  <refsect1>
    <title>See Also</title>
    <para>
      <link linkend="flcount"><citetitle>FLcount</citetitle></link>,
      <link linkend="fljoy"><citetitle>FLjoy</citetitle></link>,
      <link linkend="flkeyb"><citetitle>FLkeyb</citetitle></link>,
      <link linkend="flknob"><citetitle>FLknob</citetitle></link>,
      <link linkend="flroller"><citetitle>FLroller</citetitle></link>,
      <link linkend="flslider"><citetitle>FLslider</citetitle></link>
    </para>
  </refsect1>

  <refsect1>
    <title>Credits</title>
    <para>Author: &namegabriel;</para>
    <para>New in version 4.22</para>
    <para>Example written by Iain McCurdy, edited by &namekevin;.</para>
  </refsect1>
</refentry>
