23void info(
const std::string& title,
const std::string& message);
30void warn(
const std::string& title,
const std::string& message);
37void error(
const std::string& title,
const std::string& message);
46bool confirm(
const std::string& title,
const std::string& message);
75 const std::vector<FileFilter>& filters = { });
FileMode
Kind of file chooser.
void warn(const std::string &title, const std::string &message)
Show a warning message box. Blocks until it is closed.
void error(const std::string &title, const std::string &message)
Show an error message box. Blocks until it is closed.
bool confirm(const std::string &title, const std::string &message)
Ask a yes or no question. Blocks until it is answered.
std::optional< std::string > take_file()
Take the file the user chose. Returns it once, then empty until the next chooser.
void info(const std::string &title, const std::string &message)
Show an information message box. Blocks until it is closed.
bool is_file_pending()
Check if a file chooser is open.
bool 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()....
Filter shown in a file chooser.
std::string name
Name shown to the user, for example "Levels".
std::string pattern
Semicolon separated extensions without dots, for example "xml;json", or "*" for all files.