Table of Contents

Interface IDOMPaintable

Namespace
SharpConsoleUI.Layout
Assembly
SharpConsoleUI.dll

Interface for controls that support DOM-based painting. Controls implementing this interface can paint directly to a CharacterBuffer. All controls must implement this interface for the DOM layout system.

public interface IDOMPaintable

Methods

MeasureDOM(LayoutConstraints)

Measures the control's desired size given the available constraints.

LayoutSize MeasureDOM(LayoutConstraints constraints)

Parameters

constraints LayoutConstraints

The layout constraints (min/max width/height).

Returns

LayoutSize

The desired size of the control.

PaintDOM(CharacterBuffer, LayoutRect, LayoutRect, Color, Color)

Paints the control's content directly to a CharacterBuffer.

void PaintDOM(CharacterBuffer buffer, LayoutRect bounds, LayoutRect clipRect, Color defaultForeground, Color defaultBackground)

Parameters

buffer CharacterBuffer

The buffer to paint to.

bounds LayoutRect

The absolute bounds where the control should paint.

clipRect LayoutRect

The clipping rectangle (visible area).

defaultForeground Color

The default foreground color from the container.

defaultBackground Color

The default background color from the container.