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
8
NS_ENIGMA_BEGIN
9
13
class
SaveFileDialog
{
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
42
NS_ENIGMA_END
43
44
45
#endif
// !ENIGMA_SAVE_FILE_DIALOG_H
Core.hpp
NS_ENIGMA_BEGIN
#define NS_ENIGMA_BEGIN
Enable/Disable Assertions.
Definition:
Macros.hpp:13
NS_ENIGMA_END
#define NS_ENIGMA_END
Definition:
Macros.hpp:14
SaveFileDialog
Definition:
SaveFileDialog.hpp:13
SaveFileDialog::Show
std::string Show() const
SaveFileDialog::SaveFileDialog
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::~SaveFileDialog
~SaveFileDialog() noexcept=default
src
System
Dialogs
SaveFileDialog.hpp
Generated on Sat Oct 19 2024 20:10:46 for Enigma by
1.9.1