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
intThe x size
ys
intThe y size
p
Placementx
inty
intf
CharFormatThe 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
intThe x size
ys
intThe y size
f
CharFormatThe 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
DefFormat
Deafult char format
public CharFormat? DefFormat { get; set; }
Property Value
Elements
List of child elements
public ReactiveList<TuiElement> Elements { get; }
Property Value
- ReactiveList<TuiElement>
Xsize
public int Xsize { get; set; }
Property Value
Ysize
public int Ysize { get; set; }
Property Value
Methods
BufferNeedsToBeGenerated()
In most cases, the base implementation is enough
protected override bool BufferNeedsToBeGenerated()
Returns
GenerateBuffer()
The method that generates the element's buffer
protected override Buffer GenerateBuffer()
Returns
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