xtd - Reference Guide  0.1.1
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
segments.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace forms {
19  enum class segments {
21  none = 0,
23  a = 0b1,
25  b = 0b10,
27  c = 0b100,
29  d = 0b1000,
31  e = 0b10000,
33  f = 0b100000,
35  g = 0b1000000,
37  h = 0b10000000,
39  i = 0b100000000,
41  j = 0b1000000000,
43  k = 0b10000000000,
45  l = 0b100000000000,
47  m = 0b1000000000000,
49  a1 = a,
51  a2 = 0b10000000000000,
53  d1 = d,
55  d2 = 0b100000000000000,
57  g1 = g,
59  g2 = 0b1000000000000000,
61  dp = 0b10000000000000000,
63  pc = 0b100000000000000000,
64  };
65 
67  inline segments& operator +=(segments& lhs, segments rhs) {lhs = static_cast<segments>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
68  inline segments& operator -=(segments& lhs, segments rhs) {lhs = static_cast<segments>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
69  inline segments& operator &=(segments& lhs, segments rhs) {lhs = static_cast<segments>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
70  inline segments& operator |=(segments& lhs, segments rhs) {lhs = static_cast<segments>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
71  inline segments& operator ^=(segments& lhs, segments rhs) {lhs = static_cast<segments>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
72  inline segments operator +(segments lhs, segments rhs) {return static_cast<segments>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
73  inline segments operator -(segments lhs, segments rhs) {return static_cast<segments>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
74  inline segments operator ~(segments rhs) {return static_cast<segments>(~static_cast<long long>(rhs));}
75  inline segments operator &(segments lhs, segments rhs) {return static_cast<segments>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
76  inline segments operator |(segments lhs, segments rhs) {return static_cast<segments>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
77  inline segments operator ^(segments lhs, segments rhs) {return static_cast<segments>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
78  inline std::ostream& operator<<(std::ostream& os, segments value) {return os << to_string(value, {{segments::none, "none"}, {segments::a, "a"}, {segments::b, "b"}, {segments::c, "c"}, {segments::d, "d"}, {segments::e, "e"}, {segments::f, "f"}, {segments::g, "g"}, {segments::h, "h"}, {segments::i, "i"}, {segments::j, "j"}, {segments::k, "k"}, {segments::l, "l"}, {segments::m, "m"}, {segments::a2, "a2"}, {segments::d2, "d2"}, {segments::g2, "g2"}, {segments::dp, "dp"}, {segments::pc, "pc"}});}
79  inline std::wostream& operator<<(std::wostream& os, segments value) {return os << to_string(value, {{segments::none, L"none"}, {segments::a, L"a"}, {segments::b, L"b"}, {segments::c, L"c"}, {segments::d, L"d"}, {segments::e, L"e"}, {segments::f, L"f"}, {segments::g, L"g"}, {segments::h, L"h"}, {segments::i, L"i"}, {segments::j, L"j"}, {segments::k, L"k"}, {segments::l, L"l"}, {segments::m, L"m"}, {segments::a2, L"a2"}, {segments::d2, L"d2"}, {segments::g2, L"g2"}, {segments::dp, L"dp"}, {segments::pc, L"pc"}});}
81  }
82 }
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
segments
Specifies how a control anchors to the edges of its container.
Definition: segments.h:19
@ g1
The g1 segment.
@ a
The a segment.
@ h
The h segment.
@ l
The l segment.
@ j
The j segment.
@ c
The c segment.
@ a2
The a2 segment.
@ m
The m segment.
@ d
The d segment.
@ i
The i segment.
@ a1
The a1 segment.
@ k
The k segment.
@ f
The f segment.
@ b
The b segment.
@ dp
The dp segment (dot point).
@ d1
The d1 segment.
@ d2
The d2 segment.
@ g
The g segment.
@ pc
The cp segment (punctuation colon).
@ e
The e segment.
@ g2
The g2 segment.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition: system_report.h:17
Contains xtd::ustring class.