Table of Contents

Class FigleControlBuilder

Namespace
SharpConsoleUI.Builders
Assembly
SharpConsoleUI.dll

Fluent builder for Figlet ASCII art controls

public sealed class FigleControlBuilder : IControlBuilder<FigleControl>
Inheritance
FigleControlBuilder
Implements
Inherited Members
Extension Methods

Methods

Build()

Builds the Figlet control

public FigleControl Build()

Returns

FigleControl

The configured Figlet control

Centered()

Centers the FIGlet text horizontally

public FigleControlBuilder Centered()

Returns

FigleControlBuilder

The builder for chaining

Large()

Sets the FIGlet text to use large font

public FigleControlBuilder Large()

Returns

FigleControlBuilder

The builder for chaining

Small()

Sets the FIGlet text to use small font

public FigleControlBuilder Small()

Returns

FigleControlBuilder

The builder for chaining

StickyBottom()

Makes the control stick to the bottom of the window

public FigleControlBuilder StickyBottom()

Returns

FigleControlBuilder

The builder for chaining

StickyTop()

Makes the control stick to the top of the window

public FigleControlBuilder StickyTop()

Returns

FigleControlBuilder

The builder for chaining

Visible(bool)

Sets the visibility

public FigleControlBuilder Visible(bool visible = true)

Parameters

visible bool

Whether the control is visible

Returns

FigleControlBuilder

The builder for chaining

WithAlignment(HorizontalAlignment)

Sets the horizontal alignment

public FigleControlBuilder WithAlignment(HorizontalAlignment alignment)

Parameters

alignment HorizontalAlignment

The horizontal alignment

Returns

FigleControlBuilder

The builder for chaining

WithColor(Color)

Sets the FIGlet text color

public FigleControlBuilder WithColor(Color color)

Parameters

color Color

The text color

Returns

FigleControlBuilder

The builder for chaining

WithCustomFont(FigletFont)

Sets a custom FigletFont instance

public FigleControlBuilder WithCustomFont(FigletFont font)

Parameters

font FigletFont

The custom font

Returns

FigleControlBuilder

The builder for chaining

WithFontPath(string)

Sets the path to a custom .flf font file

public FigleControlBuilder WithFontPath(string fontPath)

Parameters

fontPath string

Path to the .flf font file

Returns

FigleControlBuilder

The builder for chaining

WithMargin(int)

Sets uniform margin

public FigleControlBuilder WithMargin(int margin)

Parameters

margin int

The margin value for all sides

Returns

FigleControlBuilder

The builder for chaining

WithMargin(int, int, int, int)

Sets the margin

public FigleControlBuilder WithMargin(int left, int top, int right, int bottom)

Parameters

left int

Left margin

top int

Top margin

right int

Right margin

bottom int

Bottom margin

Returns

FigleControlBuilder

The builder for chaining

WithName(string)

Sets the control name for lookup

public FigleControlBuilder WithName(string name)

Parameters

name string

The control name

Returns

FigleControlBuilder

The builder for chaining

WithRightPadded(bool)

Sets whether the right side should be padded

public FigleControlBuilder WithRightPadded(bool rightPadded)

Parameters

rightPadded bool

Whether to pad the right side

Returns

FigleControlBuilder

The builder for chaining

WithSize(FigletSize)

Sets the FIGlet text size

public FigleControlBuilder WithSize(FigletSize size)

Parameters

size FigletSize

The font size

Returns

FigleControlBuilder

The builder for chaining

WithStickyPosition(StickyPosition)

Sets the sticky position

public FigleControlBuilder WithStickyPosition(StickyPosition position)

Parameters

position StickyPosition

The sticky position

Returns

FigleControlBuilder

The builder for chaining

WithTag(object)

Sets a tag object

public FigleControlBuilder WithTag(object tag)

Parameters

tag object

The tag object

Returns

FigleControlBuilder

The builder for chaining

WithText(string)

Sets the FIGlet text to render

public FigleControlBuilder WithText(string text)

Parameters

text string

The text to render as ASCII art

Returns

FigleControlBuilder

The builder for chaining

WithVerticalAlignment(VerticalAlignment)

Sets the vertical alignment

public FigleControlBuilder WithVerticalAlignment(VerticalAlignment alignment)

Parameters

alignment VerticalAlignment

The vertical alignment

Returns

FigleControlBuilder

The builder for chaining

WithWidth(int)

Sets the width

public FigleControlBuilder WithWidth(int width)

Parameters

width int

The control width

Returns

FigleControlBuilder

The builder for chaining

WithWrapMode(WrapMode)

Sets the wrap mode for FIGlet text when it exceeds available width.

public FigleControlBuilder WithWrapMode(WrapMode wrapMode)

Parameters

wrapMode WrapMode

The wrap mode to apply.

Returns

FigleControlBuilder

The builder for chaining

Operators

implicit operator FigleControl(FigleControlBuilder)

Implicit conversion to FigleControl

public static implicit operator FigleControl(FigleControlBuilder builder)

Parameters

builder FigleControlBuilder

The builder

Returns

FigleControl

The built Figlet control