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

One run of rich text: a piece of text or an inline icon. More...

#include <gui_core/text/gui_text_system.h>

Public Types

enum  Type { Text , Icon }

Public Member Functions

uint64_t GetHashCode () const

Public Attributes

Type type
std::string_view text
 Text runs.
IconID iconID
 Icon runs.
float iconWidth = kSizeAuto
 CSS px, or kSizeAuto.
float iconHeight = kSizeAuto
 CSS px, or kSizeAuto.
intptr_t contentId = 0
 non-zero makes the run hittable (HitTestContent returns it)
bool isLink = false
 drawn as a link: underlined, in linkStyle's colors
LinkStyle linkStyle
const TextStyle * textStyleOverride = nullptr
 Text style of this run in place of the element's (font, size, weight, ...); null uses the element's.

Static Public Attributes

static constexpr float kSizeAuto = -1.0f
 size the icon automatically

Detailed Description

One run of rich text: a piece of text or an inline icon.

Member Enumeration Documentation

◆ Type

Enumerator
Text 
Icon 

Member Function Documentation

◆ GetHashCode()

uint64_t tachyon::ContentRun::GetHashCode ( ) const
inline

Member Data Documentation

◆ kSizeAuto

float tachyon::ContentRun::kSizeAuto = -1.0f
staticconstexpr

size the icon automatically

◆ type

Type tachyon::ContentRun::type

◆ text

std::string_view tachyon::ContentRun::text

Text runs.

◆ iconID

IconID tachyon::ContentRun::iconID

Icon runs.

◆ iconWidth

float tachyon::ContentRun::iconWidth = kSizeAuto

CSS px, or kSizeAuto.

◆ iconHeight

float tachyon::ContentRun::iconHeight = kSizeAuto

CSS px, or kSizeAuto.

◆ contentId

intptr_t tachyon::ContentRun::contentId = 0

non-zero makes the run hittable (HitTestContent returns it)

◆ isLink

bool tachyon::ContentRun::isLink = false

drawn as a link: underlined, in linkStyle's colors

◆ linkStyle

LinkStyle tachyon::ContentRun::linkStyle

◆ textStyleOverride

const TextStyle* tachyon::ContentRun::textStyleOverride = nullptr

Text style of this run in place of the element's (font, size, weight, ...); null uses the element's.

Caller-owned; must outlive the frame, like text.


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