ngscopeclient / scopehal-apps

ngscopeclient and other client applications for libscopehal.
https://www.ngscopeclient.org/
BSD 3-Clause "New" or "Revised" License
549 stars 84 forks source link

Look into how to create a *modeless*, cross platform, native file dialog #538

Closed azonenberg closed 1 year ago

azonenberg commented 1 year ago

ImGuiFileDialog leaves something to be desired.

Can we figure out how to create native file browser dialogs on all major platforms (using the Windows common dialog, XDG portal API on Linux, and whatever the equivalent on MacOS is)? The NativeFileDialog library may be an interesting reference, however it seems to only support modal operation which is not an option for filter configuration.

azonenberg commented 1 year ago

New idea: use https://github.com/btzy/nativefiledialog-extended and ImGuiFileDialog with a wrapper layer and some preferences, and actually run the NFD calls in a background thread.

Preferences will support two modes: exclusively NFD (most consistent UX), and ImGuiFileDialog if fullscreened with NFD used otherwise. (Using NFD in fullscreen mode is not an option as it doesn't support setting the topmost flag or window hierarchy, so it will disappear behind the app)