API Reference
Class
Sized
Carries a Sized.LayoutSize with a widget, so declarative surfaces (the PowerShell DSL, JSON layouts) can say "this panel takes two shares" or "this log fills the rest" without calling container methods. Rows, Columns use it as the default size when the child is added without an explicit one. Rendering passes straight through to the inner widget.
Inheritance
- Object
- Sized
Usage
Constructors
public Sized(IWidget widget, LayoutSize size) #Wraps a widget with a size.
Parameters
- widget ConsoleMonster.Layout.IWidget
- The widget.
- size ConsoleMonster.Layout.LayoutSize
- Its size inside a row or column layout.
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns:
SizeReturns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Returns
The desired size, never larger than the constraints.
public Void Render(Region region, RenderContext context) #Returns:
VoidRenders into a region. The region may be smaller or larger than the measured size.
Parameters
- region ConsoleMonster.Canvas.Region
- The target region.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
Inherited Methods
public virtual Boolean Equals(Object? obj) #Returns:
BooleanInherited from Object
Parameters
- obj Object?