API Reference
RenderContext
Everything a widget needs besides its own state: the terminal profile, the theme, the glyph set and the animation clock. Resolved theme styles and parsed markup are cached per context.
Inheritance
- Object
- RenderContext
Usage
Explore 141 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 5
- Method RenderContext.WithClock
- Extension method ITerminalTarget.CreateContext
- Method TerminalTargetExtensions.CreateContext
- Property PresenterContext.Render
- Method Terminal.CreateContext
Accepted by parameters 136
- Method BrailleCanvas.Render
- Method CharacterCanvas.Render
- Method HalfBlockCanvas.Render
- Method PixelCanvas.Render
- Extension method RenderContext.Spinner
- Method ChangeView.Measure
- Method ChangeView.Render
- Method GlyphSetExtensions.Spinner
- Method HighlightStyles.For
- Method HighlightStyles.ToLines
- Method Align.Measure
- Method Align.Render
- Method Columns.Measure
- Method Columns.Render
- Method CultureScope.Measure
- Method CultureScope.Render
- Method Grid.Measure
- Method Grid.Render
- Method ICompactWidget.RenderCompact
- Method IWidget.Measure
- Method IWidget.Render
- Method Padding.Measure
- Method Padding.Render
- Method Panel.Measure
- Method Panel.Render
- Method Prioritized.Measure
- Method Prioritized.Render
- Method Rows.Measure
- Method Rows.Render
- Method Sized.Measure
- Method Sized.Render
- Method Stack.Measure
- Method Stack.Render
- Method InlineArea.Draw
- Method WatchFrame.Measure
- Method WatchFrame.Render
- Method StatusLine.Compose
- Method PresentationOptions.CreateContext
- Constructor PresenterContext.PresenterContext
- Method FrameComposer.Compose
- Method FrameComposer.RenderBlock
- Constructor ConsoleColorMap.ConsoleColorMap
- Method Terminal.RenderChunks
- Method TestRunSummary.Measure
- Method TestRunSummary.Render
- Method TestRunText.FailureLines
- Method TestRunView.Build
- Method TestRunView.Measure
- Method TestRunView.Render
- Method ConsoleTextLayout.Lines
- Method RichText.Measure
- Method RichText.Render
- Method RichText.ToStyledText
- Method ActivityList.Measure
- Method ActivityList.Render
- Method BarChart.Measure
- Method BarChart.Render
- Method CellMap.CountLabel
- Method CellMap.Legend
- Method CellMap.Measure
- Method CellMap.Render
- Method CodeView.Measure
- Method CodeView.Render
- Method CodeView.Rows
- Method Dashboard.Measure
- Method Dashboard.Render
- Method Dashboard.RenderCompact
- Method ExceptionView.Lines
- Method ExceptionView.Measure
- Method ExceptionView.Render
- Method FooterBar.Line
- Method FooterBar.Measure
- Method FooterBar.Render
- Method HeaderBar.Measure
- Method HeaderBar.Render
- Method HelpView.Measure
- Method HelpView.Render
- Method Histogram.Measure
- Method Histogram.Render
- Method InspectorView.Measure
- Method InspectorView.Render
- Method KeyValueList.Measure
- Method KeyValueList.Render
- Method Lanes.Measure
- Method Lanes.Render
- Method LineChart.Measure
- Method LineChart.Render
- Method LiveTable.Measure
- Method LiveTable.Render
- Method LiveWidget.Measure
- Method LiveWidget.Render
- Method Logo.Measure
- Method Logo.Render
- Method LogRegion.Measure
- Method LogRegion.Render
- Method LogTags.Style
- Method LogTags.Tag
- Method Phases.Measure
- Method Phases.Render
- Method ProgressBar.Measure
- Method ProgressBar.Render
- Method ProgressColumn.Draw
- Method ProgressColumn.Measure
- Method ProgressColumn.Render
- Method ProgressColumn.Summarize
- Method ProgressColumns.Custom
- Method RecordView.Measure
- Method RecordView.Render
- Method Rule.Measure
- Method Rule.Render
- Method RunView.Build
- Method RunView.Measure
- Method RunView.Render
- Method Slot.Measure
- Method Slot.Render
- Method Sparkline.Measure
- Method Sparkline.Render
- Method Spinner.Measure
- Method Spinner.Render
- Method StackedBar.Measure
- Method StackedBar.Render
- Method StatusList.Measure
- Method StatusList.Render
- Method SummaryBar.Line
- Method SummaryBar.Measure
- Method SummaryBar.Render
- Method Table.Measure
- Method Table.Render
- Method Table.Measure
- Method Table.Render
- Method TextBlock.Measure
- Method TextBlock.Render
- Method Tree.Measure
- Method Tree.Render
- Method WatchView.Measure
- Method WatchView.Render
Constructors
public RenderContext(TerminalProfile profile, ITheme theme, IGlyphSet? glyphs = null, Int64 tick = 0, TimeSpan elapsed = default) #Creates a context.
Parameters
- profile ConsoleMonster.Capabilities.TerminalProfile
- The terminal profile.
- theme ConsoleMonster.Styling.ITheme
- The theme.
- glyphs ConsoleMonster.Glyphs.IGlyphSet? = null
- The glyph set; defaults to the built-in set for the profile's tier.
- tick System.Int64 = 0
- Animation frame counter (spinners advance with it).
- elapsed System.TimeSpan = default
- Time since the session started (for clocks).
Methods
public StyledText Markup(String markup) #StyledTextParses markup with this context's theme and colour depth (cached).
Parameters
- markup System.String
- The markup.
Returns
The styled text.
public Style Series(Int32 index) #StyleReturns the chart series style for an index (wraps after six).
Parameters
- index System.Int32
- Zero-based series index.
Returns
The style.
public Style Style(ThemeToken token) #StyleReturns the resolved style of a theme token.
Parameters
- token ConsoleMonster.Styling.ThemeToken
- The token.
Returns
The style for the current colour depth.
public Style Style(StatusKind status) #StyleReturns the style for a status.
Parameters
- status ConsoleMonster.Styling.StatusKind
- The status.
Returns
The style.
public RenderContext WithClock(Int64 tick, TimeSpan elapsed) #RenderContextReturns a context for the next animation frame, keeping the caches.
Parameters
- tick System.Int64
- The new tick.
- elapsed System.TimeSpan
- The new elapsed time.
Returns
A context sharing profile, theme and glyphs.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?
Properties
public CultureInfo Culture { get; } #The culture for numbers and dates: TerminalProfile.Culture, or the current culture when that is null.
public WidgetLabels Labels { get; } #The built-in widget words for TerminalProfile.Language (or the default language).
Extension Methods
public static String Spinner(RenderContext context, Int64 offset = 0) #StringThe running symbol for this frame: the tier's spinner, advanced by the session's tick (offset so neighbouring rows do not spin in step), or the static running glyph when the tier has no spinner. Every widget that shows running work (lanes, phases, status lists, activities, spinners) uses this one.
Parameters
- context ConsoleMonster.Canvas.RenderContext
- The render context.
- offset System.Int64 = 0
- A per-row offset.
Returns
The symbol.