Namespace SharpConsoleUI.Layout
Classes
- AnsiParser
Parses ANSI escape sequences and converts them to cells. Used to bridge Spectre.Console markup output to the character buffer.
- CharacterBuffer
A 2D buffer of character cells for rendering. Supports double-buffering for efficient diff-based output.
- ControlBounds
Represents the complete bounds and coordinate information for a control within a window
- HorizontalLayout
Layout algorithm that arranges children horizontally. Similar to HorizontalGridControl behavior.
- LayoutNode
Represents a node in the layout DOM tree. Wraps an IWindowControl and manages layout state (measure/arrange/paint).
- ScrollableLayoutNode
A layout node that supports scrolling. Manages a viewport into a larger content area.
- VerticalStackLayout
Layout algorithm that stacks children vertically. Similar to ColumnContainer behavior.
- WindowContentLayout
Root layout for window content. Handles sticky top, scrollable middle, and sticky bottom sections.
- WindowLayoutManager
Manages layout calculations and coordinate translations for all controls in a window
Structs
- BufferSnapshot
Immutable snapshot of a CharacterBuffer at a point in time.
- Cell
Represents a single character cell in the character buffer. Contains the character, foreground color, background color, and dirty state.
- CellChange
Represents a change to a single cell in the buffer.
- LayoutConstraints
Represents layout constraints for measuring controls. Defines minimum and maximum width/height bounds.
- LayoutRect
Represents a rectangle with position and size. Immutable value type for layout calculations and hit testing. Named LayoutRect to avoid conflicts with System.Drawing.Rectangle during transition.
- LayoutSize
Represents a size with width and height dimensions. Immutable value type for layout calculations. Named LayoutSize to avoid conflicts with System.Drawing.Size during transition.
Interfaces
- IDOMMeasurable
Interface for controls that support native DOM-based measurement only. Controls implementing this interface provide optimized size calculation.
- IDOMPaintable
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.
- ILayoutContainer
Interface for layout algorithms that determine how children are measured and arranged. Different implementations provide different layout strategies (vertical stack, horizontal, grid, etc.)
- IRegionClippingLayout
Interface for layout containers that support region-specific clipping. This allows different clip rectangles to be applied to children based on their properties, such as preventing scrollable content from painting over sticky controls.
Enums
- HorizontalAlignment
Horizontal alignment options for controls within their container.
- VerticalAlignment
Vertical alignment options for controls within their container.