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.
content_alignment.h
Go to the documentation of this file.
1 #pragma once
5 #include <xtd/ustring.h>
6 
8 namespace xtd {
10  namespace forms {
17  enum class content_alignment {
19  top_left = 0b1,
21  top_center = 0b10,
23  top_right = 0b100,
25  middle_left = 0b10000,
27  middle_center = 0b100000,
29  middle_right = 0b1000000,
31  bottom_left = 0b100000000,
33  bottom_center = 0b1000000000,
35  bottom_right = 0b10000000000,
36  };
37 
39  inline std::ostream& operator<<(std::ostream& os, content_alignment value) {return os << to_string(value, {{content_alignment::top_left, "top_left"}, {content_alignment::top_center, "top_center"}, {content_alignment::top_right, "top_right"}, {content_alignment::middle_left, "middle_left"}, {content_alignment::middle_center, "middle_center"}, {content_alignment::middle_right, "middle_right"}, {content_alignment::bottom_left, "bottom_left"}, {content_alignment::bottom_center, "bottom_center"}, {content_alignment::bottom_right, "bottom_right"}});}
40  inline std::wostream& operator<<(std::wostream& os, content_alignment value) {return os << to_string(value, {{content_alignment::top_left, L"top_left"}, {content_alignment::top_center, L"top_center"}, {content_alignment::top_right, L"top_right"}, {content_alignment::middle_left, L"middle_left"}, {content_alignment::middle_center, L"middle_center"}, {content_alignment::middle_right, L"middle_right"}, {content_alignment::bottom_left, L"bottom_left"}, {content_alignment::bottom_center, L"bottom_center"}, {content_alignment::bottom_right, L"bottom_right"}});}
42  }
43 }
Content is vertically aligned at the middle, and horizontally aligned on the right.
Starts at the upper-right corner of the screen.
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
Starts at the lower-right corner of the screen.
Content is vertically aligned at the bottom, and horizontally aligned at the center.
content_alignment
Specifies alignment of content on the drawing surface.
Definition: content_alignment.h:17
Contains xtd::ustring class.
Starts at the upper-left corner of the screen.
Content is vertically aligned in the middle, and horizontally aligned on the left.
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition: about_box.h:13
Content is vertically aligned at the middle, and horizontally aligned at the center.
Content is vertically aligned at the top, and horizontally aligned at the center. ...
Starts at the lower-left corner of the screen, which is the default position.
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