Table of Contents

Class SpinnerStyleExtensions

Namespace
SharpConsoleUI.Controls
Assembly
SharpConsoleUI.dll

Convenience extensions for SpinnerStyle.

public static class SpinnerStyleExtensions
Inheritance
SpinnerStyleExtensions
Inherited Members

Methods

FrameWidth(SpinnerStyle)

The reserved column width for the style — the widest frame's display width, measured with markup stripped and Unicode (East Asian / ambiguous) width applied so the value matches what the spinner actually occupies on screen. Lets you reserve a stable footprint (e.g. a status-bar label) up front, without constructing a spinner or animator first.

public static int FrameWidth(this SpinnerStyle style)

Parameters

style SpinnerStyle

Returns

int

Remarks

Thin sugar over ReservedWidth(SpinnerStyle) — the single source of truth shared by the inline [spinner] markup, SpinnerControl, and SpinnerTextAnimator.

FrameWidth(SpinnerStyle, int)

The reserved column width honoring an explicit minimum requestedWidth: a value narrower than the style's natural width is clamped up so the glyph never clips, and a non-positive value uses the natural width. Mirrors the inline [spinner … width:N] semantics.

public static int FrameWidth(this SpinnerStyle style, int requestedWidth)

Parameters

style SpinnerStyle
requestedWidth int

Returns

int