Shared owning, UI-affine scroll values built on the existing ScrollState. The controller owns no tree/widget/router references or observer runtime. Public access is read-only after checked creation; mounted commands must use their checked node/tree owner. Shared ownership does not permit concurrent mutation. Final destruction only releases values and may occur on any thread; checked queries require the creating UI thread.
More...
#include <scroll_controller.hpp>
|
|
| ~ScrollController () |
| | Release values; no callbacks, tree access or thread-affine cleanup occurs.
|
|
| ScrollController (const ScrollController &)=delete |
|
ScrollController & | operator= (const ScrollController &)=delete |
| std::expected< ScrollControllerSnapshot, TreeError > | snapshot () const noexcept |
| | Observe both axes atomically on the creating UI thread.
|
|
|
struct | detail::ScrollControllerAccess |
Shared owning, UI-affine scroll values built on the existing ScrollState. The controller owns no tree/widget/router references or observer runtime. Public access is read-only after checked creation; mounted commands must use their checked node/tree owner. Shared ownership does not permit concurrent mutation. Final destruction only releases values and may occur on any thread; checked queries require the creating UI thread.
◆ create()
Validate and atomically create both initial axes on the current UI thread.
- Parameters
-
| options | Owning metrics and intended offsets; all uint64 metrics are supported. |
- Returns
- Shared controller, INVALID_ARGUMENT for an invalid fraction, or NO_MEMORY.
- Note
- Initial positions clamp to extent-viewport, with position zero for a zero viewport. No tree mutation, invalidation, callbacks or terminal I/O occur.
◆ snapshot()
Observe both axes atomically on the creating UI thread.
- Returns
- Owning values from one revision, or WRONG_THREAD without reading mutable state.
- Note
- No allocation, mutation, invalidation, callbacks or borrowed result storage.
The documentation for this class was generated from the following file: