Docs · API reference · Verso.Extensions.Utilities

CellVisibilityResolver Class#

Resolves cell visibility by evaluating the three-layer model: cell type default, user metadata override, and layout-supported states. Layouts call this as a convenience but are not required to use it.

public static class CellVisibilityResolver

Inheritance System.Object → CellVisibilityResolver

Methods#

Resolve(CellModel, CellVisibilityHint, string, IReadOnlySet<CellVisibilityState>) Method#

Resolves the visibility state for a cell within a specific layout using an explicit hint rather than an ICellRenderer instance.

public static Verso.Abstractions.CellVisibilityState Resolve(Verso.Abstractions.CellModel cell, Verso.Abstractions.CellVisibilityHint defaultHint, string layoutId, System.Collections.Generic.IReadOnlySet<Verso.Abstractions.CellVisibilityState> supportedStates);

Parameters#

cell CellModel

The cell to resolve visibility for.

defaultHint CellVisibilityHint

The default visibility hint for the cell type.

layoutId System.String

The target layout identifier.

supportedStates System.Collections.Generic.IReadOnlySet<CellVisibilityState>

The set of visibility states the layout supports.

Returns#

CellVisibilityState
The resolved visibility state, guaranteed to be within supportedStates.

Resolve(CellModel, ICellRenderer, string, IReadOnlySet<CellVisibilityState>) Method#

Resolves the visibility state for a cell within a specific layout.

public static Verso.Abstractions.CellVisibilityState Resolve(Verso.Abstractions.CellModel cell, Verso.Abstractions.ICellRenderer renderer, string layoutId, System.Collections.Generic.IReadOnlySet<Verso.Abstractions.CellVisibilityState> supportedStates);

Parameters#

cell CellModel

The cell to resolve visibility for.

renderer ICellRenderer

The cell's renderer, providing the default visibility hint.

layoutId System.String

The target layout identifier.

supportedStates System.Collections.Generic.IReadOnlySet<CellVisibilityState>

The set of visibility states the layout supports.

Returns#

CellVisibilityState
The resolved visibility state, guaranteed to be within supportedStates.