Table of Contents

Class TaskBarElement

Namespace
SharpConsoleUI.Panel
Assembly
SharpConsoleUI.dll

A panel element that displays a clickable list of windows (task bar). Subscribes to WindowStateService events for automatic updates.

public class TaskBarElement : PanelElement, IPanelElement
Inheritance
TaskBarElement
Implements
Inherited Members
Extension Methods

Constructors

TaskBarElement(string?)

Initializes a new TaskBarElement.

public TaskBarElement(string? name = null)

Parameters

name string

Optional element name. Defaults to "taskbar".

Properties

ActiveColor

Gets or sets the highlight color for the active window.

public Color? ActiveColor { get; set; }

Property Value

Color?

FlexGrow

Gets the flex grow factor. 0 = fixed sizing, >0 = flex proportional to other flex elements.

public override int FlexGrow { get; }

Property Value

int

InactiveColor

Gets or sets the color for inactive windows.

public Color? InactiveColor { get; set; }

Property Value

Color?

MinimizedDim

Gets or sets whether minimized windows are displayed with dimmed text.

public bool MinimizedDim { get; set; }

Property Value

bool

ShowShortcutLabels

Gets or sets whether to show Alt-N keyboard shortcut labels next to window titles.

public bool ShowShortcutLabels { get; set; }

Property Value

bool

Methods

ProcessMouseEvent(MouseEventArgs, int, int)

Processes a mouse event that occurred within this element's bounds.

public override bool ProcessMouseEvent(MouseEventArgs args, int elementX, int elementWidth)

Parameters

args MouseEventArgs

The mouse event arguments.

elementX int

The x position of this element on screen.

elementWidth int

The allocated width of this element.

Returns

bool

True if the event was handled.

Render(CharacterBuffer, int, int, int, Color, Color)

Renders the element into the character buffer at the specified position.

public override void Render(CharacterBuffer buffer, int x, int y, int width, Color fg, Color bg)

Parameters

buffer CharacterBuffer

The character buffer to render into.

x int

The x position to render at.

y int

The y position to render at.

width int

The allocated width for this element.

fg Color

The default foreground color.

bg Color

The default background color.