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_alignment.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
7 #if defined(_WIN32)
8 #undef far
9 #undef near
10 #endif
11 
13 namespace xtd {
15  namespace drawing {
23  enum class string_alignment {
25  near = 0,
27  center = 1,
29  far = 2
30  };
31 
33  inline std::ostream& operator<<(std::ostream& os, string_alignment value) {return os << xtd::to_string(value, {{string_alignment::near, "near"}, {string_alignment::center, "center"}, {string_alignment::far, "far"}});}
34  inline std::wostream& operator<<(std::wostream& os, string_alignment value) {return os << xtd::to_string(value, {{string_alignment::near, L"near"}, {string_alignment::center, L"center"}, {string_alignment::far, L"far"}});}
36  }
37 }
Specifies the text be aligned near the layout. In a left-to-right layout, the near position is left...
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
string_alignment
Specifies the alignment of a text string relative to its layout rectangle.
Definition: string_alignment.h:23
Specifies that text is aligned in the center of the layout rectangle.
Specifies that text is aligned far from the origin position of the layout rectangle. In a left-to-right layout, the far position is right. In a right-to-left layout, the far position is left.
Contains xtd::ustring class.