WidgetTranslationContext

Class

Translates a virtual DOM tree into the Widget tree that the layout engine measures and paints.

Namespace: RazorConsole.Core.Layout
Assembly: RazorConsole.Core

Definition

public sealed class WidgetTranslationContext

Constructors

1
NameTypeDescription
WidgetTranslationContext(IEnumerable<IWidgetTranslator>?, SyntaxHighlightingService?)()ConstructorInitializes a new instance of the WidgetTranslationContext class.

Properties

1
NameTypeDescription
Other
AnimatedRenderablesIReadOnlyCollection<IAnimatedConsoleRenderable>Gets the animated renderables found in the current translation.

Methods

3
NameTypeDescription
ClearAnimatedRenderables()MethodForgets the animated renderables of the previous translation.
TrackAnimation(IAnimatedConsoleRenderable)()MethodRegisters an animated renderable so the display refreshes it on its interval. Custom translators call this for animated content they place in a SpectreWidget.
Translate(VNode)()WidgetTranslates node through the custom translators and then the built-in translation.