UNPKG

pxt-core

Version:

Microsoft MakeCode provides Blocks / JavaScript / Python tools and editors

34 lines (33 loc) 1.26 kB
/// <reference path="../../pxtlib.d.ts" /> import * as Blockly from "blockly"; import { FieldCustom } from "./field_utils"; import { FieldTextDropdown, FieldTextDropdownOptions } from "./field_textdropdown"; export interface FieldAutoCompleteOptions extends FieldTextDropdownOptions { key: string; } export declare class FieldAutoComplete extends FieldTextDropdown implements FieldCustom { isFieldCustom_: boolean; protected key: string; protected parsedValue: string; protected quoteSize_: number; protected quoteWidth_: number; protected quoteLeftX_: number; protected quoteRightX_: number; protected quoteY_: number; protected quoteLeft_: SVGTextElement; protected quoteRight_: SVGTextElement; constructor(text: string, options: FieldAutoCompleteOptions, opt_validator?: Blockly.FieldValidator); isOptionListDynamic(): boolean; getDisplayText_(): string; getFieldDescription(): string; doValueUpdate_(newValue: string): void; getValue(): string; getOptions(): [string, string][]; showDropdown_(): void; getKey(): string; initView(): void; updateSize_(): void; positionRight(x: number): number; positionLeft(x: number): number; createSVGArrow(): void; }