Show / Hide Table of Contents

Interface ISettableGridView<T>

Interface designed to act as a standardized input/output format that defines minimal required data for algorithms that operate and make changes to a grid of some sort. For a concrete implementation to subclass for custom implementations, see SettableGridViewBase<T>.

Inherited Members
IGridView<T>.Height
IGridView<T>.Width
IGridView<T>.Count
Namespace: SadRogue.Primitives.GridViews
Assembly: TheSadRogue.Primitives.dll
Syntax
public interface ISettableGridView<T> : IGridView<T>
Type Parameters
Name Description
T

The type of value being returned/set by the indexer functions.

Remarks

See IGridView<T>. This interface serves the same purpose, but for cases when it is also necessary for an algorithm to be able to change the value at each location.

Like IGridView, a number of implementations of this interface to cover common needs are provided. For example, ArrayView<T> defines the interface such that the data is retrieved from and set to an array, and LambdaSettableGridView<T> defines the interface such that arbitrary callbacks are used to retrieve and set the data.

Properties

| Improve this Doc View Source

Item[Point]

Given a position, returns/sets the "value" associated with that location.

Declaration
T this[Point pos] { get; set; }
Parameters
Type Name Description
Point pos

Location to get/set the value for.

Property Value
Type Description
T

The "value" associated with the provided location.

| Improve this Doc View Source

Item[Int32]

Given an 1-dimensional index, returns/sets the value associated with the corresponding position in the map view.

Declaration
T this[int index1D] { get; set; }
Parameters
Type Name Description
Int32 index1D

1D index of location to get/set the "value" for.

Property Value
Type Description
T

The "value" associated with the given location.

Remarks

Typically, this may be implemented in terms of Item[Point] by using FromIndex(Int32, Int32) to calculate the 2D position represented by that 1D index, and passing that position to the Item[Point] indexer to get/set the value associated with the position.

| Improve this Doc View Source

Item[Int32, Int32]

Given an X and Y value, returns/sets the "value" associated with that location.

Declaration
T this[int x, int y] { get; set; }
Parameters
Type Name Description
Int32 x

X-value of location.

Int32 y

Y-value of location.

Property Value
Type Description
T

The "value" associated with that location.

Remarks

Typically, this can be implemented via Item[Point].

Extension Methods

GridViewExtensions.ApplyOverlay<T>(ISettableGridView<T>, IGridView<T>)
GridViewExtensions.ApplyOverlay<T>(ISettableGridView<T>, Func<Point, T>)
GridViewExtensions.Bounds<T>(IGridView<T>)
GridViewExtensions.Contains<T>(IGridView<T>, Int32, Int32)
GridViewExtensions.Contains<T>(IGridView<T>, Point)
GridViewExtensions.ExtendToString<T>(IGridView<T>, String, String, Func<T, String>, String, String, String, String)
GridViewExtensions.ExtendToString<T>(IGridView<T>, Int32, String, String, Func<T, String>, String, String, String, String)
GridViewExtensions.Fill<T>(ISettableGridView<T>, T)
GridViewExtensions.Positions<T>(IGridView<T>)
  • Improve this Doc
  • View Source
Back to top Generated by DocFX