Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
portals::ui::LiveThemeRef< S > Class Template Reference

Weak typed live parameter observation, never owning a controller or UI owner. More...

#include <ui_style.hpp>

Public Member Functions

 LiveThemeRef ()=default
 Construct an empty observer; operations return CLOSED.
template<style::ct::detail::Literal Name>
auto get (std::source_location origin=std::source_location::current()) const
template<style::ct::detail::Literal Name, class T>
std::expected< bool, ManagedError > set (T value, std::source_location origin=std::source_location::current()) const
template<class... C>
std::expected< bool, ManagedError > apply (C... changes) const

Friends

template<class>
class LiveThemeStage

Detailed Description

template<class S>
class portals::ui::LiveThemeRef< S >

Weak typed live parameter observation, never owning a controller or UI owner.

Template Parameters
SExisting validated static stylesheet type. Before first successful bind and after facade cleanup operations return CLOSED. Foreign-thread calls reject before mutable descriptor, weak target, or raw ManagedScene access.

Member Function Documentation

◆ apply()

template<class S>
template<class... C>
std::expected< bool, ManagedError > portals::ui::LiveThemeRef< S >::apply ( C... changes) const
inline
Template Parameters
CExisting named update types; names unique and values exact.
Parameters
changesCandidates committed together through the existing controller.
Returns
True for change, false for equality, or exact recoverably reported failure.

◆ get()

template<class S>
auto portals::ui::LiveThemeRef< S >::get ( std::source_location origin = std::source_location::current()) const
inline
Template Parameters
NameKnown parameter name in S.
Parameters
originRead call site retained in recoverable diagnostics.
Returns
Current scalar or exact typed error; recoverable failures go to a live UI collector.

◆ set()

template<class S>
template<style::ct::detail::Literal Name, class T>
std::expected< bool, ManagedError > portals::ui::LiveThemeRef< S >::set ( T value,
std::source_location origin = std::source_location::current() ) const
inline
Template Parameters
NameKnown parameter name in S.
TExact existing parameter scalar type.
Parameters
valueCandidate scalar, admitted atomically through existing LiveTheme.
originUpdate site retained in recoverable diagnostics.
Returns
True for change, false for equality, or exact failure without facade sticky failure.

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