import { IControl } from "../UiControl"; import { WindowLike } from "./UiWindow"; import { DpiSize, DpiSize_2, KnobControlType, Rect, IconCache } from "../UiCommon"; import { Vec4, Vec2 } from "../../Math/Vector"; export declare enum MatrixUnitType { Empty = 0, Switch = 1, Pointer = 2, Value = 3, Pie = 4, Pan = 5, Icon = 6, Color = 7 } export declare enum MatrixUnitFlag { Default = 0, Disabled = 1, Hidden = 2, Active = 4 } export declare class MatrixUnit { Type: MatrixUnitType; Flag: MatrixUnitFlag; DataValue: number; DataIcon: IconCache; DataColor: Vec4; BackColor: Vec4; ForeColor: Vec4; FillColor: Vec4; } export interface IMatrixEditorDoc { SetDimension(vSize: Vec2): IMatrixEditorDoc; GetDimension(): Vec2; SetVirtualUnit(fn: (sender: IMatrixEditorDoc, x: number, y: number) => MatrixUnit): IMatrixEditorDoc; SetVirtualColHeader(fn: (sender: IMatrixEditorDoc, n: number) => string): IMatrixEditorDoc; SetVirtualRowHeader(fn: (sender: IMatrixEditorDoc, n: number) => string): IMatrixEditorDoc; SetUnit(x: number, y: number, u: MatrixUnit): IMatrixEditorDoc; GetUnit(x: number, y: number): MatrixUnit; SetUnitBackColor(vColor: Vec4): IMatrixEditorDoc; GetUnitBackColor(): Vec4; SetUnitForeColor(vColor: Vec4): IMatrixEditorDoc; GetUnitForeColor(): Vec4; SetUnitFillColor(vColor: Vec4): IMatrixEditorDoc; GetUnitFillColor(): Vec4; ColClearName(): IMatrixEditorDoc; ColSetName(n: number, s: string): IMatrixEditorDoc; ColGetName(n: number): string; ColClearSplitter(): IMatrixEditorDoc; ColSetSplitter(n: number, nSize: DpiSize): IMatrixEditorDoc; ColGetSplitter(n: number): DpiSize; ColSetIcon(n: number, nIcon: IconCache): IMatrixEditorDoc; ColGetIcon(n: number): IconCache; ColSetBackColor(n: number, vColor: Vec4): IMatrixEditorDoc; ColGetBackColor(n: number): Vec4; ColSetVisible(n: number, b: boolean): IMatrixEditorDoc; ColGetVisible(n: number): boolean; ColSetEnable(n: number, b: boolean): IMatrixEditorDoc; ColGetEnable(n: number): boolean; RowClearName(): IMatrixEditorDoc; RowSetName(n: number, s: string): IMatrixEditorDoc; RowGetName(n: number): string; RowClearSplitter(): IMatrixEditorDoc; RowSetSplitter(n: number, nSize: DpiSize): IMatrixEditorDoc; RowGetSplitter(n: number): DpiSize; RowSetIcon(n: number, nIcon: IconCache): IMatrixEditorDoc; RowGetIcon(n: number): IconCache; RowSetBackColor(n: number, vColor: Vec4): IMatrixEditorDoc; RowGetBackColor(n: number): Vec4; RowSetVisible(n: number, b: boolean): IMatrixEditorDoc; RowGetVisible(n: number): boolean; RowSetEnable(n: number, b: boolean): IMatrixEditorDoc; RowGetEnable(n: number): boolean; ViewSetValueFormat(fn: (sender: IMatrixEditorDoc, x: number, y: number, v: number) => string): any; Redraw(): IMatrixEditorDoc; } export interface IMatrixEditor extends IControl { new (window: WindowLike): IMatrixEditor; DocNew(): MatrixEditor; DocGet(): IMatrixEditorDoc; DocLink(p: MatrixEditor): MatrixEditor; ViewReset(): MatrixEditor; ViewCopyFrom(p: MatrixEditor): MatrixEditor; ColSetSizeAll(nSize: DpiSize): MatrixEditor; ColGetSizeAll(): DpiSize; ColSetSize(n: number, nSize: DpiSize): MatrixEditor; ColGetSize(n: number): DpiSize; ColSetVertical(b: boolean): MatrixEditor; ColGetVertical(): boolean; RowSetSizeAll(nSize: DpiSize): MatrixEditor; RowGetSizeAll(): DpiSize; RowSetSize(n: number, nSize: DpiSize): MatrixEditor; RowGetSize(n: number): DpiSize; ViewSetCornerSize(vSize: DpiSize_2): MatrixEditor; ViewGetCornerSize(): DpiSize_2; ViewSetCornerContent(c: IControl): IControl; ViewGetCornerContent(): IControl; ViewSetBack(b: boolean): MatrixEditor; ViewGetBack(): boolean; ViewSetUnit(b: boolean): MatrixEditor; ViewGetUnit(): boolean; ViewSetPanel(b: boolean): MatrixEditor; ViewGetPanel(): boolean; ViewSetColHeader(b: boolean): MatrixEditor; ViewGetColHeader(): boolean; ViewSetRowHeader(b: boolean): MatrixEditor; ViewGetRowHeader(): boolean; ViewSetUnitBack(b: boolean): MatrixEditor; ViewGetUnitBack(): boolean; ViewSetCursor(b: boolean): MatrixEditor; ViewGetCursor(): boolean; ViewSetCursorEmpty(b: boolean): MatrixEditor; ViewGetCursorEmpty(): boolean; ViewSetGridX(b: boolean): MatrixEditor; ViewGetGridX(): boolean; ViewSetGridY(b: boolean): MatrixEditor; ViewGetGridY(): boolean; ViewSetScrollX(b: boolean): MatrixEditor; ViewGetScrollX(): boolean; ViewSetScrollY(b: boolean): MatrixEditor; ViewGetScrollY(): boolean; UnitGetRect(x: number, y: number): Rect; SetKnobControlType(nType: KnobControlType): MatrixEditor; GetKnobControlType(): KnobControlType; GetEditorRect(): Rect; OnUnitClick(fn: (sender: MatrixEditor, x: number, y: number, u: MatrixUnit) => void): MatrixEditor; OnUnitRightClick(fn: (sender: MatrixEditor, x: number, y: number, u: MatrixUnit) => void): MatrixEditor; OnUnitChange(fn: (sender: MatrixEditor, x: number, y: number, u: MatrixUnit) => void): MatrixEditor; OnUnitChangeBegin(fn: (sender: MatrixEditor, x: number, y: number, u: MatrixUnit) => void): MatrixEditor; OnUnitChangeEnd(fn: (sender: MatrixEditor, x: number, y: number, u: MatrixUnit, bCanceled: boolean) => boolean): MatrixEditor; } declare const MatrixEditor_base: IMatrixEditor; export declare class MatrixEditor extends MatrixEditor_base { private m_CornerContent; DocGet(): IMatrixEditorDoc; UnitGetRect(x: number, y: number): Rect; GetEditorRect(): Rect; ViewSetCornerContent(c: IControl): IControl; } export {};