///
import * as Blockly from "blockly";
import svg = pxt.svgUtil;
import { FieldCustom, FieldCustomOptions } from "./field_utils";
import { FieldMatrix } from "./field_matrix";
export declare const HEADER_HEIGHT = 50;
export declare const TOTAL_WIDTH = 300;
export declare class FieldCustomMelody extends FieldMatrix implements FieldCustom {
isFieldCustom_: boolean;
SERIALIZABLE: boolean;
protected params: U;
private melody;
private soundingKeys;
protected numMatrixRows: number;
protected numMatrixCols: number;
private tempo;
private stringRep;
private isPlaying;
private timeouts;
private invalidString;
private prevString;
private topDiv;
private editorDiv;
private gridDiv;
private bottomDiv;
private doneButton;
private playButton;
private playIcon;
private tempoInput;
private firstFocusableElement;
private lastFocusableElement;
private static CELL_WIDTH;
private static CELL_HORIZONTAL_MARGIN;
private static CELL_VERTICAL_MARGIN;
private static CELL_CORNER_RADIUS;
private static VIEWBOX_WIDTH;
private static VIEWBOX_HEIGHT;
private static COLOR_BLOCK_WIDTH;
private static COLOR_BLOCK_HEIGHT;
private static COLOR_BLOCK_X;
private static COLOR_BLOCK_Y;
private static COLOR_BLOCK_SPACING;
private static MUSIC_ICON_WIDTH;
private toggle;
private root;
private gallery;
protected clearSelectionOnBlur: boolean;
private matrixFocusBind;
private tabKeyBind;
constructor(value: string, params: U, validator?: Blockly.FieldValidator);
init(): void;
showEditor_(e?: Event): void;
getValue(): string;
doValueUpdate_(newValue: string): void;
getText_(): string;
getFieldDescription(): string;
protected onInit(): void;
render_(): void;
protected renderEditor(div: HTMLDivElement): void;
protected onEditorClose(): void;
private onDone;
private clearDomReferences;
protected getTypeScriptValue(): string;
protected parseTypeScriptValue(value: string): void;
private isValidNote;
protected getPreviewWidth(): number;
protected getPreviewHeight(): number;
protected getDropdownBackgroundColour(): string;
protected getDropdownBorderColour(): string;
private updateFieldLabel;
private setTempo;
private syncTempoField;
private getDuration;
private createMelodyIfDoesntExist;
protected toggleCell(column: number, row: number): void;
protected getCellToggled(column: number, row: number): boolean;
protected useTwoToneFocusIndicator(_x: number, _y: number): boolean;
private updateGrid;
private playNote;
protected queueToneForColumn(column: number, delay: number, duration: number): void;
protected playToneCore(row: number): void;
private highlightColumn;
private createGridDisplay;
private handleMatrixFocus;
private handleTabKey;
protected attachPointerEventHandlersToCell(x: number, y: number, cellRect: SVGElement): void;
protected handleArrowUp(x: number, y: number): void;
protected handleArrowDown(x: number, y: number): void;
protected handleArrowLeft(x: number, y: number): void;
protected handleArrowRight(x: number, y: number): void;
private getMelodyNote;
private togglePlay;
private updatePlayButton;
private playMelody;
private stopMelody;
private showGallery;
private hideGallery;
isFullBlockField(): boolean;
}
export interface ButtonGroup {
root: svg.Group;
cx: number;
cy: number;
}