class Fl_FileChooser


Class Hierarchy

Include Files

Description

The Fl_FileChooser widget displays a standard file selection dialog that supports various selection modes.

Fl_FileChooser widget

Methods

Fl_FileChooser(const char *pathname, const char *pattern, int type, const char *title)

The constructor creates the Fl_FileChooser dialog pictured above. The pathname argument can be a directory name or a complete file name (in which case the corresponding file is highlighted in the list and in the filename input field.)

The pattern argument can be a NULL string or "*" to list all files. See the FLTK documentation on filename_match() for other kinds of patterns.

The type argument can be one of the following:

The title argument is used to set the title bar text for the Fl_FileChooser window.

~Fl_FileChooser()

Destroys the widget and frees all memory used by it.

void color(Fl_Color c)
Fl_Color color()

Sets or gets the background color of the FileBrowser list.

int count()

Returns the number of selected files.

void directory(const char *pathname)
const char *directory()

Sets or gets the current directory.

void filter(const char *pattern)
const char *filter()

Sets or gets the current filename filter pattern.

void hide()

Hides the Fl_FileChooser window.

void iconsize(uchar s)
uchar iconsize()

Sets or gets the size of the icons in the FileBrowser. By default the icon size is set to 1.5 times the textsize().

void label(const char *l)
const char *label()

Sets or gets the title bar text for the Fl_FileChooser.

void rescan()

Reloads the current directory in the FileBrowser.

void show()

Shows the Fl_FileChooser window.

void textcolor(Fl_Color c)
Fl_Color textcolor()

Sets or gets the current FileBrowser text color.

void textfont(uchar f)
uchar textfont()

Sets or gets the current FileBrowser text font.

void textsize(uchar s)
uchar textsize()

Sets or gets the current FileBrowser text size.

void type(int t)
int type()

Sets or gets the current type of Fl_FileChooser.

const char *value(const char *pathname)
const char *value(int file)
const char *value()

Sets or gets the current value of the selected file.

int visible()

Returns 1 if the Fl_FileChooser window is visible.