SFML community forums
General => Feature requests => Topic started 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??
-
Thats not really a vital part of a media library is it? What would you use it for?
-
Use a GUI library like Qt or wxWidgets, if you need such features.
-
Isn't Boost::Filesystem what you'r looking for ?
-
well.. I guess your 100% right there ;) sry..
-
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 ;)
-
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.
-
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.
-
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 ).
-
Boost.filesystem + SFGUI to create a dialog is indeed perfectly possible and what I do.
Might share a polished version soon.
-
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
-
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.
-
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.
-
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.