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

The visual properties of one element state (normal, :hover, :active, ...). More...

#include <gui_core/style/gui_style.h>

Public Member Functions

void SetBorderColor (const ColorStyle &c)
 Sets all four border colors to c.
void SetBorderColor (const ColorStyle &t, const ColorStyle &r, const ColorStyle &b, const ColorStyle &l)
 Per-edge border colors, in CSS order.

Public Attributes

TextStyle textStyle {}
 font and text metrics
ColorStyle backgroundColor {}
 CSS: background.
ColorStyle borderColors [4] {}
 [0]=top, [1]=right, [2]=bottom, [3]=left
ColorStyle textColor {}
 CSS: color; none = transparent.
ColorStyle iconColor {}
 -tachyon-icon-color; none = the text color
ColorStyle decorationColors [4] {}
 CSS: text-<under|bottom|over|through>line-color, in that order (see DecorationLine); none = the text color.
BoxShadow boxShadow [kMaxBoxShadows] {}
 CSS: box-shadow; the first is drawn on top.
BoxShadow textShadow [kMaxTextShadows] {}
 CSS: text-shadow, under the text, its decorations and its icon; the first is drawn on top.
float opacity = -1.0f
 CSS: opacity, 0 to 1: the element and everything in it drawn that much opaque.

Detailed Description

The visual properties of one element state (normal, :hover, :active, ...).

Lengths are in CSS px.

Member Function Documentation

◆ SetBorderColor() [1/2]

void tachyon::StyleState::SetBorderColor ( const ColorStyle & c)
inline

Sets all four border colors to c.

◆ SetBorderColor() [2/2]

void tachyon::StyleState::SetBorderColor ( const ColorStyle & t,
const ColorStyle & r,
const ColorStyle & b,
const ColorStyle & l )
inline

Per-edge border colors, in CSS order.

Member Data Documentation

◆ textStyle

TextStyle tachyon::StyleState::textStyle {}

font and text metrics

◆ backgroundColor

ColorStyle tachyon::StyleState::backgroundColor {}

CSS: background.

◆ borderColors

ColorStyle tachyon::StyleState::borderColors[4] {}

[0]=top, [1]=right, [2]=bottom, [3]=left

◆ textColor

ColorStyle tachyon::StyleState::textColor {}

CSS: color; none = transparent.

◆ iconColor

ColorStyle tachyon::StyleState::iconColor {}

-tachyon-icon-color; none = the text color

◆ decorationColors

ColorStyle tachyon::StyleState::decorationColors[4] {}

CSS: text-<under|bottom|over|through>line-color, in that order (see DecorationLine); none = the text color.

◆ boxShadow

BoxShadow tachyon::StyleState::boxShadow[kMaxBoxShadows] {}

CSS: box-shadow; the first is drawn on top.

◆ textShadow

BoxShadow tachyon::StyleState::textShadow[kMaxTextShadows] {}

CSS: text-shadow, under the text, its decorations and its icon; the first is drawn on top.

No spread, never inset.

◆ opacity

float tachyon::StyleState::opacity = -1.0f

CSS: opacity, 0 to 1: the element and everything in it drawn that much opaque.

Below 0 is not set: 1, or the theme's –disabled-opacity for a disabled control.


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