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.
progress_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 progress_box_options {
20  none = 0b0,
22  show_cancel_button = 0b1,
24  show_skip_button = 0b10,
26  show_elapsed_time = 0b100,
28  show_estimated_time = 0b1000,
30  show_remaining_time = 0b10000,
32  all = show_cancel_button | show_skip_button | show_elapsed_time | show_estimated_time | show_remaining_time
33  };
34 
36  inline progress_box_options& operator +=(progress_box_options& lhs, progress_box_options rhs) noexcept { lhs = static_cast<progress_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs; }
37  inline progress_box_options& operator -=(progress_box_options& lhs, progress_box_options rhs) noexcept { lhs = static_cast<progress_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs; }
38  inline progress_box_options& operator &=(progress_box_options& lhs, progress_box_options rhs) noexcept { lhs = static_cast<progress_box_options>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs; }
39  inline progress_box_options& operator |=(progress_box_options& lhs, progress_box_options rhs) noexcept { lhs = static_cast<progress_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs; }
40  inline progress_box_options& operator ^=(progress_box_options& lhs, progress_box_options rhs) noexcept { lhs = static_cast<progress_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs; }
41  inline progress_box_options operator +(progress_box_options lhs, progress_box_options rhs) noexcept { return static_cast<progress_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); }
42  inline progress_box_options operator -(progress_box_options lhs, progress_box_options rhs) noexcept { return static_cast<progress_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); }
43  inline progress_box_options operator ~(progress_box_options rhs) noexcept { return static_cast<progress_box_options>(~static_cast<long long>(rhs)); }
44  inline bool operator &(progress_box_options lhs, progress_box_options rhs) noexcept { return static_cast<bool>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); }
45  inline progress_box_options operator |(progress_box_options lhs, progress_box_options rhs) noexcept { return static_cast<progress_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); }
46  inline progress_box_options operator ^(progress_box_options lhs, progress_box_options rhs) noexcept { return static_cast<progress_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); }
47 
48  inline std::ostream& operator<<(std::ostream& os, progress_box_options value) { return os << to_string(value, { {progress_box_options::none, "none"}, {progress_box_options::show_cancel_button, "show_cancel_button"}, {progress_box_options::show_skip_button, "show_skip_button"}, {progress_box_options::show_elapsed_time, "show_elapsed_time"}, {progress_box_options::show_estimated_time, "show_estimated_time"}, {progress_box_options::show_remaining_time, "show_remaining_time"}, {progress_box_options::all, "all"} }); }
49  inline std::wostream& operator<<(std::wostream& os, progress_box_options value) { return os << to_string(value, { {progress_box_options::none, L"none"}, {progress_box_options::show_cancel_button, L"show_cancel_button"}, {progress_box_options::show_skip_button, L"show_skip_button"}, {progress_box_options::show_elapsed_time, L"show_elapsed_time"}, {progress_box_options::show_estimated_time, L"show_estimated_time"}, {progress_box_options::show_remaining_time, L"show_remaining_time"}, {progress_box_options::all, L"all"} }); }
51  }
52 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::string to_string(const date_time &value, const std::string &fmt, const std::locale &loc)
Convert a specified value into a string with specified format and locale.
Definition: date_time.h:1110
progress_box_options
Specifies options on a xtd::forms::progress_box.
Definition: progress_box_options.h:18
Contains xtd::ustring class.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13