Skip to content
ConsoleMonster

API Reference

Class

ScreenCapture

Namespace ConsoleMonster.Interactive
Assembly ConsoleMonster
Modifiers sealed

Draws prompts, menus and forms into memory instead of the terminal and keeps every frame: for scripted demos, documentation screenshots and exports (ConsoleExporter.ToHtml(capture.LastFrame)). Set it on InteractiveOptions.Capture together with a scripted InteractiveOptions.Input.

Inheritance

  • Object
  • ScreenCapture

Usage

Explore 3 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 2

Accepted by parameters 1

Constructors

public ScreenCapture(Int32 width, Int32 height, Boolean inline = false) #

Creates a capture of a fixed size.

Parameters

width System.Int32 requiredposition: 0
Width in cells.
height System.Int32 requiredposition: 1
Height in cells.
inline System.Boolean = false optionalposition: 2
Whether prompts draw as they would in the scrollback (true) or on a full screen (false).

Methods

public CellBuffer? FindFrame(String text) #
Returns: CellBuffer?

The first frame whose text contains a phrase (for picking a screen to export), or null.

Parameters

text System.String requiredposition: 0
The phrase.

Returns

The frame, or null.

Properties

public Int32 Width { get; } #

Width in cells.

public Int32 Height { get; } #

Height in cells.

public IReadOnlyList<CellBuffer> Frames { get; } #

Every frame drawn, in order.

public CellBuffer? LastFrame { get; } #

The last frame drawn, or null.