Skip to content

ControlsConsole Class

A basic console that can contain controls.

C#
[DataContract]
public class ControlsConsole : Console, IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize

Inheritance objectScreenObjectScreenSurfaceConsole

Implements IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, SadRogue.Primitives.IPositionable, IComponentHost, ISurface, ISurfaceSettable, ICellSurfaceResize

Creates a new console.

C#
public ControlsConsole(int width, int height)

width int
The width in cells of the surface.

height int
The height in cells of the surface.

ControlsConsole(int, int, ColoredGlyphBase[])

Section titled “ControlsConsole(int, int, ColoredGlyphBase[])”

Creates a new screen object that can render a surface. Uses the specified cells to generate the surface.

C#
public ControlsConsole(int width, int height, ColoredGlyphBase[] initialCells)

width int
The width in cells of the surface.

height int
The height in cells of the surface.

initialCells ColoredGlyphBase[]
The initial cells to seed the surface.

Creates a new console with the specified width and height, with SadRogue.Primitives.Color.Transparent for the background and SadRogue.Primitives.Color.White for the foreground.

C#
public ControlsConsole(int width, int height, int bufferWidth, int bufferHeight)

width int
The visible width of the console in cells.

height int
The visible height of the console in cells.

bufferWidth int
The total width of the console in cells.

bufferHeight int
The total height of the console in cells.

ControlsConsole(int, int, int, int, ColoredGlyphBase[]?)

Section titled “ControlsConsole(int, int, int, int, ColoredGlyphBase[]?)”

Creates a console with the specified width and height, with SadRogue.Primitives.Color.Transparent for the background and SadRogue.Primitives.Color.White for the foreground.

C#
public ControlsConsole(int width, int height, int bufferWidth, int bufferHeight, ColoredGlyphBase[]? initialCells)

width int
The width of the console in cells.

height int
The height of the console in cells.

bufferWidth int
The total width of the console in cells.

bufferHeight int
The total height of the console in cells.

initialCells ColoredGlyphBase[]
The cells to seed the console with. If null, creates the cells for you.

ControlsConsole(ICellSurface, IFont?, Point?)

Section titled “ControlsConsole(ICellSurface, IFont?, Point?)”

Creates a new console using the existing surface.

C#
public ControlsConsole(ICellSurface surface, IFont? font = null, Point? fontSize = null)

surface ICellSurface
The surface.

font IFont
The font to use with the surface.

fontSize System.NullableSadRogue.Primitives.Point
The font size.

The controls host holding all the controls.

C#
public ControlHost Controls { get; }

Returns the value “Console (Controls)”.

C#
public override string ToString()

string
The string “Console (Controls)”.