Table of Contents

Struct ScrollbarPaletteRequest

Namespace
SharpConsoleUI.Helpers.Scrollbar
Assembly
SharpConsoleUI.dll

The inputs to Resolve(ScrollbarPaletteRequest): everything the shared colour cascade needs to pick a scrollbar's thumb and track colours.

public readonly record struct ScrollbarPaletteRequest : IEquatable<ScrollbarPaletteRequest>
Implements
Inherited Members
Extension Methods

Constructors

ScrollbarPaletteRequest(Color?, Color?, ITheme?, bool, bool, Color, bool)

The inputs to Resolve(ScrollbarPaletteRequest): everything the shared colour cascade needs to pick a scrollbar's thumb and track colours.

public ScrollbarPaletteRequest(Color? ThumbOverride, Color? TrackOverride, ITheme? Theme, bool HasFocus, bool IsEnabled, Color Background, bool UseTableThemeKeys = false)

Parameters

ThumbOverride Color?

An explicit per-instance thumb colour, if the control was given one. Wins outright.

TrackOverride Color?

An explicit per-instance track colour, if the control was given one. Wins outright.

Theme ITheme

The active theme, or null if none is available.

HasFocus bool

Whether the scrollable control currently has focus.

IsEnabled bool

Whether the scrollable control is enabled. A disabled bar dims to its unfocused colours.

Background Color

The cell background every scrollbar cell paints with.

UseTableThemeKeys bool

When true, reads TableScrollbarThumbColor/TableScrollbarTrackColor instead of the general ScrollbarThumbColor family. Table themes its bars independently of every other scrollable control; those two keys have no unfocused variants.

Properties

Background

The cell background every scrollbar cell paints with.

public Color Background { get; init; }

Property Value

Color

HasFocus

Whether the scrollable control currently has focus.

public bool HasFocus { get; init; }

Property Value

bool

IsEnabled

Whether the scrollable control is enabled. A disabled bar dims to its unfocused colours.

public bool IsEnabled { get; init; }

Property Value

bool

Theme

The active theme, or null if none is available.

public ITheme? Theme { get; init; }

Property Value

ITheme

ThumbOverride

An explicit per-instance thumb colour, if the control was given one. Wins outright.

public Color? ThumbOverride { get; init; }

Property Value

Color?

TrackOverride

An explicit per-instance track colour, if the control was given one. Wins outright.

public Color? TrackOverride { get; init; }

Property Value

Color?

UseTableThemeKeys

When true, reads TableScrollbarThumbColor/TableScrollbarTrackColor instead of the general ScrollbarThumbColor family. Table themes its bars independently of every other scrollable control; those two keys have no unfocused variants.

public bool UseTableThemeKeys { get; init; }

Property Value

bool