5#include <portals/detail/pss_parser.hpp>
6#include <portals/ui_static.hpp>
15void staticStyleInvalidRgb();
17void staticStyleInvalidMix();
19void staticStyleInvalidState();
21void staticStyleInvalidMetric();
24void staticStyleInvalidScrollbarPattern();
31 std::same_as<T, RgbColor> || std::same_as<T, bool> || std::same_as<T, std::int32_t> ||
32 std::same_as<T, ScrollbarPattern> || std::same_as<T, ScrollbarThumbPattern> || std::same_as<T, ScrollbarArrowPattern>;
38template <Literal Name, ParameterValue T>
struct Parameter {
39 static constexpr auto NAME = Name;
52 [](
const auto &...entry) {
53 return std::tuple{entry.initial...};
62template <Literal Name>
struct Token {
63 static constexpr auto NAME = Name;
70template <
class Left,
class Right>
struct Mix {
81 constexpr std::array NAMES{P::NAME.view()...};
83 for (std::size_t index = 0; index < NAMES.size(); ++index) {
84 if (NAMES[index] == Name.
view()) {
95template <Literal Name>
consteval std::size_t parameterIndex(Parameters<>
const &) {
105template <
class T,
class P,
class V>
constexpr T evaluate(T value,
const P &,
const V &) {
115template <
Literal Name,
class... P,
class V>
118 static_assert(INDEX <
sizeof...(P),
"Static style token requires a known parameter");
120 if constexpr (INDEX <
sizeof...(P)) {
121 return std::get<INDEX>(values);
134template <
class Left,
class Right,
class P,
class V>
136 auto left = evaluate(expression.left,
parameters, values);
137 auto right = evaluate(expression.right,
parameters, values);
138 static_assert(std::same_as<
decltype(left), RgbColor> && std::same_as<
decltype(right), RgbColor>,
139 "Static style mix requires color expressions");
141 if constexpr (std::same_as<
decltype(left), RgbColor> && std::same_as<
decltype(right), RgbColor>) {
142 const auto component = [&](std::uint8_t a, std::uint8_t b) {
143 constexpr std::int32_t FULL_PERCENTAGE = 100;
145 return static_cast<std::uint8_t
>((a * (FULL_PERCENTAGE - expression.percentage) + b * expression.percentage) /
149 return {component(left.red, right.red), component(left.green, right.green), component(left.blue, right.blue)};
163 FRAME_LINE_FOREGROUND,
164 FRAME_LINE_BACKGROUND,
167 FRAME_LINE_UNDERLINE,
168 FRAME_TITLE_FOREGROUND,
169 FRAME_TITLE_BACKGROUND,
172 FRAME_TITLE_UNDERLINE,
173 FRAME_ENDS_FOREGROUND,
174 FRAME_ENDS_BACKGROUND,
177 FRAME_ENDS_UNDERLINE,
178 SCROLLBAR_TRACK_FOREGROUND,
179 SCROLLBAR_TRACK_BACKGROUND,
180 SCROLLBAR_TRACK_BOLD,
181 SCROLLBAR_TRACK_ITALIC,
182 SCROLLBAR_TRACK_UNDERLINE,
183 SCROLLBAR_THUMB_FOREGROUND,
184 SCROLLBAR_THUMB_BACKGROUND,
185 SCROLLBAR_THUMB_BOLD,
186 SCROLLBAR_THUMB_ITALIC,
187 SCROLLBAR_THUMB_UNDERLINE,
188 SCROLLBAR_ENDS_FOREGROUND,
189 SCROLLBAR_ENDS_BACKGROUND,
191 SCROLLBAR_ENDS_ITALIC,
192 SCROLLBAR_ENDS_UNDERLINE,
193 SCROLLBAR_ARROWS_FOREGROUND,
194 SCROLLBAR_ARROWS_BACKGROUND,
195 SCROLLBAR_ARROWS_BOLD,
196 SCROLLBAR_ARROWS_ITALIC,
197 SCROLLBAR_ARROWS_UNDERLINE,
198 SCROLLBAR_CORNER_FOREGROUND,
199 SCROLLBAR_CORNER_BACKGROUND,
200 SCROLLBAR_CORNER_BOLD,
201 SCROLLBAR_CORNER_ITALIC,
202 SCROLLBAR_CORNER_UNDERLINE,
203 SCROLLBAR_TRACK_PATTERN,
204 SCROLLBAR_THUMB_PATTERN,
205 SCROLLBAR_ARROW_PATTERN,
206 SLIDER_TRACK_FOREGROUND,
207 SLIDER_TRACK_BACKGROUND,
210 SLIDER_TRACK_UNDERLINE,
211 SLIDER_FILL_FOREGROUND,
212 SLIDER_FILL_BACKGROUND,
215 SLIDER_FILL_UNDERLINE,
216 SLIDER_THUMB_FOREGROUND,
217 SLIDER_THUMB_BACKGROUND,
220 SLIDER_THUMB_UNDERLINE,
223 SCROLLBAR_THUMB_START_FOREGROUND,
224 SCROLLBAR_THUMB_START_BACKGROUND,
225 SCROLLBAR_THUMB_START_BOLD,
226 SCROLLBAR_THUMB_START_ITALIC,
227 SCROLLBAR_THUMB_START_UNDERLINE,
228 SCROLLBAR_THUMB_BODY_FOREGROUND,
229 SCROLLBAR_THUMB_BODY_BACKGROUND,
230 SCROLLBAR_THUMB_BODY_BOLD,
231 SCROLLBAR_THUMB_BODY_ITALIC,
232 SCROLLBAR_THUMB_BODY_UNDERLINE,
233 SCROLLBAR_THUMB_END_FOREGROUND,
234 SCROLLBAR_THUMB_END_BACKGROUND,
235 SCROLLBAR_THUMB_END_BOLD,
236 SCROLLBAR_THUMB_END_ITALIC,
237 SCROLLBAR_THUMB_END_UNDERLINE,
238 SCROLLBAR_THUMB_SINGLE_FOREGROUND,
239 SCROLLBAR_THUMB_SINGLE_BACKGROUND,
240 SCROLLBAR_THUMB_SINGLE_BOLD,
241 SCROLLBAR_THUMB_SINGLE_ITALIC,
242 SCROLLBAR_THUMB_SINGLE_UNDERLINE,
250 static constexpr auto KIND = Kind;
260 static constexpr auto TYPE = Type;
261 static constexpr auto ID = Id;
271template <Literal Type, Literal Id>
struct Selector<Type, Id> {
272 static constexpr auto TYPE = Type;
273 static constexpr auto ID = Id;
283template <
class S,
class... D>
struct Rule {
291template <
class T>
struct IsRule : std::false_type {};
297template <
class S,
class... D>
struct IsRule<
Rule<S, D...>> : std::true_type {};
324template <
class... P>
consteval bool uniqueParameters(
Parameters<P...> const &) {
325 constexpr std::array<std::string_view,
sizeof...(P)> NAMES{P::NAME.view()...};
327 for (std::size_t index = 0; index < NAMES.size(); ++index) {
328 if (NAMES[index].empty()) {
332 for (std::size_t other = index + 1; other < NAMES.size(); ++other) {
333 if (NAMES[index] == NAMES[other]) {
345template <
class... D>
consteval bool uniqueDeclarations(
const std::tuple<D...> &) {
346 constexpr std::array<Property,
sizeof...(D)> KINDS{D::KIND...};
348 for (std::size_t index = 0; index < KINDS.size(); ++index) {
349 for (std::size_t other = index + 1; other < KINDS.size(); ++other) {
350 if (KINDS[index] == KINDS[other]) {
367template <
class D,
class P,
class V>
368constexpr void assign(
const D &declaration, StyleDeclarations &destination,
const P &
parameters,
const V &values) {
369 auto value = evaluate(declaration.expression,
parameters, values);
370 constexpr bool COLOR =
371 D::KIND == Property::FOREGROUND || D::KIND == Property::BACKGROUND || D::KIND == Property::FRAME_LINE_FOREGROUND ||
372 D::KIND == Property::FRAME_LINE_BACKGROUND || D::KIND == Property::FRAME_TITLE_FOREGROUND ||
373 D::KIND == Property::FRAME_TITLE_BACKGROUND || D::KIND == Property::FRAME_ENDS_FOREGROUND ||
374 D::KIND == Property::FRAME_ENDS_BACKGROUND || D::KIND == Property::SCROLLBAR_TRACK_FOREGROUND ||
375 D::KIND == Property::SCROLLBAR_TRACK_BACKGROUND || D::KIND == Property::SCROLLBAR_THUMB_START_FOREGROUND ||
376 D::KIND == Property::SCROLLBAR_THUMB_START_BACKGROUND || D::KIND == Property::SCROLLBAR_THUMB_BODY_FOREGROUND ||
377 D::KIND == Property::SCROLLBAR_THUMB_BODY_BACKGROUND || D::KIND == Property::SCROLLBAR_THUMB_END_FOREGROUND ||
378 D::KIND == Property::SCROLLBAR_THUMB_END_BACKGROUND || D::KIND == Property::SCROLLBAR_THUMB_SINGLE_FOREGROUND ||
379 D::KIND == Property::SCROLLBAR_THUMB_SINGLE_BACKGROUND || D::KIND == Property::SCROLLBAR_THUMB_FOREGROUND ||
380 D::KIND == Property::SCROLLBAR_THUMB_BACKGROUND || D::KIND == Property::SCROLLBAR_ENDS_FOREGROUND ||
381 D::KIND == Property::SCROLLBAR_ENDS_BACKGROUND || D::KIND == Property::SCROLLBAR_ARROWS_FOREGROUND ||
382 D::KIND == Property::SCROLLBAR_ARROWS_BACKGROUND || D::KIND == Property::SCROLLBAR_CORNER_FOREGROUND ||
383 D::KIND == Property::SCROLLBAR_CORNER_BACKGROUND || D::KIND == Property::SLIDER_TRACK_FOREGROUND ||
384 D::KIND == Property::SLIDER_TRACK_BACKGROUND || D::KIND == Property::SLIDER_FILL_FOREGROUND ||
385 D::KIND == Property::SLIDER_FILL_BACKGROUND || D::KIND == Property::SLIDER_THUMB_FOREGROUND ||
386 D::KIND == Property::SLIDER_THUMB_BACKGROUND;
387 constexpr bool METRIC = D::KIND == Property::MIN_WIDTH;
388 using Expected = std::conditional_t<
396 std::conditional_t<D::KIND == Property::GLYPH_FALLBACK,
GlyphFallback,
397 std::conditional_t<COLOR, RgbColor, std::conditional_t<METRIC, std::int32_t, bool>>>>>>>;
398 static_assert(std::same_as<
decltype(value), Expected>,
"Static style declaration value type mismatch");
400 if constexpr (std::same_as<
decltype(value), Expected>) {
401 if constexpr (D::KIND == Property::FOREGROUND) {
402 destination.foreground = value;
403 }
else if constexpr (D::KIND == Property::BACKGROUND) {
404 destination.background = value;
405 }
else if constexpr (D::KIND == Property::BOLD) {
406 destination.bold = value;
407 }
else if constexpr (D::KIND == Property::ITALIC) {
408 destination.italic = value;
409 }
else if constexpr (D::KIND == Property::UNDERLINE) {
410 destination.underline = value;
411 }
else if constexpr (D::KIND == Property::FRAME_LINE_FOREGROUND) {
412 destination.frameLine.foreground = value;
413 }
else if constexpr (D::KIND == Property::FRAME_LINE_BACKGROUND) {
414 destination.frameLine.background = value;
415 }
else if constexpr (D::KIND == Property::FRAME_LINE_BOLD) {
416 destination.frameLine.bold = value;
417 }
else if constexpr (D::KIND == Property::FRAME_LINE_ITALIC) {
418 destination.frameLine.italic = value;
419 }
else if constexpr (D::KIND == Property::FRAME_LINE_UNDERLINE) {
420 destination.frameLine.underline = value;
421 }
else if constexpr (D::KIND == Property::FRAME_TITLE_FOREGROUND) {
422 destination.frameTitle.foreground = value;
423 }
else if constexpr (D::KIND == Property::FRAME_TITLE_BACKGROUND) {
424 destination.frameTitle.background = value;
425 }
else if constexpr (D::KIND == Property::FRAME_TITLE_BOLD) {
426 destination.frameTitle.bold = value;
427 }
else if constexpr (D::KIND == Property::FRAME_TITLE_ITALIC) {
428 destination.frameTitle.italic = value;
429 }
else if constexpr (D::KIND == Property::FRAME_TITLE_UNDERLINE) {
430 destination.frameTitle.underline = value;
431 }
else if constexpr (D::KIND == Property::FRAME_ENDS_FOREGROUND) {
432 destination.frameEnds.foreground = value;
433 }
else if constexpr (D::KIND == Property::FRAME_ENDS_BACKGROUND) {
434 destination.frameEnds.background = value;
435 }
else if constexpr (D::KIND == Property::FRAME_ENDS_BOLD) {
436 destination.frameEnds.bold = value;
437 }
else if constexpr (D::KIND == Property::FRAME_ENDS_ITALIC) {
438 destination.frameEnds.italic = value;
439 }
else if constexpr (D::KIND == Property::FRAME_ENDS_UNDERLINE) {
440 destination.frameEnds.underline = value;
441 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_FOREGROUND) {
442 destination.scrollbarTrack.foreground = value;
443 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_BACKGROUND) {
444 destination.scrollbarTrack.background = value;
445 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_BOLD) {
446 destination.scrollbarTrack.bold = value;
447 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_ITALIC) {
448 destination.scrollbarTrack.italic = value;
449 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_UNDERLINE) {
450 destination.scrollbarTrack.underline = value;
451 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_FOREGROUND) {
452 destination.scrollbarThumb.foreground = value;
453 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BACKGROUND) {
454 destination.scrollbarThumb.background = value;
455 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BOLD) {
456 destination.scrollbarThumb.bold = value;
457 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_ITALIC) {
458 destination.scrollbarThumb.italic = value;
459 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_UNDERLINE) {
460 destination.scrollbarThumb.underline = value;
461 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_START_FOREGROUND) {
462 destination.scrollbarThumbStart.foreground = value;
463 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_START_BACKGROUND) {
464 destination.scrollbarThumbStart.background = value;
465 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_START_BOLD) {
466 destination.scrollbarThumbStart.bold = value;
467 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_START_ITALIC) {
468 destination.scrollbarThumbStart.italic = value;
469 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_START_UNDERLINE) {
470 destination.scrollbarThumbStart.underline = value;
471 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BODY_FOREGROUND) {
472 destination.scrollbarThumbBody.foreground = value;
473 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BODY_BACKGROUND) {
474 destination.scrollbarThumbBody.background = value;
475 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BODY_BOLD) {
476 destination.scrollbarThumbBody.bold = value;
477 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BODY_ITALIC) {
478 destination.scrollbarThumbBody.italic = value;
479 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_BODY_UNDERLINE) {
480 destination.scrollbarThumbBody.underline = value;
481 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_END_FOREGROUND) {
482 destination.scrollbarThumbEnd.foreground = value;
483 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_END_BACKGROUND) {
484 destination.scrollbarThumbEnd.background = value;
485 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_END_BOLD) {
486 destination.scrollbarThumbEnd.bold = value;
487 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_END_ITALIC) {
488 destination.scrollbarThumbEnd.italic = value;
489 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_END_UNDERLINE) {
490 destination.scrollbarThumbEnd.underline = value;
491 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_SINGLE_FOREGROUND) {
492 destination.scrollbarThumbSingle.foreground = value;
493 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_SINGLE_BACKGROUND) {
494 destination.scrollbarThumbSingle.background = value;
495 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_SINGLE_BOLD) {
496 destination.scrollbarThumbSingle.bold = value;
497 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_SINGLE_ITALIC) {
498 destination.scrollbarThumbSingle.italic = value;
499 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_SINGLE_UNDERLINE) {
500 destination.scrollbarThumbSingle.underline = value;
501 }
else if constexpr (D::KIND == Property::SCROLLBAR_ENDS_FOREGROUND) {
502 destination.scrollbarEnds.foreground = value;
503 }
else if constexpr (D::KIND == Property::SCROLLBAR_ENDS_BACKGROUND) {
504 destination.scrollbarEnds.background = value;
505 }
else if constexpr (D::KIND == Property::SCROLLBAR_ENDS_BOLD) {
506 destination.scrollbarEnds.bold = value;
507 }
else if constexpr (D::KIND == Property::SCROLLBAR_ENDS_ITALIC) {
508 destination.scrollbarEnds.italic = value;
509 }
else if constexpr (D::KIND == Property::SCROLLBAR_ENDS_UNDERLINE) {
510 destination.scrollbarEnds.underline = value;
511 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROWS_FOREGROUND) {
512 destination.scrollbarArrows.foreground = value;
513 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROWS_BACKGROUND) {
514 destination.scrollbarArrows.background = value;
515 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROWS_BOLD) {
516 destination.scrollbarArrows.bold = value;
517 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROWS_ITALIC) {
518 destination.scrollbarArrows.italic = value;
519 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROWS_UNDERLINE) {
520 destination.scrollbarArrows.underline = value;
521 }
else if constexpr (D::KIND == Property::SCROLLBAR_CORNER_FOREGROUND) {
522 destination.scrollbarCorner.foreground = value;
523 }
else if constexpr (D::KIND == Property::SCROLLBAR_CORNER_BACKGROUND) {
524 destination.scrollbarCorner.background = value;
525 }
else if constexpr (D::KIND == Property::SCROLLBAR_CORNER_BOLD) {
526 destination.scrollbarCorner.bold = value;
527 }
else if constexpr (D::KIND == Property::SCROLLBAR_CORNER_ITALIC) {
528 destination.scrollbarCorner.italic = value;
529 }
else if constexpr (D::KIND == Property::SCROLLBAR_CORNER_UNDERLINE) {
530 destination.scrollbarCorner.underline = value;
531 }
else if constexpr (D::KIND == Property::SCROLLBAR_TRACK_PATTERN) {
532 destination.scrollbarTrackPattern = value;
533 }
else if constexpr (D::KIND == Property::SCROLLBAR_THUMB_PATTERN) {
534 destination.scrollbarThumbPattern = value;
535 }
else if constexpr (D::KIND == Property::SLIDER_TRACK_FOREGROUND) {
536 destination.sliderTrack.foreground = value;
537 }
else if constexpr (D::KIND == Property::SLIDER_TRACK_BACKGROUND) {
538 destination.sliderTrack.background = value;
539 }
else if constexpr (D::KIND == Property::SLIDER_TRACK_BOLD) {
540 destination.sliderTrack.bold = value;
541 }
else if constexpr (D::KIND == Property::SLIDER_TRACK_ITALIC) {
542 destination.sliderTrack.italic = value;
543 }
else if constexpr (D::KIND == Property::SLIDER_TRACK_UNDERLINE) {
544 destination.sliderTrack.underline = value;
545 }
else if constexpr (D::KIND == Property::SLIDER_FILL_FOREGROUND) {
546 destination.sliderFill.foreground = value;
547 }
else if constexpr (D::KIND == Property::SLIDER_FILL_BACKGROUND) {
548 destination.sliderFill.background = value;
549 }
else if constexpr (D::KIND == Property::SLIDER_FILL_BOLD) {
550 destination.sliderFill.bold = value;
551 }
else if constexpr (D::KIND == Property::SLIDER_FILL_ITALIC) {
552 destination.sliderFill.italic = value;
553 }
else if constexpr (D::KIND == Property::SLIDER_FILL_UNDERLINE) {
554 destination.sliderFill.underline = value;
555 }
else if constexpr (D::KIND == Property::SLIDER_THUMB_FOREGROUND) {
556 destination.sliderThumb.foreground = value;
557 }
else if constexpr (D::KIND == Property::SLIDER_THUMB_BACKGROUND) {
558 destination.sliderThumb.background = value;
559 }
else if constexpr (D::KIND == Property::SLIDER_THUMB_BOLD) {
560 destination.sliderThumb.bold = value;
561 }
else if constexpr (D::KIND == Property::SLIDER_THUMB_ITALIC) {
562 destination.sliderThumb.italic = value;
563 }
else if constexpr (D::KIND == Property::SLIDER_THUMB_UNDERLINE) {
564 destination.sliderThumb.underline = value;
565 }
else if constexpr (D::KIND == Property::GLYPH_PROFILE) {
566 destination.glyphProfile = value;
567 }
else if constexpr (D::KIND == Property::GLYPH_FALLBACK) {
568 destination.glyphFallback = value;
569 }
else if constexpr (D::KIND == Property::SCROLLBAR_ARROW_PATTERN) {
570 destination.scrollbarArrowPattern = value;
571 }
else if constexpr (METRIC) {
572 destination.minWidth = value;
585template <
class R,
class P,
class V>
586constexpr StyleDeclarations declarations(
const R &
rule,
const P &
parameters,
const V &values) {
587 StyleDeclarations result{};
589 [&](
const auto &...declaration) {
590 (assign(declaration, result,
parameters, values), ...);
602template <
class R,
class P>
consteval void validateRule(
const R &
rule,
const P &
parameters) {
604 staticStyleInvalidState();
607 static_assert(uniqueDeclarations(
decltype(
rule.declarations){}),
"Static style rule repeats a declaration");
610 if ((values.glyphProfile &&
612 (values.glyphFallback &&
620 staticStyleInvalidScrollbarPattern();
623 if (values.minWidth && (*values.minWidth < 0 ||
rule.selector.state !=
StyleState::ANY ||
rule.selector.readOnly)) {
624 staticStyleInvalidMetric();
632template <
class P,
class... R>
class Sheet {
638 static_assert(
sizeof...(R) <=
MAX_STYLE_RULES,
"Static style sheet exceeds the rule limit");
639 static_assert(uniqueParameters(P{}),
"Static style parameter names must be nonempty and unique");
649 constexpr const std::tuple<R...> &
rules() const noexcept {
655 std::tuple<R...> rules_;
661template <
class T>
struct IsSheet : std::false_type {};
672template <
class P,
class... R>
struct IsSheet<
Sheet<P, R...>> : std::true_type {};
678template <Literal Name,
class T>
struct Change {
679 static constexpr auto NAME = Name;
686template <
class... C>
consteval bool uniqueChanges() {
687 constexpr std::array<std::string_view,
sizeof...(C)> NAMES{C::NAME.view()...};
689 for (std::size_t index = 0; index < NAMES.size(); ++index) {
690 for (std::size_t other = index + 1; other < NAMES.size(); ++other) {
691 if (NAMES[index] == NAMES[other]) {
706 return scene.lifetime_;
727 return scene.stylesDirty_;
734 return scene.captureThemeLease();
742 return scene.checkThemeLease(
lease);
779consteval RgbColor rgb(std::int32_t red, std::int32_t green, std::int32_t blue) {
780 constexpr std::int32_t MAX_COMPONENT = 255;
782 if (red < 0 || green < 0 || blue < 0 || red > MAX_COMPONENT || green > MAX_COMPONENT || blue > MAX_COMPONENT) {
783 detail::staticStyleInvalidRgb();
786 return {
static_cast<std::uint8_t
>(red),
static_cast<std::uint8_t
>(green),
static_cast<std::uint8_t
>(blue)};
794template <detail::Literal Name, detail::ParameterValue T>
consteval auto parameter(T initial) {
803 requires(detail::IsParameter<P>::value && ...)
806 "Static style parameter names must be nonempty and unique");
814template <detail::Literal Name>
consteval auto token() {
826template <
class Left,
class Right>
consteval auto mix(Left left, Right right, std::int32_t percentage) {
827 constexpr std::int32_t FULL_PERCENTAGE = 100;
829 if (percentage < 0 || percentage > FULL_PERCENTAGE) {
830 detail::staticStyleInvalidMix();
843template <detail::Literal Type =
"", detail::Literal Id =
"", detail::Literal... Classes>
846 detail::staticStyleInvalidState();
866 static_assert(portals::detail::isPssIdentifier(Name.
view()),
"Static style ID requires a PSS ASCII identifier");
868 return selector<
"", Name>(state, readOnly);
877 static_assert(Name.
view() ==
"*" || portals::detail::isPssIdentifier(Name.
view()),
878 "Static style type requires a PSS ASCII identifier or universal '*'");
889 static_assert(portals::detail::isPssIdentifier(Name.
view()),
"Static style class requires a PSS ASCII identifier");
891 return selector<
"",
"", Name>(state, readOnly);
914template <
class E>
consteval auto fg(E expression) {
922template <
class E>
consteval auto bg(E expression) {
930template <
class E>
consteval auto bold(E expression) {
938template <
class E>
consteval auto italic(E expression) {
946template <
class E>
consteval auto underline(E expression) {
954template <
class E>
consteval auto minWidth(E expression) {
1364template <
class S,
class... D>
1365 requires(detail::IsDeclaration<D>::value && ...)
1366consteval auto
rule(S target, D... declarations) {
1367 static_assert(detail::uniqueDeclarations(std::tuple<D...>{}),
"Static style rule repeats a declaration");
1369 return detail::Rule<S, D...>{target, {declarations...}};
1378template <
class P,
class... R>
1379 requires(detail::IsRule<R>::value && ...)
1380consteval
auto sheet(P values, R... rules) {
1381 static_assert(
sizeof...(R) <=
MAX_STYLE_RULES,
"Static style sheet exceeds the rule limit");
1396template <
class... P,
class... R>
1397 requires(detail::IsRule<R>::value && ...)
1399 static_cast<void>(extraParameters);
1405 std::get<P>(extraParameters.entries)...),
1449template <
class S,
class V>
StyleSheet materializeValues(
const S &description,
const V &values) {
1451 result.
rules.reserve(std::tuple_size_v<std::remove_cvref_t<
decltype(description.rules())>>);
1453 [&](
const auto &...
rule) {
1454 if constexpr (
sizeof...(rule) > 0) {
1455 const auto append = [&](
const auto &source) {
1456 using SelectorType = std::remove_cvref_t<
decltype(source.selector)>;
1459 target.selector.id = SelectorType::ID.view();
1460 target.selector.state = source.selector.state;
1461 target.selector.readOnly = source.selector.readOnly;
1462 target.selector.classes.reserve(SelectorType::CLASS_NAMES.size());
1464 for (
const auto name : SelectorType::CLASS_NAMES) {
1465 target.selector.classes.emplace_back(name);
1468 target.declarations = declarations(source, description.parameters(), values);
1469 result.
rules.push_back(std::move(target));
1471 (append(
rule), ...);
1474 description.rules());
1488 return detail::materializeValues(description, description.parameters().defaults());
1496template <detail::Literal Name,
class T>
auto change(T value) {
1509 requires detail::IsSheet<S>::value
1511 using Values =
decltype(std::declval<S>().parameters().defaults());
1517 std::weak_ptr<const void> lifetime;
1518 std::thread::id owner;
1537 return std::unexpected(allowed.error());
1540 const auto root = scene.root().id();
1548 std::make_shared<State>(description, description.parameters().defaults(), &scene, lifetime, owner, root, lease);
1549 auto sheet = detail::materializeValues(result.state_->description, result.state_->values);
1550 allowed = boundary(result.state_);
1553 return std::unexpected(allowed.error());
1559 return std::unexpected(installed.error());
1562 result.state_->lease = *installed;
1564 }
catch (
const std::bad_alloc &) {
1572 template <detail::Literal Name>
auto get()
const {
1573 constexpr auto INDEX = index<Name>();
1574 using Value = std::tuple_element_t<INDEX, Values>;
1575 std::expected<Value, ManagedError> result;
1576 const auto state = state_;
1577 auto allowed = boundary(state);
1580 return decltype(result)(std::unexpected(allowed.error()));
1583 return decltype(result)(std::get<INDEX>(state->values));
1591 template <detail::Literal Name,
class T> std::expected<bool, ManagedError>
set(T value)
const {
1602 template <
class... C> std::expected<bool, ManagedError>
apply(C... changes)
const {
1603 static_assert(detail::uniqueChanges<C...>(),
"Static style update repeats a parameter");
1604 const auto state = state_;
1605 auto allowed = boundary(state);
1608 return std::unexpected(allowed.error());
1611 auto candidate = state->values;
1612 (update(candidate, changes), ...);
1614 const bool changed = candidate != state->values;
1622 explicit Guard(State &value) : state(value) {
1623 state.applying =
true;
1627 state.applying =
false;
1632 auto sheet = detail::materializeValues(state->description, candidate);
1633 allowed = boundary(state,
true);
1636 return std::unexpected(allowed.error());
1642 return std::unexpected(installed.error());
1645 state->values = candidate;
1648 }
catch (
const std::bad_alloc &) {
1654 template <detail::Literal Name>
static consteval std::size_t index() {
1655 using P = std::remove_cvref_t<decltype(std::declval<S>().parameters())>;
1656 constexpr auto INDEX = detail::parameterIndex<Name>(P{});
1657 static_assert(INDEX < std::tuple_size_v<Values>,
"Static style update requires a known parameter");
1662 template <
class C>
static void update(Values &values,
const C &
change) {
1663 constexpr auto INDEX = index<C::NAME>();
1664 using Value = std::tuple_element_t<INDEX, Values>;
1665 static_assert(std::same_as<
decltype(
change.value), Value>,
"Static style update value type mismatch");
1667 if constexpr (std::same_as<
decltype(
change.value), Value>) {
1668 std::get<INDEX>(values) =
change.value;
1672 static std::expected<void, ManagedError> boundary(
const std::shared_ptr<State> &state,
bool completing =
false) {
1678 if (state->owner != std::this_thread::get_id()) {
1682 if (state->lifetime.expired()) {
1686 if (state->applying && !completing) {
1693 std::shared_ptr<State> state_;
Additive lifecycle owner over one existing Application subtree. UI affine and nonmovable....
Definition managed.hpp:530
std::expected< bool, ManagedError > set(T value) const
Definition style_static.hpp:1591
auto get() const
Definition style_static.hpp:1572
static std::expected< LiveTheme, ManagedError > attach(ManagedScene &scene, const S &description)
Definition style_static.hpp:1533
std::expected< bool, ManagedError > apply(C... changes) const
Definition style_static.hpp:1602
LiveTheme()=default
Construct an empty observer; operations return CLOSED.
Immutable owning parameter/rule description returned by sheet().
Definition style_static.hpp:632
constexpr const P & parameters() const noexcept
Definition style_static.hpp:644
consteval Sheet(P parameters, R... rules)
Definition style_static.hpp:637
constexpr const std::tuple< R... > & rules() const noexcept
Definition style_static.hpp:649
Scalar types with nonthrowing ownership and equality.
Definition style_static.hpp:30
Owning compile-time PSS v0 snapshots using the existing runtime cascade.
Definition pss_compact.hpp:8
consteval auto sliderTrackUnderline(E expression)
Definition style_static.hpp:1229
consteval auto sliderFillUnderline(E expression)
Definition style_static.hpp:1254
consteval auto scrollbarArrowsBackground(E expression)
Definition style_static.hpp:1314
StyleSheet materialize(const CompactSheet< R, C, D, B > &description)
Definition style_pss.hpp:362
consteval auto scrollbarThumbEndBackground(E expression)
Definition style_static.hpp:1164
consteval auto scrollbarThumbStartUnderline(E expression)
Definition style_static.hpp:1129
consteval auto frameLineBackground(E expression)
Definition style_static.hpp:964
consteval auto sliderThumbItalic(E expression)
Definition style_static.hpp:1274
consteval auto frameEndsItalic(E expression)
Definition style_static.hpp:1024
consteval auto frameEndsUnderline(E expression)
Definition style_static.hpp:1029
consteval auto frameTitleForeground(E expression)
Definition style_static.hpp:984
consteval auto foreground(E expression)
Definition style_static.hpp:898
consteval auto scrollbarCornerForeground(E expression)
Definition style_static.hpp:1334
consteval auto scrollbarThumbEndBold(E expression)
Definition style_static.hpp:1169
consteval auto frameLineBold(E expression)
Definition style_static.hpp:969
consteval auto scrollbarThumbBodyBackground(E expression)
Definition style_static.hpp:1139
consteval auto sliderThumbUnderline(E expression)
Definition style_static.hpp:1279
consteval auto frameLineForeground(E expression)
Definition style_static.hpp:959
consteval auto scrollbarThumbSingleForeground(E expression)
Definition style_static.hpp:1184
consteval auto sliderFillItalic(E expression)
Definition style_static.hpp:1249
consteval auto scrollbarThumbBackground(E expression)
Definition style_static.hpp:1089
consteval auto scrollbarThumbSingleBackground(E expression)
Definition style_static.hpp:1189
consteval auto scrollbarCornerUnderline(E expression)
Definition style_static.hpp:1354
consteval auto frameEndsBold(E expression)
Definition style_static.hpp:1019
consteval auto bg(E expression)
Definition style_static.hpp:922
consteval auto sliderTrackBackground(E expression)
Definition style_static.hpp:1214
consteval auto scrollbarEndsForeground(E expression)
Definition style_static.hpp:1284
consteval auto sliderFillBackground(E expression)
Definition style_static.hpp:1239
consteval auto glyphFallback(E expression)
Definition style_static.hpp:1044
consteval auto parameters(P... entries)
Definition style_static.hpp:804
consteval auto scrollbarThumbPattern(E expression)
Definition style_static.hpp:1049
consteval auto bold(E expression)
Definition style_static.hpp:930
consteval auto sliderThumbForeground(E expression)
Definition style_static.hpp:1259
consteval auto scrollbarThumbBodyForeground(E expression)
Definition style_static.hpp:1134
consteval auto minWidth(E expression)
Definition style_static.hpp:954
consteval auto scrollbarArrowsItalic(E expression)
Definition style_static.hpp:1324
consteval auto fg(E expression)
Definition style_static.hpp:914
consteval auto scrollbarEndsItalic(E expression)
Definition style_static.hpp:1299
consteval auto scrollbarThumbStartBold(E expression)
Definition style_static.hpp:1119
consteval auto scrollbarEndsBold(E expression)
Definition style_static.hpp:1294
consteval auto scrollbarTrackUnderline(E expression)
Definition style_static.hpp:1079
consteval auto scrollbarTrackForeground(E expression)
Definition style_static.hpp:1059
consteval auto sheet(P values, R... rules)
Definition style_static.hpp:1380
consteval auto underline(E expression)
Definition style_static.hpp:946
consteval auto scrollbarThumbBold(E expression)
Definition style_static.hpp:1094
consteval auto id(StyleState state=StyleState::ANY, bool readOnly=false)
Definition style_static.hpp:865
consteval auto background(E expression)
Definition style_static.hpp:906
consteval auto frameLineItalic(E expression)
Definition style_static.hpp:974
consteval auto frameEndsForeground(E expression)
Definition style_static.hpp:1009
consteval auto scrollbarThumbBodyBold(E expression)
Definition style_static.hpp:1144
consteval auto selector(StyleState state=StyleState::ANY, bool readOnly=false)
Definition style_static.hpp:844
consteval auto rule(S target, D... declarations)
Definition style_static.hpp:1366
consteval auto frameTitleItalic(E expression)
Definition style_static.hpp:999
consteval auto mix(Left left, Right right, std::int32_t percentage)
Blend colors using integral components, rounding down.
Definition style_static.hpp:826
consteval auto scrollbarThumbItalic(E expression)
Definition style_static.hpp:1099
consteval auto frameEndsBackground(E expression)
Definition style_static.hpp:1014
consteval auto scrollbarThumbUnderline(E expression)
Definition style_static.hpp:1104
consteval auto parameter(T initial)
Definition style_static.hpp:794
consteval auto scrollbarThumbBodyItalic(E expression)
Definition style_static.hpp:1149
consteval auto frameTitleBold(E expression)
Definition style_static.hpp:994
consteval auto scrollbarArrowPattern(E expression)
Definition style_static.hpp:1054
consteval auto scrollbarThumbEndUnderline(E expression)
Definition style_static.hpp:1179
consteval auto token()
Definition style_static.hpp:814
consteval auto frameTitleUnderline(E expression)
Definition style_static.hpp:1004
consteval auto scrollbarEndsBackground(E expression)
Definition style_static.hpp:1289
consteval auto sliderThumbBold(E expression)
Definition style_static.hpp:1269
consteval auto sliderThumbBackground(E expression)
Definition style_static.hpp:1264
consteval auto sliderFillForeground(E expression)
Definition style_static.hpp:1234
auto live(ManagedScene &scene, const S &description)
Definition style_static.hpp:1703
consteval auto scrollbarTrackItalic(E expression)
Definition style_static.hpp:1074
consteval auto scrollbarThumbStartBackground(E expression)
Definition style_static.hpp:1114
consteval auto scrollbarThumbBodyUnderline(E expression)
Definition style_static.hpp:1154
consteval auto scrollbarCornerBackground(E expression)
Definition style_static.hpp:1339
consteval auto scrollbarTrackPattern(E expression)
Definition style_static.hpp:1034
consteval RgbColor rgb(std::int32_t red, std::int32_t green, std::int32_t blue)
Validate and construct a constant RGB value without narrowing first.
Definition style_static.hpp:779
consteval auto themeFromTokens(ThemeTokens defaults, detail::Parameters< P... > extraParameters={}, R... extraRules)
Constant counterpart of portals::themeFromTokens with live named color parameters.
Definition style_static.hpp:1398
consteval auto scrollbarTrackBold(E expression)
Definition style_static.hpp:1069
consteval auto scrollbarThumbStartForeground(E expression)
Definition style_static.hpp:1109
consteval auto sliderFillBold(E expression)
Definition style_static.hpp:1244
consteval auto sliderTrackForeground(E expression)
Definition style_static.hpp:1209
consteval auto scrollbarThumbSingleItalic(E expression)
Definition style_static.hpp:1199
consteval auto italic(E expression)
Definition style_static.hpp:938
consteval auto scrollbarThumbForeground(E expression)
Definition style_static.hpp:1084
consteval auto scrollbarCornerBold(E expression)
Definition style_static.hpp:1344
consteval auto scrollbarArrowsForeground(E expression)
Definition style_static.hpp:1309
consteval auto scrollbarThumbSingleUnderline(E expression)
Definition style_static.hpp:1204
auto change(T value)
Definition style_static.hpp:1496
consteval auto sliderTrackBold(E expression)
Definition style_static.hpp:1219
consteval auto scrollbarTrackBackground(E expression)
Definition style_static.hpp:1064
consteval auto glyphProfile(E expression)
Definition style_static.hpp:1039
consteval auto scrollbarArrowsBold(E expression)
Definition style_static.hpp:1319
consteval auto sliderTrackItalic(E expression)
Definition style_static.hpp:1224
consteval auto className(StyleState state=StyleState::ANY, bool readOnly=false)
Definition style_static.hpp:888
consteval auto type(StyleState state=StyleState::ANY, bool readOnly=false)
Definition style_static.hpp:876
consteval auto scrollbarEndsUnderline(E expression)
Definition style_static.hpp:1304
consteval auto scrollbarCornerItalic(E expression)
Definition style_static.hpp:1349
consteval auto scrollbarThumbStartItalic(E expression)
Definition style_static.hpp:1124
consteval auto frameLineUnderline(E expression)
Definition style_static.hpp:979
consteval auto frameTitleBackground(E expression)
Definition style_static.hpp:989
consteval auto scrollbarArrowsUnderline(E expression)
Definition style_static.hpp:1329
consteval auto scrollbarThumbEndItalic(E expression)
Definition style_static.hpp:1174
consteval auto scrollbarThumbSingleBold(E expression)
Definition style_static.hpp:1194
consteval auto all(StyleState state=StyleState::ANY, bool readOnly=false)
Definition style_static.hpp:856
consteval auto scrollbarThumbEndForeground(E expression)
Definition style_static.hpp:1159
ScrollbarThumbPattern
Independent thumb source; all choices are opt-in.
Definition scrollbar_skin.hpp:24
@ LEGACY
Existing repeated thumb, including ASCII fallback.
Definition scrollbar_skin.hpp:25
@ FRACTIONAL_BLOCK
Eighth-cell block placement; requires a blank track and no custom thumb shapes.
Definition scrollbar_skin.hpp:28
ScrollbarPattern
Opt-in scrollbar glyph presets; legacy calls retain their original appearance.
Definition scrollbar_skin.hpp:15
@ LEGACY
Existing shaded track and block thumb.
Definition scrollbar_skin.hpp:16
@ FRACTIONAL_BLOCK
Blank track and eighth-cell block placement; explicit leaves keep priority.
Definition scrollbar_skin.hpp:20
@ STYLE
Register or apply styles, including a theme change.
Definition managed_diagnostics.hpp:52
GlyphProfile
Explicit glyph map, independent of colors and geometry. NF maps use Nerd Fonts 3 Powerline codepoints...
Definition glyph_profile.hpp:12
@ DEFAULT
Preserve the control's existing glyph sources.
Definition glyph_profile.hpp:13
@ NF_BACKSLASH
Powerline backslash horizontal caps, Unicode vertical inset caps.
Definition glyph_profile.hpp:19
GlyphFallback
Portable replacement when the selected map fails one-cell admission.
Definition glyph_profile.hpp:23
@ UNICODE_GLYPHS
Unicode replacement, with ASCII when Unicode is not one cell.
Definition glyph_profile.hpp:24
@ ASCII
ASCII replacement; also selects ASCII vertical caps for NF maps.
Definition glyph_profile.hpp:25
StyleState
Presentation states; ANY matches every state without changing behavior.
Definition style.hpp:26
@ DISABLED
Synchronized control ineligibility.
Definition style.hpp:30
@ FOCUSED
Synchronized control focus.
Definition style.hpp:29
@ CARET
Editor software caret.
Definition style.hpp:33
@ HEADER
Fixed table heading.
Definition style.hpp:32
@ ANY
Match all presentation variants.
Definition style.hpp:27
@ SELECTED
Selected row or editor range.
Definition style.hpp:31
constexpr std::size_t MAX_STYLE_RULES
Finite typed/PSS rule budget.
Definition style.hpp:302
ScrollbarArrowPattern
Independent functional-arrow source; selecting it never enables buttons.
Definition scrollbar_skin.hpp:32
@ LEGACY
Existing functional arrow source.
Definition scrollbar_skin.hpp:33
@ ASCII
Less-than, greater-than, caret and lowercase v.
Definition scrollbar_skin.hpp:35
TreeError
Checked tree failures; rejected operations never start the requested callback.
Definition widget_types.hpp:26
@ CLOSED
The owning tree or source is closed.
Definition widget_types.hpp:31
@ WRONG_THREAD
Operation requires the tree's UI thread.
Definition widget_types.hpp:28
@ WOULD_BLOCK
The current frame/reentry boundary or finite queue/work budget rejects this operation.
Definition widget_types.hpp:32
@ NO_MEMORY
Allocation failed inside the operation boundary.
Definition widget_types.hpp:33
Original error plus independent runner/restoration and cleanup failures.
Definition managed_diagnostics.hpp:62
Owning identity, independent of addresses; zero is never a live identity.
Definition widget_types.hpp:15
Owning RGB color; terminal encoding belongs to the output adapter.
Definition cell_buffer.hpp:20
One owned selector/declaration pair in source order.
Definition style.hpp:205
StyleSelector selector
Matching and specificity criteria.
Definition style.hpp:211
std::string type
Empty or * means any type.
Definition style.hpp:68
Owned immutable-at-use rules; constructing typed values may allocate and throw.
Definition style.hpp:233
std::vector< StyleRule > rules
Source-order rules, at most MAX_STYLE_RULES when installed.
Definition style.hpp:239
Typed palette tokens for the built-in theme factories.
Definition style.hpp:347
Private captured theme authority, including legacy epoch admission.
Definition style.hpp:293
Private bridge reusing managed lifetime, affinity and mutation boundaries.
Definition style_static.hpp:701
static bool pending(ManagedScene &scene) noexcept
Definition style_static.hpp:726
static auto attachTheme(ManagedScene &scene, const StyleSheet &sheet, portals::detail::StyleThemeLease lease)
Definition style_static.hpp:750
static portals::detail::StyleThemeLease lease(ManagedScene &scene)
Definition style_static.hpp:733
static std::expected< void, ManagedError > checkLease(ManagedScene &scene, portals::detail::StyleThemeLease lease)
Definition style_static.hpp:741
static auto applyTheme(ManagedScene &scene, const StyleSheet &sheet, portals::detail::StyleThemeLease lease)
Definition style_static.hpp:759
static std::expected< void, ManagedError > boundary(ManagedScene &scene)
Definition style_static.hpp:719
static std::weak_ptr< const void > lifetime(ManagedScene &scene)
Definition style_static.hpp:705
static std::thread::id owner(ManagedScene &scene)
Definition style_static.hpp:712
Internal owning named update member.
Definition style_static.hpp:678
T value
Candidate scalar.
Definition style_static.hpp:680
static constexpr auto NAME
Owning update identity.
Definition style_static.hpp:679
Internal typed owning declaration.
Definition style_static.hpp:249
Expression expression
Owned value expression.
Definition style_static.hpp:251
static constexpr auto KIND
Destination identity.
Definition style_static.hpp:250
Recognize internal declaration types.
Definition style_static.hpp:302
Recognize internal parameter types.
Definition style_static.hpp:313
Recognize internal rule types.
Definition style_static.hpp:291
Recognize validated owning sheet types.
Definition style_static.hpp:661
constexpr std::string_view view() const noexcept
Definition ui_static.hpp:31
Internal acyclic color blend expression.
Definition style_static.hpp:70
Right right
Owned expression selected at one hundred percent.
Definition style_static.hpp:72
Left left
Owned expression selected at zero percent.
Definition style_static.hpp:71
std::int32_t percentage
Validated constant blend factor.
Definition style_static.hpp:73
Internal owning constant parameter definition.
Definition style_static.hpp:38
T initial
Constant default value.
Definition style_static.hpp:40
static constexpr auto NAME
Owning static identity.
Definition style_static.hpp:39
Internal owning parameter pack.
Definition style_static.hpp:46
std::tuple< P... > entries
Owning definitions.
Definition style_static.hpp:47
constexpr auto defaults() const
Definition style_static.hpp:50
Internal owning rule, validated by its containing sheet.
Definition style_static.hpp:283
S selector
Owning selector.
Definition style_static.hpp:284
std::tuple< D... > declarations
Owning declarations.
Definition style_static.hpp:285
static constexpr std::array< std::string_view, 0 > CLASS_NAMES
Empty class predicates.
Definition style_static.hpp:274
StyleState state
Existing pseudo-state.
Definition style_static.hpp:275
bool readOnly
Orthogonal read-only qualifier.
Definition style_static.hpp:276
static constexpr auto TYPE
Owning type identity.
Definition style_static.hpp:272
static constexpr auto ID
Owning target identity.
Definition style_static.hpp:273
Internal conjunction selector with static owning byte identities.
Definition style_static.hpp:259
static constexpr std::array CLASS_NAMES
Views into static owned template bytes.
Definition style_static.hpp:262
StyleState state
Existing pseudo-state.
Definition style_static.hpp:263
static constexpr auto ID
Owning target identity.
Definition style_static.hpp:261
bool readOnly
Orthogonal read-only qualifier.
Definition style_static.hpp:264
static constexpr auto TYPE
Owning type identity.
Definition style_static.hpp:260
Internal named expression leaf.
Definition style_static.hpp:62
static constexpr auto NAME
Owning static identity.
Definition style_static.hpp:63
Owning fixed-size bytes usable as a structural template argument.
Definition ui_static.hpp:15
constexpr std::string_view view() const noexcept
Definition ui_static.hpp:31