| This contest was finished on May 31, 2002
The winner was Mike Sweet's file chooser with 74% of all votes.
View the results
Received Entries
The following entries have been received:
Matthias Melcher
Download .tar.gz |
Download .zip
I added two features to the existing file browser
- I extended the pattern function to contain multiple pattern (a la
Windows) This is source code compatible to 1.1.0.
To use this feature, simply provide a tab delimited list of
description/pattern pairs instead of one pattern (the single pattern
method continues to work, as does the custom pattern button - try it
:-).
char patternList[] =
"Source Code (.c;.C;.cxx;.cpp;.h;.H)\t*.{c,C,cxx,cpp,h,H}\t"
"C++ Source Files only(.cxx;.cpp)\t*.{cxx,cpp}\t"
"Header Files only (.h;.H)\t*.{h,H}\t"
"Fluid Files (.fl)\t*.fl";
- I added a shortcut button (a la Mac OS X, top right) which pops up a
menu with all mounted drives (home, desktop, etc. to be added). It also
provides menu items to add and delete the current file/directory to the
shortcuts (uses Fl_Preferences, up to 10 entries). Using a button for a
pulldown is disputable...
Michael Sweet
Download .tar.gz |
Download .zip
(last updated 5/27/2002)
My new file chooser simplifies the dialog while providing several
key enhancements:
- Like Matthias's file chooser, you can now provide
multiple patterns, although I chose to put the patterns
in parenthesis and use a tab to separate each pattern,
e.g.:
char pattern[] = "Image Files (*.{bmp,gif,jpg,png,xbm,xpm})\t"
"Web Files (*.{htm,html,php})\t"
"All Files (*)";
If no "*" pattern is provided, then an entry for "All
Files (*)" is automatically added.
- The new file chooser provides a built-in preview box
which can be toggled by the programmer or user. The
preview box first tries to load the selected file using
Fl_Shared_Image::get(), and if that fails it checks if
the first 2048 bytes are printable text. Apps can
register (preview) image loading functions to provide
file previews. The sample app includes code to generate
previews of PS and PDF files using Ghostscript...
- 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 for adding a directory to
the favorites list (Alt+a), managing the favorites list
(Alt+m), showing the filesystem list (Alt+f), going to
the home directory (Alt+h), and going to any of the
first 10 favorites (Alt+0 to Alt+9).
|
| |