Class LayeredScreenSurface
A basic console that can contain controls.
Implements
Inherited Members
Namespace: SadConsole
Assembly: SadConsole.dll
Syntax
[DataContract]
public class LayeredScreenSurface : ScreenSurface, IDisposable, IScreenSurfaceEditable, IScreenSurface, IScreenObject, IPositionable, IComponentHost, ISurface, ISurfaceSettable, ILayeredData, ICellSurfaceResize
Constructors
LayeredScreenSurface(ICellSurface, IFont?, Point?)
Creates a new console using the existing surface.
Declaration
public LayeredScreenSurface(ICellSurface surface, IFont? font = null, Point? fontSize = null)
Parameters
| Type | Name | Description |
|---|---|---|
| ICellSurface | surface | The surface. |
| IFont | font | The font to use with the surface. |
| Point? | fontSize | The font size. |
LayeredScreenSurface(int, int)
Creates a new console.
Declaration
public LayeredScreenSurface(int width, int height)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width in cells of the surface. |
| int | height | The height in cells of the surface. |
LayeredScreenSurface(int, int, ColoredGlyphBase[])
Creates a new screen object that can render a surface. Uses the specified cells to generate the surface.
Declaration
public LayeredScreenSurface(int width, int height, ColoredGlyphBase[] initialCells)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width in cells of the surface. |
| int | height | The height in cells of the surface. |
| ColoredGlyphBase[] | initialCells | The initial cells to seed the surface. |
LayeredScreenSurface(int, int, int, int)
Creates a new console with the specified width and height, with Transparent for the background and White for the foreground.
Declaration
public LayeredScreenSurface(int width, int height, int bufferWidth, int bufferHeight)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The visible width of the console in cells. |
| int | height | The visible height of the console in cells. |
| int | bufferWidth | The total width of the console in cells. |
| int | bufferHeight | The total height of the console in cells. |
LayeredScreenSurface(int, int, int, int, ColoredGlyphBase[]?)
Creates a console with the specified width and height, with Transparent for the background and White for the foreground.
Declaration
public LayeredScreenSurface(int width, int height, int bufferWidth, int bufferHeight, ColoredGlyphBase[]? initialCells)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the console in cells. |
| int | height | The height of the console in cells. |
| int | bufferWidth | The total width of the console in cells. |
| int | bufferHeight | The total height of the console in cells. |
| ColoredGlyphBase[] | initialCells | The cells to seed the console with. If null, creates the cells for you. |
Properties
Layers
The controls host holding all the controls.
Declaration
public LayeredSurface Layers { get; }
Property Value
| Type | Description |
|---|---|
| LayeredSurface |
Methods
Resize(int, int, bool)
Resizes the surface and view to the specified width and height.
Declaration
public void Resize(int width, int height, bool clear)
Parameters
| Type | Name | Description |
|---|---|---|
| int | width | The width of the surface and view. |
| int | height | The height of the surface and view. |
| bool | clear | When true, resets every cell to the DefaultForeground, DefaultBackground and glyph 0. |
Resize(int, int, int, int, bool)
Resizes the surface to the specified width and height.
Declaration
public void Resize(int viewWidth, int viewHeight, int totalWidth, int totalHeight, bool clear)
Parameters
| Type | Name | Description |
|---|---|---|
| int | viewWidth | The viewable width of the surface. |
| int | viewHeight | The viewable height of the surface. |
| int | totalWidth | The maximum width of the surface. |
| int | totalHeight | The maximum height of the surface. |
| bool | clear | When true, resets every cell to the DefaultForeground, DefaultBackground and glyph 0. |
ToString()
Returns the value "ScreenSurface (Layered)".
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The string "ScreenSurface (Layered)". |