ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
Unit.hpp File Reference

Length units and the compact 8-byte tagged Value expression representation. More...

#include "Common.hpp"
#include "CoreTypes.hpp"
#include "SmallVector.hpp"
#include <atomic>
#include <bit>
#include <cstdint>

Go to the source code of this file.

Classes

struct  ZenitUI::Value
 8-byte tagged length expression: More...
struct  ZenitUI::Value::Term

Enumerations

enum class  Unit : int8_t {
  Auto = -1 , Number = 0 , Pixel = 1 , Percent = 2 ,
  VW = 3 , VH = 4 , PW = 5 , PH = 6
}
enum class  ValueOp : uint8_t {
  None , Add , Sub , Mul ,
  Div , Min , Max , Clamp ,
  Round , Floor , Ceil , Mod
}

Functions

Value ZenitUI::Auto () noexcept
Value ZenitUI::Px (float p) noexcept
Value ZenitUI::Percent (float p) noexcept
Value ZenitUI::VW (float p) noexcept
Value ZenitUI::VH (float p) noexcept
Value ZenitUI::PW (float p) noexcept
Value ZenitUI::PH (float p) noexcept
Value ZenitUI::Num (float p) noexcept

Detailed Description

Length units and the compact 8-byte tagged Value expression representation.