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.
string_format_flags.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace drawing {
17  enum class string_format_flags {
21  direction_vertical = 0b10,
23  fit_black_box = 0b100,
25  display_format_control = 0b100000,
27  no_font_fallback = 0b10000000000,
29  measure_trailing_spaces = 0b100000000000,
31  no_wrap = 0b1000000000000,
33  line_limit = 0b10000000000000,
35  no_clip = 0b100000000000000,
36  };
37 
39  inline string_format_flags& operator +=(string_format_flags& lhs, string_format_flags rhs) {lhs = static_cast<string_format_flags>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
40  inline string_format_flags& operator -=(string_format_flags& lhs, string_format_flags rhs) {lhs = static_cast<string_format_flags>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
41  inline string_format_flags& operator &=(string_format_flags& lhs, string_format_flags rhs) {lhs = static_cast<string_format_flags>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
42  inline string_format_flags& operator |=(string_format_flags& lhs, string_format_flags rhs) {lhs = static_cast<string_format_flags>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
43  inline string_format_flags& operator ^=(string_format_flags& lhs, string_format_flags rhs) {lhs = static_cast<string_format_flags>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
44  inline string_format_flags operator +(string_format_flags lhs, string_format_flags rhs) {return static_cast<string_format_flags>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
45  inline string_format_flags operator -(string_format_flags lhs, string_format_flags rhs) {return static_cast<string_format_flags>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
46  inline string_format_flags operator ~(string_format_flags rhs) {return static_cast<string_format_flags>(~static_cast<long long>(rhs));}
47  inline string_format_flags operator &(string_format_flags lhs, string_format_flags rhs) {return static_cast<string_format_flags>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
48  inline string_format_flags operator |(string_format_flags lhs, string_format_flags rhs) {return static_cast<string_format_flags>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
49  inline string_format_flags operator ^(string_format_flags lhs, string_format_flags rhs) {return static_cast<string_format_flags>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
50  inline std::ostream& operator<<(std::ostream& os, string_format_flags value) {return os << xtd::to_string(value, {{string_format_flags::direction_right_to_left, "direction_right_to_left"}, {string_format_flags::direction_vertical, "direction_vertical"}, {string_format_flags::fit_black_box, "fit_black_box"}, {string_format_flags::display_format_control, "display_format_control"}, {string_format_flags::no_font_fallback, "no_font_fallback"}, {string_format_flags::measure_trailing_spaces, "measure_trailing_spaces"}, {string_format_flags::no_wrap, "no_wrap"}, {string_format_flags::line_limit, "line_limit"}, {string_format_flags::no_clip, "no_clip"}});}
51  inline std::wostream& operator<<(std::wostream& os, string_format_flags value) {return os << xtd::to_string(value, {{string_format_flags::direction_right_to_left, L"direction_right_to_left"}, {string_format_flags::direction_vertical, L"direction_vertical"}, {string_format_flags::fit_black_box, L"fit_black_box"}, {string_format_flags::display_format_control, L"display_format_control"}, {string_format_flags::no_font_fallback, L"no_font_fallback"}, {string_format_flags::measure_trailing_spaces, L"measure_trailing_spaces"}, {string_format_flags::no_wrap, L"no_wrap"}, {string_format_flags::line_limit, L"line_limit"}, {string_format_flags::no_clip, L"no_clip"}});}
53  }
54 }
Includes the trailing space at the end of each line. By default the boundary rectangle returned by th...
Text wrapping between lines when formatting within a rectangle is disabled. This flag is implied when...
Overhanging parts of glyphs, and unwrapped text reaching outside the formatting rectangle are allowed...
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
Fallback to alternate fonts for characters not supported in the requested font is disabled...
Parts of characters are allowed to overhang the string&#39;s layout rectangle. By default, characters are repositioned to avoid any overhang.
string_format_flags
Specifies the display and layout information for text strings. This enumeration allows a bitwise comb...
Definition: string_format_flags.h:17
Contains xtd::ustring class.
Control characters such as the left-to-right mark are shown in the output with a representative glyph...
Text is displayed from right to left. text.
Only entire lines are laid out in the formatting rectangle. By default layout continues until the end...