Skip to content
ConsoleMonster

API Reference

Class

FrameComposer

Namespace ConsoleMonster.Rendering
Assembly ConsoleMonster
Modifiers static

Renders widgets into cell buffers: full-screen frames for live sessions and sized blocks for print-once output.

Inheritance

  • Object
  • FrameComposer

Methods

public static CellBuffer Compose(IWidget root, Int32 width, Int32 height, RenderContext context, CellBuffer? reuse = null) #
Returns: CellBuffer

Renders a widget as a full-screen frame.

Parameters

root ConsoleMonster.Layout.IWidget requiredposition: 0
The root widget.
width System.Int32 requiredposition: 1
Screen width.
height System.Int32 requiredposition: 2
Screen height.
context ConsoleMonster.Canvas.RenderContext requiredposition: 3
The render context.
reuse ConsoleMonster.Canvas.CellBuffer? = null optionalposition: 4
A buffer to reuse (resized when needed), or null.

Returns

The frame.

public static CellBuffer RenderBlock(IWidget widget, Int32 width, RenderContext context) #
Returns: CellBuffer

Renders a widget as a block exactly as tall as it measures at the given width.

Parameters

widget ConsoleMonster.Layout.IWidget requiredposition: 0
The widget.
width System.Int32 requiredposition: 1
Available width.
context ConsoleMonster.Canvas.RenderContext requiredposition: 2
The render context.

Returns

The block.