Class
ContextWidget
ConsoleMonster.Widgets
Builds a view for the destination context at measurement and rendering time.
Inheritance
- object
- ContextWidget
Constructors
public ContextWidget(Func<RenderContext, IWidget> build) #Creates a deferred view without detecting or changing the process terminal.
Parameters
- build System.Func<ConsoleMonster.Canvas.RenderContext, ConsoleMonster.Layout.IWidget>
- A pure factory using the supplied destination context.
Methods
public Size Measure(Constraints constraints, RenderContext context) #Returns the size the widget wants within the constraints.
Parameters
- constraints ConsoleMonster.Layout.Constraints
- The space offered.
- context ConsoleMonster.Canvas.RenderContext
- Profile, theme and glyphs.
public void Render(Region region, RenderContext context) #Renders 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.