Table of Contents

Class TuiScreen

Namespace
AshConsoleGraphics
Assembly
AshConsoleGraphics.dll

Element that has other elements and shows them all

public class TuiScreen : TuiElement, IEnumerable<TuiElement>, IEnumerable
Inheritance
TuiScreen
Implements
Derived
Inherited Members

Constructors

TuiScreen(int, int, Placement, int, int, CharFormat?, params TuiElement[])

Initializes a new screen

public TuiScreen(int xs, int ys, Placement p, int x, int y, CharFormat? f, params TuiElement[] e)

Parameters

xs int

The x size

ys int

The y size

p Placement
x int
y int
f CharFormat

The default format

e TuiElement[]

The elements

TuiScreen(int, int, CharFormat?, params TuiElement[])

Initializes a new screen with top left placement

public TuiScreen(int xs, int ys, CharFormat? f, params TuiElement[] e)

Parameters

xs int

The x size

ys int

The y size

f CharFormat

The default format

e TuiElement[]

The elements

Properties

AutoResize

If set to true, the screen will auto resize to the whole console size

public bool AutoResize { get; set; }

Property Value

bool

DefFormat

Deafult char format

public CharFormat? DefFormat { get; set; }

Property Value

CharFormat

Elements

List of child elements

public ReactiveList<TuiElement> Elements { get; }

Property Value

ReactiveList<TuiElement>

Xsize

public int Xsize { get; set; }

Property Value

int

Ysize

public int Ysize { get; set; }

Property Value

int

Methods

BufferNeedsToBeGenerated()

In most cases, the base implementation is enough

protected override bool BufferNeedsToBeGenerated()

Returns

bool

GenerateBuffer()

The method that generates the element's buffer

protected override Buffer GenerateBuffer()

Returns

Buffer

GetEnumerator()

Returns an enumerator that iterates through the collection.

public IEnumerator<TuiElement> GetEnumerator()

Returns

IEnumerator<TuiElement>

An enumerator that can be used to iterate through the collection.

Print()

Prints the screen into the console

public void Print()

SetAllNoNeedGenerateBuffer()

protected void SetAllNoNeedGenerateBuffer()

Events

OnResize

Action that takes place when the screen resizes

public event EventHandler<ResizeArgs> OnResize

Event Type

EventHandler<ResizeArgs>