ZenitUI
Retained-mode C++20 UI framework
Loading...
Searching...
No Matches
ZenitUI::Theme Class Reference

Per-context stylesheet: rules, keyframes, and root style. More...

#include <Theme.hpp>

Classes

struct  SymbolKey
 Key for rulesByLastSymbol: the last selector component. More...
struct  SymbolKeyHash
 Hash for SymbolKey. More...

Public Member Functions

void addRule (ThemeRule r)
 Insert a rule into the theme.
void addKeyframes (const KeyframeAnimation &anim)
 Insert or replace a keyframe animation and bump the version.
void clear ()
 Remove every rule, keyframe, and root declaration.

Public Attributes

std::vector< ThemeRule > rules
Style root
std::unordered_map< std::string, KeyframeAnimation > keyframes
std::unordered_map< std::string, std::vector< size_t > > rulesByTag
std::vector< size_t > rulesNoTag
std::unordered_map< SymbolKey, std::vector< uint32_t >, SymbolKeyHash > rulesByLastSymbol
bool hasSiblingCombinators {false}
uint32_t version {0}

Detailed Description

Per-context stylesheet: rules, keyframes, and root style.

Owned by UIContext::theme.


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