Show / Hide Table of Contents

Class SettableViewport<T>

Similar to Viewport<T>, but implements ISettableGridView<T> and thus implements "set" functionality via relative coordinates.

Inheritance
object
GridViewBase<T>
Viewport<T>
SettableViewport<T>
Implements
ISettableGridView<T>
IGridView<T>
Inherited Members
Viewport<T>.SetViewArea(Rectangle)
Viewport<T>.ToString()
Viewport<T>.ToString(Func<T, string>)
Viewport<T>.ToString(int, Func<T, string>)
Viewport<T>.ViewArea
Viewport<T>.Height
Viewport<T>.Width
GridViewBase<T>.Count
object.GetType()
object.MemberwiseClone()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
Namespace: SadRogue.Primitives.GridViews
Assembly: TheSadRogue.Primitives.dll
Syntax
public class SettableViewport<T> : Viewport<T>, ISettableGridView<T>, IGridView<T>
Type Parameters
Name Description
T

Type being exposed by map view.

Constructors

View Source

SettableViewport(ISettableGridView<T>)

Constructor. Takes the map view to represent. The viewport will represent the entire given map view.

Declaration
public SettableViewport(ISettableGridView<T> gridView)
Parameters
Type Name Description
ISettableGridView<T> gridView

The map view to represent.

View Source

SettableViewport(ISettableGridView<T>, Rectangle)

Constructor. Takes the parent map view, and the initial subsection of that map view to represent.

Declaration
public SettableViewport(ISettableGridView<T> gridView, Rectangle viewArea)
Parameters
Type Name Description
ISettableGridView<T> gridView

The map view being represented.

Rectangle viewArea

The initial subsection of that map to represent.

Properties

View Source

GridView

The map view that this viewport is exposing values from.

Declaration
public ISettableGridView<T> GridView { get; }
Property Value
Type Description
ISettableGridView<T>
View Source

this[Point]

Given a position in relative coordinates, sets/returns the "value" associated with that location in absolute coordinates.

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

Viewport-relative position of the location to retrieve/set the value for.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

View Source

this[int]

Given a position in relative 1d-array-index style, returns/sets the "value" associated with that location in absolute coordinates.

Declaration
public T this[int relativeIndex1D] { get; set; }
Parameters
Type Name Description
int relativeIndex1D

Viewport-relative position of the location to retrieve/set the value for, as a 1D array index.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

View Source

this[int, int]

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

Declaration
public T this[int relativeX, int relativeY] { get; set; }
Parameters
Type Name Description
int relativeX

Viewport-relative X-value of location.

int relativeY

Viewport-relative Y-value of location.

Property Value
Type Description
T

The "value" associated with the absolute location represented on the underlying map view.

Implements

ISettableGridView<T>
IGridView<T>

Extension Methods

GridViewExtensions.Bounds<T>(IGridView<T>)
GridViewExtensions.Contains<T>(IGridView<T>, Point)
GridViewExtensions.Contains<T>(IGridView<T>, int, int)
GridViewExtensions.ExtendToString<T>(IGridView<T>, int, string, string, Func<T, string>?, string, string, string, string)
GridViewExtensions.ExtendToString<T>(IGridView<T>, string, string, Func<T, string>?, string, string, string, string)
GridViewExtensions.Positions<T>(IGridView<T>)
GridViewExtensions.ApplyOverlay<T>(ISettableGridView<T>, IGridView<T>)
GridViewExtensions.ApplyOverlay<T>(ISettableGridView<T>, Func<Point, T>)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?)
PropertyChangedEventHelpers.SafelySetProperty<TObject, TProperty>(TObject, ref TProperty, TProperty, EventHandler<ValueChangedEventArgs<TProperty>>?, EventHandler<ValueChangedEventArgs<TProperty>>?)
  • View Source
In this article
Back to top Generated by DocFX