Filesystem Access Abilities?

Hello,

I don’t know if this is SDL’s business or not, but I want to create a
simple file open/save dialog for a project I have in SDL, but I need
to be able to look at the filesystem and show the user the
directories and and files on their HD, and to be able to navigate
them. How can I do this in SDL, or is there s C/C++ standard set of
functions I can use? Or is there some way (even better!) to ask the
system for a file dialog so I needn’t figure out all the requisite code?

I’m coming from Java programming, so forgive me if the answer to this
is obvious. And it may be obvious to say this, but I kind of would
like to find a croxx-platform solution for at least Windows, OS X,
and Linux.

Thanks,
–Scott

Hello,

I don’t know if this is SDL’s business or not, but I want to create a
simple file open/save dialog for a project I have in SDL, but I need
to be able to look at the filesystem and show the user the
directories and and files on their HD, and to be able to navigate
them. How can I do this in SDL, or is there s C/C++ standard set of
functions I can use? Or is there some way (even better!) to ask the
system for a file dialog so I needn’t figure out all the requisite
code?

The standard way is opendir and others. (man opendir)

It’s the C way to work with directory.

Now if you want a dialox box like in java, things are a little bit
more complicated.

On macosx, you can use cocoa which is easy and really fun.

On linux you need to work with a graphic lib on top of X11 (gtk, QT…).

On windows, you must use the windows API. I don’t know them, but I’m
sure google knows.

Now, I’m pretty sure that has been done before, you should check the
UI libs for SDL for this feature.

Best regardsOn Jan 23, 2007, at 8:18 AM, Scott Harper wrote:


Kuon
Programmer and sysadmin.

“Computers should not stop working when the users’ brain does.”

Kuon - Nicolas Goy - ??? (Goyman.com SA) pravi:> On Jan 23, 2007, at 8:18 AM, Scott Harper wrote:

Hello,

I don’t know if this is SDL’s business or not, but I want to create a
simple file open/save dialog for a project I have in SDL, but I need
to be able to look at the filesystem and show the user the
directories and and files on their HD, and to be able to navigate
them. How can I do this in SDL, or is there s C/C++ standard set of
functions I can use? Or is there some way (even better!) to ask the
system for a file dialog so I needn’t figure out all the requisite
code?

The standard way is opendir and others. (man opendir)

It’s the C way to work with directory.

Now if you want a dialox box like in java, things are a little bit
more complicated.

On macosx, you can use cocoa which is easy and really fun.

On linux you need to work with a graphic lib on top of X11 (gtk, QT…).

On windows, you must use the windows API. I don’t know them, but I’m
sure google knows.

Now, I’m pretty sure that has been done before, you should check the
UI libs for SDL for this feature.

Best regards

The Windows API or you can use the more simple MFC or .NET Framework

Best regards, Ziga.

Hello !

The Windows API or you can use the more simple MFC or .NET Framework

He asks if there is a xplattform way.

CU