xtd - Reference Guide  0.2.0
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
open_file_box_options.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace forms {
18  enum class open_file_box_options {
20  none = 0b0,
22  check_file_exists = 0b1,
24  dereference_link = 0b10,
26  validate_names = 0b100,
28  restore_directory = 0b1000,
30  enable_auto_upgrade = 0b10000,
32  show_hidden_files = 0b100000,
34  show_help = 0b1000000,
36  show_preview = 0b10000000,
38  support_multi_dotted_extensions = 0b100000000,
40  all = check_file_exists | dereference_link | validate_names | restore_directory | enable_auto_upgrade | show_hidden_files | show_help | show_preview | support_multi_dotted_extensions
41  };
42 
44  inline open_file_box_options& operator +=(open_file_box_options& lhs, open_file_box_options rhs) noexcept { lhs = static_cast<open_file_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs; }
45  inline open_file_box_options& operator -=(open_file_box_options& lhs, open_file_box_options rhs) noexcept { lhs = static_cast<open_file_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs; }
46  inline open_file_box_options& operator &=(open_file_box_options& lhs, open_file_box_options rhs) noexcept { lhs = static_cast<open_file_box_options>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs; }
47  inline open_file_box_options& operator |=(open_file_box_options& lhs, open_file_box_options rhs) noexcept { lhs = static_cast<open_file_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs; }
48  inline open_file_box_options& operator ^=(open_file_box_options& lhs, open_file_box_options rhs) noexcept { lhs = static_cast<open_file_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs; }
49  inline open_file_box_options operator +(open_file_box_options lhs, open_file_box_options rhs) noexcept { return static_cast<open_file_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); }
50  inline open_file_box_options operator -(open_file_box_options lhs, open_file_box_options rhs) noexcept { return static_cast<open_file_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); }
51  inline open_file_box_options operator ~(open_file_box_options rhs) noexcept { return static_cast<open_file_box_options>(~static_cast<long long>(rhs)); }
52  inline bool operator &(open_file_box_options lhs, open_file_box_options rhs) noexcept { return static_cast<bool>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); }
53  inline open_file_box_options operator |(open_file_box_options lhs, open_file_box_options rhs) noexcept { return static_cast<open_file_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); }
54  inline open_file_box_options operator ^(open_file_box_options lhs, open_file_box_options rhs) noexcept { return static_cast<open_file_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); }
55 
56  inline std::ostream& operator<<(std::ostream& os, open_file_box_options value) { return os << to_string(value, { {open_file_box_options::none, "none"}, {open_file_box_options::check_file_exists, "check_file_exists"}, {open_file_box_options::dereference_link, "dereference_link"}, {open_file_box_options::validate_names, "validate_names"}, {open_file_box_options::restore_directory, "restore_directory"}, {open_file_box_options::enable_auto_upgrade, "enable_auto_upgrade"}, {open_file_box_options::show_hidden_files, "show_hidden_files"}, {open_file_box_options::show_help, "show_help"}, {open_file_box_options::show_preview, "show_preview"}, {open_file_box_options::support_multi_dotted_extensions, "support_multi_dotted_extensions"}, {open_file_box_options::all, "all"} }); }
57  inline std::wostream& operator<<(std::wostream& os, open_file_box_options value) { return os << to_string(value, { {open_file_box_options::none, L"none"}, {open_file_box_options::check_file_exists, L"check_file_exists"}, {open_file_box_options::dereference_link, L"dereference_link"}, {open_file_box_options::validate_names, L"validate_names"}, {open_file_box_options::restore_directory, L"restore_directory"}, {open_file_box_options::enable_auto_upgrade, L"enable_auto_upgrade"}, {open_file_box_options::show_hidden_files, L"show_hidden_files"}, {open_file_box_options::show_help, L"show_help"}, {open_file_box_options::show_preview, L"show_preview"}, {open_file_box_options::support_multi_dotted_extensions, L"support_multi_dotted_extensions"}, {open_file_box_options::all, L"all"} }); }
59  }
60 }
Whether the dialog box displays a warning if the user specifies a file name that does not exist...
Whether the dialog box supports displaying and saving files that have multiple file name extensions...
Whether this xtd::forms::file_dialog instance should automatically upgrade appearance and behavior wh...
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Whether the dialog box restores the directory to the previously selected directory before closing...
open_file_box_options
Specifies options on a xtd::forms::open_file_box.
Definition: open_file_box_options.h:18
Whether preview file is displayed in the file dialog box.
Whether hidden files are displayed in the file dialog box.
Contains xtd::ustring class.
Whether the dialog box accepts only valid file names.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Whether the dialog box returns the location of the file referenced by the shortcut (...
Whether the Help button is displayed in the file dialog box.
std::string to_string(const value_t &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: to_string.h:37