From 7b797bf9edf570a89684f44afde86a650cd40ebc Mon Sep 17 00:00:00 2001 From: Greg Ercolano Date: Mon, 10 Aug 2020 09:05:09 -0700 Subject: Added Mike's feature list to Fl_File_Chooser docs When Mike proposed Fl_File_Chooser, he included a list of features in the voting contest: https://www.fltk.org/contest.php Seemed like a good idea to include these in the widget's docs. --- src/Fl_File_Chooser2.cxx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx index ddbb3e5cd..39010eb8c 100644 --- a/src/Fl_File_Chooser2.cxx +++ b/src/Fl_File_Chooser2.cxx @@ -31,6 +31,32 @@ \image html Fl_File_Chooser.jpg \image latex Fl_File_Chooser.jpg "Fl_File_Chooser" width=12cm + Features include: + + - Multiple filter patterns can be specified, with parenthesis around filters, + and tabs to separate each pattern, e.g.: + \code + char pattern[] = "Image Files (*.{bmp,gif,jpg,png,xbm,xpm})\t" + "Web Files (*.{htm,html,php})\t" + "All Files (*)"; + \endcode + - If no "*" pattern is provided, then an entry for "All Files (*)" is automatically added. + - An optional file preview box is provided which can be toggled by programmer or user + showing images, or the first 2048 bytes of printable text. + - Preview image loading functions can be registered to provide custom file previews. + - The favorites button shows up to 100 user-saved favorite directories, the user's home + directory, and a filesystems item. + - A simple dialog is provided for managing saved directories. + - Shortcut keys are provided: +
+ + + + + + +
ShortcutDescription
Alt+aAdds a directory to the favorites list
Alt+mManages the favorites list
Alt+fShows the filesystem list
Alt+hGo to the home directory
Alt+0..9going to any of the first 10 favorites
+ The Fl_File_Chooser widget transmits UTF-8 encoded filenames to its user. It is recommended to open files that may have non-ASCII names with the fl_fopen() or fl_open() utility functions that handle these names in a cross-platform way -- cgit v1.2.3