import { MathItem } from '../../core/MathItem.js'; import { OutputJax } from '../../core/OutputJax.js'; import { OptionList } from '../../util/Options.js'; import { MJContextMenu } from './MJContextMenu.js'; import { MmlVisitor } from './MmlVisitor.js'; import { SelectableInfo } from './SelectableInfo.js'; import { MenuMathDocument } from './MenuHandler.js'; export interface MenuSettings { texHints: boolean; semantics: boolean; zoom: string; zscale: string; renderer: string; alt: boolean; cmd: boolean; ctrl: boolean; shift: boolean; scale: string; explorer: boolean; highlight: string; background: string; foreground: string; speech: boolean; subtitles: boolean; speechrules: string; autocollapse: boolean; collapsible: boolean; inTabOrder: boolean; } export declare type HTMLMATHITEM = MathItem; export declare class Menu { static MENU_STORAGE: string; static OPTIONS: OptionList; protected static loading: number; protected static loadingPromises: Map>; protected static _loadingPromise: Promise; protected static _loadingOK: Function; protected static _loadingFailed: Function; options: OptionList; settings: MenuSettings; defaultSettings: MenuSettings; menu: MJContextMenu; MmlVisitor: MmlVisitor; protected document: MenuMathDocument; protected jax: { [name: string]: OutputJax; }; protected rerenderStart: number; readonly isLoading: boolean; readonly loadingPromise: Promise; protected about: ContextMenu.Info; protected help: ContextMenu.Info; protected mathmlCode: SelectableInfo; protected originalText: SelectableInfo; protected annotationText: SelectableInfo; protected zoomBox: ContextMenu.Info; constructor(document: MenuMathDocument, options?: OptionList); protected initSettings(): void; protected initMenu(): void; protected checkLoadableItems(): void; protected enableExplorerItems(enable: boolean): void; protected mergeUserSettings(): void; protected saveUserSettings(): void; protected setScale(scale: string): void; protected setRenderer(jax: string): void; protected setOutputJax(jax: string): void; protected setTabOrder(tab: boolean): void; protected setExplorer(explore: boolean): void; protected setCollapsible(collapse: boolean): void; protected scaleAllMath(): void; protected resetDefaults(): void; checkComponent(name: string): void; protected loadComponent(name: string, callback: () => void): void; loadA11y(component: string): void; protected transferMathList(document: MenuMathDocument): void; protected formatSource(text: string): string; protected toMML(math: HTMLMATHITEM): any; protected zoom(event: MouseEvent, type: string, math: HTMLMATHITEM): void; protected isZoomEvent(event: MouseEvent, zoom: string): boolean; protected rerender(start?: number): void; protected copyMathML(): void; protected copyOriginal(): void; copyAnnotation(): void; protected copyToClipboard(text: string): void; addMenu(math: HTMLMATHITEM): void; clear(): void; variable(name: keyof MenuSettings, action?: (value: T) => void): { name: "semantics" | "explorer" | "scale" | "alt" | "background" | "texHints" | "zoom" | "zscale" | "renderer" | "cmd" | "ctrl" | "shift" | "highlight" | "foreground" | "speech" | "subtitles" | "speechrules" | "autocollapse" | "collapsible" | "inTabOrder"; getter: () => string | boolean; setter: (value: T) => void; }; submenu(id: string, content: string, entries?: any[], disabled?: boolean): { type: string; id: string; content: string; menu: { items: Object[]; }; disabled: boolean; }; command(id: string, content: string, action: () => void, other?: Object): { type: string; id: string; content: string; action: () => void; } & Object; checkbox(id: string, content: string, variable: string, other?: Object): { type: string; id: string; content: string; variable: string; } & Object; radioGroup(variable: string, radios: string[][]): ({ type: string; id: string; content: string; variable: string; } & Object)[]; radio(id: string, content: string, variable: string, other?: Object): { type: string; id: string; content: string; variable: string; } & Object; label(id: string, content: string): { type: string; id: string; content: string; }; rule(): { type: string; }; }