/** * Toolbars are UI elements that are usually constantly displayed on screen, e. g inside a panel, and can hold any number of BarItems, including Actions, Tools, BarSelects etc. * Toolbars are made to be customized by users * @module */ /** * Registry of all toolbars */ export interface ToolbarRegistry { tools: Toolbar; main_tools: Toolbar; element_position: Toolbar; element_size: Toolbar; element_stretch: Toolbar; element_origin: Toolbar; element_rotation: Toolbar; brush: Toolbar; vertex_snap: Toolbar; seam_tool: Toolbar; weight_brush: Toolbar; outliner: Toolbar; reference_images: Toolbar; animations: Toolbar; collections: Toolbar; texturelist: Toolbar; layers: Toolbar; uv_editor: Toolbar; display: Toolbar; keyframe: Toolbar; timeline: Toolbar; color_picker: Toolbar; palette: Toolbar; skin_pose: Toolbar; [id: string]: Toolbar; } export declare const Toolbars: Record; export interface ToolbarOptions { id?: string; name?: string; /** * If true, the toolbar will display a label abovee */ label?: boolean; condition?: ConditionResolvable; /** * If true, the toolbar will only take as much width as needed */ narrow?: boolean; vertical?: boolean; /** * If true, the toolbar will not wrap into new line, and will instead display an overflow button in case of overflow */ no_wrap?: boolean; /** * If true, add the toolbar automatically to it's designated spot in the UI * @deprecated */ default_place?: boolean; /** * Default content of the toolbar. Separators are available, where _ = separator, + = spaces, # = line break */ children: ('_' | '+' | '#' | string | BarItem)[]; } export declare class Toolbar { id: string; name: string; label: boolean; label_node: HTMLElement; condition: ConditionResolvable; children: (BarItem | string)[]; no_wrap: boolean; narrow: boolean; vertical: boolean; default_place: boolean; default_children: (BarItem | string)[]; positionLookup: any; condition_cache: any; previously_enabled: any; postload: any; node: HTMLElement; constructor(id: string, data: ToolbarOptions); /** * Legacy constructor * @deprecated */ constructor(data: ToolbarOptions); /** * Builds the toolbar from data * @param {object} data Data used to build the toolbar * @param {boolean} force If true, customization data will be ignored. Used when resetting toolbar */ build(data: any, force?: boolean): this; contextmenu(event: MouseEvent): void; editMenu(): this; add(action: BarItem, position?: number): this; remove(action: BarItem | string, update?: boolean): this; update(force?: boolean): this; toPlace(place: string): this; save(): this; reset(): this; menu: Menu; } export declare const BARS: { stored: { _known: any[]; }; editing_bar: any; action_definers: any[]; condition: typeof Condition; dialog: Dialog; defineActions(definer: () => void): void; setupActions(): void; setupToolbars(): void; setupVue(): void; updateConditions(): void; }; type ToolboxToolbar = Toolbar & { selected: Tool; original: any; toggleTransforms(event?: MouseEvent): void; }; declare const global: { Toolbar: typeof import("./toolbars").Toolbar; BARS: { stored: { _known: any[]; }; editing_bar: any; action_definers: any[]; condition: typeof Condition; dialog: Dialog; defineActions(definer: () => void): void; setupActions(): void; setupToolbars(): void; setupVue(): void; updateConditions(): void; }; Toolbars: Record; }; declare global { type Toolbar = import('./toolbars').Toolbar; const Toolbar: typeof global.Toolbar; const Toolbars: ToolbarRegistry; const BARS: typeof global.BARS; const Toolbox: ToolboxToolbar; interface Window { Toolbox: ToolboxToolbar; } } export {};