Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Plattform independet File Open / File Save dialogs  (Read 37776 times)

0 Members and 3 Guests are viewing this topic.

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Plattform independet File Open / File Save dialogs
« 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??

Kingdom of Fish

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Plattform independet File Open / File Save dialogs
« Reply #1 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?

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Plattform independet File Open / File Save dialogs
« Reply #2 on: March 29, 2008, 04:36:44 am »
Use a GUI library like Qt or wxWidgets, if you need such features.
Laurent Gomila - SFML developer

Aszarsha

  • Full Member
  • ***
  • Posts: 200
    • MSN Messenger - aszarsha@gmail.com
    • View Profile
Plattform independet File Open / File Save dialogs
« Reply #3 on: March 29, 2008, 05:42:19 pm »
Isn't Boost::Filesystem what you'r looking for ?

tgm

  • Jr. Member
  • **
  • Posts: 69
    • View Profile
Plattform independet File Open / File Save dialogs
« Reply #4 on: March 29, 2008, 05:56:43 pm »
well.. I guess your 100% right there ;) sry..

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
Plattform independet File Open / File Save dialogs
« Reply #5 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 ;)
Laurent Gomila - SFML developer

Aszarsha

  • Full Member
  • ***
  • Posts: 200
    • MSN Messenger - aszarsha@gmail.com
    • View Profile
Plattform independet File Open / File Save dialogs
« Reply #6 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.

chafporte

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #7 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.
« Last Edit: March 28, 2016, 01:39:16 pm by chafporte »

DanielDorn1997

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #8 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 ).

Kojay

  • Full Member
  • ***
  • Posts: 104
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #9 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.
« Last Edit: March 28, 2016, 07:44:57 pm by Kojay »

SeriousITGuy

  • Full Member
  • ***
  • Posts: 123
  • Still learning...
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #10 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

Turbine

  • Full Member
  • ***
  • Posts: 100
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #11 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.

eXpl0it3r

  • SFML Team
  • Hero Member
  • *****
  • Posts: 11034
    • View Profile
    • development blog
    • Email
Re: Plattform independet File Open / File Save dialogs
« Reply #12 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.
Official FAQ: https://www.sfml-dev.org/faq.php
Official Discord Server: https://discord.gg/nr4X7Fh
——————————————————————
Dev Blog: https://duerrenberger.dev/blog/

Phanoo

  • Full Member
  • ***
  • Posts: 136
    • View Profile
Re: Plattform independet File Open / File Save dialogs
« Reply #13 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.
« Last Edit: October 19, 2017, 01:30:24 pm by ratatax »