ViewDamage struct Core

What changed on screen, as a view tells its host: everything, a span of items of the view's source, some cells of one item, or an area in content coordinates. A value, so telling it allocates nothing.

public readonly struct ViewDamage
Namespace
ArionUI.Core
Package
ArionUI.Core · dotnet add package ArionUI.Core --prerelease

Properties

All

public static ViewDamage All { get; }

Everything the view shows.

Area

public LogRect Area { get; }

The damaged area of ViewDamageKind.Area, in content coordinates.

First

public int First { get; }

The first damaged item (ViewDamageKind.Items, ViewDamageKind.Cells).

FirstColumn

public int FirstColumn { get; }

The first damaged column of ViewDamageKind.Cells.

Kind

public ViewDamageKind Kind { get; }

Which of the shapes the damage has.

Last

public int Last { get; }

The last damaged item, inclusive.

LastColumn

public int LastColumn { get; }

The last damaged column, inclusive.

Restyled

public static ViewDamage Restyled { get; }

Everything the view shows, drawn anew for its looks only (a rule's styling): no value changed, so what was worked out of the values (the selection's Σ) stays.

StylingOnly

public bool StylingOnly { get; }

Whether only the looks changed, no value (ViewDamage.Restyled).

Methods

At

public static ViewDamage At(LogRect area);

An area in content coordinates.

Cells

public static ViewDamage Cells(int item, int firstColumn, int lastColumn);

The columns firstColumn to lastColumn of one item.

Item

public static ViewDamage Item(int item);

One item of the view's source, wherever it is shown.

Items

public static ViewDamage Items(int first, int last);

The items first to last, inclusive.