import { Menu, MenuItem, MenuOpenPositionAnchor, MenuOptions } from "./menu"; declare global { function factoryResetAndReload(): void; interface Window { ErrorLog: { message: string; file: string; line: number; }[]; } } export interface BarMenuOptions extends MenuOptions { name?: string; icon?: IconString; condition?: ConditionResolvable; } /** * Creates a new menu in the menu bar */ export declare class BarMenu extends Menu { type: 'bar_menu'; name: string; icon: IconString; label: HTMLElement; constructor(id: string, structure: MenuItem[] | ((context: any) => MenuItem[]), options?: BarMenuOptions); open(position?: MenuOpenPositionAnchor, context?: any): this; hide(): this; /** * Visually highlights an action within the menu, until the user opens the menu */ highlight(action: MenuItem): void; delete(): void; } export declare const MenuBar: { menus: { file: BarMenu; edit: BarMenu; transform: BarMenu; uv: BarMenu; texture: BarMenu; animation: BarMenu; keyframe: BarMenu; display: BarMenu; tools: BarMenu; view: BarMenu; help: BarMenu; [id: string]: BarMenu; }; /** * @deprecated */ menues: Record; keys: string[]; open: Menu | null; last_opened: any; mode_switcher_button: null | HTMLDivElement; setup(): void; openMobile(button: HTMLElement, event?: Event): HTMLElement; /** * Add a new menu to the menu bar * @param menu The BarMenu to add * @param position Specify the position in the menu list where to add insert the menu. Can either be an index in the list of all menus, or the ID of the menu to insert right from. */ addMenu(menu: BarMenu, position?: number | string): void; /** * Update the menu bar */ update(): void; /** * Adds an action to the menu structure * @param action Action to add * @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, separated by a point. For example, `file.export.0` places the action at the top position of the Export submenu in the File menu. */ addAction(action: Action, path?: string): void; /** * * @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, or item ID, separated by a point. For example, `export.export_special_format` removes the action "Export Special Format" from the Export submenu. */ removeAction(path: string): void; }; declare const global: { BarMenu: typeof import("./menu_bar").BarMenu; MenuBar: { menus: { file: import("./menu_bar").BarMenu; edit: import("./menu_bar").BarMenu; transform: import("./menu_bar").BarMenu; uv: import("./menu_bar").BarMenu; texture: import("./menu_bar").BarMenu; animation: import("./menu_bar").BarMenu; keyframe: import("./menu_bar").BarMenu; display: import("./menu_bar").BarMenu; tools: import("./menu_bar").BarMenu; view: import("./menu_bar").BarMenu; help: import("./menu_bar").BarMenu; [id: string]: import("./menu_bar").BarMenu; }; /** * @deprecated */ menues: Record; keys: string[]; open: Menu | null; last_opened: any; mode_switcher_button: null | HTMLDivElement; setup(): void; openMobile(button: HTMLElement, event?: Event): HTMLElement; /** * Add a new menu to the menu bar * @param menu The BarMenu to add * @param position Specify the position in the menu list where to add insert the menu. Can either be an index in the list of all menus, or the ID of the menu to insert right from. */ addMenu(menu: import("./menu_bar").BarMenu, position?: number | string): void; /** * Update the menu bar */ update(): void; /** * Adds an action to the menu structure * @param action Action to add * @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, separated by a point. For example, `file.export.0` places the action at the top position of the Export submenu in the File menu. */ addAction(action: Action, path?: string): void; /** * * @param path Path pointing to the location. Use the ID of each level of the menu, or index or group within a level, or item ID, separated by a point. For example, `export.export_special_format` removes the action "Export Special Format" from the Export submenu. */ removeAction(path: string): void; }; }; declare global { type BarMenu = import('./menu_bar').BarMenu; const BarMenu: typeof global.BarMenu; const MenuBar: typeof global.MenuBar; } export {};