TachyonUI
0.1.0
High-performance UI for building tools.
Toggle main menu visibility
Loading...
Searching...
No Matches
gui_style_ref.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <stdint.h>
4
5
namespace
tachyon
6
{
9
10
// ------------------------------------------------------------------------
11
// StyleRef - References into style pools
12
// ------------------------------------------------------------------------
13
15
enum class
LayoutStyleIndex
: uint32_t {
Invalid
= 0 };
17
enum class
VisualBoxStyleIndex
: uint16_t {
Invalid
= 0 };
19
enum class
VisualTextStyleIndex
: uint16_t {
Invalid
= 0 };
20
24
struct
StyleRef
25
{
26
LayoutStyleIndex
layoutStyleIndex
=
LayoutStyleIndex::Invalid
;
27
VisualBoxStyleIndex
visualBoxStyleIndex
=
VisualBoxStyleIndex::Invalid
;
28
VisualTextStyleIndex
visualTextStyleIndex
=
VisualTextStyleIndex::Invalid
;
29
31
static
constexpr
StyleRef
Invalid
() {
return
StyleRef
{
LayoutStyleIndex::Invalid
,
VisualBoxStyleIndex::Invalid
,
VisualTextStyleIndex::Invalid
}; }
32
33
inline
bool
operator==
(
const
StyleRef
& rhs)
const
{
return
layoutStyleIndex
== rhs.
layoutStyleIndex
&&
visualBoxStyleIndex
== rhs.
visualBoxStyleIndex
&&
visualTextStyleIndex
== rhs.
visualTextStyleIndex
; }
34
inline
bool
operator!=
(
const
StyleRef
& rhs)
const
{
return
!(*
this
== rhs); }
35
};
36
37
}
tachyon::Invalid
@ Invalid
Definition
gui_image.h:37
tachyon::VisualTextStyleIndex
VisualTextStyleIndex
Index into StyleManager's visual text style pool; Invalid (0) = none.
Definition
gui_style_ref.h:19
tachyon::LayoutStyleIndex
LayoutStyleIndex
Index into StyleManager's layout style pool; Invalid (0) = none.
Definition
gui_style_ref.h:15
tachyon::VisualBoxStyleIndex
VisualBoxStyleIndex
Index into StyleManager's visual box style pool; Invalid (0) = none.
Definition
gui_style_ref.h:17
tachyon::VisualTextStyleIndex::Invalid
@ Invalid
Definition
gui_style_ref.h:19
tachyon::LayoutStyleIndex::Invalid
@ Invalid
Definition
gui_style_ref.h:15
tachyon::VisualBoxStyleIndex::Invalid
@ Invalid
Definition
gui_style_ref.h:17
tachyon
Definition
gui_logging.h:24
tachyon::StyleRef
A registered style, as StyleManager::Register returns it: indices into the shared style pools,...
Definition
gui_style_ref.h:25
tachyon::StyleRef::operator!=
bool operator!=(const StyleRef &rhs) const
Definition
gui_style_ref.h:34
tachyon::StyleRef::visualBoxStyleIndex
VisualBoxStyleIndex visualBoxStyleIndex
Index into visual box style pool.
Definition
gui_style_ref.h:27
tachyon::StyleRef::visualTextStyleIndex
VisualTextStyleIndex visualTextStyleIndex
Index into visual text style pool.
Definition
gui_style_ref.h:28
tachyon::StyleRef::operator==
bool operator==(const StyleRef &rhs) const
Definition
gui_style_ref.h:33
tachyon::StyleRef::Invalid
static constexpr StyleRef Invalid()
A reference to no style (all indices Invalid).
Definition
gui_style_ref.h:31
tachyon::StyleRef::layoutStyleIndex
LayoutStyleIndex layoutStyleIndex
Index into layout style pool.
Definition
gui_style_ref.h:26
gui_core
style
gui_style_ref.h
Generated by
1.18.0