Show / Hide Table of Contents

Interface ICellSurface

An array of ColoredGlyphBase objects used to represent a 2D surface.

Inherited Members
IGridView<ColoredGlyphBase>.Height
IGridView<ColoredGlyphBase>.Width
IGridView<ColoredGlyphBase>.Count
IGridView<ColoredGlyphBase>.this[int, int]
IGridView<ColoredGlyphBase>.this[Point]
IGridView<ColoredGlyphBase>.this[int]
IEnumerable<ColoredGlyphBase>.GetEnumerator()
ISurface.Surface
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
public interface ICellSurface : IGridView<ColoredGlyphBase>, IEnumerable<ColoredGlyphBase>, IEnumerable, ISurface

Properties

Area

Returns a rectangle that represents the entire size of the surface.

Declaration
Rectangle Area { get; }
Property Value
Type Description
Rectangle

Connected3dBox

Glyph indexes for a block box that looks 3d.

Declaration
public static int[] Connected3dBox { get; }
Property Value
Type Description
int[]

ConnectedLineEmpty

Glyph indexes for an empty line 0.

Declaration
public static int[] ConnectedLineEmpty { get; }
Property Value
Type Description
int[]

ConnectedLineThick

Glyph indexes for a thick line.

Declaration
public static int[] ConnectedLineThick { get; }
Property Value
Type Description
int[]

ConnectedLineThin

Glyph indexes for a thin line.

Declaration
public static int[] ConnectedLineThin { get; }
Property Value
Type Description
int[]

ConnectedLineThinExtended

Glyph indexes for a thin line using a SadConsole extended font.

Declaration
public static int[] ConnectedLineThinExtended { get; }
Property Value
Type Description
int[]

DefaultBackground

The default background for glyphs on this surface.

Declaration
Color DefaultBackground { get; set; }
Property Value
Type Description
Color

DefaultForeground

The default foreground for glyphs on this surface.

Declaration
Color DefaultForeground { get; set; }
Property Value
Type Description
Color

DefaultGlyph

The default glyph used in clearing and erasing.

Declaration
int DefaultGlyph { get; set; }
Property Value
Type Description
int

Effects

Processes the effects added to cells with CellSurfaceEditor.SetEffect*.

Declaration
EffectsManager Effects { get; }
Property Value
Type Description
EffectsManager

IsDirty

Indicates the surface has changed and needs to be rendered.

Declaration
bool IsDirty { get; set; }
Property Value
Type Description
bool

IsScrollable

Returns true when the View width or height is different from Area; otherwise false.

Declaration
bool IsScrollable { get; }
Property Value
Type Description
bool

TimesShiftedDown

A variable that tracks how many times this editor shifted the surface down.

Declaration
int TimesShiftedDown { get; set; }
Property Value
Type Description
int

TimesShiftedLeft

A variable that tracks how many times this editor shifted the surface left.

Declaration
int TimesShiftedLeft { get; set; }
Property Value
Type Description
int

TimesShiftedRight

A variable that tracks how many times this editor shifted the surface right.

Declaration
int TimesShiftedRight { get; set; }
Property Value
Type Description
int

TimesShiftedUp

A variable that tracks how many times this editor shifted the surface up.

Declaration
int TimesShiftedUp { get; set; }
Property Value
Type Description
int

UsePrintProcessor

When true, the Parser is used to generate a ColoredString before printing.

Declaration
bool UsePrintProcessor { get; set; }
Property Value
Type Description
bool

View

The visible portion of the surface.

Declaration
Rectangle View { get; set; }
Property Value
Type Description
Rectangle

ViewHeight

Gets or sets the visible height of the surface in cells.

Declaration
int ViewHeight { get; set; }
Property Value
Type Description
int

ViewPosition

The position of the view within the buffer.

Declaration
Point ViewPosition { get; set; }
Property Value
Type Description
Point

ViewWidth

Gets or sets the visible width of the surface in cells.

Declaration
int ViewWidth { get; set; }
Property Value
Type Description
int

Methods

CreateLine(int)

Creates an array of glyphs that can be used as a connected line.

Declaration
public static int[] CreateLine(int singleGlyph)
Parameters
Type Name Description
int singleGlyph

The glyph to use for the connected line array.

Returns
Type Description
int[]

An array of glyphs.

ValidateLineStyle<T>(in T[])

Returns a value that indicates a line style array is not null and contains the required number of elements.

Declaration
public static bool ValidateLineStyle<T>(in T[] connectedLineStyle)
Parameters
Type Name Description
T[] connectedLineStyle

The array to check based on the ICellSurface.ConnectedLineIndex enum.

Returns
Type Description
bool

True when the line style is correct.

Type Parameters
Name Description
T

Type of the array.

Events

IsDirtyChanged

An event that is raised when IsDirty changes.

Declaration
event EventHandler IsDirtyChanged
Event Type
Type Description
EventHandler

Extension Methods

CellSurfaceEditor.PrintTheDraw(ICellSurface, int, int, string, TheDrawFont)
CellSurfaceEditor.PrintTheDraw(ICellSurface, int, string, TheDrawFont, HorizontalAlignment, int)
CellSurfaceEditor.AddDecorator(ISurface, Point, params CellDecorator[])
CellSurfaceEditor.AddDecorator(ISurface, int, params CellDecorator[]?)
CellSurfaceEditor.AddDecorator(ISurface, int, int, params CellDecorator[])
CellSurfaceEditor.AddDecorator(ISurface, int, int, int, params CellDecorator[])
CellSurfaceEditor.Clear(ISurface)
CellSurfaceEditor.Clear(ISurface, Rectangle)
CellSurfaceEditor.Clear(ISurface, IEnumerable<Point>)
CellSurfaceEditor.Clear(ISurface, int, int)
CellSurfaceEditor.Clear(ISurface, int, int, int)
CellSurfaceEditor.ClearDecorators(ISurface, int, int)
CellSurfaceEditor.ClearDecorators(ISurface, int, int, int)
CellSurfaceEditor.ClearShiftValues(ISurface)
CellSurfaceEditor.ConnectLines(ISurface)
CellSurfaceEditor.ConnectLines(ISurface, int[])
CellSurfaceEditor.ConnectLines(ISurface, int[], Rectangle)
CellSurfaceEditor.Copy(ISurface, ICellSurface)
CellSurfaceEditor.Copy(ISurface, ICellSurface, int, int)
CellSurfaceEditor.Copy(ISurface, Rectangle, ICellSurface, int, int)
CellSurfaceEditor.Copy(ISurface, int, int, int, int, ICellSurface, int, int)
CellSurfaceEditor.DrawBox(ISurface, Rectangle, ShapeParameters)
CellSurfaceEditor.DrawCircle(ISurface, Rectangle, ShapeParameters)
CellSurfaceEditor.DrawLine(ISurface, Point, Point, int?, Color?, Color?, Mirror?)
CellSurfaceEditor.Erase(ISurface)
CellSurfaceEditor.Erase(ISurface, int, int)
CellSurfaceEditor.Erase(ISurface, int, int, int)
CellSurfaceEditor.Fill(ISurface, ColoredGlyphBase)
CellSurfaceEditor.Fill(ISurface, Rectangle, Color?, Color?, int?, Mirror?)
CellSurfaceEditor.Fill(ISurface, int, int, int, Color?, Color?, int?, Mirror?)
CellSurfaceEditor.Fill(ISurface, Color?, Color?, int?, Mirror?)
CellSurfaceEditor.FillWithRandomGarbage(ISurface, IFont)
CellSurfaceEditor.FillWithRandomGarbage(ISurface, int)
CellSurfaceEditor.FillWithRandomGarbage(ISurface, int, Rectangle)
CellSurfaceEditor.GetBackground(ISurface, int, int)
CellSurfaceEditor.GetCellAppearance(ISurface, int, int)
CellSurfaceEditor.GetCells(ISurface, Rectangle)
CellSurfaceEditor.GetEffect(ISurface, int)
CellSurfaceEditor.GetEffect(ISurface, int, int)
CellSurfaceEditor.GetForeground(ISurface, int, int)
CellSurfaceEditor.GetGlyph(ISurface, int, int)
CellSurfaceEditor.GetMirror(ISurface, int, int)
CellSurfaceEditor.GetString(ISurface, int, int)
CellSurfaceEditor.GetString(ISurface, int, int, int)
CellSurfaceEditor.GetStringColored(ISurface, int, int)
CellSurfaceEditor.GetStringColored(ISurface, int, int, int)
CellSurfaceEditor.GetSubSurface(ISurface)
CellSurfaceEditor.GetSubSurface(ISurface, Rectangle)
CellSurfaceEditor.IsValidCell(ISurface, int)
CellSurfaceEditor.IsValidCell(ISurface, int, int)
CellSurfaceEditor.IsValidCell(ISurface, int, int, out int)
CellSurfaceEditor.Print(ISurface, int, int, ColoredGlyphBase[])
CellSurfaceEditor.Print(ISurface, int, int, ColoredString)
CellSurfaceEditor.Print(ISurface, int, int, IEnumerable<ColoredGlyphBase>)
CellSurfaceEditor.Print(ISurface, int, int, string)
CellSurfaceEditor.Print(ISurface, int, int, string, ColoredGlyphBase, ICellEffect?)
CellSurfaceEditor.Print(ISurface, int, int, string, Mirror)
CellSurfaceEditor.Print(ISurface, int, int, string, Color)
CellSurfaceEditor.Print(ISurface, int, int, string, Color, Color)
CellSurfaceEditor.Print(ISurface, int, int, string, Color, Color, Mirror)
CellSurfaceEditor.Print(ISurface, int, int, string, Color, Color, Mirror, CellDecorator[])
CellSurfaceEditor.RemoveDecorator(ISurface, Point, params CellDecorator[])
CellSurfaceEditor.RemoveDecorator(ISurface, int, params CellDecorator[])
CellSurfaceEditor.RemoveDecorator(ISurface, int, int, params CellDecorator[])
CellSurfaceEditor.RemoveDecorator(ISurface, int, int, int, params CellDecorator[])
CellSurfaceEditor.SetBackground(ISurface, int, int, Color)
CellSurfaceEditor.SetCellAppearance(ISurface, int, int, ColoredGlyphBase)
CellSurfaceEditor.SetDecorator(ISurface, Point, params CellDecorator[]?)
CellSurfaceEditor.SetDecorator(ISurface, int, params CellDecorator[]?)
CellSurfaceEditor.SetDecorator(ISurface, int, int, params CellDecorator[]?)
CellSurfaceEditor.SetDecorator(ISurface, int, int, int, params CellDecorator[]?)
CellSurfaceEditor.SetEffect(ISurface, ColoredGlyphBase, ICellEffect?)
CellSurfaceEditor.SetEffect(ISurface, IEnumerable<ColoredGlyphBase>, ICellEffect?)
CellSurfaceEditor.SetEffect(ISurface, IEnumerable<Point>, ICellEffect?)
CellSurfaceEditor.SetEffect(ISurface, IEnumerable<int>, ICellEffect?)
CellSurfaceEditor.SetEffect(ISurface, int, ICellEffect?)
CellSurfaceEditor.SetEffect(ISurface, int, int, ICellEffect?)
CellSurfaceEditor.SetForeground(ISurface, int, int, Color)
CellSurfaceEditor.SetGlyph(ISurface, int, int, int)
CellSurfaceEditor.SetGlyph(ISurface, int, int, int, Color)
CellSurfaceEditor.SetGlyph(ISurface, int, int, int, Color, Color)
CellSurfaceEditor.SetGlyph(ISurface, int, int, int, Color, Color, Mirror)
CellSurfaceEditor.SetGlyph(ISurface, int, int, int, Color, Color, Mirror, IEnumerable<CellDecorator>)
CellSurfaceEditor.SetMirror(ISurface, int, int, Mirror)
CellSurfaceEditor.SetPixels(ISurface, Color[])
CellSurfaceEditor.SetPixels(ISurface, Rectangle, Color[])
CellSurfaceEditor.ShiftColumn(ISurface, int, int, bool)
CellSurfaceEditor.ShiftColumn(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftColumnDown(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftColumnDownUnchecked(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftColumnUp(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftColumnUpUnchecked(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftDown(ISurface)
CellSurfaceEditor.ShiftDown(ISurface, int, bool)
CellSurfaceEditor.ShiftLeft(ISurface)
CellSurfaceEditor.ShiftLeft(ISurface, int, bool)
CellSurfaceEditor.ShiftRight(ISurface)
CellSurfaceEditor.ShiftRight(ISurface, int, bool)
CellSurfaceEditor.ShiftRow(ISurface, int, int, bool)
CellSurfaceEditor.ShiftRow(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftRowLeft(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftRowLeftUnchecked(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftRowRight(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftRowRightUnchecked(ISurface, int, int, int, int, bool)
CellSurfaceEditor.ShiftUp(ISurface)
CellSurfaceEditor.ShiftUp(ISurface, int, bool)
ExtensionsSystem.GetDebuggerDisplayValue(object)
In this article

Back to top

Back to top Generated by DocFX