Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
SaveFileDialog.hpp
Go to the documentation of this file.
1 #pragma once
2 #ifndef ENIGMA_SAVE_FILE_DIALOG_H
3 #define ENIGMA_SAVE_FILE_DIALOG_H
4 
5 #include <Core/Core.hpp>
6 #include <portable-file-dialogs.h>
7 
9 
14  public: /* Constructors / Destructor */
23  SaveFileDialog(const std::string& title,
24  const std::string& initial_path = ".",
25  const bool force_overwrite = true,
26  const std::initializer_list<std::string>& filters = {"All Files", "*"});
27  ~SaveFileDialog() noexcept = default;
28 
29  public: /* Accessors */
33  std::string Show() const;
34 
35  private:
36  std::string m_title; /*< Dialog title */
37  std::string m_initial_path; /*< Dialog initial path */
38  bool m_force_overwrite; /*< Shall force file overwriting? */
39  std::vector<std::string> m_filters; /*< Which files to allow to save e.g .txt, .jpg... { "Text Files (.txt .text)", "*.txt *.text", "All Files", "*" }, */
40 };
41 
43 
44 
45 #endif // !ENIGMA_SAVE_FILE_DIALOG_H
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition: Macros.hpp:13
#define NS_ENIGMA_END
Definition: Macros.hpp:14
std::string Show() const
SaveFileDialog(const std::string &title, const std::string &initial_path=".", const bool force_overwrite=true, const std::initializer_list< std::string > &filters={"All Files", "*"})
~SaveFileDialog() noexcept=default