Hi,
The FileChooser allows you to give you a set of patterns to match for the file name like this. Eg. for choosing an image:
- Image files (*.png, *.jpg, *.jpeg, *.tiff)
Another common use case which is not in JUCE is giving more than one set of those patterns:
- Image files (*.png, *.jpg, *.jpeg, *.tiff)
- PNG files (*.png)
- JPEG files (*.jpg, *.jpeg)
- TIFF files (*.tiff)
I would expect most platforms will implement that kind of option in the native file chooser. It implemented on Windows, and used by almost every single application.
Any thoughts about (1) is it meaningful to allow this directly in JUCE, and (2) how would we add it to the FileChooser class?
Mine are: (1) yes, and (2) the FileChooser currently takes all its options in the constructor. As a comparison DialogWindow::LaunchOptions has an empty constructor, and all options are set by modifying public members. It could be done this way too for the FileChooser: construct, then set some more options, then open the dialog. So we could have an addFilePatternsGroup(String), or a setFilePatternGroups(StringArray) method if you're not happy with a single pattern.
--
Roeland
