Style
Serializable container that links a modifier with its parse rule. Tracks registration state and ownership to prevent bugs.
Remarks
public BaseModifier Modifier{ get; set }Gets or sets the modifier, with proper lifecycle management on hot-swap.
public IParseRule Rule{ get; set }Gets or sets the parse rule, with proper lifecycle management on hot-swap.
Parameter forwarded to Modifier when this style has no Rule (whole-text application). Ignored when Rule is set — the rule then supplies its own parameter(s) per matched range. The setter auto-dirties the owning component when the style is registered and rule-less.
public UniTextBase Owner{ get }Gets the UniTextBase that owns this Style.
public static Style WholeText(BaseModifier modifier, string parameter)Builds a style that applies modifier to the entire text. No Rule is created — the absence of a rule 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 RangeRule.
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>.
