TachyonUI 0.1.0
High-performance UI for building tools.
Loading...
Searching...
No Matches
tachyon::BoxEdges Struct Reference

Per-side values of the box model (margin, padding, border widths). More...

#include <gui_core/style/gui_style.h>

Public Member Functions

constexpr BoxEdges ()=default
constexpr BoxEdges (uint16_t all)
 All four edges the same.
constexpr BoxEdges (uint16_t vertical, uint16_t horizontal)
 Top/bottom and left/right, like the two-value CSS shorthand.
constexpr BoxEdges (uint16_t t, uint16_t r, uint16_t b, uint16_t l)
 In CSS order: top, right, bottom, left.
constexpr uint16_t Horizontal () const
 left + right
constexpr uint16_t Vertical () const
 top + bottom
constexpr bool IsZero () const
 All edges are 0.
bool operator== (const BoxEdges &) const noexcept=default

Public Attributes

uint16_t top = 0
uint16_t right = 0
uint16_t bottom = 0
uint16_t left = 0

Detailed Description

Per-side values of the box model (margin, padding, border widths).

Constructor & Destructor Documentation

◆ BoxEdges() [1/4]

tachyon::BoxEdges::BoxEdges ( )
constexprdefault

◆ BoxEdges() [2/4]

tachyon::BoxEdges::BoxEdges ( uint16_t all)
inlineconstexpr

All four edges the same.

◆ BoxEdges() [3/4]

tachyon::BoxEdges::BoxEdges ( uint16_t vertical,
uint16_t horizontal )
inlineconstexpr

Top/bottom and left/right, like the two-value CSS shorthand.

◆ BoxEdges() [4/4]

tachyon::BoxEdges::BoxEdges ( uint16_t t,
uint16_t r,
uint16_t b,
uint16_t l )
inlineconstexpr

In CSS order: top, right, bottom, left.

Member Function Documentation

◆ Horizontal()

uint16_t tachyon::BoxEdges::Horizontal ( ) const
inlineconstexpr

left + right

◆ Vertical()

uint16_t tachyon::BoxEdges::Vertical ( ) const
inlineconstexpr

top + bottom

◆ IsZero()

bool tachyon::BoxEdges::IsZero ( ) const
inlineconstexpr

All edges are 0.

◆ operator==()

bool tachyon::BoxEdges::operator== ( const BoxEdges & ) const
defaultnoexcept

Member Data Documentation

◆ top

uint16_t tachyon::BoxEdges::top = 0

◆ right

uint16_t tachyon::BoxEdges::right = 0

◆ bottom

uint16_t tachyon::BoxEdges::bottom = 0

◆ left

uint16_t tachyon::BoxEdges::left = 0

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