class Fl_Input : public Fl_Input_

This is the FL text input object. 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 except \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 assummes the font can draw any characters in the ISO-Latin1 character set).

There are some subclasses with different behavior:

Selections made with the left mouse button are put into the X selection and can thus be pasted into another program. You can paste the X selection in by clicking the middle mouse button at the insertion point.

Emacs control keys are simulated:
Arrow keys Move the insertion point. Up/down arrows only work in the Fl_Multiline_Input object, otherwise they navigate the the next/previous Fl_input object. Shift+arrow will extend the selection.
Backspace Deletes one character to the left, or deletes the selected region.
Delete Deletes one character to the right or deletes the selected region. To handle X servers that don't have backspace keys, this key is translated by Fl into Backspace unless a real backspace has been encountered.
Return May cause the callback, see when().
Home Go to the start of line.
End Go to the end of line.
^A Go to start of line.
^B Move left
^C Copy the selection to the X selection
^D Delete one character to the right or deletes the selected region.
^E Go to the end of line.
^F Move right
^K Delete to the end of line (next \n character) or deletes a single \n character. These deletions are all concatenated into the X selection.
^N Move down
^P Move up
^Q Quote next character, lets you insert control or meta characters (use Alt to "metaize" a character).
^U Delete everything.
^V or ^Y Paste the X selection
^X or ^W Copy the region to the X selection and delete it.
^Z or ^_ 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 expected.

Fl_Input(int,int,int,int,const char * = 0);

const char *value() const;

int value(const char *);

char index(int) const;

int size() const;

uchar when() const;
void when(uchar);

int changed() const;
void set_changed();
void clear_changed();

uchar textfont() const;
void textfont(uchar);
uchar textsize() const;
void textsize(uchar);
uchar textcolor() const;
void textcolor(uchar);

uchar cursor_color() const;
void cursor_color(uchar);

uchar selection_color() const;
void selection_color(uchar);

See also the methods for Fl_Input_. These methods are designed so subclasses can edit the text, but can be called directly if your application wants to edit the text or change the cursor position or selection.

(back to contents)