2002-05-08 16:44:52 +04:00
|
|
|
|
<HTML>
|
2006-10-29 17:16:03 +03:00
|
|
|
|
<HEAD>
|
|
|
|
|
<TITLE>Fl_Input</TITLE>
|
|
|
|
|
</HEAD>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
<BODY>
|
|
|
|
|
|
2001-11-28 21:00:17 +03:00
|
|
|
|
<!-- NEW PAGE -->
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<H2><A name=Fl_Input>class Fl_Input</A></H2>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<HR>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<H3>Class Hierarchy</H3>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<UL><PRE>
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<A href=Fl_Input_.html#Fl_Input_>Fl_Input_</A>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
+----<B>Fl_Input</B>
|
1998-12-29 17:21:17 +03:00
|
|
|
|
|
|
2002-05-01 04:55:45 +04:00
|
|
|
|
+----<A href="Fl_File_Input.html">Fl_File_Input</A>, <A href=Fl_Float_Input.html#Fl_Float_Input>Fl_Float_Input</A>,
|
|
|
|
|
<A href=Fl_Int_Input.html#Fl_Int_Input>Fl_Int_Input</A>, <A href=Fl_Multiline_Input.html#Fl_Multiline_Input>Fl_Multiline_Input</A>,
|
|
|
|
|
<A href=Fl_Output.html#Fl_Output>Fl_Output</A>, <A href=Fl_Secret_Input.html#Fl_Secret_Input>Fl_Secret_Input</A>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
</PRE></UL>
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<H3>Include Files</H3>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<UL><PRE>
|
1999-01-13 22:28:54 +03:00
|
|
|
|
#include <FL/Fl_Input.H>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
</PRE></UL>
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<H3>Description</H3>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<P>This is the FLTK text input widget. It displays a single line
|
|
|
|
|
of text and lets the user edit it. Normally it is drawn with an
|
|
|
|
|
inset box and a white background. The text may contain any
|
|
|
|
|
characters (even 0), and will correctly display anything, using
|
|
|
|
|
^X notation for unprintable control characters and \nnn notation
|
|
|
|
|
for unprintable characters with the high bit set. It assumes the
|
|
|
|
|
font can draw any characters in the ISO-8859-1 character set.
|
2000-02-21 13:45:59 +03:00
|
|
|
|
|
2001-05-06 20:25:05 +04:00
|
|
|
|
<CENTER><TABLE border=1 WIDTH=90% summary="Fl_Input keyboard and mouse bindings.">
|
2000-02-21 13:45:59 +03:00
|
|
|
|
|
|
|
|
|
<TR><TD WIDTH=200><B>Mouse button 1</B></TD><TD>Moves the cursor to
|
|
|
|
|
this point. Drag selects characters. Double click selects words.
|
|
|
|
|
Triple click selects all text. Shift+click extends the selection.
|
|
|
|
|
When you select text it is automatically copied to the clipboard.
|
|
|
|
|
</TD></TR>
|
|
|
|
|
|
|
|
|
|
<TR><TD><B>Mouse button 2</B></TD><TD>Insert the clipboard at
|
2000-02-22 03:56:53 +03:00
|
|
|
|
the point clicked. You can also select a region and replace it with the
|
|
|
|
|
clipboard by selecting the region with mouse button 2.
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</TD></TR>
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<TR><TD><B>Mouse button 3</B></TD><TD>Currently acts like button 1.</TD></TR>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>Backspace</B></TD><TD>Deletes one character to the left, or
|
1999-01-13 22:28:54 +03:00
|
|
|
|
deletes the selected region.</TD></TR>
|
|
|
|
|
<TR><TD><B>Enter</B></TD><TD>May cause the callback, see when().</TD></TR>
|
|
|
|
|
<TR><TD><B>^A or Home</B></TD><TD>Go to start of line.</TD></TR>
|
|
|
|
|
<TR><TD><B>^B or Left</B></TD><TD>Move left</TD></TR>
|
|
|
|
|
<TR><TD><B>^C</B></TD><TD>Copy the selection to the clipboard</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^D or Delete</B></TD><TD>Deletes one character to the right
|
2000-02-21 13:45:59 +03:00
|
|
|
|
or deletes the selected region.</TD></TR>
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<TR><TD><B>^E or End</B></TD><TD>Go to the end of line.</TD></TR>
|
|
|
|
|
<TR><TD><B>^F or Right</B></TD><TD>Move right</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^K</B></TD><TD>Delete to the end of line (next \n character)
|
|
|
|
|
or deletes a single \n character. These deletions are all concatenated
|
1999-01-13 22:28:54 +03:00
|
|
|
|
into the clipboard.</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^N or Down</B></TD><TD>Move down (for Fl_Multiline_Input
|
1999-01-13 22:28:54 +03:00
|
|
|
|
only, otherwise it moves to the next input field).</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^P or Up</B></TD><TD>Move up (for Fl_Multiline_Input only,
|
1999-01-13 22:28:54 +03:00
|
|
|
|
otherwise it moves to the previous input field).</TD></TR>
|
|
|
|
|
<TR><TD><B>^U</B></TD><TD>Delete everything.</TD></TR>
|
|
|
|
|
<TR><TD><B>^V or ^Y</B></TD><TD>Paste the clipboard</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^X or ^W</B></TD><TD>Copy the region to the clipboard and
|
1999-01-13 22:28:54 +03:00
|
|
|
|
delete it.</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>^Z or ^_</B></TD><TD>Undo. This is a single-level undo
|
|
|
|
|
mechanism, but all adjacent deletions and insertions are concatenated
|
|
|
|
|
into a single "undo". Often this will undo a lot more than you
|
1999-01-13 22:28:54 +03:00
|
|
|
|
expected.</TD></TR>
|
2001-11-29 22:24:00 +03:00
|
|
|
|
<TR><TD><B>Shift+move</B></TD><TD>Move the cursor but also extend the
|
1999-01-13 22:28:54 +03:00
|
|
|
|
selection.</TD></TR>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
|
|
|
|
|
<TR><TD><B>RightCtrl or
|
2000-04-28 22:15:26 +04:00
|
|
|
|
<BR>Compose</B></TD><TD><a name=compose>Start</A>
|
|
|
|
|
a <A href="events.html#compose">compose-character</A>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
sequence. The next one or two keys typed define the character to
|
|
|
|
|
insert (see table that follows.)
|
2000-02-21 13:45:59 +03:00
|
|
|
|
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<p>For instance, to type "<22>" type [compose][a]['] or [compose]['][a].
|
|
|
|
|
|
|
|
|
|
<P>The character "nbsp" (non-breaking space) is typed by using
|
|
|
|
|
[compose][space].
|
|
|
|
|
|
|
|
|
|
<P>The single-character sequences may be followed by a space if
|
|
|
|
|
necessary to remove ambiguity. For instance, if you really want to
|
|
|
|
|
type "<22>~" rather than "<22>" you must type [compose][a][space][~].
|
|
|
|
|
|
|
|
|
|
<p>The same key may be used to "quote" control characters into the
|
|
|
|
|
text. If you need a <tt>^Q</tt> character you can get one by typing
|
|
|
|
|
[compose][Control+Q].
|
|
|
|
|
|
|
|
|
|
<p>X may have a key on the keyboard
|
|
|
|
|
defined as <tt>XK_Multi_key</tt>. If so this key may be used as well
|
|
|
|
|
as the right-hand control key. You can set this up with the program
|
|
|
|
|
<tt>xmodmap</tt>.
|
|
|
|
|
|
|
|
|
|
<p>If your keyboard is set to support a foreign language you should
|
|
|
|
|
also be able to type "dead key" prefix characters. On X you will
|
|
|
|
|
actually be able to see what dead key you typed, and if you then move
|
|
|
|
|
the cursor without completing the sequence the accent will remain
|
|
|
|
|
inserted.
|
|
|
|
|
</TABLE></CENTER>
|
|
|
|
|
|
|
|
|
|
<!-- NEW PAGE -->
|
2001-05-06 20:25:05 +04:00
|
|
|
|
<center><table border=1 summary="Character Composition Table">
|
|
|
|
|
<caption align="top">Character Composition Table</caption>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
<tr>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
<th>Keys</th><th>Char</th>
|
|
|
|
|
|
|
|
|
|
</tr><tr>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>sp</TT></td><td align=center><small>nbsp</small></td>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
<td align=center><TT>*</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>` A</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>D -</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>d -</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>!</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>+ -</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' A</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>~ N</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>~ n</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>%</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>2</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>A ^</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` O</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` o</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>#</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>3</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>~ A</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' O</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>~ a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' o</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>$</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>'</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>: A</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ O</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ o</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>y =</tt></td><td align=center><EFBFBD></td>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
<td align=center><TT>u</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>* A</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>~ O</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>* a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>~ o</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>|</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>p</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>A E</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: O</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>a e</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: o</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>&</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>.</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>, C</tt></td><td align=center><EFBFBD></td>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
<td align=center><TT>x</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>, c</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>- :</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>:</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>,</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>E `</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>O /</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` e</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>o /</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>c</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>1</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>' E</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` U</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' e</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` u</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>a</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>o</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>^ E</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' U</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ e</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' u</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>< <</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>> ></tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: E</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ U</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: e</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ u</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>~</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>1 4</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` I</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: U</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>` i</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: u</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>-</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>1 2</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' I</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' Y</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' i</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>' y</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>r</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>3 4</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ I</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>T H</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>^ i</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>t h</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</tr><tr>
|
|
|
|
|
<td align=center><TT>_</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>?</tt></td><td align=center><EFBFBD></td>
|
2000-03-16 17:35:51 +03:00
|
|
|
|
<td align=center><TT>: I</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>s s</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: i</tt></td><td align=center><EFBFBD></td>
|
|
|
|
|
<td align=center><TT>: y</tt></td><td align=center><EFBFBD>
|
2000-02-21 13:45:59 +03:00
|
|
|
|
</table></center>
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<H3>Methods</H3>
|
|
|
|
|
<CENTER>
|
2001-05-06 20:25:05 +04:00
|
|
|
|
<TABLE width=90% summary="Fl_Input methods.">
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<TR><TD align=left valign=top>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A href=#Fl_Input.Fl_Input>Fl_Input</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.~Fl_Input>~Fl_Input</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.cursor_color>cursor_color</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
</TD><TD align=left valign=top>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A href=#Fl_Input.index>index</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.size>size</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
</TD><TD align=left valign=top>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A href=#Fl_Input.static_value>static_value</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.textcolor>textcolor</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
</TD><TD align=left valign=top>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A href=#Fl_Input.textfont>textfont</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.textsize>textsize</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
</TD><TD align=left valign=top>
|
|
|
|
|
<UL>
|
|
|
|
|
<LI><A href=#Fl_Input.value>value</A></LI>
|
|
|
|
|
<LI><A href=#Fl_Input.when>when</A></LI>
|
|
|
|
|
</UL>
|
|
|
|
|
</TD></TR>
|
|
|
|
|
</TABLE>
|
|
|
|
|
</CENTER>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.Fl_Input">Fl_Input::Fl_Input(int x, int y, int w,
|
1999-01-13 22:28:54 +03:00
|
|
|
|
int h, const char *label = 0)</A></H4>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<P>Creates a new <TT>Fl_Input</TT> widget using the given position, size,
|
2001-11-29 22:24:00 +03:00
|
|
|
|
and label string. The default boxtype is <TT>FL_DOWN_BOX</TT>.
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.~Fl_Input">virtual Fl_Input::~Fl_Input()</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Destroys the widget and any value associated with it.
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.value">const char *Fl_Input::value() const
|
|
|
|
|
<BR>int Fl_Input::value(const char*)
|
|
|
|
|
<BR>int Fl_Input::value(const char*, int)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>The first form returns the current value, which is a pointer
|
|
|
|
|
to the internal buffer and is valid only until the next event is
|
|
|
|
|
handled.
|
|
|
|
|
|
|
|
|
|
<P>The second two forms change the text and set the mark and the
|
|
|
|
|
point to the end of it. The string is copied to the internal
|
|
|
|
|
buffer. Passing <TT>NULL</TT> is the same as "".
|
|
|
|
|
This returns non-zero if the new value is different than the
|
|
|
|
|
current one. You can use the second version to directly set the
|
|
|
|
|
length if you know it already or want to put nul's in the
|
|
|
|
|
text.</P>
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.static_value">int Fl_Input::static_value(const
|
1999-01-13 22:28:54 +03:00
|
|
|
|
char*)
|
2002-05-08 16:44:52 +04:00
|
|
|
|
<BR>int Fl_Input::static_value(const char*, int)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Change the text and set the mark and the point to the end of
|
|
|
|
|
it. The string is <I>not</I> copied. If the user edits the
|
|
|
|
|
string it is copied to the internal buffer then. This can save a
|
|
|
|
|
great deal of time and memory if your program is rapidly
|
|
|
|
|
changing the values of text fields, but this will only work if
|
|
|
|
|
the passed string remains unchanged until either the
|
|
|
|
|
<TT>Fl_Input</TT> is destroyed or <TT>value()</TT> is called
|
2001-11-29 22:24:00 +03:00
|
|
|
|
again.
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.size">int Fl_Input::size() const</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Returns the number of characters in <TT>value()</TT>. This
|
|
|
|
|
may be greater than <TT>strlen(value())</TT> if there are nul
|
|
|
|
|
characters in it.
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.index">char Fl_Input::index(int) const</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Same as <TT>value()[n]</TT>, but may be faster in plausible
|
2001-11-29 22:24:00 +03:00
|
|
|
|
implementations. No bounds checking is done.
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.when">Fl_When Fl_Widget::when() const
|
|
|
|
|
<BR>void Fl_Widget::when(Fl_When)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Controls when callbacks are done. The following values are useful,
|
2001-11-29 22:24:00 +03:00
|
|
|
|
the default value is <TT>FL_WHEN_RELEASE</TT>:
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
<UL>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<LI><TT>0</TT>: The callback is not done, but
|
|
|
|
|
<TT>changed()</TT> is turned on.</LI>
|
|
|
|
|
|
|
|
|
|
<LI><TT>FL_WHEN_CHANGED</TT>: The callback is done each
|
|
|
|
|
time the text is changed by the user.</LI>
|
|
|
|
|
|
|
|
|
|
<LI><TT>FL_WHEN_RELEASE</TT>: The callback will be done
|
|
|
|
|
when this widget loses the focus, including when the
|
|
|
|
|
window is unmapped. This is a useful value for text
|
|
|
|
|
fields in a panel where doing the callback on every
|
|
|
|
|
change is wasteful. However the callback will also
|
|
|
|
|
happen if the mouse is moved out of the window, which
|
|
|
|
|
means it should not do anything visible (like pop up an
|
|
|
|
|
error message). You might do better setting this to
|
|
|
|
|
zero, and scanning all the items for <TT>changed()</TT>
|
|
|
|
|
when the OK button on a panel is pressed.</LI>
|
|
|
|
|
|
|
|
|
|
<LI><TT>FL_WHEN_ENTER_KEY</TT>: If the user types the
|
|
|
|
|
Enter key, the entire text is selected, and the callback
|
|
|
|
|
is done if the text has changed. Normally the Enter key
|
|
|
|
|
will navigate to the next field (or insert a newline for
|
|
|
|
|
a <TT>Fl_Mulitline_Input</TT>), this changes the
|
|
|
|
|
behavior.</LI>
|
|
|
|
|
|
|
|
|
|
<LI><TT>FL_WHEN_ENTER_KEY|FL_WHEN_NOT_CHANGED</TT>: The
|
|
|
|
|
Enter key will do the callback even if the text has not
|
|
|
|
|
changed. Useful for command fields.</LI>
|
|
|
|
|
|
1999-01-13 22:28:54 +03:00
|
|
|
|
</UL>
|
2002-05-08 16:44:52 +04:00
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.textcolor">Fl_Color Fl_Input::textcolor() const
|
|
|
|
|
<BR>void Fl_Input::textcolor(Fl_Color)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Gets or sets the color of the text in the input field.
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.textfont">Fl_Font Fl_Input::textfont() const
|
|
|
|
|
<BR>void Fl_Input::textfont(Fl_Font)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Gets or sets the font of the text in the input field.
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.textsize">uchar Fl_Input::textsize() const
|
|
|
|
|
<BR>void Fl_Input::textsize(uchar)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Gets or sets the size of the text in the input field.
|
|
|
|
|
|
|
|
|
|
<H4><A name="Fl_Input.cursor_color">Fl_Color Fl_Input::cursor_color()
|
1999-01-13 22:28:54 +03:00
|
|
|
|
const
|
2002-05-08 16:44:52 +04:00
|
|
|
|
<BR>void Fl_Input::cursor_color(Fl_Color)</A></H4>
|
|
|
|
|
|
|
|
|
|
<P>Get or set the color of the cursor. This is black by default.
|
1999-01-19 23:53:39 +03:00
|
|
|
|
|
2002-05-08 16:44:52 +04:00
|
|
|
|
</BODY>
|
|
|
|
|
</HTML>
|