Class NoxSelection
- Namespace
- Nox.Grid
- Assembly
- Nox.Grid.dll
A union of cell ranges (selections added with Ctrl). The last range is the target of Shift extension.
public sealed class NoxSelection
- Inheritance
-
NoxSelection
- Inherited Members
Properties
Bounds
The range enclosing all ranges.
public NoxCellRange Bounds { get; }
Property Value
Count
Number of selected ranges.
public int Count { get; }
Property Value
IsEmpty
Whether nothing is selected.
public bool IsEmpty { get; }
Property Value
Ranges
The selected ranges, in the order they were selected.
public IReadOnlyList<NoxCellRange> Ranges { get; }
Property Value
Methods
Add(NoxCellRange)
Adds a range.
public void Add(NoxCellRange range)
Parameters
rangeNoxCellRange
Clear()
Removes every range.
public void Clear()
Clip(int, int)
Clips parts that fall outside the bounds (when the row or column count decreases).
public void Clip(int rowCount, int columnCount)
Parameters
Contains(int, int)
Whether the cell is in any selected range.
public bool Contains(int row, int column)
Parameters
Returns
ContainsRow(int)
Whether the row is in any selected range.
public bool ContainsRow(int row)
Parameters
rowint
Returns
GetRows()
Rows spanned by the selection (ascending, no duplicates).
public int[] GetRows()
Returns
- int[]
ReplaceLast(NoxCellRange)
Replaces the last range (adds one if none) - Shift extension.
public void ReplaceLast(NoxCellRange range)
Parameters
rangeNoxCellRange
Set(NoxCellRange)
Replaces the selection with a single range.
public void Set(NoxCellRange range)
Parameters
rangeNoxCellRange