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
constraintsLayoutConstraintsThe 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
bufferCharacterBufferThe buffer to paint to.
boundsLayoutRectThe absolute bounds where the control should paint.
clipRectLayoutRectThe clipping rectangle (visible area).
defaultForegroundColorThe default foreground color from the container.
defaultBackgroundColorThe default background color from the container.