Back to API Reference
Class

Style

sealed
Inherits:IModifierChangeSink
Implements:IRangeSourceChangeSink

Links a range source with the modifier graph applied to its entities.

public BaseModifier Modifier{ get; set }

Gets or sets the modifier, with proper lifecycle management on hot-swap.

public RangeSource Source{ get; set }

Gets or sets the range producer. Null means one implicit whole-text entity.

public string DefaultParameter{ get; set }

Source-specific default used by the implicit whole-text entity when no source exists.

public bool Enabled{ get; set }

Whether this style takes part in text processing. A disabled style is skipped entirely — not registered with the parser, never applied or rendered, and ignored by style queries — as if removed, while its configuration is preserved. Re-enabling restores its authored position and precedence.

public static Style WholeText(BaseModifier modifier, string parameter)

Builds a style that applies modifier to the entire text. No Source is created — the absence of a source is interpreted as "no constraint, apply everywhere", and parameter is forwarded to the modifier on every cycle via defaultParameter.

public static Style Range(BaseModifier modifier, int start, int end, string parameter)

Builds a style that applies modifier to a fixed codepoint range via a FixedRangeSource.

public static Style FromSource(RangeSource source, BaseModifier modifier)

Builds a style that applies a modifier graph to entities emitted by a range source.

public static Style Tag(BaseModifier modifier, string tagName, string defaultParameter)

Builds a style that activates modifier on ranges matched by a rich-text tag <tagName>...</tagName>.