HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Data Structures | Enumerations | Functions
alignment.hpp File Reference
#include "assert.hpp"
#include "cast.hpp"

Go to the source code of this file.

Data Structures

class  v1::alignment
 

Enumerations

enum class  v1::vertical_alignment : uint8_t { top , middle , bottom }
 Vertical alignment. More...
 
enum class  v1::horizontal_alignment : uint8_t {
  flush , left , center , justified ,
  right
}
 

Functions

constexpr alignment v1::operator| (horizontal_alignment lhs, vertical_alignment rhs) noexcept
 Combine vertical and horizontal alignment.
 
constexpr alignment v1::operator| (vertical_alignment lhs, horizontal_alignment rhs) noexcept
 Combine vertical and horizontal alignment.
 

Enumeration Type Documentation

◆ horizontal_alignment

enum class v1::horizontal_alignment : uint8_t
strong
Enumerator
flush 

Align the text naturally based on the writing direction of each paragraph.

This will act as flush_left if the paragraph is in left-to-right direction, and as flush_right if the paragraph is in right-to-left direction.

left 

Align the text to the left side.

The text will be flush-left independent of the writing direction.

center 

Align the text in the center.

Since the text is centered, the writing direction is unimportant.

justified 

Stretch the text to be flush to both sides.

Since the text is flush on both sides, the writing direction is unimportant.

right 

Align the text to the right side.

The text will be flush-left independent of the writing direction.

◆ vertical_alignment

enum class v1::vertical_alignment : uint8_t
strong

Vertical alignment.

Enumerator
top 

Align to the top.

middle 

Align to the vertical-middle.

bottom 

Align to the bottom.

Function Documentation

◆ operator|() [1/2]

constexpr alignment v1::operator| ( horizontal_alignment lhs,
vertical_alignment rhs )
constexprnoexcept

Combine vertical and horizontal alignment.

Parameters
lhsA text alignment.
rhsA vertical alignment.
Returns
A combined vertical and horizontal alignment.

◆ operator|() [2/2]

constexpr alignment v1::operator| ( vertical_alignment lhs,
horizontal_alignment rhs )
constexprnoexcept

Combine vertical and horizontal alignment.

Parameters
lhsA text alignment.
rhsA vertical alignment.
Returns
A combined vertical and horizontal alignment.