Table of Contents

Class TuiFramedRadio

Namespace
AshConsoleGraphics.Interactive
Assembly
AshConsoleGraphics.dll

Radio button: two options, either one or the other

public class TuiFramedRadio : TuiSelectable
Inheritance
TuiFramedRadio
Inherited Members

Constructors

TuiFramedRadio(char, char, string, string, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

Initializes a new radio button with default frame chars ('┌┐└┘──││') and the same colors for selected and not selected

public TuiFramedRadio(char u, char c, string lo, string ro, Placement p, int x, int y, CharFormat? ff = null, CharFormat? cf = null, CharFormat? tf = null, CharFormat? pf = null)

Parameters

u char

Unchecked char

c char

Checked char

lo string

Left option

ro string

Right option

p Placement
x int
y int
ff CharFormat

Frame format

cf CharFormat

Check format

tf CharFormat

Text format

pf CharFormat

Selector format

TuiFramedRadio(char, char, string, string, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

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

public TuiFramedRadio(char u, char c, string lo, string ro, Placement p, int x, int y, CharFormat? ff, CharFormat? sff, CharFormat? cf, CharFormat? scf, CharFormat? tf, CharFormat? stf, CharFormat? pf)

Parameters

u char

Unchecked char

c char

Checked char

lo string

Left option

ro string

Right option

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

tf CharFormat

Not selected text format

stf CharFormat

Selected text format

pf CharFormat

Selector format

TuiFramedRadio(string, char, char, string, string, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

Initializes a new radio button with the same colors when selected and when not

public TuiFramedRadio(string chars, char u, char c, string lo, string ro, Placement p, int x, int y, CharFormat? ff = null, CharFormat? cf = null, CharFormat? tf = null, CharFormat? pf = null)

Parameters

chars string

Frame charchters

u char

Unchecked char

c char

Checked char

lo string

Left option

ro string

Right option

p Placement
x int
y int
ff CharFormat

Frame format

cf CharFormat

Check format

tf CharFormat

Text format

pf CharFormat

Selector format

TuiFramedRadio(string, char, char, string, string, Placement, int, int, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?, CharFormat?)

Initializes a new radio button

public TuiFramedRadio(string chars, char u, char c, string lo, string ro, Placement p, int x, int y, CharFormat? ff, CharFormat? sff, CharFormat? cf, CharFormat? scf, CharFormat? tf, CharFormat? stf, CharFormat? pf)

Parameters

chars string

Frame charchters

u char

Unchecked char

c char

Checked char

lo string

Left option

ro string

Right option

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

tf CharFormat

Not selected text format

stf CharFormat

Selected text format

pf CharFormat

Selector format

Properties

CheckFormat

Not selected check charachter format

public CharFormat? CheckFormat { get; set; }

Property Value

CharFormat

CheckedChar

Check carachter when the checkbox is checked

public char CheckedChar { get; set; }

Property Value

char

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

LeftOption

Left option

public string LeftOption { get; set; }

Property Value

string

RightOption

Right option

public string RightOption { get; set; }

Property Value

string

RightOptionChecked

If the right option is checked(true) or the left one(false)

public bool RightOptionChecked { get; set; }

Property Value

bool

SelectedCheckFormat

Selected check charachter format

public CharFormat? SelectedCheckFormat { get; set; }

Property Value

CharFormat

SelectedFrameFormat

Selected frame charachter format

public CharFormat? SelectedFrameFormat { get; set; }

Property Value

CharFormat

SelectedTextFormat

Selected text charachter format

public CharFormat? SelectedTextFormat { get; set; }

Property Value

CharFormat

SelectorFormat

Format of the selectors that surround the element when selcted

public CharFormat? SelectorFormat { get; set; }

Property Value

CharFormat

TextFormat

Not selected text charachter format

public CharFormat? TextFormat { get; set; }

Property Value

CharFormat

UnCheckedChar

Check carachter when the checkbox is unchecked

public char UnCheckedChar { get; set; }

Property Value

char

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