Table of Contents

Class TuiFramedCheckBox

Namespace
AshConsoleGraphics.Interactive
Assembly
AshConsoleGraphics.dll

Checkbox (on/off) with a frame

public class TuiFramedCheckBox : TuiCheckBox
Inheritance
TuiFramedCheckBox
Inherited Members

Constructors

TuiFramedCheckBox(char, char, bool, Placement, int, int, CharFormat?, CharFormat?, CharFormat?)

Initializes a new framed checkbox with defaut frame chars and the same colors when selected and not selected

public TuiFramedCheckBox(char u, char c, bool b, Placement p, int x, int y, CharFormat? ff = null, CharFormat? cf = null, CharFormat? pf = null)

Parameters

u char

Unchecked char

c char

Checked char

b bool

If the checkbox is initially checked or not

p Placement
x int
y int
ff CharFormat

Frame format

cf CharFormat

Check format

pf CharFormat

Selector format

TuiFramedCheckBox(char, char, bool, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

Initializes a new framed checkbox with default frame chars ('┌┐└┘──││')

public TuiFramedCheckBox(char u, char c, bool b, Placement p, int x, int y, CharFormat? ff, CharFormat? sff, CharFormat? cf, CharFormat? scf, CharFormat? pf)

Parameters

u char

Unchecked char

c char

Checked char

b bool

If the checkbox is initially checked or not

p Placement
x int
y int
ff CharFormat

Not selected frame format

sff CharFormat

Selected frame format

cf CharFormat

Not selected check format

scf CharFormat

Selected check format

pf CharFormat

Selector format

TuiFramedCheckBox(string, char, char, bool, Placement, int, int, CharFormat?, CharFormat?, CharFormat?)

Initializes a new framed checkbox with the same colors when selected and not selected

public TuiFramedCheckBox(string chars, char u, char c, bool b, Placement p, int x, int y, CharFormat? ff = null, CharFormat? cf = null, CharFormat? pf = null)

Parameters

chars string

Frame charchters

u char

Unchecked char

c char

Checked char

b bool

If the checkbox is initially checked or not

p Placement
x int
y int
ff CharFormat

Frame format

cf CharFormat

Check format

pf CharFormat

Selector format

TuiFramedCheckBox(string, char, char, bool, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

Initializes a new framed checkbox

public TuiFramedCheckBox(string chars, char u, char c, bool b, Placement p, int x, int y, CharFormat? ff, CharFormat? sff, CharFormat? cf, CharFormat? scf, CharFormat? pf)

Parameters

chars string

Frame charchters

u char

Unchecked char

c char

Checked char

b bool

If the checkbox is initially checked or not

p Placement
x int
y int
ff CharFormat

Not selected frame format

sff CharFormat

Selected frame format

cf CharFormat

Not selected check format

scf CharFormat

Selected check format

pf CharFormat

Selector format

Properties

FrameChars

Frame charachters. An example would be '┌┐└┘──││'

public char[] FrameChars { get; set; }

Property Value

char[]

FrameFormat

Not selected frame charachter format

public CharFormat? FrameFormat { get; set; }

Property Value

CharFormat

SelectedFrameFormat

Selected frame charachter format

public CharFormat? SelectedFrameFormat { get; set; }

Property Value

CharFormat

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