Portals0.7.0 · dev (544a5c68c72e · 2026-11-28 UTC)
Loading...
Searching...
No Matches
scroll_preparation.hpp
1// Copyright (c) 2026 ttldtor.
2// SPDX-License-Identifier: BSL-1.0
3#pragma once
4
5#include <portals/layout_snapshot.hpp>
6
7namespace portals {
16
22
37std::expected<ScrollPreparationResult, TreeError> prepareScrollAreas(WidgetTree &tree,
38 std::span<const Node<ScrollArea>> areas,
39 const LayoutSnapshot &snapshot,
40 std::optional<ScrollRevealTarget> reveal = {});
41} // namespace portals
Owning immutable identities and local sizes from one completed layout pass. Copies share immutable va...
Definition layout_snapshot.hpp:43
Copyable typed observer; never owns or exposes an unchecked widget pointer.
Definition widget.hpp:92
Exclusive parent/child ownership on Scheduler's UI thread. Scheduler must outlive this object....
Definition widget.hpp:179
Public Portals API.
Definition action.hpp:8
std::expected< ScrollPreparationResult, TreeError > prepareScrollAreas(WidgetTree &tree, std::span< const Node< ScrollArea > > areas, const LayoutSnapshot &snapshot, std::optional< ScrollRevealTarget > reveal={})
Prepare all ordinary scroll areas against one immutable geometry profile.
Owning result; successful preparation does not imply successful final rendering.
Definition scroll_preparation.hpp:18
bool revealMoved
At least one integral reveal position differed from the clamped plan.
Definition scroll_preparation.hpp:20
bool layoutChanged
Metrics/raster adoption requested another existing layout pass.
Definition scroll_preparation.hpp:19
Owning one-shot reveal input for an explicit low-level scene preparation. Managed scenes retain their...
Definition scroll_preparation.hpp:12
Node< Widget > target
Full live identity whose available footprint should become visible.
Definition scroll_preparation.hpp:13
Node< Widget > root
Optional ancestor limiting reveal; empty includes all captured ancestors.
Definition scroll_preparation.hpp:14