SFML community forums

General => Feature requests => Topic started by: tgm on March 28, 2008, 06:27:22 pm

Title: Plattform independet File Open / File Save dialogs
Post by: tgm on March 28, 2008, 06:27:22 pm
As the titel says, I would love to have platform independent file open / save dialogs.. Any chance??
Title: Plattform independet File Open / File Save dialogs
Post by: Kingdom of Fish on March 29, 2008, 02:15:40 am
Thats not really a vital part of a media library is it? What would you use it for?
Title: Plattform independet File Open / File Save dialogs
Post by: Laurent on March 29, 2008, 04:36:44 am
Use a GUI library like Qt or wxWidgets, if you need such features.
Title: Plattform independet File Open / File Save dialogs
Post by: Aszarsha on March 29, 2008, 05:42:19 pm
Isn't Boost::Filesystem what you'r looking for ?
Title: Plattform independet File Open / File Save dialogs
Post by: tgm on March 29, 2008, 05:56:43 pm
well.. I guess your 100% right there ;) sry..
Title: Plattform independet File Open / File Save dialogs
Post by: Laurent on March 30, 2008, 07:14:19 am
Quote
Isn't Boost::Filesystem what you'r looking for ?

Boost filesystem gives a portable way to access the files on your disk, but it won't display any window to open / save them ;)
Title: Plattform independet File Open / File Save dialogs
Post by: Aszarsha on March 30, 2008, 03:31:23 pm
Quote from: "Laurent"
Boost filesystem gives a portable way to access the files on your disk, but it won't display any window to open / save them ;)
Hoo... I misunderstood the question, sorry.
Title: Re: Plattform independet File Open / File Save dialogs
Post by: chafporte on February 29, 2016, 10:34:09 am
As a GUI complement, tiny file dialogs offers 6 modal function calls. It's a single C C++ cross-platform file to add to your project. It has no init and no main loop.
Title: Re: Plattform independet File Open / File Save dialogs
Post by: DanielDorn1997 on March 18, 2016, 02:00:05 am
If you are looking for file system to Read / write files just use one of the huge mammoth sized libraries that provide this already, one good library for doing this that is made for c++ is http://pocoproject.org/ poco was made for c++ as an alternative to boost, as for displaying dialogs just use a library like SFGUI for GUI.

I would highly recommend to not use QT with SFML since you will have to write your own wrapper for QT, and although there is a tutorial from SFML 1.6 http://www.sfml-dev.org/tutorials/1.6/graphics-qt.php, which can be used with sfml 2.3.2 i would just recommend using SFGUI.

SFGUI is a library very tightly integrated with SFML solely for the purpose of GUI, however you will have to build the library yourself with cmake since it does not provide binaries any more, so as long as you can use cmake, with nmake or what ever make file system you are using to build with than this is a very good option.

that being said like every on else here has said there is not point in re inventing the wheel e.g. ( why implement a file system api when there are many others currently out and c++17 is about to have it's own as well ).
Title: Re: Plattform independet File Open / File Save dialogs
Post by: Kojay on March 28, 2016, 07:41:30 pm
Boost.filesystem + SFGUI to create a dialog is indeed perfectly possible and what I do.
Might share a polished version soon.
Title: Re: Plattform independet File Open / File Save dialogs
Post by: SeriousITGuy on March 29, 2016, 10:28:50 am
Since ISO C++ will add a filesystem module with C++17 which is based on Boost.Filesystem, the safest way going for filesystem support is Boost.Filesystem. Users of newer compilers like GCC 5.1 or VC2015 can experiment with this right away with the experimental namespace std::experimental::filesystem::v1
Title: Re: Plattform independet File Open / File Save dialogs
Post by: Turbine on October 18, 2017, 06:32:43 am
I'd like to revive this idea, due to the new direction of SFML dev.

A wrapper for something like:
https://github.com/mlabbe/nativefiledialog

Would make for a good addition, much like the clipboard improvements.
Title: Re: Plattform independet File Open / File Save dialogs
Post by: eXpl0it3r on October 18, 2017, 09:54:28 am
To be honest, if there already exists a well maintained and open source library, I don't see the reason for including this into SFML itself, especially since it's somewhat on the edge in regards to whether this fits the scope of SFML.

To me it seems that people are afraid of adding dependencies, for no good reason.
Title: Re: Plattform independet File Open / File Save dialogs
Post by: Phanoo on October 19, 2017, 01:27:43 pm
I recommend tinyfiledialogs if you only need file dialogs. Works very well, VERY EASY to use it's a single C file, so much easier and lighter than a whole gui toolkit... nativefiledialog isnt bad either but i had special character problems on Windows with it (can't be used directly with fopen) so i recommend tinyfiledialogs more.