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.
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,
30  };
31 
33  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;}
34  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;}
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) {return static_cast<anchor_styles>(static_cast<long long>(lhs) + static_cast<long long>(rhs));}
39  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));}
40  inline anchor_styles operator ~(anchor_styles rhs) {return static_cast<anchor_styles>(~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 lhs, anchor_styles rhs) {return static_cast<anchor_styles>(static_cast<long long>(lhs) | 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 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"}});}
45  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"}});}
47  }
48 }
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
anchor_styles
Specifies how a control anchors to the edges of its container.
Definition: anchor_styles.h:19
@ none
The cause of the closure was not defined or could not be determined.
@ bottom
The parent form of this multiple document interface (MDI) form is closing.
@ right
The Microsoft Windows Task Manager is closing the application.
@ left
The user is closing the form through the user interface (UI), for example by clicking the Close butto...
@ top
The operating system is closing all applications before shutting down.
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.