66 constexpr alignment() noexcept : _value(0) {}
72 constexpr explicit alignment(uint8_t value) noexcept : _value(value) {}
75 _value((to_underlying(v) << 4) | to_underlying(t))
77 hi_axiom(to_underlying(v) <= 0xf);
78 hi_axiom(to_underlying(t) <= 0xf);
82 _value((to_underlying(v) << 4) | to_underlying(t))
84 hi_axiom(to_underlying(v) <= 0xf);
85 hi_axiom(to_underlying(t) <= 0xf);
88 [[nodiscard]]
static constexpr alignment top_flush()
noexcept
90 return {horizontal_alignment::flush, vertical_alignment::top};
93 [[nodiscard]]
static constexpr alignment top_left()
noexcept
95 return {horizontal_alignment::left, vertical_alignment::top};
98 [[nodiscard]]
static constexpr alignment top_center()
noexcept
100 return {horizontal_alignment::center, vertical_alignment::top};
103 [[nodiscard]]
static constexpr alignment top_justified()
noexcept
105 return {horizontal_alignment::justified, vertical_alignment::top};
108 [[nodiscard]]
static constexpr alignment top_right()
noexcept
110 return {horizontal_alignment::right, vertical_alignment::top};
113 [[nodiscard]]
static constexpr alignment middle_flush()
noexcept
115 return {horizontal_alignment::flush, vertical_alignment::middle};
118 [[nodiscard]]
static constexpr alignment middle_left()
noexcept
120 return {horizontal_alignment::left, vertical_alignment::middle};
123 [[nodiscard]]
static constexpr alignment middle_center()
noexcept
125 return {horizontal_alignment::center, vertical_alignment::middle};
128 [[nodiscard]]
static constexpr alignment middle_justified()
noexcept
130 return {horizontal_alignment::justified, vertical_alignment::middle};
133 [[nodiscard]]
static constexpr alignment middle_right()
noexcept
135 return {horizontal_alignment::right, vertical_alignment::middle};
138 [[nodiscard]]
static constexpr alignment bottom_left()
noexcept
140 return {horizontal_alignment::left, vertical_alignment::bottom};
143 [[nodiscard]]
static constexpr alignment bottom_center()
noexcept
145 return {horizontal_alignment::center, vertical_alignment::bottom};
148 [[nodiscard]]
static constexpr alignment bottom_right()
noexcept
150 return {horizontal_alignment::right, vertical_alignment::bottom};
163 [[nodiscard]]
constexpr friend bool operator==(
alignment const &lhs,
alignment const &rhs)
noexcept =
default;
167 return lhs.text() == rhs;
172 return lhs == rhs.text();
177 return lhs.vertical() == rhs;
182 return lhs == rhs.vertical();
constexpr alignment operator|(horizontal_alignment lhs, vertical_alignment rhs) noexcept
Combine vertical and horizontal alignment.
Definition alignment.hpp:200