import { IControl } from "../UiControl"; import { WindowLike } from "./UiWindow"; import { Vec2, Vec4 } from "../../Math/Vector"; import { DpiSize_2, DpiSize, IconCache, DpiMargin, Rect, InputModifier } from "../UiCommon"; export declare type NoteIndex = number; export declare type NoteRange = Vec2; export declare class NoteIndexUtil { static C(nOctave: number): number; static D(nOctave: number): number; static E(nOctave: number): number; static F(nOctave: number): number; static G(nOctave: number): number; static A(nOctave: number): number; static B(nOctave: number): number; static Cx(nOctave: number): number; static Dx(nOctave: number): number; static Fx(nOctave: number): number; static Gx(nOctave: number): number; static Ax(nOctave: number): number; static Db(nOctave: number): number; static Eb(nOctave: number): number; static Gb(nOctave: number): number; static Ab(nOctave: number): number; static Bb(nOctave: number): number; private static get __WhiteArray(); static IsWhiteKey(n: NoteIndex): boolean; private static get __WhiteCountArray(); static CountWhiteKey(v: NoteRange): number; private static get __KeyNameSharpArray(); static GetKeyNameSharp(n: NoteIndex): string; private static get __KeyNameFlatArray(); static GetKeyNameFlat(n: NoteIndex): string; static GetOctave(n: NoteIndex): number; static GetKey(n: NoteIndex): number; static FromKeyOctave(nKey: number, nOctave: number): NoteIndex; private static get __FromName_note(); private static get __FromName_type(); private static get __A(); private static get __G(); private static get __a(); private static get __g(); static FromName(s: string): NoteIndex; static get Invalid(): NoteIndex; static get C5(): NoteIndex; static get A5(): NoteIndex; static get Key88Range(): NoteRange; static get Key76Range(): NoteRange; static get Key61Range(): NoteRange; static get Key54Range(): NoteRange; static get Key49Range(): NoteRange; static get Key37Range1(): NoteRange; static get Key37Range2(): NoteRange; static get Key36Range1(): NoteRange; static get Key36Range2(): NoteRange; static get Key32Range1(): NoteRange; static get Key32Range2(): NoteRange; static get Key25Range(): NoteRange; } export declare class MidiKeyItem { Id: number; Note: NoteIndex; Velocity: number; } export interface IMidiKey extends IControl { new (window: WindowLike): IMidiKey; SetRange(v: NoteRange): MidiKey; GetRange(): NoteRange; SetMiddleOctave(nOctave: number): MidiKey; GetMiddleOctave(): number; SetUniformWidth(b: boolean): MidiKey; GetUniformWidth(): boolean; SetPerfectWidth(b: boolean): MidiKey; GetPerfectWidth(): boolean; SetWhiteWidthLimit(v: DpiSize_2): MidiKey; GetWhiteWidthLimit(): DpiSize_2; SetWhiteWidth(nPixelWidth: DpiSize): MidiKey; GetWhiteWidth(): DpiSize; SetBlackSize(vPercentage: Vec2): MidiKey; GetBlackSize(): Vec2; SetOctaveLabel(b: boolean): MidiKey; GetOctaveLabel(): boolean; SetMultiplePress(b: boolean): MidiKey; GetMultiplePress(): boolean; GetOctaveKeyWidth(): number[]; MarkClear(): MidiKey; MarkSetLabel(nNote: NoteIndex, s: string): MidiKey; MarkGetLabel(nNote: NoteIndex): string; MarkSetLabelColor(nNote: NoteIndex, vColor: Vec4): MidiKey; MarkGetLabelColor(nNote: NoteIndex): Vec4; MarkSetColor(nNote: NoteIndex, vColor: Vec4): MidiKey; MarkGetColor(nNote: NoteIndex): Vec4; MarkSetIcon(nNote: NoteIndex, nIcon: IconCache): MidiKey; MarkGetIcon(nNote: NoteIndex): IconCache; MarkbarSetHeight(nHeight: DpiSize): MidiKey; MarkbarGetHeight(): DpiSize; MarkbarSetMargin(margin: DpiMargin): MidiKey; MarkbarGetMargin(): DpiMargin; MarkbarSetColor(nNote: NoteIndex, vColor: Vec4): MidiKey; MarkbarGetColor(nNote: NoteIndex): Vec4; MarkbarSetColorHeight(nNote: NoteIndex, f: number): MidiKey; MarkbarGetColorHeight(nNote: NoteIndex): number; MarkbarSetIcon(nNote: NoteIndex, nIcon: IconCache): MidiKey; MarkbarGetIcon(nNote: NoteIndex): IconCache; RangeClear(): MidiKey; RangeAdd(vRange: NoteRange, vColor: Vec4): MidiKey; KeyHitTest(pt: Vec2): number; KeyGetRect(nKey: NoteIndex): Rect; KeySetPress(nKey: NoteIndex, bPress: boolean): MidiKey; KeyGetPress(nKey: NoteIndex): boolean; KeyClearPress(): MidiKey; OnClick(fn: (sender: MidiKey, key: MidiKeyItem, bIsFirstPress: boolean, nModifier: InputModifier) => void): MidiKey; OnDrop(fn: (sender: MidiKey, key: MidiKeyItem, bIsLastRelease: boolean, nModifier: InputModifier) => void): MidiKey; } declare const MidiKey_base: IMidiKey; export declare class MidiKey extends MidiKey_base { KeyGetRect(nKey: NoteIndex): Rect; GetBlackSize(): Vec2; MarkGetLabelColor(nNote: NoteIndex): Vec4; MarkGetColor(nNote: NoteIndex): Vec4; MarkbarGetColor(nNote: NoteIndex): Vec4; } export {};