RenderContext
ConsoleMonster.Canvas
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 288 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 8
- Method RenderContext.WithClock
- Property FrameSectionContext.Render
- Property GroupedColumn<T>.Cell
- Extension method ITerminalTarget.CreateContext
- Method TerminalTargetExtensions.CreateContext
- Property PresenterContext.Render
- Method Terminal.CreateContext
- Method ConsoleViewStyle.Apply
Accepted by parameters 280
- Method BrailleCanvas.Render
- Method CharacterCanvas.Render
- Method HalfBlockCanvas.Render
- Method PixelCanvas.Render
- Extension method RenderContext.Spinner
- Method BaselineView.Measure
- Method BaselineView.Render
- Method ChangeView.Measure
- Method ChangeView.Render
- Method TextDiffView.Measure
- Method TextDiffView.Render
- Method DashboardFrame.Measure
- Method DashboardFrame.Render
- Method Distribution.Measure
- Method Distribution.Render
- Method FrameBars.Note
- Method FrameBars.Range
- Constructor GroupedColumn<T>.GroupedColumn
- Method GroupedRows<T>.Measure
- Method GroupedRows<T>.Render
- Method GlyphSetExtensions.Spinner
- Method ConsoleImage.Measure
- Method ConsoleImage.Render
- Method HighlightStyles.For
- Method HighlightStyles.ToLines
- Method ServicesView.Measure
- Method ServicesView.Render
- Method Accordion.Measure
- Method Accordion.Render
- Method AppBinding.Measure
- Method AppBinding.Render
- Method AppScreens.Measure
- Method AppScreens.Render
- Method Breadcrumb.HandleInput
- Method Breadcrumb.Measure
- Method Breadcrumb.Render
- Method Button.HandleInput
- Method Button.Measure
- Method Button.Render
- Method ChartPlot.FormatValue
- Method ChartPlot.Measure
- Method ChartPlot.Render
- Method ChartPlot.SeriesStyle
- Method ChartPlot.XLabel
- Method ChartView.HandleInput
- Method ChartView.Measure
- Method ChartView.Render
- Method Collapsible.HandleInput
- Method Collapsible.Measure
- Method Collapsible.Render
- Method DataGrid.HandleInput
- Method DataGrid.Measure
- Method DataGrid.Render
- Method DatePicker.HandleInput
- Method DatePicker.Measure
- Method DatePicker.Render
- Method InputControl.HandleInput
- Method InputControl.Measure
- Method InputControl.Render
- Method LogViewport.HandleInput
- Method LogViewport.Measure
- Method LogViewport.Render
- Method Outline.HandleInput
- Method Outline.Measure
- Method Outline.Render
- Method Select.HandleInput
- Method Select.Measure
- Method Select.Render
- Method SelectionInputBase.HandleInput
- Method SelectionInputBase.Measure
- Method SelectionInputBase.Render
- Method TextInput.HandleInput
- Method TextInput.Measure
- Method TextInput.Render
- Method Toggle.HandleInput
- Method Toggle.Measure
- Method Toggle.Render
- Method TreeSelect.HandleInput
- Method TreeSelect.Measure
- Method TreeSelect.Render
- Method Align.Measure
- Method Align.Render
- Method Columns.Measure
- Method Columns.Render
- Method CultureScope.Measure
- Method CultureScope.Render
- Method ICompactWidget.RenderCompact
- Method IWidget.Measure
- Method IWidget.Render
- Method LayoutGrid.Measure
- Method LayoutGrid.Render
- Method Padding.Measure
- Method Padding.Render
- Method Panel.Measure
- Method Panel.Render
- Method Prioritized.Measure
- Method Prioritized.Render
- Method Responsive.Measure
- Method Responsive.Render
- Method Rows.Measure
- Method Rows.Render
- Method Sized.Measure
- Method Sized.Render
- Method Stack.Measure
- Method Stack.Render
- Method Steady.Measure
- Method Steady.Render
- Method InlineArea.Draw
- Method LogTailView.Measure
- Method LogTailView.Render
- Method WatchFrame.Measure
- Method WatchFrame.Render
- Method StatusLine.Compose
- Method OverviewWidget.Measure
- Method OverviewWidget.Render
- Method DisplayText.Status
- Method PresentationOptions.CreateContext
- Constructor PresenterContext.PresenterContext
- Constructor ConsoleColorMap.ConsoleColorMap
- Extension method StatusKind.ToWord
- Method StatusKinds.ToWord
- 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 Calendar.Measure
- Method Calendar.Render
- Method CellMap.CountLabel
- Method CellMap.Legend
- Method CellMap.Measure
- Method CellMap.Render
- Method CodeView.Measure
- Method CodeView.Render
- Method CodeView.Rows
- Method ConsoleViewFrame.Measure
- Method ConsoleViewFrame.Render
- Method ConsoleViewStyle.Apply
- Method ConsoleViewStyle.Create
- Constructor ContextWidget.ContextWidget
- Method ContextWidget.Measure
- Method ContextWidget.Render
- Method Dashboard.Measure
- Method Dashboard.Render
- Method Dashboard.RenderCompact
- Method Diagram.Measure
- Method Diagram.Render
- Method ExceptionView.Lines
- Method ExceptionView.Measure
- Method ExceptionView.Render
- Method FactFlow.Measure
- Method FactFlow.Render
- Method Flow.Measure
- Method Flow.Render
- Method FooterBar.Line
- Method FooterBar.Measure
- Method FooterBar.Render
- Method GroupedStreamingTable<T1, T2>.RenderChunks
- 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 LayoutRegion.Measure
- Method LayoutRegion.Render
- Method LayoutRegions.Measure
- Method LayoutRegions.Render
- Method Legend.Measure
- Method Legend.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 MarkdownView.Measure
- Method MarkdownView.Render
- Method Matrix.Measure
- Method Matrix.Render
- Method PathSet.Measure
- Method PathSet.Render
- 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 RegionWidget.Measure
- Method RegionWidget.Render
- Method RoleTable.Measure
- Method RoleTable.Render
- Method Rule.Measure
- Method Rule.Render
- Method RunBoard.Measure
- Method RunBoard.Render
- Method RunCompletion.Measure
- Method RunCompletion.Render
- Method RunDashboard.Measure
- Method RunDashboard.Render
- Method RunProgress.Measure
- Method RunProgress.Render
- Method RunSummary.Measure
- Method RunSummary.Render
- Method RunView.Build
- Method RunView.Measure
- Method RunView.Render
- Method ScatterPlot.Measure
- Method ScatterPlot.Render
- Method ScoreGauge.Measure
- Method ScoreGauge.Render
- Method ScrollView.Measure
- Method ScrollView.Render
- Method ShellPrompt.Continuation
- Method ShellPrompt.Measure
- Method ShellPrompt.Render
- Method ShellPrompt.ToAnsi
- Method Sparkline.Measure
- Method Sparkline.Render
- Method Spinner.Measure
- Method Spinner.Render
- Method Splitter.Measure
- Method Splitter.Render
- Method StackedBar.GetFillMarker
- Method StackedBar.Measure
- Method StackedBar.Render
- Method StatusList.Measure
- Method StatusList.Render
- Method SummaryBar.Line
- Method SummaryBar.Measure
- Method SummaryBar.Render
- Method Table.DisplaysColumn
- Method Table.Measure
- Method Table.Render
- Method Table<T>.DisplaysColumn
- Method Table<T>.Measure
- Method Table<T>.Render
- Method Tabs.Measure
- Method Tabs.Render
- Method TextBlock.Measure
- Method TextBlock.Render
- Method Tree.Measure
- Method Tree.Render
- Method ViewFacts.Measure
- Method ViewFacts.Render
- Method ViewHeader.CompactWidth
- Method ViewHeader.Measure
- Method ViewHeader.NaturalWidth
- Method ViewHeader.Render
- Method ViewHint.Measure
- Method ViewHint.Render
- Method WatchView.Measure
- Method WatchView.Render
Constructors
public RenderContext(TerminalProfile profile, ITheme theme, IGlyphSet? glyphs = null, long 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 long = 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) #Parses markup with this context's theme, colour depth and glyph repertoire (cached). Where the output cannot carry a hyperlink, a link whose text differs from its target is followed by the target, as text (url).
Parameters
- markup string
- The markup.
public Style Series(int index) #Returns the chart series style for an index (wraps after six).
Parameters
- index int
- Zero-based series index.
public RenderContext WithClock(long tick, TimeSpan elapsed) #Returns a context for the next animation frame, keeping the caches.
Parameters
- tick long
- The new tick.
- elapsed System.TimeSpan
- The new elapsed time.
Inherited Methods
Properties
public ThemeDensity Density { get; } #The profile's spacing override, or the theme's density.
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).
public bool ReducedMotion { get; } #Whether animated glyphs and motion must remain static.
Extension Methods
public static string Spinner(RenderContext context, long offset = 0) #The 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 long = 0
- A per-row offset.
Returns
string The symbol.