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.
anchor_styles.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 anchor_styles {
21  none = 0b0,
23  top = 0b1,
25  bottom = 0b10,
27  left = 0b100,
29  right = 0b1000,
31  all = top | bottom | left | right,
32  };
33 
35  inline anchor_styles& operator +=(anchor_styles& lhs, anchor_styles rhs) {lhs = static_cast<anchor_styles>(static_cast<long long>(lhs) + static_cast<long long>(rhs)); return lhs;}
36  inline anchor_styles& operator -=(anchor_styles& lhs, anchor_styles rhs) {lhs = static_cast<anchor_styles>(static_cast<long long>(lhs) - static_cast<long long>(rhs)); return lhs;}
37  inline anchor_styles& operator &=(anchor_styles& lhs, anchor_styles rhs) {lhs = static_cast<anchor_styles>(static_cast<long long>(lhs) & static_cast<long long>(rhs)); return lhs;}
38  inline anchor_styles& operator |=(anchor_styles& lhs, anchor_styles rhs) {lhs = static_cast<anchor_styles>(static_cast<long long>(lhs) | static_cast<long long>(rhs)); return lhs;}
39  inline anchor_styles& operator ^=(anchor_styles& lhs, anchor_styles rhs) {lhs = static_cast<anchor_styles>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs)); return lhs;}
40  inline anchor_styles operator +(anchor_styles lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
41  inline anchor_styles operator -(anchor_styles lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) - static_cast<long long>(rhs));}
42  inline anchor_styles operator ~(anchor_styles rhs) {return static_cast<anchor_styles>(~static_cast<long long>(rhs));}
43  inline anchor_styles operator &(anchor_styles lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) & static_cast<long long>(rhs));}
44  inline anchor_styles operator |(anchor_styles lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) | static_cast<long long>(rhs));}
45  inline anchor_styles operator ^(anchor_styles lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) ^ static_cast<long long>(rhs));}
46  inline std::ostream& operator<<(std::ostream& os, anchor_styles value) {return os << to_string(value, {{anchor_styles::none, "none"}, {anchor_styles::top, "top"}, {anchor_styles::bottom, "bottom"}, {anchor_styles::left, "left"}, {anchor_styles::right, "right"}});}
47  inline std::wostream& operator<<(std::wostream& os, anchor_styles value) {return os << to_string(value, {{anchor_styles::none, L"none"}, {anchor_styles::top, L"top"}, {anchor_styles::bottom, L"bottom"}, {anchor_styles::left, L"left"}, {anchor_styles::right, L"right"}});}
49  }
50 }
Bind control edges to the top of its container.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Bind control edges to the bottom of its container.
Bind control edges to the right of its container.
Contains xtd::ustring class.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
All flags except none.
Bind control edges to the left of its container.
anchor_styles
Specifies how a control anchors to the edges of its container.
Definition: anchor_styles.h:19
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