xtd - Reference Guide  0.1.2
Modern c++17/20 framework to create console, GUI and unit test applications on Windows, macOS, Linux, iOS and android.
Loading...
Searching...
No Matches
content_alignment.h
Go to the documentation of this file.
1
4#pragma once
5#include <xtd/ustring.h>
6
8namespace 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}
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
content_alignment
Specifies alignment of content on the drawing surface.
Definition content_alignment.h:17
@ top_center
Content is vertically aligned at the top, and horizontally aligned at the center.
@ bottom_center
Content is vertically aligned at the bottom, and horizontally aligned at the center.
@ bottom_left
Content is vertically aligned in the bottom, and horizontally aligned on the left.
@ top_left
Content is vertically aligned at the top, and horizontally aligned on the left.
@ middle_left
Content is vertically aligned in the middle, and horizontally aligned on the left.
@ bottom_right
Content is vertically aligned at the bottom, and horizontally aligned on the right.
@ middle_center
Content is vertically aligned at the middle, and horizontally aligned at the center.
@ top_right
Content is vertically aligned at the top, and horizontally aligned on the right.
@ middle_right
Content is vertically aligned at the middle, and horizontally aligned on the right.
@ bottom_left
Starts at the lower-left corner of the screen, which is the default position.
@ top_left
Starts at the upper-left corner of the screen.
@ bottom_right
Starts at the lower-right corner of the screen.
@ top_right
Starts at the upper-right corner of the screen.
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.