Scylla Framework
  • API Reference
Search Results for

    Show / Hide Table of Contents
    • Scylla.Console.TextMode
      • IConsoleScreen
      • TextModeDebugConsoleDisplay
      • TicTacToeCommand
      • TicTacToeScreen
    • Scylla.TextMode
      • ANSIAttributeParser
      • ANSIColor
      • ANSISGRAttributes
      • AmbientEffectBase
      • BackgroundBlendMode
      • BoxStyle
      • BoxStyleCharacters
      • BoxStyleCharacters.BoxChars
      • CRTSettings
      • Cell
      • CellAttributes
      • CellAttributesExtensions
      • CellBuffer
      • CellBufferRenderer
      • CellGrid
      • CellMask
      • CellPosition
      • CellRange
      • CellRect
      • ColorCycleEffect
      • ColorCycleEffectPreset
      • CrossFadeEffect
      • CursorStyle
      • DecodeEffect
      • DecodeEffectPreset
      • DigitalRainEffect
      • DigitalRainEffectPreset
      • EffectsSettings
      • FadeEffect
      • FadeEffectPreset
      • FlickerEffect
      • FlickerEffectPreset
      • GlitchEffect
      • GlitchEffectPreset
      • GlyphAtlasCache
      • GridSettings
      • IAutoCompleter
      • IInputHistory
      • ITextEffect
      • ITextEffectContext
      • ITextModeGridProvider
      • ITextModePointerMapper
      • ITextModeRenderSource
      • ITextModeViewHost
      • IVTParserHandler
      • InputHistory
      • MaskTransitionEffect
      • MouseEncodingMode
      • MouseTrackingMode
      • PackedGlyphData
      • PulseEffect
      • PulseEffectPreset
      • PushEffect
      • PushEffectPreset
      • SDFSettings
      • ScrollbackAttributeRun
      • ScrollbackLine
      • ScyllaTextMode
      • ScyllaTextMode.Meta
      • ScyllaTextModeConfiguration
      • SlideInEffect
      • SlideInEffectPreset
      • StaticTuneInEffect
      • StaticTuneInEffectPreset
      • TerminalCLI
      • TerminalEmulator
      • TerminalGridRenderer
      • TerminalInputEncoder
      • TerminalMouseButton
      • TerminalScrollbackBuffer
      • TerminalSettings
      • TextAlignment
      • TextEffectBase
      • TextEffectCompletedEvent
      • TextEffectDirection
      • TextEffectExtensions
      • TextEffectMaskPattern
      • TextEffectPreset
      • TextEffectPushMode
      • TextEffectSequencer
      • TextEffectStartedEvent
      • TextEffectState
      • TextEffectTimeMode
      • TextEffects
      • TextModeCellBorder
      • TextModeColorDefaults
      • TextModeColorScheme
      • TextModeColorSet
      • TextModeConfigurationChangedEvent
      • TextModeConsole
      • TextModeConstants
      • TextModeEffectPlayer
      • TextModeGridCapture
      • TextModeLayoutUtil
      • TextModeMaterials
      • TextModeMouseReporter
      • TextModeMouseReportingEvent
      • TextModeSelectionChangedEvent
      • TextModeSelectionEndedEvent
      • TextModeSelectionManager
      • TextModeSelectionStartedEvent
      • TextModeTerminal
      • TextModeTerminalColorTheme
      • TextModeTerminalHost
      • TextModeTerminalSettings
      • TextModeTerminalStartMode
      • TextModeThemeBackground
      • TextModeThemeChangedEvent
      • TextModeThemeRemapper
      • TextModeThemes
      • TextModeView
      • TextWrapMode
      • ThemeSettings
      • TransitionEffectBase
      • TransitionEffectPreset
      • TwinkleEffect
      • TwinkleEffectPreset
      • TypewriterCharacterRevealedEvent
      • TypewriterEffect
      • TypewriterEffectPreset
      • UITextModeView
      • VTParser
      • WaveEffect
      • WaveEffectPreset
    • Scylla.TextMode.CRT
      • CRTBeam
      • CRTBeamClock
      • CRTBeamScanDirection
      • CRTBeamStatus
      • CRTCalibrationPattern
      • CRTCurvatureShape
      • CRTGeometry
      • CRTHDR
      • CRTHDRDisplay
      • CRTHDRTarget
      • CRTHorizontalKernel
      • CRTImageRegion
      • CRTMaskType
      • CRTQualityTier
      • CRTScaleMode
      • CRTSignalStandard
      • CRTSignalType
      • ITextModeCRTCameraEffect
      • ITextModeCRTHDRDisplaySource
      • TextModeCRTBeam
      • TextModeCRTCalibration
      • TextModeCRTCameraEffects
      • TextModeCRTConstants
      • TextModeCRTDriver
      • TextModeCRTHDR
      • TextModeCRTImageRenderer
      • TextModeCRTMonitor
      • TextModeCRTPreset
      • TextModeCRTPresetRegistry
      • TextModeCRTScreen
      • TextModeCRTSettings
      • TextModeCRTTube
    • Scylla.TextMode.Editor
      • CellGridPreviewWidget
      • ColorPaletteWidget
      • ITextModeCRTCameraSetupProvider
      • ScyllaTextModeConfigurationEditor
      • ScyllaTextModeDependencyProvider
      • ScyllaTextModeEditor
      • ScyllaTextModeMenuItems
      • ScyllaTextModeShaderProvider
      • TextModeCRTCameraSetup
      • TextModeCRTCameraStatus
      • TextModeCRTDriverEditor
      • TextModeCRTMonitorEditor
      • TextModeCRTPresetEditor
      • TextModeCRTPresetGenerator
      • TextModeColorAssetGenerator
      • TextModeColorPaletteDefaults
      • TextModeTerminalHostEditor
      • TextModeThemeField
      • TextModeViewEditor
      • TextModeViewEditorBase
      • UITextModeViewEditor
    • Scylla.TextMode.URP
      • CRTQualityTierParameter
      • TextModeCRTInjectionPoint
      • TextModeCRTPresetParameter
      • TextModeCRTRendererFeature
      • TextModeCRTVolume

    Class TextModeThemeChangedEvent

    Event published when the active TextMode color theme changes. Views and terminals subscribe to this to re-adopt the theme's colors and, where a color map is supplied, to recolor the content they already hold.

    Inheritance
    object
    ScyllaEvent
    TextModeThemeChangedEvent
    Inherited Members
    ScyllaEvent.IsCancelled
    ScyllaEvent.StopPropagation()
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Scylla.TextMode
    Assembly: ScyllaTextMode.dll
    Syntax
    public sealed class TextModeThemeChangedEvent : ScyllaEvent
    Remarks

    An event is used here rather than the direct calls the Console module makes, because TextMode has no single owner to call through. A scene can hold any number of views, and a TextModeTerminal is a plain object that no registry knows about.

    Constructors

    TextModeThemeChangedEvent(in TextModeColorScheme, in TextModeColorScheme, IReadOnlyDictionary<uint, uint>, bool, IReadOnlyDictionary<uint, uint>)

    Creates a new theme-changed event.

    Declaration
    public TextModeThemeChangedEvent(in TextModeColorScheme previousScheme, in TextModeColorScheme scheme, IReadOnlyDictionary<uint, uint> colorMap, bool inverted = false, IReadOnlyDictionary<uint, uint> backgroundColorMap = null)
    Parameters
    Type Name Description
    TextModeColorScheme previousScheme

    The theme that was active before the change.

    TextModeColorScheme scheme

    The theme that is active now.

    IReadOnlyDictionary<uint, uint> colorMap

    The color translation table, or null to leave existing content alone.

    bool inverted

    Whether every color is shown inverted after the change.

    IReadOnlyDictionary<uint, uint> backgroundColorMap

    The translation table for cell backgrounds, or null to use colorMap for them as well.

    Properties

    BackgroundColorMap

    The packed-color translation table for cell backgrounds, or null when ColorMap is null.

    Declaration
    public IReadOnlyDictionary<uint, uint> BackgroundColorMap { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<uint, uint>
    Remarks

    Built by BuildBackgroundMap(ColorPalette, ColorPalette, Dictionary<uint, uint>), where the outgoing theme's background wins over ANSI black when the two share a color, so blank cells take the incoming theme's background. Pass it with ColorMap to Remap(CellGrid, IReadOnlyDictionary<uint, uint>, IReadOnlyDictionary<uint, uint>). The same rule as for ColorMap applies: read it synchronously and do not keep the reference.

    ColorMap

    Packed-color translation table from the previous theme to the current one, or null when existing content should be left alone.

    Declaration
    public IReadOnlyDictionary<uint, uint> ColorMap { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<uint, uint>
    Remarks

    The map is built once and shared by every subscriber, because building it runs a nearest-color search per palette entry and there is no reason for each view to pay that separately. Pass it to Remap(CellGrid, IReadOnlyDictionary<uint, uint>, IReadOnlyDictionary<uint, uint>) together with BackgroundColorMap, or to RemapColors(IReadOnlyDictionary<uint, uint>).

    Read it synchronously, and do not keep the reference. The dictionary behind this property is one table the theme system reuses for every switch: it is cleared and refilled by the next theme change, which can happen before a handler that stashed the reference ever looks at it again. Consume the map inside the event handler and let it go.

    Inverted

    Whether TextMode shows every color inverted after this change. Inverting is a display setting that changes neither Scheme nor any stored color; code that draws theme colors outside a TextMode view passes them through DisplayColor(Color).

    Declaration
    public bool Inverted { get; }
    Property Value
    Type Description
    bool

    PreviousScheme

    The theme that was active before the change.

    Declaration
    public TextModeColorScheme PreviousScheme { get; }
    Property Value
    Type Description
    TextModeColorScheme

    Scheme

    The theme that is active now.

    Declaration
    public TextModeColorScheme Scheme { get; }
    Property Value
    Type Description
    TextModeColorScheme
    In this article
    Back to top Scylla Framework - TextMode Module API Documentation