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

Bounded real widget subtrees, independent of the text-only VirtualList. More...

#include <virtual_rows.hpp>

Inheritance diagram for portals::VirtualRows< T >:
portals::VirtualRows< T >portals::VirtualRows< T > portals::SizedWidget portals::Layout portals::Widget portals::LayoutItem

Public Types

using VirtualRow = T
 Domain row used by the host's typed observing facade.

Public Member Functions

std::uint64_t firstRow () const noexcept
std::optional< TreeError > lastError () const noexcept
std::optional< std::uint64_t > rowCount () const noexcept
std::optional< WindowStatus > windowStatus () const noexcept
std::optional< SourceError > sourceError () const noexcept
std::optional< SourceCursor > recoveryCursor () const noexcept
std::optional< SourceCapabilities > capabilities () const noexcept
std::size_t mountedRows () const noexcept
VirtualRowsPosition position () const noexcept
std::expected< CellSize, TreeError > childAvailable (CellSize available) const override
std::expected< CellSize, TreeError > measureChildren (std::span< const MeasuredChild >) const override
 Ignore child measurements.
std::expected< std::vector< CellRect >, TreeError > arrangeChildren (std::span< const MeasuredChild > children, CellSize available) const override
std::expected< void, TreeError > arrange (CellRect local) override
std::expected< void, TreeError > paint (PaintContext &context) override
Public Member Functions inherited from portals::SizedWidget
 SizedWidget (SizePolicy policy={})
 Own the supplied policies; checked by layout.
SizePolicy sizePolicy () const override
 Copy current policy without borrowing storage.
Public Member Functions inherited from portals::Widget
virtual ~Widget ()=default
 Destroy on UI after the last active tree borrow.
virtual void mount ()
 Called exactly once after attachment; exceptions are reported.
virtual void unmount ()
 Called once before destruction, children first; cleanup continues on exceptions.
virtual std::expected< CellSize, TreeError > measure (CellSize available)
 Default desired size is empty.
virtual ComputedStyle styleDefaults () const
 Read manual presentation defaults during style staging on UI.
virtual bool styleReadOnly () const noexcept
 Read actual view-only state during style staging; false by default.
const std::shared_ptr< const StyleSnapshot > & computedStyle () const noexcept
 Inspect the last atomically installed theme inside tree.read/frame.
std::uint64_t styleRevision () const noexcept
Public Member Functions inherited from portals::LayoutItem
virtual ~LayoutItem ()=default
 Destroy with the implementing widget.
Public Member Functions inherited from portals::Layout
virtual ~Layout ()=default
 Destroy with the implementing widget.
virtual std::expected< CellRect, TreeError > childClip (CellSize available) const
 Clip descendants within this container without changing allocation.
virtual std::expected< LayoutChildPolicy, TreeError > childLayoutFor (NodeId child, CellSize available) const
 Describe one child's clip and reveal policy after arrangeChildren.

Detailed Description

template<class T>
class portals::VirtualRows< T >

Bounded real widget subtrees, independent of the text-only VirtualList.

Template Parameters
TImmutable domain row type supplied to the declarative row factory. Layout only places committed assignments; factories and managed mutation run between frames.

Member Function Documentation

◆ arrange()

template<class T>
std::expected< void, TreeError > portals::VirtualRows< T >::arrange ( CellRect local)
inlineoverridevirtual
Parameters
localAllocated host rectangle.
Returns
Success after retaining zero-origin paint bounds.

Reimplemented from portals::Widget.

◆ arrangeChildren()

template<class T>
std::expected< std::vector< CellRect >, TreeError > portals::VirtualRows< T >::arrangeChildren ( std::span< const MeasuredChild > children,
CellSize available ) const
inlineoverridevirtual
Parameters
childrenVisible committed children.
availableAllocated viewport.
Returns
Bounded row rectangles; never reads a model or calls a factory.

Implements portals::Layout.

◆ capabilities()

template<class T>
std::optional< SourceCapabilities > portals::VirtualRows< T >::capabilities ( ) const
inlinenoexcept
Returns
Captured native traversal capabilities, or empty for finite sources.

◆ childAvailable()

template<class T>
std::expected< CellSize, TreeError > portals::VirtualRows< T >::childAvailable ( CellSize available) const
inlineoverridevirtual
Parameters
availableOffered viewport cells.
Returns
Width after gutters and fixed or natural measurement bounds.

Implements portals::Layout.

◆ firstRow()

template<class T>
std::uint64_t portals::VirtualRows< T >::firstRow ( ) const
inlinenoexcept
Returns
Last committed first finite ordinal; unknown-total hosts use cursor navigation instead.

◆ lastError()

template<class T>
std::optional< TreeError > portals::VirtualRows< T >::lastError ( ) const
inlinenoexcept
Returns
Last checked asynchronous preparation failure, or empty after success.

◆ measureChildren()

template<class T>
std::expected< CellSize, TreeError > portals::VirtualRows< T >::measureChildren ( std::span< const MeasuredChild > ) const
inlineoverridevirtual

Ignore child measurements.

Returns
Empty intrinsic extent; size policy owns viewport sizing.

Implements portals::Layout.

◆ mountedRows()

template<class T>
std::size_t portals::VirtualRows< T >::mountedRows ( ) const
inlinenoexcept
Returns
Number of currently displayed real row subtrees.

◆ paint()

template<class T>
std::expected< void, TreeError > portals::VirtualRows< T >::paint ( PaintContext & context)
inlineoverridevirtual
Parameters
contextSynchronous frame sink.
Returns
Marker submission or the original sink error.

Reimplemented from portals::Widget.

◆ position()

template<class T>
VirtualRowsPosition portals::VirtualRows< T >::position ( ) const
inlinenoexcept
Returns
Owning last committed position; acquisition neither prepares nor reads source rows.

◆ recoveryCursor()

template<class T>
std::optional< SourceCursor > portals::VirtualRows< T >::recoveryCursor ( ) const
inlinenoexcept
Returns
Explicit native history-recovery cursor; never followed implicitly.

◆ rowCount()

template<class T>
std::optional< std::uint64_t > portals::VirtualRows< T >::rowCount ( ) const
inlinenoexcept
Returns
Exact finite extent, or empty for native cursor sources.

◆ sourceError()

template<class T>
std::optional< SourceError > portals::VirtualRows< T >::sourceError ( ) const
inlinenoexcept
Returns
Native source's exact retained protocol failure, independent of tree errors.

◆ windowStatus()

template<class T>
std::optional< WindowStatus > portals::VirtualRows< T >::windowStatus ( ) const
inlinenoexcept
Returns
Native source protocol outcome; finite models return empty.

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