|
ZenitUI
Retained-mode C++20 UI framework
|
Parse a single CSS-like declaration (key: value) into a Style. More...
#include "Common.hpp"#include "Logger.hpp"#include "CoreTypes.hpp"#include "Easing.hpp"#include "Unit.hpp"#include "Style.hpp"#include "StyleSpecs.hpp"#include <charconv>#include <cctype>#include <optional>#include <sstream>Go to the source code of this file.
Functions | |
| std::optional< Value > | ZenitUI::parseValueToken (std::string_view s) |
| Parse a single Value token. | |
| std::optional< Color > | ZenitUI::parseColorToken (std::string_view s) |
| Parse a color token. | |
| std::optional< Spacing > | ZenitUI::parseSpacingToken (std::string_view s) |
| Parse a 1-4 value shorthand. | |
| std::optional< Align > | ZenitUI::parseAlignToken (std::string_view s) |
| std::optional< Direction > | ZenitUI::parseDirectionToken (std::string_view s) |
| std::optional< TextDirection > | ZenitUI::parseTextDirectionToken (std::string_view s) |
| std::optional< Justify > | ZenitUI::parseJustifyToken (std::string_view s) |
| std::optional< WhiteSpace > | ZenitUI::parseWhiteSpaceToken (std::string_view s) |
| std::optional< TextOverflow > | ZenitUI::parseTextOverflowToken (std::string_view s) |
| std::optional< CursorShape > | ZenitUI::parseCursorToken (std::string_view s) |
| bool | ZenitUI::applyStyleAttr (Style &st, std::string_view key, std::string_view val) |
Apply a single key: value declaration to st. | |
| std::string | ZenitUI::substituteVarRefs (std::string v, const std::unordered_map< std::string, std::string > &customProps) |
Recursively substitute var(--name) references in v. | |
| Style | ZenitUI::resolveUnresolvedProps (const std::unordered_map< std::string, std::string > &unresolved, const std::unordered_map< std::string, std::string > &customProps) |
Resolve every pending var(...) declaration in unresolved. | |
Parse a single CSS-like declaration (key: value) into a Style.
Two entry points:
The detail namespace contains the calc()-style expression parser and a few small string helpers that are not part of the public API but are used by applyStyleAttr.