Class TuiElement
- Namespace
- AshConsoleGraphics
- Assembly
- AshConsoleGraphics.dll
Element of a screen
public abstract class TuiElement
- Inheritance
-
TuiElement
- Derived
- Inherited Members
Constructors
TuiElement(Placement, int, int)
Initializes a new element
protected TuiElement(Placement p, int x, int y)
Parameters
Properties
Buffer
public Buffer Buffer { get; }
Property Value
OffsetX
Offset in the X coordinate from its relative position
public int OffsetX { get; set; }
Property Value
OffsetY
Offset in the Y coordinate from its relative position
public int OffsetY { get; set; }
Property Value
Placement
Relative placement to its parent screen
public Placement Placement { get; set; }
Property Value
needToGenBuffer
Set this to true when the buffer needs to be regenerated
protected bool needToGenBuffer { get; set; }
Property Value
Methods
BufferNeedsToBeGenerated()
In most cases, the base implementation is enough
protected virtual bool BufferNeedsToBeGenerated()
Returns
GenerateBuffer()
The method that generates the element's buffer
protected abstract Buffer GenerateBuffer()
Returns
GetTopLeftPosition(int, int)
public (int, int) GetTopLeftPosition(int Xsize, int Ysize)
Parameters
Returns
TriggerUpdate()
public void TriggerUpdate()
Events
OnParentResize
Will be called when parent screen resizes
public event EventHandler<ResizeArgs> OnParentResize