summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2020-08-10 09:05:09 -0700
committerGreg Ercolano <erco@seriss.com>2020-08-10 09:05:09 -0700
commit7b797bf9edf570a89684f44afde86a650cd40ebc (patch)
treeff7010b55b9838b655f7d668bd8f1198507c3a1e /src/Fl_File_Chooser2.cxx
parente5b518987007fe2f83394e6d1ba4d8f642b68676 (diff)
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.
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx26
1 files changed, 26 insertions, 0 deletions
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:
+ <CENTER><TABLE BORDER=1>
+ <TR><TH>Shortcut</TH><TH>Description</TH></TR>
+ <TR><TD>Alt+a</TD><TD>Adds a directory to the favorites list</TD></TR>
+ <TR><TD>Alt+m</TD><TD>Manages the favorites list</TD></TR>
+ <TR><TD>Alt+f</TD><TD>Shows the filesystem list</TD></TR>
+ <TR><TD>Alt+h</TD><TD>Go to the home directory</TD></TR>
+ <TR><TD>Alt+0..9</TD><TD>going to any of the first 10 favorites</TD></TR>
+ </TABLE></CENTER>
+
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