sussudio
Version:
An unofficial VS Code Internal API
29 lines (28 loc) • 1.39 kB
text/typescript
/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
import { ISelectBoxDelegate, ISelectBoxOptions, ISelectBoxStyles, ISelectData, ISelectOptionItem } from "./selectBox.mjs";
import { Event } from "../../../common/event.mjs";
import { Disposable } from "../../../common/lifecycle.mjs";
export declare class SelectBoxNative extends Disposable implements ISelectBoxDelegate {
private selectElement;
private selectBoxOptions;
private options;
private selected;
private readonly _onDidSelect;
private styles;
constructor(options: ISelectOptionItem[], selected: number, styles: ISelectBoxStyles, selectBoxOptions?: ISelectBoxOptions);
private registerListeners;
get onDidSelect(): Event<ISelectData>;
setOptions(options: ISelectOptionItem[], selected?: number): void;
select(index: number): void;
setAriaLabel(label: string): void;
focus(): void;
blur(): void;
setFocusable(focusable: boolean): void;
render(container: HTMLElement): void;
style(styles: ISelectBoxStyles): void;
applyStyles(): void;
private createOption;
}