import { I18nString, Keymap } from '@textbus/core'; import { Tool, ToolFactory, ToolFactoryParams } from '../help'; import { Commander } from '../commander'; import { Matcher } from '../matcher/matcher'; /** * 按扭型工具的配置接口 */ export interface ButtonToolConfig { /** 按扭控件点击后调用的命令 */ commanderFactory(): Commander; /** 状态查询器 */ matcher?: Matcher; /** 设置按扭显示的文字 */ label?: I18nString; /** 给按扭控件添加一组 css class 类 */ classes?: string[]; /** 给按扭控件添加一组 icon css class 类 */ iconClasses?: string[]; /** 当鼠标放在控件上的提示文字 */ tooltip?: I18nString; /** 当前按扭控件的快捷键配置 */ keymap?: Keymap; } export declare class ButtonTool implements ToolFactory { private config; constructor(config: ButtonToolConfig); create(params: ToolFactoryParams, addTool: (tool: Tool) => void): HTMLElement; }