roo_display
API Documentation for roo_display
Loading...
Searching...
No Matches
roo_display::Alignment Class Reference

Combines horizontal and vertical alignment. More...

#include <alignment.h>

Public Member Functions

constexpr Alignment ()
 
constexpr Alignment (HAlign h)
 
constexpr Alignment (VAlign v)
 
constexpr Alignment (HAlign h, VAlign v)
 
constexpr HAlign h () const
 
constexpr VAlign v () const
 
Offset resolveOffset (const Box &outer, const Box &inner) const
 
Alignment shiftBy (int16_t dx, int16_t dy)
 
bool operator== (Alignment other) const
 
bool operator!= (Alignment other) const
 

Detailed Description

Combines horizontal and vertical alignment.

Lightweight and pass-by-value. Use | to compose, e.g. kTop.shiftBy(5) | kMiddle.

Definition at line 172 of file alignment.h.

Constructor & Destructor Documentation

◆ Alignment() [1/4]

constexpr roo_display::Alignment::Alignment ( )
inlineconstexpr

Definition at line 174 of file alignment.h.

Referenced by shiftBy().

◆ Alignment() [2/4]

constexpr roo_display::Alignment::Alignment ( HAlign  h)
inlineconstexpr

Definition at line 176 of file alignment.h.

◆ Alignment() [3/4]

constexpr roo_display::Alignment::Alignment ( VAlign  v)
inlineconstexpr

Definition at line 178 of file alignment.h.

◆ Alignment() [4/4]

constexpr roo_display::Alignment::Alignment ( HAlign  h,
VAlign  v 
)
inlineconstexpr

Definition at line 180 of file alignment.h.

Member Function Documentation

◆ h()

constexpr HAlign roo_display::Alignment::h ( ) const
inlineconstexpr

Definition at line 182 of file alignment.h.

Referenced by resolveOffset().

◆ operator!=()

bool roo_display::Alignment::operator!= ( Alignment  other) const
inline

Definition at line 201 of file alignment.h.

◆ operator==()

bool roo_display::Alignment::operator== ( Alignment  other) const
inline

Definition at line 197 of file alignment.h.

◆ resolveOffset()

Offset roo_display::Alignment::resolveOffset ( const Box outer,
const Box inner 
) const
inline

Definition at line 186 of file alignment.h.

References roo_display::Offset::dx, h(), and v().

Referenced by roo_display::DrawingContext::draw().

◆ shiftBy()

Alignment roo_display::Alignment::shiftBy ( int16_t  dx,
int16_t  dy 
)
inline

◆ v()

constexpr VAlign roo_display::Alignment::v ( ) const
inlineconstexpr

Definition at line 184 of file alignment.h.

Referenced by resolveOffset().


The documentation for this class was generated from the following file: