EN
RU
Portals
0.7.0 · dev
0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Toggle main menu visibility
Loading...
Searching...
No Matches
style_source.hpp
1
// Copyright (c) 2026 ttldtor.
2
// SPDX-License-Identifier: BSL-1.0
3
#pragma once
4
5
#include <portals/detail/pss_data.hpp>
6
7
namespace
portals
{
8
namespace
detail {
13
std::expected<void, PssError> validateStyleDocument(
const
PssDocument &document);
14
}
// namespace detail
15
19
struct
StyleLayerSource
{
21
~StyleLayerSource
() =
default
;
22
23
StyleLayerHandle
handle
;
24
StyleTier
tier
{
StyleTier::DEFAULTS
};
25
std::string
name
{
""
};
26
std::shared_ptr<const PssDocument>
document
;
27
};
28
}
// namespace portals
portals::StyleLayerHandle
Weak UI-affine observer; destruction does not remove its layer.
Definition
style.hpp:272
portals
Public Portals API.
Definition
action.hpp:8
portals::StyleTier
StyleTier
Independent cascade priority, before selector specificity.
Definition
style.hpp:251
portals::StyleTier::DEFAULTS
@ DEFAULTS
Declarations above widget defaults and below all other tiers.
Definition
style.hpp:252
portals::StyleLayerSource
Owning provenance snapshot for one real engine layer, including unknown typed sources....
Definition
style_source.hpp:19
portals::StyleLayerSource::name
std::string name
Owned engine layer identity, independent of the document source label.
Definition
style_source.hpp:25
portals::StyleLayerSource::handle
StyleLayerHandle handle
UI-affine weak identity; stale after removal, whole replacement, or scene destruction.
Definition
style_source.hpp:23
portals::StyleLayerSource::document
std::shared_ptr< const PssDocument > document
Owned immutable metadata, or null for a low-level/unknown source.
Definition
style_source.hpp:26
portals::StyleLayerSource::tier
StyleTier tier
Actual cascade priority of the observed layer.
Definition
style_source.hpp:24
portals::StyleLayerSource::~StyleLayerSource
~StyleLayerSource()=default
Suppress implicit noexcept moves because checked MSVC string transfers can allocate.
include
portals
style_source.hpp