Cross platform way to create file dialog in C++ [closed] - c++

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I am writing an application in which I need to be able to browse for an existing file and to create a new one. I need to create user interface for that. Is there any good cross-platform free library to help me do that?

If you're not already using a cross-platform UI library, then it doesn't make a lot of sense to introduce a dependency upon a huge library just to display a file dialog.
Since recommendations for a cross-platform UI library have already been hashed out repeatedly in other questions (use the search feature to find them if you're interested) and are probably off-topic anyway,
I'm going to take the liberty of assuming that such is not your question.
Therefore, the answer is that no, there is no reliable, cross-platform way of creating a file dialog. Each platform provides a different interface/API for this, so you'll need to write code to detect the current platform and then display the dialog as instructed by each platform's documentation.
You can do this either at run-time (if you want to have a single binary), or at compile-time by using conditional compilation (#if statements).
This is basically all that any UI library would be doing, and for such a simple requirement (a single feature) it makes sense to me at least to just do that work yourself.

You can give wxWidgets a try, a GUI library in C++, free, open-source,... and work with the native graphics libraries.

Related

key value flat file database simple in C or C++ [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
For a project i am looking for a simple database which is written in C (or C++) for a cross platform aplication.
After looking into HamsterDB (which looked promissing) i had found out, that it is dependen on boost on windows.
So the alternative should not relies on STL or other libraries as the Application will be run on different Eco Systems (like arduino,symbian,android,windows) and compiled on diferent IDEs.
It will store up ton 20mil keys(but usualy below 50k keys), IO will be low.
Therefor it should be as clean C (or C++) as possible.
Can somebody show me something which will fullfill this, ready made?
LevelDB is what you're looking for. It's written in C++ but C functions are available as well.
LevelDB is a fast key-value storage library written at Google that provides
an ordered mapping from string keys to string values.
Looks like Berkeley DB is an option to you. Not sure about the embedded part (especially for arduino).
You can find a complete tutorial at standford's classes.

Is There A C++ Wrapper / Binding For SDL? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I really have no problem with SDL in C , but it's kind of tiring. Using structs doing stuff without classes, or worse, having to wrap the functions up in a class yourself etc. I was wondering whether there was a good , mature , well-designed (i.e NO Macros , using templates and the STL) wrapper (binding?) for SDL?
You could check out https://github.com/AMDmi3/libSDL2pp. It is C++11/14 binding for SDL2 and related libraries (SDL2_ttf, SDL2_image). Seems like it also satisfies your style requirements - it makes much use of modern C++ features and seem to generally provides safe and easy way of using SDL2 primitives.
SDLmm is a C++ wrapper for SDL. I'm not sure when it was last updated though and I can't vouch for the style of C++ used either.
Pardon the personal plug, but I've been working on just such a library.
https://github.com/CYBORUS/cyborus-game-engine/tree/master/CGE
It was not my original intent to release it to the world, so it lacks documentation. However, if there were enough interest, I would be more than happy to spin off this CGE folder into its own project.
(CGE stands for CYBORUS Game Engine. It does precisely what you are asking for. For example, it keeps SDL_Surface structs safely inside a class CGE::Image.)

Virtual Filesystem with C/C++ under Windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
I am currently developing a game which simulates an operating system. Therefore i need an ingame filesystem. Currently, i am using zziplib to be able to load files from a zip archive, however this is a readonly "filesystem" and i need a way to write new files and serialize them afterwards (and deserializing them during the next execution)! Are there any useful libraries out there in the wild to be used or should i write one for myself based on any ones?
This is probably one of the places where using a simple database as a filesystem makes sens.
Use something like sqlite to store the data (with paths as keys, blobs as data, or something like that).
One of the advantages of doing this is that you don't actually have to worry about the storage, and you can use existing database tools to view/edit the data "offline" rather than having to write your own. (Plus you can store other game info in there as well.)
You might check out PicoStorage and Embedded File System in C++. I haven't directly used either but I've looked at them both. Embedded File System does have a dependency which could be a show stopper -- it requires Qt to be linked in. Perhaps that could be removed, but it uses it mainly for QString and QFile (and would have no reason to require the UI).
Update, 9 years later: As commented, the above links no longer work. This alternative link for PicoStorage may be viable (I was able to download the source from there but I've made no effort to validate it) but I cannot locate a modern equivalent for EFS.
My six pence on top of the answers above. SolFS (now CBFS Storage) and CodebaseFS provide virtual file system capabilities; both have an API for C/C++ and appear to do exactly what you are asking about. Still... the scale of your task is not clear for me. Does your game need to manage dozens, hundreds, zounds, ... of files? What are the sizes of those files? Etc, etc. I would raise these questions before looking for an appropriate solution.

Recommend fast C++ UI library with small memory footprint [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I want to write an app that reacts for global shortcuts and accepts commands (the way launchy does).
I'm trying to minimize the time between pressing the shortcut and the moment the window appears on the screen and is fully operational.
Can you suggest a good UI library (with some argumentation) that could be helpful?
I looked into QT and wxWidget but I'm afraid the app will get heavy (in memory / processing speed way) - and all I need is a small window that doesn't even need to be pretty.
.. or should I just go with native Windows libraries? (the main target is my Windows 7 machine)
Fast? Small? Windows-only? Sounds like you want WTL.
Caveat: You'll need to use VC++.
Also, I recommend grabbing the source straight out of SVN, as a new release hasn't been packaged in quite some time despite the fact that the project gets updated with some regularity.
I recommend FLTK!! www.fltk.org
Win32++ no mfc required neither ATL.
If you already know the winapi this is definitely for you. If not it helps a lot.
http://sourceforge.net/projects/win32-framework/
http://www.codeproject.com/KB/winsdk/framework.aspx
If you want the smallest memory footprint and are using windows just directly call the winforms routines provided by windows. This eliminates all the code in all these third party libraries. It's smaller and will be faster.

Is there any good boost::filesystem alternative? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Is there any portable c++ library to work with the filesystem?
I know about boost::filesystem, but I need to know if there is any other.
Thanks!
POCO has similar functionality which you can find under Foundation/FileSystem.
There is at least one more solution worth mentioning - STLSoft, a set of BSD-like licensed libraries, contains a cross-platform wrapper under Windows & Unix native filesystem APIs - PlatformSTL project. The benefit in comparison with boost::filesystem is no need to build anything, the whole library is header-only, you can simply include it in your project. The bad side is lack of documentation though, I spent quite some time to figure out how to use it.
What about QT's QFileSystemModel or QFSFileEngine?
You can find it in the SSVUtils library: https://github.com/SuperV1234/SSVUtils
I found that for an application which needs a lot more than the filesystem API defined in the language it makes sense to encapsulate the filesystem API yourself and on a per application level.
Because in this case you usually need some very specific features (you surely do on the iPhone/MacOSX) and this will be not very portable and also missed by boost and others. In this case you need to go a bit higher in your abstraction layer.
Today the operating system API isn't that bad anymore. Writing a wrapper shouldn't take long.