btzy / nativefiledialog-extended

Cross platform (Windows, Mac, Linux) native file dialog library with C and C++ bindings, based on mlabbe/nativefiledialog.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider merging OpenDialog, OpenDialogMultiple, and PickFolder into a single API

btzy opened this issue · comments

On all four backends, these three APIs actually call a single platform native API. NFDe is essentially calling the same code, but setting a flag to determine whether to select files or folders, and whether to select single vs multiple items. Since all backends only actually use a single API with options, NFDe should probably do the same too. As a bonus, we will also support the ability to select multiple folders.

Note that on MacOS, the native API seems to be even more flexible - you can choose to allow the selection of both files and folders.

Or maybe it shouldn't be merged for single vs multiple due to the differing return type, but at least we can merge the files vs folders part.

Not intending to do this, since the way to retrieve multiple files different from retrieving a single file. PickFolderMultiple will be separately introduced.