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.
bounds_specified.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 bounds_specified {
20  none = 0,
22  x = 0b1,
24  y = 0b10,
26  location = 0b11,
28  width = 0b100,
30  height = 0b1000,
32  size = 0b1100,
34  all = 0b1111,
35  };
36 
38  inline bounds_specified& operator +=(bounds_specified& lhs, bounds_specified rhs) {lhs = static_cast<bounds_specified>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
39  inline bounds_specified& operator -=(bounds_specified& lhs, bounds_specified rhs) {lhs = static_cast<bounds_specified>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
40  inline bounds_specified& operator &=(bounds_specified& lhs, bounds_specified rhs) {lhs = static_cast<bounds_specified>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
41  inline bounds_specified& operator |=(bounds_specified& lhs, bounds_specified rhs) {lhs = static_cast<bounds_specified>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
42  inline bounds_specified& operator ^=(bounds_specified& lhs, bounds_specified rhs) {lhs = static_cast<bounds_specified>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
43  inline bounds_specified operator +(bounds_specified lhs, bounds_specified rhs) {return static_cast<bounds_specified>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
44  inline bounds_specified operator -(bounds_specified lhs, bounds_specified rhs) {return static_cast<bounds_specified>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
45  inline bounds_specified operator ~(bounds_specified rhs) {return static_cast<bounds_specified>(~static_cast<long long>(rhs));}
46  inline bounds_specified operator &(bounds_specified lhs, bounds_specified rhs) {return static_cast<bounds_specified>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
47  inline bounds_specified operator |(bounds_specified lhs, bounds_specified rhs) {return static_cast<bounds_specified>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
48  inline bounds_specified operator ^(bounds_specified lhs, bounds_specified rhs) {return static_cast<bounds_specified>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
49  inline std::ostream& operator<<(std::ostream& os, bounds_specified value) {return os << to_string(value, {{bounds_specified::none, "none"}, {bounds_specified::x, "x"}, {bounds_specified::y, "y"}, {bounds_specified::width, "width"}, {bounds_specified::height, "height"}});}
50  inline std::wostream& operator<<(std::wostream& os, bounds_specified value) {return os << to_string(value, {{bounds_specified::none, L"none"}, {bounds_specified::x, L"x"}, {bounds_specified::y, L"y"}, {bounds_specified::width, L"width"}, {bounds_specified::height, L"height"}});}
52  }
53 }
size_t size
Represents a size of any object in bytes.
Definition: types.h:171
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
bounds_specified
Specifies the bounds of the control to use when defining a control's size and position....
Definition: bounds_specified.h:18
@ y
Specifies that the top edge of the control is defined.
@ x
Specifies that the left edge of the control is defined.
@ all
Specifies that both the location and size property values are defined.
@ height
Specifies that the height of the control is defined.
@ location
Specifies that both the x and y coordinates of the control are defined.
@ width
Specifies that the width of the control is defined.
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.