import { AlignType, DpiSize, IconCache, Rect } from "../UiCommon"; import { IVisual } from "../UiVisual"; import { WindowLike } from "../Control/UiWindow"; import { Vec2, Vec4 } from "../../Math"; import { Byo2Font, Byo2Image } from "../../Byo2"; import { ResourceSource } from "../../Io"; import { AveImage } from "../../Image"; export declare class RichLabelSimpleShape { Size: number; Offset: number; } export declare class RichLabelColor { static FromNative(color: RichLabelColor): RichLabelColor; Color: Vec4; Rect: Rect[]; Scaling: Vec2; RectSpeed: number; PhaseSpeed: number; } export declare class RichLabelUnderline { static FromNative(underline: RichLabelUnderline): RichLabelUnderline; Color: RichLabelColor; Shape: RichLabelSimpleShape; } export declare class RichLabelStrike { static FromNative(strike: RichLabelStrike): RichLabelStrike; Color: RichLabelColor; Shape: RichLabelSimpleShape; } export declare enum RichLabelEmphasisType { Rectangle = 0, Circle = 1, Icon = 2 } export declare class RichLabelEmphasis { static FromNative(emphasis: RichLabelEmphasis): RichLabelEmphasis; Type: RichLabelEmphasisType; Shape: RichLabelSimpleShape; Near: boolean; Color: RichLabelColor; Icon: IconCache; } export declare class RichLabelTextColor { static FromNative(color: RichLabelTextColor): RichLabelTextColor; Text: RichLabelColor; Border: RichLabelColor; Shadow: RichLabelColor; } export declare class RichLabelBackColor { static FromNative(color: RichLabelBackColor): RichLabelBackColor; Color: RichLabelColor; } export declare class RichLabelTextFxColor { static FromNative(color: RichLabelTextFxColor): RichLabelTextFxColor; Color: Vec4[]; Speed: number; } export declare class RichLabelTextFxTransform { static FromNative(transform: RichLabelTextFxTransform): RichLabelTextFxTransform; TranslationRange: Vec2; RotationRange: number; ScaleRange: Vec2; Speed: number; } export declare enum RichLabelTextFxType { Custom = 0, Color = 1, Transform = 2, Wave = 3 } export declare class RichLabelTextWave { Frequency: number; Amplitude: number; Speed: number; } export declare class RichLabelTextFx { static FromNative(fx: RichLabelTextFx): RichLabelTextFx; Type: RichLabelTextFxType; CustomId: number; Color: RichLabelTextFxColor; Transform: RichLabelTextFxTransform; Wave: RichLabelTextWave; } export declare type RichLabelCluster = { Char: string; CharIndex: number; CharTotal: number; ClusterIndex: number; ClusterTotal: number; }; export declare class RichLabelTransform { Translation: Vec2; Scaling: Vec2; Rotation: number; } export declare class RichLabelDisplay { Transform: RichLabelTransform; TextColor: RichLabelTextColor; BackColor: RichLabelBackColor; Opacity: number; } export declare type RichLabelTextFxCustom = { Cluster: RichLabelCluster; Id: number; Time: number; FrameTime: number; }; export declare type RichLabelCustomPlay = { Cluster: RichLabelCluster; Progress: number; Time: number; FrameTime: number; }; export declare type RichLabelQueryVariable = { IsName: boolean; Id: number; Name: string; }; export declare enum RichLabelReset { Mask = 1, Underline = 2, Strikethrough = 4, Emphasis = 8, TextColor = 16, BackColor = 32, TextFont = 64, TextEffect = 128, All = 255 } export interface IRichLabel extends IVisual { new (window: WindowLike, key?: string | number): IRichLabel; SetText(s: string): RichLabel; GetText(): string; SetAlignHorz(n: AlignType): RichLabel; GetAlignHorz(): AlignType; SetAlignVert(n: AlignType): RichLabel; GetAlignVert(): AlignType; SetWrappable(b: boolean): RichLabel; GetWrappable(): boolean; FmReset(resetFlag: RichLabelReset): RichLabel; FmSetDefaultTextColor(color: RichLabelTextColor): RichLabel; FmGetDefaultTextColor(): RichLabelTextColor; FmSetDefaultBackColor(color: RichLabelTextColor): RichLabel; FmGetDefaultBackColor(): RichLabelTextColor; FmSetDefaultFont(font: Byo2Font): RichLabel; FmGetDefaultFont(): Byo2Font; FmSetRubyFont(font: Byo2Font): RichLabel; FmGetRubyFont(): Byo2Font; FmSetRubyForceSpace(b: boolean): RichLabel; FmGetRubyForceSpace(): boolean; FmSetRubyTextColor(color: RichLabelTextColor): RichLabel; FmGetRubyTextColor(): RichLabelTextColor; FmSetRubyBackColor(color: RichLabelBackColor): RichLabel; FmGetRubyBackColor(): RichLabelBackColor; FmSetSScriptSize(ratio: number): RichLabel; FmGetSScriptSize(): number; FmSetBorderOffset(size: DpiSize): RichLabel; FmGetBorderOffset(): DpiSize; FmSetShadowOffset(size: DpiSize): RichLabel; FmGetShadowOffset(): DpiSize; FmSetEmphasisNearSpace(size: DpiSize): RichLabel; FmGetEmphasisNearSpace(): DpiSize; FmSetEmphasisFarSpace(size: DpiSize): RichLabel; FmGetEmphasisFarSpace(): DpiSize; FmSetMaskResource(rs: ResourceSource): RichLabel; FmSetMaskImageData(img: AveImage): RichLabel; FmSetMaskImage(img: Byo2Image): RichLabel; FmSetUnderline(index: number, p: RichLabelUnderline): RichLabel; FmGetUnderline(index: number): RichLabelUnderline; FmSetStrikethrough(index: number, p: RichLabelStrike[]): RichLabel; FmGetStrikethrough(index: number): RichLabelStrike[]; FmSetEmphasis(index: number, p: RichLabelEmphasis): RichLabel; FmGetEmphasis(index: number): RichLabelEmphasis; FmSetTextColor(index: number, p: RichLabelTextColor, name?: string): RichLabel; FmGetTextColor(index: number): RichLabelTextColor; FmGetTextColorByName(name: string): RichLabelTextColor; FmSetBackColor(index: number, p: RichLabelBackColor, name?: string): RichLabel; FmGetBackColor(index: number): RichLabelBackColor; FmGetBackColorByName(name: string): RichLabelBackColor; FmSetTextFont(index: number, font: Byo2Font, name?: string): RichLabel; FmGetTextFont(index: number): Byo2Font; FmGetTextFontByName(name: string): Byo2Font; FmSetTextEffect(index: number, fx: RichLabelTextFx, name?: string): RichLabel; FmGetTextEffect(index: number): RichLabelTextFx; FmGetTextEffectByName(name: string): RichLabelTextFx; FmSetTextEffectCustom(fn: (sender: RichLabel, fx: RichLabelTextFxCustom, cd: RichLabelDisplay) => RichLabelDisplay): RichLabel; IconClear(): RichLabel; IconSetId(name: string, iconId: number): RichLabel; IconGetId(name: string): number; IconRemoveId(name: string): RichLabel; IconClearOffset(): RichLabel; IconRemoveOffset(iconId: number): RichLabel; IconSetOffset(iconId: number, offset: DpiSize): RichLabel; IconGetOffset(iconId: number): DpiSize; IconSetManager(fn: (sender: RichLabel, name: string) => number): RichLabel; IconSetDefaultSize(sizeOn100Percent: number): RichLabel; IconGetDefaultSize(): number; VaClear(): RichLabel; VaSetById(nId: number, text?: string): RichLabel; VaGetById(nId: number): string; VaSetByName(name: string, text?: string): RichLabel; VaGetByName(name: string): string; VaSetManager(fn: (sender: RichLabel, qv: RichLabelQueryVariable) => string): RichLabel; PlStart(): RichLabel; PlStop(): RichLabel; PlIsPlaying(): RichLabel; PlSetPosition(normalizedPosition: number): RichLabel; PlGetPosition(): number; PlSetAdvanceSpeed(clusterPerSecond: number): RichLabel; PlGetAdvanceSpeed(): number; PlSetClusterSpeed(_1PerSecond: number): RichLabel; PlGetClusterSpeed(): number; PlSetCustom(fn: (sender: RichLabel, cp: RichLabelCustomPlay, cd: RichLabelDisplay) => RichLabelDisplay): RichLabel; PlGetFirstCluster(): number; PlGetLastCluster(): number; } declare const RichLabel_base: IRichLabel; export declare class RichLabel extends RichLabel_base { FmGetDefaultTextColor(): RichLabelTextColor; FmGetDefaultBackColor(): RichLabelTextColor; FmGetRubyTextColor(): RichLabelTextColor; FmGetRubyBackColor(): RichLabelBackColor; FmGetUnderline(index: number): RichLabelUnderline; FmGetStrikethrough(index: number): RichLabelStrike[]; FmGetEmphasis(index: number): RichLabelEmphasis; FmGetTextColor(index: number): RichLabelTextColor; FmGetTextColorByName(name: string): RichLabelTextColor; FmGetBackColor(index: number): RichLabelBackColor; FmGetBackColorByName(name: string): RichLabelBackColor; FmGetTextEffect(index: number): RichLabelTextFx; FmGetTextEffectByName(name: string): RichLabelTextFx; } export {};