Table of Contents

Class HelpOverlay

Namespace
MiniTui
Assembly
MiniTui.dll

The key bindings in scope, grouped by component (§9.5). Shown by ShowHelp() and the built-in ? binding. ?, q, Enter or Esc closes it.

public sealed class HelpOverlay : Overlay
Inheritance
HelpOverlay
Inherited Members

Properties

HasSelection

True while the component has something selected to copy, such as a selectable ScrollState: Ctrl+C then goes to its HandleKey(ConsoleKeyInfo) instead of quitting, as it does for one that captures text.

public override bool HasSelection { get; }

Property Value

bool

Title

The title in the overlay's border.

public override string? Title { get; }

Property Value

string

Methods

HandleKey(ConsoleKeyInfo)

Handle a key before Keys. Return true if handled.

public override bool HandleKey(ConsoleKeyInfo key)

Parameters

key ConsoleKeyInfo

Returns

bool

HandleMouse(MouseEvent)

Handle a mouse event inside this component's Area (1.x spec §4.7). Return true if handled; otherwise the event goes on to the component's parent, and is dropped if nothing handles it. A press has already focused the component when this runs.

public override bool HandleMouse(MouseEvent mouse)

Parameters

mouse MouseEvent

Returns

bool

Placement(Rect)

Where the overlay goes, including its border. The default is centered, 60% × 50% of the screen, at least 30 × 7, and clamped to the screen minus a 2-cell margin.

public override Rect Placement(Rect screen)

Parameters

screen Rect

Returns

Rect

Render(Buffer, Rect, RenderContext)

Draw the component. Called every frame its parent renders it.

public override void Render(Buffer buf, Rect area, RenderContext ctx)

Parameters

buf Buffer
area Rect
ctx RenderContext