Enigma  3.2.0
A Simple, Reliable and Efficient Encryption Tool
OpenFileDialog.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include <portable-file-dialogs.h>
4 
5 #include <Core/Core.hpp>
6 
8 
13  public:
21  OpenFileDialog(const std::string& title,
22  const std::string& initial_path = ".",
23  const bool allow_multiselect = true,
24  const std::initializer_list<std::string>& filters = {"All Files", "*"});
25  ~OpenFileDialog() noexcept = default;
26 
27  public: /* Accessors */
31  std::vector<std::string> Show() const;
32 
33  private:
34  std::string m_title; /*< Dialog title */
35  std::string m_initial_path; /*< Dialog initial path */
36  bool m_allow_multiselect; /*< Shall allow multi file selection ? */
37  std::vector<std::string> m_filters; /*< Which files to allow e.g .txt, .jpg... */
38 };
39 
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition: Macros.hpp:13
#define NS_ENIGMA_END
Definition: Macros.hpp:14
std::vector< std::string > Show() const
Spawns Open File Dialog and returns selected file(s) paths.
OpenFileDialog(const std::string &title, const std::string &initial_path=".", const bool allow_multiselect=true, const std::initializer_list< std::string > &filters={"All Files", "*"})
~OpenFileDialog() noexcept=default