|
TachyonUI 0.1.0
High-performance UI for building tools.
|
A complete style, as parsed from CSS or built in code: layout properties plus the visual properties of each state, in CSS px. More...
#include <gui_core/style/gui_style.h>
Classes | |
| struct | States |
| A style's states, indexed by ElementState (or by slot number). More... | |
Static Public Attributes | |
| static constexpr int16_t | kAuto = -1 |
State slots | |
The state slots: one per combination of the ElementState bits Active, Hover, Focused, Selected and Selection (0 to 31), and Disabled alone (32). | |
| static constexpr int | kStateCount = int(ElementState::Disabled) + 1 |
| one per state slot | |
| States | states {} |
| one per state slot | |
| TextLayoutStyle | textLayoutStyle {} |
| shared by all states | |
| BoxEdges | margin {} |
| CSS px. | |
| BoxEdges | padding {} |
| CSS px. | |
| BoxEdges | borderWidths {} |
| CSS px. | |
| BoxCorners | borderRadius {} |
| CSS px. | |
| float | borderDashSize = 0.0f |
| dash length in CSS px; 0 = solid | |
| float | borderDashOffset = 0.0f |
| offset into the dash pattern, CSS px | |
| BoxShadow | focusRing {} |
| :focus-visible box-shadow, over the state's shadows | |
| StateLayer | stateLayer = StateLayer::None |
| -tachyon-state-layer: Content makes the hovered and pressed backgrounds from the state's text color over its background, in place of the :hover / :active ones. | |
| LayoutData | layoutData {} |
| flex, grid and size properties | |
| uint16_t | iconTextGap = 0 |
| space between icon and text, CSS px | |
| uint16_t | iconSize = 0 |
| icon size in CSS px; 0 = its natural size | |
| int16_t | iconOffsetY = 0 |
| vertical nudge of the icon in CSS px; positive = up | |
| ImageIndex | textureIndex = ImageIndex::Invalid |
| texture of the texture color types | |
| Display | display: 3 = Display::Flex |
| CSS: display. | |
| Visibility | visibility: 2 = Visibility::Visible |
| CSS: visibility. | |
| Overflow | overflowX: 2 = Overflow::Auto |
| CSS: overflow-x. | |
| Overflow | overflowY: 2 = Overflow::Auto |
| CSS: overflow-y. | |
| IconSide | iconSide: 3 = IconSide::Left |
| CSS: -tachyon-icon-side. | |
| AlignItems | alignSelf: 3 = AlignItems::Auto |
| CSS: align-self; Auto = the container's align-items. | |
| BreakBehavior | breakBehavior: 2 = BreakBehavior::Auto |
| CSS: break-after. | |
| bool | clampScroll: 1 = true |
| clamp the scroll offset to the content; false = unbounded | |
| MouseCursor | cursor = MouseCursor::Default |
| CSS: cursor. | |
| constexpr void | SetOverflow (Overflow o) noexcept |
| CSS overflow shorthand: sets both axes. | |
A complete style, as parsed from CSS or built in code: layout properties plus the visual properties of each state, in CSS px.
StyleManager::Register bakes it into a LayoutStyle, VisualBoxStyle and VisualTextStyle at the UI scale.
|
inlineconstexprnoexcept |
CSS overflow shorthand: sets both axes.
|
staticconstexpr |
|
staticconstexpr |
one per state slot
| States tachyon::Style::states {} |
one per state slot
| TextLayoutStyle tachyon::Style::textLayoutStyle {} |
shared by all states
| BoxEdges tachyon::Style::margin {} |
CSS px.
| BoxEdges tachyon::Style::padding {} |
CSS px.
| BoxEdges tachyon::Style::borderWidths {} |
CSS px.
| BoxCorners tachyon::Style::borderRadius {} |
CSS px.
| float tachyon::Style::borderDashSize = 0.0f |
dash length in CSS px; 0 = solid
| float tachyon::Style::borderDashOffset = 0.0f |
offset into the dash pattern, CSS px
| BoxShadow tachyon::Style::focusRing {} |
:focus-visible box-shadow, over the state's shadows
| StateLayer tachyon::Style::stateLayer = StateLayer::None |
-tachyon-state-layer: Content makes the hovered and pressed backgrounds from the state's text color over its background, in place of the :hover / :active ones.
| LayoutData tachyon::Style::layoutData {} |
flex, grid and size properties
| uint16_t tachyon::Style::iconTextGap = 0 |
space between icon and text, CSS px
| uint16_t tachyon::Style::iconSize = 0 |
icon size in CSS px; 0 = its natural size
| int16_t tachyon::Style::iconOffsetY = 0 |
vertical nudge of the icon in CSS px; positive = up
| ImageIndex tachyon::Style::textureIndex = ImageIndex::Invalid |
texture of the texture color types
| Display tachyon::Style::display |
CSS: display.
| Visibility tachyon::Style::visibility |
CSS: visibility.
| Overflow tachyon::Style::overflowX |
CSS: overflow-x.
| Overflow tachyon::Style::overflowY |
CSS: overflow-y.
| IconSide tachyon::Style::iconSide |
CSS: -tachyon-icon-side.
| AlignItems tachyon::Style::alignSelf |
CSS: align-self; Auto = the container's align-items.
| BreakBehavior tachyon::Style::breakBehavior |
CSS: break-after.
| bool tachyon::Style::clampScroll |
clamp the scroll offset to the content; false = unbounded
| MouseCursor tachyon::Style::cursor = MouseCursor::Default |
CSS: cursor.