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.
font_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 font_box_options {
20  none = 0b0,
22  allow_simulations = 0b1,
24  allow_vector_fonts = 0b10,
26  allow_vertical_fonts = 0b100,
28  allow_script_change = 0b1000,
30  fixed_pitch_only = 0b10000,
32  scripts_only = 0b100000,
34  show_apply = 0b1000000,
36  show_color = 0b10000000,
38  show_effects = 0b100000000,
40  show_help = 0b1000000000,
42  all = allow_simulations | allow_vector_fonts | allow_vertical_fonts | allow_script_change | fixed_pitch_only | scripts_only | show_apply | show_color | show_effects | show_help
43  };
44 
46  inline font_box_options& operator +=(font_box_options& lhs, font_box_options rhs) noexcept { lhs = static_cast<font_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs; }
47  inline font_box_options& operator -=(font_box_options& lhs, font_box_options rhs) noexcept { lhs = static_cast<font_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs; }
48  inline font_box_options& operator &=(font_box_options& lhs, font_box_options rhs) noexcept { lhs = static_cast<font_box_options>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs; }
49  inline font_box_options& operator |=(font_box_options& lhs, font_box_options rhs) noexcept { lhs = static_cast<font_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs; }
50  inline font_box_options& operator ^=(font_box_options& lhs, font_box_options rhs) noexcept { lhs = static_cast<font_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs; }
51  inline font_box_options operator +(font_box_options lhs, font_box_options rhs) noexcept { return static_cast<font_box_options>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); }
52  inline font_box_options operator -(font_box_options lhs, font_box_options rhs) noexcept { return static_cast<font_box_options>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); }
53  inline font_box_options operator ~(font_box_options rhs) noexcept { return static_cast<font_box_options>(~static_cast<long long>(rhs)); }
54  inline bool operator &(font_box_options lhs, font_box_options rhs) noexcept { return static_cast<bool>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); }
55  inline font_box_options operator |(font_box_options lhs, font_box_options rhs) noexcept { return static_cast<font_box_options>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); }
56  inline font_box_options operator ^(font_box_options lhs, font_box_options rhs) noexcept { return static_cast<font_box_options>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); }
57 
58  inline std::ostream& operator<<(std::ostream& os, font_box_options value) { return os << to_string(value, { {font_box_options::none, "none"}, {font_box_options::allow_simulations, "allow_simulations"}, {font_box_options::allow_vector_fonts, "allow_vector_fonts"}, {font_box_options::allow_vertical_fonts, "allow_vertical_fonts"}, {font_box_options::allow_script_change, "allow_script_change"}, {font_box_options::fixed_pitch_only, "fixed_pitch_only"}, {font_box_options::scripts_only, "scripts_only"}, {font_box_options::show_apply, "show_apply"}, {font_box_options::show_color, "show_color"}, {font_box_options::show_effects, "show_effects"}, {font_box_options::show_help, "show_help"}, {font_box_options::all, "all"} }); }
59  inline std::wostream& operator<<(std::wostream& os, font_box_options value) { return os << to_string(value, { {font_box_options::none, L"none"}, {font_box_options::allow_simulations, L"allow_simulations"}, {font_box_options::allow_vector_fonts, L"allow_vector_fonts"}, {font_box_options::allow_vertical_fonts, L"allow_vertical_fonts"}, {font_box_options::allow_script_change, L"allow_script_change"}, {font_box_options::fixed_pitch_only, L"fixed_pitch_only"}, {font_box_options::scripts_only, L"scripts_only"}, {font_box_options::show_apply, L"show_apply"}, {font_box_options::show_color, L"show_color"}, {font_box_options::show_effects, L"show_effects"}, {font_box_options::show_help, L"show_help"}, {font_box_options::all, L"all"} }); }
61  }
62 }
Whether the dialog box allows vector font selections.
All flags except none.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
font_box_options
Specifies options on a xtd::forms::font_box.
Definition: font_box_options.h:18
Whether the dialog box allows selection of fonts for all non-OEM and Symbol character sets...
Whether the dialog box allows graphics device interface (GDI) font simulations.
Whether the dialog box contains controls that allow the user to specify strikethrough, underline, and text color options.
Whether the dialog box displays a Help button.
Whether the dialog box contains an Apply button.
Whether the dialog box allows only the selection of fixed-pitch fonts.
Whether the dialog box displays the color choice.
Contains xtd::ustring class.
Whether the user can change the character set specified in the Script combo box to display a characte...
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Whether the dialog box displays both vertical and horizontal fonts or only horizontal fonts...
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