summaryrefslogtreecommitdiff
path: root/src/Fl_File_Chooser2.cxx
diff options
context:
space:
mode:
authorGreg Ercolano <erco@seriss.com>2023-12-03 18:10:33 -0800
committerGreg Ercolano <erco@seriss.com>2023-12-03 18:10:33 -0800
commitb9ac6bd728659a7780d7cde024f34607601e8a7f (patch)
tree079647ed88e4f97c64bf5ca6e7b9e7e9852ecc39 /src/Fl_File_Chooser2.cxx
parent63c54fe7c8eda4652ef81ab9a759e181ac48c5ee (diff)
Solves issue #856: improve Fl_File_Chooser enum docs
Diffstat (limited to 'src/Fl_File_Chooser2.cxx')
-rw-r--r--src/Fl_File_Chooser2.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/Fl_File_Chooser2.cxx b/src/Fl_File_Chooser2.cxx
index c73938f5e..5175f61d8 100644
--- a/src/Fl_File_Chooser2.cxx
+++ b/src/Fl_File_Chooser2.cxx
@@ -150,37 +150,30 @@
/** \fn Fl_File_Chooser::Fl_File_Chooser(const char *pathname, const char *pattern, int type, const char *title)
The constructor creates the Fl_File_Chooser dialog shown.
- The pathname argument can be a directory name or a
+
+ - The \p 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
+ - The \p pattern argument can be a NULL
string or "*" to list all files, or it can be a
series of descriptions and filter strings separated by tab
characters (\\t). The format of filters is either
"Description text (patterns)" or just "patterns". A file chooser
that provides filters for HTML and image files might look like:
-
\code
"HTML Files (*.html)\tImage Files (*.{bmp,gif,jpg,png})"
\endcode
-
The file chooser will automatically add the "All Files (*)"
pattern to the end of the string you pass if you do not provide
one. The first filter in the string is the default filter.
-
+ \p
See the FLTK documentation on fl_filename_match()
for the kinds of pattern strings that are supported.
- The type argument can be one of the following:
-
- \li \c SINGLE - allows the user to select a single, existing file.
- \li \c MULTI - allows the user to select one or more existing files.
- \li \c CREATE - allows the user to select a single, existing file or
- specify a new filename.
- \li \c DIRECTORY - allows the user to select a single, existing directory.
+ - The \p type argument can be one of the Fl_File_Chooser::Type values.
- The title argument is used to set the title bar text for the
+ - The \p title argument is used to set the title bar text for the
Fl_File_Chooser window.
*/
@@ -1425,8 +1418,8 @@ Fl_File_Chooser::update_preview()
\code
// Get list of filenames user selected from a MULTI chooser
for ( int t=1; t<=chooser->count(); t++ ) {
- const char *filename = chooser->value(t);
- ...
+ const char *filename = chooser->value(t);
+ ...
}
\endcode
*/