gempyre  1.7.1
gempyre_client.h
1 #ifndef GEMPYRECLIENT_H
2 #define GEMPYRECLIENT_H
3 
4 #include <map>
5 #include <tuple>
6 #include <vector>
7 #include <string>
8 #include <string_view>
9 #include <optional>
10 
11 namespace Gempyre {
12  class Ui;
13 
15 class Dialog {
16 public:
20  using Filter = std::vector<std::tuple<std::string, std::vector<std::string>>>;
21 
22 
28  static std::optional<std::string> open_file_dialog(std::string_view caption = "",
29  std::string_view root = "",
30  const Filter& filters = {});
31 
37  static std::optional<std::vector<std::string>> open_files_dialog(std::string_view caption = "",
38  std::string_view root = "",
39  const Filter& filters = {});
40 
45  static std::optional<std::string> open_dir_dialog(std::string_view caption = "",
46  std::string_view root = "");
47 
53  static std::optional<std::string> save_file_dialog(std::string_view caption = "",
54  std::string_view root = "", const Filter& filters = {});
55 
56 };
57 }
58 
59 
60 #endif // GEMPYRECLIENT_H
Dialogs for file access.
Definition: gempyre_client.h:15
static std::optional< std::vector< std::string > > open_files_dialog(std::string_view caption="", std::string_view root="", const Filter &filters={})
Pick files.
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.
static std::optional< std::string > open_dir_dialog(std::string_view caption="", std::string_view root="")
Pick a dir.
std::vector< std::tuple< std::string, std::vector< std::string > >> Filter
Filter is for Dialog File name filters.
Definition: gempyre_client.h:20
static std::optional< std::string > open_file_dialog(std::string_view caption="", std::string_view root="", const Filter &filters={})
Pick a file.