Get the total number of sections in the list.
This operation has O(1)
complexity.
Get the total size of all sections in the list.
This operation has O(1)
complexity.
Find the index of the section which covers the given offset.
The positive offset position of interest.
The index of the section which covers the given offset,
or -1
if the offset is out of range.
This operation has O(log n)
complexity.
Insert new sections into the list.
The index at which to insert the first section. This value is clamped to the bounds of the list.
The number of sections to insert. This must be greater than zero.
The size of each section. This value is clamped
to a lower bound of 0
.
The index of the first inserted section, or -1 if
the count is <= 0
.
This operation has O(log n)
complexity.
Find the offset position of the section at the given index.
The index of the section of interest.
The offset position of the section at the given index,
or -1
if the index is out of range.
This operation has O(log n)
complexity.
Remove existing sections from the list.
The index of the first section to remove.
The number of sections to remove. This must be greater than zero.
The actual number of sections removed.
This operation has O(log n)
complexity.
Any sections which are out of range will be ignored.
Resize existing sections in the list.
The index of the first section to resize.
The number of sections to resize. This must be greater than zero.
The new size of each section. This value is clamped
to a lower bound of 0
.
The actual number of sections resized.
This operation has O(log n)
complexity.
Any sections which are out of range will be ignored.
Find the size of the section at the given index.
The index of the section of interest.
The size of the section at the given index, or -1
if
the index is out of range.
This operation has O(log n)
complexity.
Generated using TypeDoc
An object which manages a collection of variable sized sections.
A section list is well suited to managing row heights in virtually scrolling list controls. In these controls, most rows are uniform height while a handful of rows are variable sized. A pair of lists can be used to efficiently manage a virtually scrolling data grid.
A section list has guaranteed
O(log n)
worst-case performance for most operations, wheren
is the number of variable sized sections.