TachyonUI
0.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_units.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <compare>
4
#include <stdint.h>
5
6
namespace
tachyon
7
{
10
17
struct
CssPx
18
{
19
int32_t
value
= 0;
20
constexpr
CssPx
() =
default
;
22
constexpr
CssPx
(int32_t v) :
value
(v) {}
23
constexpr
auto
operator<=>
(
const
CssPx
&)
const
=
default
;
24
};
25
27
struct
Pixels
28
{
29
int32_t
value
= 0;
30
constexpr
Pixels
() =
default
;
32
constexpr
explicit
Pixels
(int32_t v) :
value
(v) {}
33
constexpr
auto
operator<=>
(
const
Pixels
&)
const
=
default
;
34
};
35
36
}
tachyon
Definition
gui_logging.h:24
tachyon::CssPx::CssPx
constexpr CssPx()=default
tachyon::CssPx::operator<=>
constexpr auto operator<=>(const CssPx &) const =default
tachyon::CssPx::value
int32_t value
Definition
gui_units.h:19
tachyon::CssPx::CssPx
constexpr CssPx(int32_t v)
Implicit, so a plain int size is CSS px.
Definition
gui_units.h:22
tachyon::Pixels::Pixels
constexpr Pixels()=default
tachyon::Pixels::operator<=>
constexpr auto operator<=>(const Pixels &) const =default
tachyon::Pixels::Pixels
constexpr Pixels(int32_t v)
Explicit: say Pixels{ n } to opt out of CSS px scaling.
Definition
gui_units.h:32
tachyon::Pixels::value
int32_t value
Definition
gui_units.h:29
gui_core
gui_units.h
Generated by
1.18.0