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

Per-side offsets of a positioned element (CSS: top, right, bottom, left), in pixels. More...

#include <gui_core/style/gui_style.h>

Public Member Functions

constexpr EdgeInset ()=default
constexpr EdgeInset (int16_t all)
 All four insets the same.
constexpr EdgeInset (int16_t vertical, int16_t horizontal)
 Top/bottom and left/right.
constexpr EdgeInset (int16_t t, int16_t r, int16_t b, int16_t l)
 In CSS order: top, right, bottom, left.
bool operator== (const EdgeInset &) const noexcept=default

Public Attributes

int16_t top = kAuto
int16_t right = kAuto
int16_t bottom = kAuto
int16_t left = kAuto

Static Public Attributes

static constexpr int16_t kAuto = std::numeric_limits<int16_t>::min()
 "Not set". Insets can be negative, so the sentinel is the lowest int16_t.

Detailed Description

Per-side offsets of a positioned element (CSS: top, right, bottom, left), in pixels.

Constructor & Destructor Documentation

◆ EdgeInset() [1/4]

tachyon::EdgeInset::EdgeInset ( )
constexprdefault

◆ EdgeInset() [2/4]

tachyon::EdgeInset::EdgeInset ( int16_t all)
inlineconstexpr

All four insets the same.

◆ EdgeInset() [3/4]

tachyon::EdgeInset::EdgeInset ( int16_t vertical,
int16_t horizontal )
inlineconstexpr

Top/bottom and left/right.

◆ EdgeInset() [4/4]

tachyon::EdgeInset::EdgeInset ( int16_t t,
int16_t r,
int16_t b,
int16_t l )
inlineconstexpr

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

Member Function Documentation

◆ operator==()

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

Member Data Documentation

◆ kAuto

int16_t tachyon::EdgeInset::kAuto = std::numeric_limits<int16_t>::min()
staticconstexpr

"Not set". Insets can be negative, so the sentinel is the lowest int16_t.

◆ top

int16_t tachyon::EdgeInset::top = kAuto

◆ right

int16_t tachyon::EdgeInset::right = kAuto

◆ bottom

int16_t tachyon::EdgeInset::bottom = kAuto

◆ left

int16_t tachyon::EdgeInset::left = kAuto

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