Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::style::ct Namespace Reference

Owning compile-time PSS v0 snapshots using the existing runtime cascade. More...

Classes

class  CompactSheet
 Immutable owning scalar stylesheet; its public type contains only numeric capacities. More...
class  FlatRule
 Nongeneric typed scalar rule for bounded array construction. Selector views refer exclusively to static template-owned identities produced by flatRule(). The final compactSheet() copies every identity into one owning text arena. No expression or callback survives. More...
class  LiveTheme
 Copyable UI-affine observer with owned rules and current scalar parameter values. Copies share values but never extend scene lifetime. One handle owns no subscription or callback. Destruction and copies are thread-independent; operations require the scene's UI thread. In layered mode this controller observes reserved THEME authority; external theme() revokes it. In legacy mode only this controller's changes are tracked: external theme() replacement supersedes its sheet until the next unequal parameter update. An equal update deliberately does not reinstall it. More...

Functions

template<std::size_t N>
constexpr std::string_view text (const char(&bytes)[N])
 Preserve the complete extent of a literal for rich compile-time diagnostics.
template<std::size_t N>
consteval auto pss (const char(&bytes)[N], std::string_view sourceName=std::string_view{})
 Convenient strict PSS literal snapshot, with bounded numeric public capacities.
template<detail::PssSourceProvider Source, detail::PssSourceProvider Origin = detail::AnonymousPssSource>
consteval auto pss (Source source, Origin origin={})
 Strict PSS provider with exact storage capacities and bounded coordinate diagnostics.
template<std::size_t R, std::size_t C, std::size_t D, std::size_t B>
StyleSheet materialize (const CompactSheet< R, C, D, B > &description)
template<std::size_t R, std::size_t C, std::size_t D, std::size_t B>
std::expected< PssDocument, PssError > materializeDocument (const CompactSheet< R, C, D, B > &description)
template<class... P, class S, class... D>
requires (detail::IsPssSelector<S>::value && (detail::IsDeclaration<D>::value && ...))
consteval FlatRule flatRule (detail::Parameters< P... > definitions, S selector, D... declarations)
 Evaluate one typed rule into nongeneric scalar data before array construction.
template<class S, class... D>
requires (detail::IsPssSelector<S>::value && (detail::IsDeclaration<D>::value && ...))
consteval FlatRule flatRule (S selector, D... declarations)
template<std::size_t N>
consteval auto compactSheet (const std::array< FlatRule, N > &rules, std::string_view sourceName=std::string_view{})
 Construct a bounded owning stylesheet from nongeneric typed rules.
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.
template<detail::Literal Name, detail::ParameterValue T>
consteval auto parameter (T initial)
template<class... P>
requires (detail::IsParameter<P>::value && ...)
consteval auto parameters (P... entries)
template<detail::Literal Name>
consteval auto token ()
template<class Left, class Right>
consteval auto mix (Left left, Right right, std::int32_t percentage)
 Blend colors using integral components, rounding down.
template<detail::Literal Type = "", detail::Literal Id = "", detail::Literal... Classes>
consteval auto selector (StyleState state=StyleState::ANY, bool readOnly=false)
consteval auto all (StyleState state=StyleState::ANY, bool readOnly=false)
template<detail::Literal Name>
consteval auto id (StyleState state=StyleState::ANY, bool readOnly=false)
template<detail::Literal Name>
consteval auto type (StyleState state=StyleState::ANY, bool readOnly=false)
template<detail::Literal Name>
consteval auto className (StyleState state=StyleState::ANY, bool readOnly=false)
template<class E>
consteval auto foreground (E expression)
template<class E>
consteval auto background (E expression)
template<class E>
consteval auto fg (E expression)
template<class E>
consteval auto bg (E expression)
template<class E>
consteval auto bold (E expression)
template<class E>
consteval auto italic (E expression)
template<class E>
consteval auto underline (E expression)
template<class E>
consteval auto minWidth (E expression)
template<class E>
consteval auto frameLineForeground (E expression)
template<class E>
consteval auto frameLineBackground (E expression)
template<class E>
consteval auto frameLineBold (E expression)
template<class E>
consteval auto frameLineItalic (E expression)
template<class E>
consteval auto frameLineUnderline (E expression)
template<class E>
consteval auto frameTitleForeground (E expression)
template<class E>
consteval auto frameTitleBackground (E expression)
template<class E>
consteval auto frameTitleBold (E expression)
template<class E>
consteval auto frameTitleItalic (E expression)
template<class E>
consteval auto frameTitleUnderline (E expression)
template<class E>
consteval auto frameEndsForeground (E expression)
template<class E>
consteval auto frameEndsBackground (E expression)
template<class E>
consteval auto frameEndsBold (E expression)
template<class E>
consteval auto frameEndsItalic (E expression)
template<class E>
consteval auto frameEndsUnderline (E expression)
template<class E>
consteval auto scrollbarTrackPattern (E expression)
template<class E>
consteval auto glyphProfile (E expression)
template<class E>
consteval auto glyphFallback (E expression)
template<class E>
consteval auto scrollbarThumbPattern (E expression)
template<class E>
consteval auto scrollbarArrowPattern (E expression)
template<class E>
consteval auto scrollbarTrackForeground (E expression)
template<class E>
consteval auto scrollbarTrackBackground (E expression)
template<class E>
consteval auto scrollbarTrackBold (E expression)
template<class E>
consteval auto scrollbarTrackItalic (E expression)
template<class E>
consteval auto scrollbarTrackUnderline (E expression)
template<class E>
consteval auto scrollbarThumbForeground (E expression)
template<class E>
consteval auto scrollbarThumbBackground (E expression)
template<class E>
consteval auto scrollbarThumbBold (E expression)
template<class E>
consteval auto scrollbarThumbItalic (E expression)
template<class E>
consteval auto scrollbarThumbUnderline (E expression)
template<class E>
consteval auto scrollbarThumbStartForeground (E expression)
template<class E>
consteval auto scrollbarThumbStartBackground (E expression)
template<class E>
consteval auto scrollbarThumbStartBold (E expression)
template<class E>
consteval auto scrollbarThumbStartItalic (E expression)
template<class E>
consteval auto scrollbarThumbStartUnderline (E expression)
template<class E>
consteval auto scrollbarThumbBodyForeground (E expression)
template<class E>
consteval auto scrollbarThumbBodyBackground (E expression)
template<class E>
consteval auto scrollbarThumbBodyBold (E expression)
template<class E>
consteval auto scrollbarThumbBodyItalic (E expression)
template<class E>
consteval auto scrollbarThumbBodyUnderline (E expression)
template<class E>
consteval auto scrollbarThumbEndForeground (E expression)
template<class E>
consteval auto scrollbarThumbEndBackground (E expression)
template<class E>
consteval auto scrollbarThumbEndBold (E expression)
template<class E>
consteval auto scrollbarThumbEndItalic (E expression)
template<class E>
consteval auto scrollbarThumbEndUnderline (E expression)
template<class E>
consteval auto scrollbarThumbSingleForeground (E expression)
template<class E>
consteval auto scrollbarThumbSingleBackground (E expression)
template<class E>
consteval auto scrollbarThumbSingleBold (E expression)
template<class E>
consteval auto scrollbarThumbSingleItalic (E expression)
template<class E>
consteval auto scrollbarThumbSingleUnderline (E expression)
template<class E>
consteval auto sliderTrackForeground (E expression)
template<class E>
consteval auto sliderTrackBackground (E expression)
template<class E>
consteval auto sliderTrackBold (E expression)
template<class E>
consteval auto sliderTrackItalic (E expression)
template<class E>
consteval auto sliderTrackUnderline (E expression)
template<class E>
consteval auto sliderFillForeground (E expression)
template<class E>
consteval auto sliderFillBackground (E expression)
template<class E>
consteval auto sliderFillBold (E expression)
template<class E>
consteval auto sliderFillItalic (E expression)
template<class E>
consteval auto sliderFillUnderline (E expression)
template<class E>
consteval auto sliderThumbForeground (E expression)
template<class E>
consteval auto sliderThumbBackground (E expression)
template<class E>
consteval auto sliderThumbBold (E expression)
template<class E>
consteval auto sliderThumbItalic (E expression)
template<class E>
consteval auto sliderThumbUnderline (E expression)
template<class E>
consteval auto scrollbarEndsForeground (E expression)
template<class E>
consteval auto scrollbarEndsBackground (E expression)
template<class E>
consteval auto scrollbarEndsBold (E expression)
template<class E>
consteval auto scrollbarEndsItalic (E expression)
template<class E>
consteval auto scrollbarEndsUnderline (E expression)
template<class E>
consteval auto scrollbarArrowsForeground (E expression)
template<class E>
consteval auto scrollbarArrowsBackground (E expression)
template<class E>
consteval auto scrollbarArrowsBold (E expression)
template<class E>
consteval auto scrollbarArrowsItalic (E expression)
template<class E>
consteval auto scrollbarArrowsUnderline (E expression)
template<class E>
consteval auto scrollbarCornerForeground (E expression)
template<class E>
consteval auto scrollbarCornerBackground (E expression)
template<class E>
consteval auto scrollbarCornerBold (E expression)
template<class E>
consteval auto scrollbarCornerItalic (E expression)
template<class E>
consteval auto scrollbarCornerUnderline (E expression)
template<class S, class... D>
requires (detail::IsDeclaration<D>::value && ...)
consteval auto rule (S target, D... declarations)
template<class P, class... R>
requires (detail::IsRule<R>::value && ...)
consteval auto sheet (P values, R... rules)
template<class... P, class... R>
requires (detail::IsRule<R>::value && ...)
consteval auto themeFromTokens (ThemeTokens defaults, detail::Parameters< P... > extraParameters={}, R... extraRules)
 Constant counterpart of portals::themeFromTokens with live named color parameters.
template<class S>
requires detail::IsSheet<S>::value
StyleSheet materialize (const S &description)
template<detail::Literal Name, class T>
auto change (T value)
template<class S>
requires detail::IsSheet<S>::value
auto live (ManagedScene &scene, const S &description)

Variables

constexpr std::size_t MAX_CT_PSS_BYTES = 16 * 1024
 Maximum compile-time source bytes, independently of the larger runtime budget.
constexpr std::size_t MAX_CT_PSS_RULES = 256
 Maximum compile-time source-order rules.
constexpr std::size_t MAX_CT_PSS_CLASSES = 1024
 Maximum compile-time class predicates across the whole sheet.
constexpr std::size_t MAX_CT_PSS_DECLARATIONS = 1536
 Maximum compile-time declaration occurrences, including overwritten duplicates.
constexpr std::size_t MAX_CT_PSS_TEXT_BYTES = 16 * 1024
 Maximum shared owning selector and source-identity text bytes.
constexpr std::size_t MAX_CT_PSS_SOURCE_NAME_BYTES = 512
 Maximum caller-supplied compile-time UTF-8 source identity bytes.
constexpr std::size_t MAX_CT_PSS_DESCRIPTOR_BYTES = 192 * 1024
 Maximum complete compact descriptor object size.

Detailed Description

Owning compile-time PSS v0 snapshots using the existing runtime cascade.

Constant-built owning rules expanded into the existing runtime style cascade.

Function Documentation

◆ all()

auto portals::style::ct::all ( StyleState state = StyleState::ANY,
bool readOnly = false )
consteval
Parameters
stateOptional presentation-state predicate.
readOnlyRequire the orthogonal view-only fact.
Returns
Owning universal selector using the existing conjunction semantics.

◆ background()

template<class E>
auto portals::style::ct::background ( E expression)
consteval
Template Parameters
EColor or color expression type.
Parameters
expressionBackground value evaluated when the sheet is materialized.
Returns
Typed declaration.

◆ bg()

template<class E>
auto portals::style::ct::bg ( E expression)
consteval
Template Parameters
ERGB scalar or existing color expression type.
Parameters
expressionOwned background expression, validated by the consuming sheet.
Returns
Existing background declaration with identical token and materialization semantics.

◆ bold()

template<class E>
auto portals::style::ct::bold ( E expression)
consteval
Template Parameters
EBoolean or boolean token type.
Parameters
expressionBold value evaluated when the sheet is materialized.
Returns
Typed declaration.

◆ change()

template<detail::Literal Name, class T>
auto portals::style::ct::change ( T value)
Template Parameters
NameParameter name checked by LiveTheme::apply().
TExact candidate value type; implicit parameter conversions are rejected.
Parameters
valueOwning scalar candidate value.
Returns
Update member for one atomic batch.

◆ className()

template<detail::Literal Name>
auto portals::style::ct::className ( StyleState state = StyleState::ANY,
bool readOnly = false )
consteval
Template Parameters
NameStatic owned required class identity, validated by the consuming API.
Parameters
stateOptional presentation-state predicate.
readOnlyRequire the orthogonal view-only fact.
Returns
Owning single-class selector.

◆ compactSheet()

template<std::size_t N>
auto portals::style::ct::compactSheet ( const std::array< FlatRule, N > & rules,
std::string_view sourceName = std::string_view{} )
consteval

Construct a bounded owning stylesheet from nongeneric typed rules.

Template Parameters
NNumeric array extent, at most MAX_CT_PSS_RULES; rule types do not enter the public result type.
Parameters
rulesScalar snapshots; names reference static storage and are copied before returning.
sourceNameConstant UTF-8 identity copied into the shared arena, or anonymous when empty.
Returns
Owning compact snapshot with synthetic typed ordinals, explicitly distinguished from PSS byte positions. Rule offset/line identify the zero/one-based rule ordinal; declaration offset/column identify property ordinals. No C++ file/line provenance is claimed. Live parameter updates remain the existing CT-002 API.

◆ fg()

template<class E>
auto portals::style::ct::fg ( E expression)
consteval
Template Parameters
ERGB scalar or existing color expression type.
Parameters
expressionOwned foreground expression, validated by the consuming sheet.
Returns
Existing foreground declaration with identical token and materialization semantics.

◆ flatRule() [1/2]

template<class... P, class S, class... D>
requires (detail::IsPssSelector<S>::value && (detail::IsDeclaration<D>::value && ...))
FlatRule portals::style::ct::flatRule ( detail::Parameters< P... > definitions,
S selector,
D... declarations )
consteval

Evaluate one typed rule into nongeneric scalar data before array construction.

Template Parameters
PExisting scalar parameter-definition types; identities must be unique.
SExisting static selector type, including the universal compound selector API.
DExisting typed declarations, at most one per destination with exact evaluated types.
Parameters
definitionsOwned parameter definitions borrowed only during immediate default evaluation.
selectorOwning static selector; only its template-static name storage is observed by the returned rule.
declarationsOwning expressions evaluated once from parameter defaults, then discarded.
Returns
Nongeneric immutable scalar snapshot; it does not participate in LiveTheme updates. Token names, exact scalar types, selector grammar, state, duplicate properties, and width are checked here.

◆ flatRule() [2/2]

template<class S, class... D>
requires (detail::IsPssSelector<S>::value && (detail::IsDeclaration<D>::value && ...))
FlatRule portals::style::ct::flatRule ( S selector,
D... declarations )
consteval
Template Parameters
SExisting owning static selector type.
DExisting typed scalar declarations or constant expressions requiring no parameters.
Parameters
selectorOwning static selector copied through its static identity storage.
declarationsConstant expressions evaluated immediately; unknown tokens are rejected.
Returns
Nongeneric scalar snapshot for the array compactSheet() API.

◆ foreground()

template<class E>
auto portals::style::ct::foreground ( E expression)
consteval
Template Parameters
EColor or color expression type.
Parameters
expressionForeground value evaluated when the sheet is materialized.
Returns
Typed declaration.

◆ frameEndsBackground()

template<class E>
auto portals::style::ct::frameEndsBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameEndsBold()

template<class E>
auto portals::style::ct::frameEndsBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameEndsForeground()

template<class E>
auto portals::style::ct::frameEndsForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameEndsItalic()

template<class E>
auto portals::style::ct::frameEndsItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameEndsUnderline()

template<class E>
auto portals::style::ct::frameEndsUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameLineBackground()

template<class E>
auto portals::style::ct::frameLineBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameLineBold()

template<class E>
auto portals::style::ct::frameLineBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameLineForeground()

template<class E>
auto portals::style::ct::frameLineForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameLineItalic()

template<class E>
auto portals::style::ct::frameLineItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameLineUnderline()

template<class E>
auto portals::style::ct::frameLineUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameTitleBackground()

template<class E>
auto portals::style::ct::frameTitleBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameTitleBold()

template<class E>
auto portals::style::ct::frameTitleBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameTitleForeground()

template<class E>
auto portals::style::ct::frameTitleForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameTitleItalic()

template<class E>
auto portals::style::ct::frameTitleItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ frameTitleUnderline()

template<class E>
auto portals::style::ct::frameTitleUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed frame declaration.

◆ glyphFallback()

template<class E>
auto portals::style::ct::glyphFallback ( E expression)
consteval
Template Parameters
EOwning enum expression.
Parameters
expressionPortable admission fallback.
Returns
Typed declaration.

◆ glyphProfile()

template<class E>
auto portals::style::ct::glyphProfile ( E expression)
consteval
Template Parameters
EOwning enum expression.
Parameters
expressionNamed glyph map.
Returns
Typed declaration.

◆ id()

template<detail::Literal Name>
auto portals::style::ct::id ( StyleState state = StyleState::ANY,
bool readOnly = false )
consteval
Template Parameters
NameStatic owned target identity, validated by the consuming API.
Parameters
stateOptional presentation-state predicate.
readOnlyRequire the orthogonal view-only fact.
Returns
Owning ID selector with no widget-type constraint.

◆ italic()

template<class E>
auto portals::style::ct::italic ( E expression)
consteval
Template Parameters
EBoolean or boolean token type.
Parameters
expressionItalic value evaluated when the sheet is materialized.
Returns
Typed declaration.

◆ live()

template<class S>
requires detail::IsSheet<S>::value
auto portals::style::ct::live ( ManagedScene & scene,
const S & description )
Template Parameters
SValidated static stylesheet type.
Parameters
sceneExisting managed owner; its Application must outlive it as usual.
descriptionOwning description copied before the existing engine installs its default values.
Returns
Copyable observer or original managed/style failure; no second cascade or retained UI tree.

◆ materialize() [1/2]

template<std::size_t R, std::size_t C, std::size_t D, std::size_t B>
StyleSheet portals::style::ct::materialize ( const CompactSheet< R, C, D, B > & description)
Template Parameters
RNumeric rule capacity.
CNumeric class capacity.
DNumeric declaration capacity.
BNumeric owning-text capacity.
Parameters
descriptionImmutable owning snapshot borrowed only during conversion.
Returns
Ordinary owning StyleSheet; allocations may throw bad_alloc, including checked container copies. This deliberately discards provenance. Use materializeDocument() to retain all source metadata.

◆ materialize() [2/2]

template<class S>
requires detail::IsSheet<S>::value
StyleSheet portals::style::ct::materialize ( const S & description)
Template Parameters
SValidated constant sheet type.
Parameters
descriptionOwning description, borrowed only during this conversion.
Returns
Ordinary owning stylesheet with default parameter values; allocation may throw. The existing engine remains responsible for specificity, source order and invalidation.

◆ materializeDocument()

template<std::size_t R, std::size_t C, std::size_t D, std::size_t B>
std::expected< PssDocument, PssError > portals::style::ct::materializeDocument ( const CompactSheet< R, C, D, B > & description)
Template Parameters
RNumeric rule capacity.
CNumeric class capacity.
DNumeric declaration capacity.
BNumeric owning-text capacity.
Parameters
descriptionImmutable owning snapshot borrowed only during conversion.
Returns
Complete owning document or ALLOCATION/NO_MEMORY; all allocation and checked return transfers are caught. Input storage and the descriptor may be destroyed after a successful return.

◆ minWidth()

template<class E>
auto portals::style::ct::minWidth ( E expression)
consteval
Template Parameters
Eint32_t or integer token type.
Parameters
expressionMinimum width evaluated when the sheet is materialized; must be nonnegative.
Returns
Typed declaration, permitted only on an ANY-state selector.

◆ mix()

template<class Left, class Right>
auto portals::style::ct::mix ( Left left,
Right right,
std::int32_t percentage )
consteval

Blend colors using integral components, rounding down.

Template Parameters
LeftConstant color or nested color expression type.
RightConstant color or nested color expression type.
Parameters
leftColor selected at zero percent.
rightColor selected at one hundred percent.
percentageConstant blend factor in [0, 100].
Returns
Owning acyclic expression; token names and color types are validated by sheet().

◆ parameter()

template<detail::Literal Name, detail::ParameterValue T>
auto portals::style::ct::parameter ( T initial)
consteval
Template Parameters
NameNonempty parameter name, owned in the type.
TExactly RgbColor, bool or int32_t.
Parameters
initialConstant default value; metric constraints are validated by sheet().
Returns
Owning typed parameter definition.

◆ parameters()

template<class... P>
requires (detail::IsParameter<P>::value && ...)
auto portals::style::ct::parameters ( P... entries)
consteval
Template Parameters
PTyped parameter definition pack; names must be unique.
Parameters
entriesConstant definitions, copied into the resulting value.
Returns
Owning parameter set; an empty set is supported.

◆ pss() [1/2]

template<std::size_t N>
auto portals::style::ct::pss ( const char(&) bytes[N],
std::string_view sourceName = std::string_view{} )
consteval

Convenient strict PSS literal snapshot, with bounded numeric public capacities.

Template Parameters
NLiteral byte extent including its final terminator.
Parameters
bytesConstant array, at most MAX_CT_PSS_BYTES excluding its final terminator.
sourceNameConstant UTF-8 identity copied into the shared arena, or empty for anonymous input.
Returns
Immutable owning scalar snapshot; materialization and scene installation remain runtime. Failures name a category and compiler invocation location. Use the provider overload for precise PSS coordinates.

◆ pss() [2/2]

template<detail::PssSourceProvider Source, detail::PssSourceProvider Origin = detail::AnonymousPssSource>
auto portals::style::ct::pss ( Source source,
Origin origin = {} )
consteval

Strict PSS provider with exact storage capacities and bounded coordinate diagnostics.

Template Parameters
SourceCaptureless default-constructible constant callable returning exactly string_view.
OriginSame provider contract for a UTF-8 source identity; defaults to anonymous.
Parameters
sourceType-only provider; its constant bytes retain their explicit extent, including embedded NUL.
originType-only source-identity provider; no callback is retained.
Returns
Exact-sized owning scalar snapshot with a numeric public type. Use a string_view literal suffix or text(literal); const char* providers are rejected before parsing.

◆ rgb()

RgbColor portals::style::ct::rgb ( std::int32_t red,
std::int32_t green,
std::int32_t blue )
consteval

Validate and construct a constant RGB value without narrowing first.

Parameters
redRed component in [0, 255].
greenGreen component in [0, 255].
blueBlue component in [0, 255].
Returns
Existing RGB value.

◆ rule()

template<class S, class... D>
requires (detail::IsDeclaration<D>::value && ...)
auto portals::style::ct::rule ( S target,
D... declarations )
consteval
Template Parameters
SConstant selector type returned by selector().
DConstant declaration pack, with at most one declaration of each kind.
Parameters
targetSelector copied into the rule.
declarationsDeclarations copied into the rule; an empty rule is supported.
Returns
Owning rule; sheet() validates token names, types and default metrics.

◆ scrollbarArrowPattern()

template<class E>
auto portals::style::ct::scrollbarArrowPattern ( E expression)
consteval
Template Parameters
EOwning enum expression.
Parameters
expressionIndependent source.
Returns
Typed declaration.

◆ scrollbarArrowsBackground()

template<class E>
auto portals::style::ct::scrollbarArrowsBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarArrowsBold()

template<class E>
auto portals::style::ct::scrollbarArrowsBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarArrowsForeground()

template<class E>
auto portals::style::ct::scrollbarArrowsForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarArrowsItalic()

template<class E>
auto portals::style::ct::scrollbarArrowsItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarArrowsUnderline()

template<class E>
auto portals::style::ct::scrollbarArrowsUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarCornerBackground()

template<class E>
auto portals::style::ct::scrollbarCornerBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarCornerBold()

template<class E>
auto portals::style::ct::scrollbarCornerBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarCornerForeground()

template<class E>
auto portals::style::ct::scrollbarCornerForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarCornerItalic()

template<class E>
auto portals::style::ct::scrollbarCornerItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarCornerUnderline()

template<class E>
auto portals::style::ct::scrollbarCornerUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarEndsBackground()

template<class E>
auto portals::style::ct::scrollbarEndsBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarEndsBold()

template<class E>
auto portals::style::ct::scrollbarEndsBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarEndsForeground()

template<class E>
auto portals::style::ct::scrollbarEndsForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarEndsItalic()

template<class E>
auto portals::style::ct::scrollbarEndsItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarEndsUnderline()

template<class E>
auto portals::style::ct::scrollbarEndsUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarThumbBackground()

template<class E>
auto portals::style::ct::scrollbarThumbBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarThumbBodyBackground()

template<class E>
auto portals::style::ct::scrollbarThumbBodyBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbBodyBold()

template<class E>
auto portals::style::ct::scrollbarThumbBodyBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbBodyForeground()

template<class E>
auto portals::style::ct::scrollbarThumbBodyForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbBodyItalic()

template<class E>
auto portals::style::ct::scrollbarThumbBodyItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbBodyUnderline()

template<class E>
auto portals::style::ct::scrollbarThumbBodyUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbBold()

template<class E>
auto portals::style::ct::scrollbarThumbBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarThumbEndBackground()

template<class E>
auto portals::style::ct::scrollbarThumbEndBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbEndBold()

template<class E>
auto portals::style::ct::scrollbarThumbEndBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbEndForeground()

template<class E>
auto portals::style::ct::scrollbarThumbEndForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbEndItalic()

template<class E>
auto portals::style::ct::scrollbarThumbEndItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbEndUnderline()

template<class E>
auto portals::style::ct::scrollbarThumbEndUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbForeground()

template<class E>
auto portals::style::ct::scrollbarThumbForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarThumbItalic()

template<class E>
auto portals::style::ct::scrollbarThumbItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarThumbPattern()

template<class E>
auto portals::style::ct::scrollbarThumbPattern ( E expression)
consteval
Template Parameters
EOwning enum expression.
Parameters
expressionIndependent source.
Returns
Typed declaration.

◆ scrollbarThumbSingleBackground()

template<class E>
auto portals::style::ct::scrollbarThumbSingleBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbSingleBold()

template<class E>
auto portals::style::ct::scrollbarThumbSingleBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbSingleForeground()

template<class E>
auto portals::style::ct::scrollbarThumbSingleForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbSingleItalic()

template<class E>
auto portals::style::ct::scrollbarThumbSingleItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbSingleUnderline()

template<class E>
auto portals::style::ct::scrollbarThumbSingleUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbStartBackground()

template<class E>
auto portals::style::ct::scrollbarThumbStartBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbStartBold()

template<class E>
auto portals::style::ct::scrollbarThumbStartBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbStartForeground()

template<class E>
auto portals::style::ct::scrollbarThumbStartForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbStartItalic()

template<class E>
auto portals::style::ct::scrollbarThumbStartItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbStartUnderline()

template<class E>
auto portals::style::ct::scrollbarThumbStartUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionSegment attribute.
Returns
Typed thumb segment declaration.

◆ scrollbarThumbUnderline()

template<class E>
auto portals::style::ct::scrollbarThumbUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarTrackBackground()

template<class E>
auto portals::style::ct::scrollbarTrackBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarTrackBold()

template<class E>
auto portals::style::ct::scrollbarTrackBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarTrackForeground()

template<class E>
auto portals::style::ct::scrollbarTrackForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarTrackItalic()

template<class E>
auto portals::style::ct::scrollbarTrackItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ scrollbarTrackPattern()

template<class E>
auto portals::style::ct::scrollbarTrackPattern ( E expression)
consteval
Template Parameters
EOwning enum expression.
Parameters
expressionIndependent source.
Returns
Typed declaration.

◆ scrollbarTrackUnderline()

template<class E>
auto portals::style::ct::scrollbarTrackUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart attribute.
Returns
Typed scrollbar declaration.

◆ selector()

template<detail::Literal Type = "", detail::Literal Id = "", detail::Literal... Classes>
auto portals::style::ct::selector ( StyleState state = StyleState::ANY,
bool readOnly = false )
consteval
Template Parameters
TypeExisting runtime widget type name; empty and "*" match every type.
IdOptional target ID; empty matches every ID.
ClassesRequired class names, all of which must match the target.
Parameters
stateExisting pseudo-state; metric declarations require ANY.
readOnlyRequire view-only; metric declarations require false.
Returns
Owning selector description; bytes retain existing runtime matching semantics.

◆ sheet()

template<class P, class... R>
requires (detail::IsRule<R>::value && ...)
auto portals::style::ct::sheet ( P values,
R... rules )
consteval
Template Parameters
PParameter-set type returned by parameters().
RConstant rule pack, preserving source order.
Parameters
valuesOwning parameter definitions and defaults.
rulesOwning rules; bounded by MAX_STYLE_RULES.
Returns
Validated immutable description usable in a constant expression.

◆ sliderFillBackground()

template<class E>
auto portals::style::ct::sliderFillBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderFillBold()

template<class E>
auto portals::style::ct::sliderFillBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderFillForeground()

template<class E>
auto portals::style::ct::sliderFillForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderFillItalic()

template<class E>
auto portals::style::ct::sliderFillItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderFillUnderline()

template<class E>
auto portals::style::ct::sliderFillUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderThumbBackground()

template<class E>
auto portals::style::ct::sliderThumbBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderThumbBold()

template<class E>
auto portals::style::ct::sliderThumbBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderThumbForeground()

template<class E>
auto portals::style::ct::sliderThumbForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderThumbItalic()

template<class E>
auto portals::style::ct::sliderThumbItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderThumbUnderline()

template<class E>
auto portals::style::ct::sliderThumbUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderTrackBackground()

template<class E>
auto portals::style::ct::sliderTrackBackground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderTrackBold()

template<class E>
auto portals::style::ct::sliderTrackBold ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderTrackForeground()

template<class E>
auto portals::style::ct::sliderTrackForeground ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderTrackItalic()

template<class E>
auto portals::style::ct::sliderTrackItalic ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ sliderTrackUnderline()

template<class E>
auto portals::style::ct::sliderTrackUnderline ( E expression)
consteval
Template Parameters
EOwning scalar expression.
Parameters
expressionPart paint leaf.
Returns
Typed Slider declaration.

◆ text()

template<std::size_t N>
std::string_view portals::style::ct::text ( const char(&) bytes[N])
constexpr

Preserve the complete extent of a literal for rich compile-time diagnostics.

Template Parameters
NLiteral array extent including the final terminator.
Parameters
bytesConstant array; embedded NUL bytes remain part of the returned extent.
Returns
Borrowed explicit-length bytes; a provider must return static literal storage.

◆ themeFromTokens()

template<class... P, class... R>
requires (detail::IsRule<R>::value && ...)
auto portals::style::ct::themeFromTokens ( ThemeTokens defaults,
detail::Parameters< P... > extraParameters = {},
R... extraRules )
consteval

Constant counterpart of portals::themeFromTokens with live named color parameters.

Template Parameters
POptional extra parameter definitions; standard color names are reserved by uniqueness checks.
ROptional extra rules appended after the standard-state and RadioGroup rules.
Parameters
defaultsDefault foreground, background, accent, muted, selection and heading colors.
extraParametersAdditional owning definitions, for example a control-specific minimum width.
extraRulesAdditional owning rules, preserving the existing cascade's source-order behavior.
Returns
Validated owning sheet with standard token names matching ThemeTokens member names.

◆ token()

template<detail::Literal Name>
auto portals::style::ct::token ( )
consteval
Template Parameters
NameParameter name, checked for existence and type by sheet().
Returns
Constant expression observing a parameter value by name.

◆ type()

template<detail::Literal Name>
auto portals::style::ct::type ( StyleState state = StyleState::ANY,
bool readOnly = false )
consteval
Template Parameters
NameStatic owned widget type, validated by the consuming API.
Parameters
stateOptional presentation-state predicate.
readOnlyRequire the orthogonal view-only fact.
Returns
Owning type selector with no ID constraint.

◆ underline()

template<class E>
auto portals::style::ct::underline ( E expression)
consteval
Template Parameters
EBoolean or boolean token type.
Parameters
expressionUnderline value evaluated when the sheet is materialized.
Returns
Typed declaration.