FLTK 1.3.0
|
This widget displays a pathname in a text input field. More...
#include <Fl_File_Input.H>
Public Member Functions | |
Fl_Boxtype | down_box () const |
Gets the box type used for the navigation bar. | |
void | down_box (Fl_Boxtype b) |
Sets the box type to use for the navigation bar. | |
Fl_Color | errorcolor () const |
Gets the current error color. | |
void | errorcolor (Fl_Color c) |
Sets the current error color to c . | |
Fl_File_Input (int X, int Y, int W, int H, const char *L=0) | |
Creates a new Fl_File_Input widget using the given position, size, and label string. | |
virtual int | handle (int event) |
Handle events in the widget. | |
int | value (const char *str) |
Sets the value of the widget given a new string value. | |
int | value (const char *str, int len) |
Sets the value of the widget given a new string value and its length. | |
const char * | value () |
Returns the current value, which is a pointer to an internal buffer and is valid only until the next event is handled. | |
Protected Member Functions | |
virtual void | draw () |
Draws the file input widget. |
This widget displays a pathname in a text input field.
A navigation bar located above the input field allows the user to navigate upward in the directory tree. You may want to handle FL_WHEN_CHANGED events for tracking text changes and also FL_WHEN_RELEASE for button release when changing to parent dir. FL_WHEN_RELEASE callback won't be called if the directory clicked is the same as the current one.
Fl_File_Input::Fl_File_Input | ( | int | X, |
int | Y, | ||
int | W, | ||
int | H, | ||
const char * | L = 0 |
||
) |
Creates a new Fl_File_Input widget using the given position, size, and label string.
The default boxtype is FL_DOWN_BOX.
[in] | X,Y,W,H | position and size of the widget |
[in] | L | widget label, default is no label |
Fl_Boxtype Fl_File_Input::down_box | ( | ) | const [inline] |
Gets the box type used for the navigation bar.
void Fl_File_Input::down_box | ( | Fl_Boxtype | b | ) | [inline] |
Sets the box type to use for the navigation bar.
Fl_Color Fl_File_Input::errorcolor | ( | ) | const [inline] |
Gets the current error color.
int Fl_File_Input::handle | ( | int | event | ) | [virtual] |
Handle events in the widget.
Return non zero if event is handled.
[in] | event |
Reimplemented from Fl_Input.
int Fl_File_Input::value | ( | const char * | str | ) |
Sets the value of the widget given a new string value.
Returns non 0 on success.
[in] | str | new string value |
Reimplemented from Fl_Input_.
int Fl_File_Input::value | ( | const char * | str, |
int | len | ||
) |
Sets the value of the widget given a new string value and its length.
Returns non 0 on success.
[in] | str | new string value |
[in] | len | lengh of value |
Reimplemented from Fl_Input_.