Dialogs for file access.
More...
#include <gempyre_client.h>
|
using | Filter = std::vector< std::tuple< std::string, std::vector< std::string > >> |
| Filter is for Dialog File name filters. More...
|
|
|
static std::optional< std::string > | open_file_dialog (std::string_view caption="", std::string_view root="", const Filter &filters={}) |
| Pick a file. More...
|
|
static std::optional< std::vector< std::string > > | open_files_dialog (std::string_view caption="", std::string_view root="", const Filter &filters={}) |
| Pick files. More...
|
|
static std::optional< std::string > | open_dir_dialog (std::string_view caption="", std::string_view root="") |
| Pick a dir. More...
|
|
static std::optional< std::string > | save_file_dialog (std::string_view caption="", std::string_view root="", const Filter &filters={}) |
| Pick a a file or crate a new one. More...
|
|
◆ Filter
Filter is for Dialog File name filters.
List of tuples having filter name + list of extensions. e.g. like [("text", [".txt", ".text"])]
◆ open_dir_dialog()
static std::optional<std::string> Gempyre::Dialog::open_dir_dialog |
( |
std::string_view |
caption = "" , |
|
|
std::string_view |
root = "" |
|
) |
| |
|
static |
Pick a dir.
- Parameters
-
caption | optional dialog name. |
root | optional root folder. |
- Returns
- directory name selected.
◆ open_file_dialog()
static std::optional<std::string> Gempyre::Dialog::open_file_dialog |
( |
std::string_view |
caption = "" , |
|
|
std::string_view |
root = "" , |
|
|
const Filter & |
filters = {} |
|
) |
| |
|
static |
Pick a file.
- Parameters
-
caption | optional dialog name. |
root | optional root folder. |
filters | optional filters what to show. |
- Returns
- file name selected.
◆ open_files_dialog()
static std::optional<std::vector<std::string> > Gempyre::Dialog::open_files_dialog |
( |
std::string_view |
caption = "" , |
|
|
std::string_view |
root = "" , |
|
|
const Filter & |
filters = {} |
|
) |
| |
|
static |
Pick files.
- Parameters
-
caption | optional dialog name. |
root | optional root folder. |
filters | optional filters what to show. |
- Returns
- vector of file names.
◆ save_file_dialog()
static std::optional<std::string> Gempyre::Dialog::save_file_dialog |
( |
std::string_view |
caption = "" , |
|
|
std::string_view |
root = "" , |
|
|
const Filter & |
filters = {} |
|
) |
| |
|
static |
Pick a a file or crate a new one.
- Parameters
-
caption | optional dialog name. |
root | optional rool folder. |
filters | optional filters what to show. |
- Returns
- file name selected.
The documentation for this class was generated from the following file: