Table of Contents

Struct DropdownWindow

Namespace
JD.AI.Rendering
Assembly
JD.AI.dll

Computes the visible slice of a dropdown list that keeps the selected item in view. Pure value type with no side effects — all rendering state is derived from inputs.

public readonly record struct DropdownWindow : IEquatable<DropdownWindow>
Implements
Inherited Members

Constructors

DropdownWindow(int, int)

Computes the visible slice of a dropdown list that keeps the selected item in view. Pure value type with no side effects — all rendering state is derived from inputs.

public DropdownWindow(int StartIndex, int VisibleCount)

Parameters

StartIndex int
VisibleCount int

Properties

StartIndex

public int StartIndex { get; init; }

Property Value

int

VisibleCount

public int VisibleCount { get; init; }

Property Value

int

Methods

Compute(int, int, int)

Computes a window of maxVisible items that keeps selectedIndex in view.

public static DropdownWindow Compute(int totalItems, int maxVisible, int selectedIndex)

Parameters

totalItems int
maxVisible int
selectedIndex int

Returns

DropdownWindow