|
header_utils
|
Types and functions for geometric alignments - relative positionings on a line. More...
Functions | |
| constexpr align | ghassanpl::operator| (horizontal_align first, vertical_align second) noexcept |
| You can use the | operator to create an align from a horizontal_align and a vertical_align. | |
| constexpr align | ghassanpl::operator| (vertical_align first, horizontal_align second) noexcept |
| You can use the | operator to create an align from a horizontal_align and a vertical_align. | |
| constexpr align & | ghassanpl::operator|= (align &first, horizontal_align second) noexcept |
| constexpr align & | ghassanpl::operator|= (align &first, vertical_align second) noexcept |
| constexpr const char * | ghassanpl::to_name (horizontal_align h) noexcept |
| Get alignment name. | |
| constexpr const char * | ghassanpl::to_name (vertical_align v) noexcept |
| Get alignment name. | |
| constexpr const char * | ghassanpl::to_name (align a) noexcept |
| Get alignment name. | |
| constexpr const char * | ghassanpl::to_natural_name (align a) noexcept |
| Get natural alignment name. | |
| constexpr vertical_align | ghassanpl::to_vertical (horizontal_align alignment) noexcept |
Returns alignment as if it was on a vertical line. | |
| constexpr vertical_align | ghassanpl::to_vertical (vertical_align alignment) noexcept |
Returns alignment as if it was on a vertical line. | |
| constexpr horizontal_align | ghassanpl::to_horizontal (vertical_align alignment) noexcept |
Returns alignment as if it was on a horizontal line. | |
| constexpr horizontal_align | ghassanpl::to_horizontal (horizontal_align alignment) noexcept |
Returns alignment as if it was on a horizontal line. | |
| constexpr vertical_align | ghassanpl::vertical_from (align alignment) noexcept |
| Gets just the vertical component from the align (as a vertical_align). | |
| constexpr horizontal_align | ghassanpl::horizontal_from (align alignment) noexcept |
| Gets just the horizontal component from the align (as a horizontal_align). | |
| constexpr align | ghassanpl::only_vertical (align alignment) noexcept |
| Gets a mew align that only has the vertical component. | |
| constexpr align | ghassanpl::only_horizontal (align alignment) noexcept |
| Gets a mew align that only has the horizontal component. | |
| constexpr vertical_align | ghassanpl::to_opposite (vertical_align alignment) noexcept |
| Returns the opposite aligment. | |
| constexpr horizontal_align | ghassanpl::to_opposite (horizontal_align alignment) noexcept |
| Returns the opposite aligment. | |
| constexpr align | ghassanpl::to_opposite (align alignment) noexcept |
| Gets an align that is opposite on bost axes. | |
| constexpr align | ghassanpl::rotated_clockwise (align alignment) noexcept |
| Returns the 2D alignment rotated clockwise. | |
| constexpr align | ghassanpl::rotated_counter_clockwise (align alignment) noexcept |
| Like rotated_clockwise but counter clockwise. | |
| constexpr align | ghassanpl::flipped_horizontally (align alignment) noexcept |
| constexpr align | ghassanpl::flipped_vertically (align alignment) noexcept |
| template<typename T> | |
| constexpr T | ghassanpl::aligned (const T &width, const T &max_width, horizontal_align align) noexcept |
| template<typename T> | |
| constexpr T | ghassanpl::aligned (const T &width, const T &max_width, vertical_align align) noexcept |
Variables | |
| constexpr align | ghassanpl::aligns_in_order [] |
| Alignments in order, first left-to-right, then top-to-bottom. | |
| constexpr align | ghassanpl::aligns_clockwise [] |
| Alignments in clockwise order. | |
| constexpr align | ghassanpl::aligns_counter_clockwise [] |
| Alignments in counter-clockwise order. | |
| constexpr horizontal_align | ghassanpl::horizontal_aligns_in_order [] |
| Horizontal alignments in order. | |
| constexpr vertical_align | ghassanpl::vertical_aligns_in_order [] |
| Vertical alignments in order. | |
| constexpr const char * | ghassanpl::horizontal_align_names [] |
| constexpr const char * | ghassanpl::vertical_align_names [] |
| constexpr const char * | ghassanpl::align_names [] |
| constexpr const char * | ghassanpl::align_names_natural [] |
Types and functions for geometric alignments - relative positionings on a line.
The align class stores alignment in 4 bits - the least significant bits contain the horizontal alignment, and the next 2 bits contain the vertical alignment. You can then use the | operator to combine them, which combines the bits.
|
strong |
|
strong |
|
strong |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Gets just the horizontal component from the align (as a horizontal_align).
|
nodiscardconstexprnoexcept |
You can use the | operator to create an align from a horizontal_align and a vertical_align.
|
nodiscardconstexprnoexcept |
You can use the | operator to create an align from a horizontal_align and a vertical_align.
|
constexprnoexcept |
|
constexprnoexcept |
Returns the 2D alignment rotated clockwise.
Imagine the align as a point on a perimeter of a square:
Rotating an align is like rotating the square - so, for example top_center becomes middle_right
Like rotated_clockwise but counter clockwise.
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
|
nodiscardconstexprnoexcept |
Gets just the vertical component from the align (as a vertical_align).
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |