API Reference
Interface
IWidget
The widget contract. A widget is a pure function of its definition, its state, the capabilities and the theme: the same inputs always produce the same cells. Implement it to get theming, glyph tiers, layout, live updates and every output mode for free.
Usage
Explore 109 API references to this type
This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.
Returned or exposed by 36
- Property Choice.Preview
- Property ChoiceField.Preview
- Property MenuItem.PageFactory
- Property MenuItem.Preview
- Property MultiSelectPrompt.Preview
- Property RunResult.Details
- Property SelectPrompt.Preview
- Property Align.Child
- Property Align.Children
- Property Columns.Children
- Property CultureScope.Child
- Property CultureScope.Children
- Property Grid.Children
- Property IContainer.Children
- Property Padding.Child
- Property Padding.Children
- Property Panel.Child
- Property Panel.Children
- Property Prioritized.Child
- Property Prioritized.Children
- Property Rows.Children
- Property Sized.Children
- Property Sized.Widget
- Property Stack.Children
- Property LiveSession.Root
- Property LiveSessionOptions.Summary
- Property WatchFrame.Content
- Property WatchOptions.Print
- Method TestRunView.Build
- Method ConsoleView.Auto
- Property Dashboard.Body
- Property Dashboard.Children
- Property RecordItem.Widget
- Method RunView.Build
- Property Slot.Children
- Property Slot.Content
Accepted by parameters 73
- Method ColumnsBuilder.Add
- Method ColumnsBuilder.AddFixed
- Method ColumnsBuilder.Panel
- Method DashboardBuilder.Add
- Method DashboardBuilder.Panel
- Method DashboardBuilder.Region
- Method RowsBuilder.Add
- Method RowsBuilder.Panel
- Method RowsBuilder.Region
- Method RowsBuilderBase.Add
- Method RowsBuilderBase.Panel
- Method RowsBuilderBase.Region
- Method ConsoleExporter.Export
- Method ConsoleExporter.Render
- Method ConsoleExporter.Save
- Method ConsoleExporter.ToHtml
- Method ConsoleExporter.ToSvg
- Method ConsoleExporter.ToText
- Method Recording.Export
- Method Recording.ExportAsciicast
- Method Recording.ExportHtml
- Method Recording.ExportPlayerData
- Method Recording.ExportSvg
- Method Recording.Save
- Method MenuContext.Run
- Method MenuItem.MultiSelect``1
- Method MenuItem.Page
- Method MenuItem.Select``1
- Constructor Align.Align
- Constructor Columns.Columns
- Method Columns.Add
- Constructor CultureScope.CultureScope
- Constructor Grid.Grid
- Method Grid.Add
- Constructor Padding.Padding
- Constructor Panel.Panel
- Constructor Prioritized.Prioritized
- Constructor Rows.Rows
- Method Rows.Add
- Constructor Sized.Sized
- Constructor Stack.Stack
- Method ConsoleWatch.Run
- Method InlineArea.Draw
- Constructor LiveSession.LiveSession
- Method LiveSession.Replay
- Constructor WatchFrame.WatchFrame
- Extension method ITerminalTarget.Write
- Method TerminalTargetExtensions.Write
- Method FrameComposer.Compose
- Method FrameComposer.RenderBlock
- Method ReplayPlayer.Play
- Method Terminal.Render
- Method Terminal.RenderChunks
- Method Terminal.RenderEncoded
- Method Terminal.RenderText
- Method Terminal.Write
- Method TestTerminal.Render
- Method TestTerminal.RenderText
- Method Ui.Columns
- Method Ui.Dashboard
- Method Ui.Fill
- Method Ui.Fixed
- Method Ui.Grid
- Method Ui.Panel
- Method Ui.Rows
- Constructor Dashboard.Dashboard
- Method RecordView.AddWidget
- Method RecordView.AddWidgetAt
- Constructor Slot.Slot
- Method Slot.Set
- Method SlotHandle.Replace
- Method SlotHandle.Set
- Method WatchView.Update
Methods
public abstract 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 abstract 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.