FilePickerclass encapsulates a file picker box.
class FilePicker : public Window, public LinkTarget<FilePicker>, public Completable<FilePicker>
||Returns the number of files that are currently selected.|
||Returns the name of the file that is currently selected.|
FilePicker(const char *title, const char *directory, uint32 flags = 0, const char *panel = nullptr);
||The file picker's displayed title.|
||The path to the directory that is initially displayed by the file picker.|
||Flags that affect the appearance and behavior of the file picker. See below for a list of possible values.|
||The name of the panel resource to use for the picker dialog. To use the default file picker, this should be set to |
FilePickerclass provides a standard interface for selecting files. When the user selects a file, the file picker's completion callback is called. The completion callback can then retrieve the path to the selected file by calling the
Options that control the appearance and behavior of the file picker can be controlled by specifying a combination (through logical OR) of the following constants in the
||Display an editable text field where the file name can be typed in.|
||Allow multiple files to be selected in the file list simultaneously. This should not be set if the |
||Causes the root directory name to be included in the file name. If the |
||Don't allow navigation outside (above) the root directory.|
directoryparameter specifies the directory for which a list of files is initially displayed. If the
kFilePickerNoDirectoriesflag is not specified, then the user can navigate to any directory beneath the initial directory. If the
kFilePickerSubdirectoryflag is specified, the user can also navigate upward one level from the initial directory (and subsequently to any directory beneath that level).
kFilePickerSaveflag is specified, then an editable text box is displayed in which the user can enter a file name. This is useful for allowing new files to be created.
If the file picker is cancelled, then the completion callback is not called.
||File pickers support smart linking with the |
||The completion callback is called when the file picker is dismissed.|