|
ASW Lib
A.D.S. Games SDL Wrapper Library. A library targeted at Allegro4 users who want to switch to SDL3 and use modern c++.
|
Native message boxes and file choosers. More...
#include <optional>#include <string>#include <vector>Go to the source code of this file.
Classes | |
| struct | asw::dialog::FileFilter |
| Filter shown in a file chooser. More... | |
Namespaces | |
| namespace | asw |
| namespace | asw::dialog |
Enumerations | |
| enum class | asw::dialog::FileMode { asw::dialog::Open , asw::dialog::Save } |
| Kind of file chooser. More... | |
Functions | |
| void | asw::dialog::info (const std::string &title, const std::string &message) |
| Show an information message box. Blocks until it is closed. | |
| void | asw::dialog::warn (const std::string &title, const std::string &message) |
| Show a warning message box. Blocks until it is closed. | |
| void | asw::dialog::error (const std::string &title, const std::string &message) |
| Show an error message box. Blocks until it is closed. | |
| bool | asw::dialog::confirm (const std::string &title, const std::string &message) |
| Ask a yes or no question. Blocks until it is answered. | |
| bool | asw::dialog::request_file (FileMode mode, const std::string &default_location="", const std::vector< FileFilter > &filters={ }) |
| Open a native file chooser. It does not block, the chosen file arrives later through take_file(). Only one chooser can be open at a time. | |
| bool | asw::dialog::is_file_pending () |
| Check if a file chooser is open. | |
| std::optional< std::string > | asw::dialog::take_file () |
| Take the file the user chose. Returns it once, then empty until the next chooser. | |
Native message boxes and file choosers.
Definition in file dialog.h.