dvui icon indicating copy to clipboard operation
dvui copied to clipboard

Native file open dialogs

Open david-vanderson opened this issue 1 year ago • 3 comments

https://github.com/david-vanderson/dvui/discussions/23

Idea is to have dvui create a modal dialog and at the same time use a library to launch the platform's native file open dialog. When the native dialog is closed, the dvui dialog would extract the information and make it available to the app.

david-vanderson avatar Aug 11 '24 15:08 david-vanderson

On Linux, use the command zenity.

iacore avatar Aug 11 '24 16:08 iacore

I found something nice: https://sourceforge.net/projects/tinyfiledialogs/

It's C, which also can be ported to Zig.

iacore avatar Aug 31 '24 23:08 iacore

That looks pretty good. @VisenDev mentioned https://github.com/samhocevar/portable-file-dialogs which compares itself to tinyfiledialogs, so probably either one is a good candidate.

david-vanderson avatar Sep 01 '24 01:09 david-vanderson

I just found out SDL3 has support for this: https://wiki.libsdl.org/SDL3/CategoryDialog

david-vanderson avatar Oct 16 '24 17:10 david-vanderson

I've pushed support for this using tinyfiledialogs. The functions currently block, but that could be fixed in the future.

The demo "Dialogs / Toasts" has examples.

This closes this issue, but please reopen or file bugs if you see problems. Thanks!

david-vanderson avatar Nov 22 '24 01:11 david-vanderson