js-draw
Version:
Draw pictures using a pen, touchscreen, or mouse! JS-draw is a drawing library for JavaScript and TypeScript.
25 lines (24 loc) • 1.06 kB
TypeScript
import Editor from '../../Editor';
import { ToolbarLocalization } from '../localization';
import BaseWidget from './BaseWidget';
export default class ActionButtonWidget extends BaseWidget {
#private;
protected makeIcon: () => Element | null;
protected title: string;
protected clickAction: () => void;
protected mustBeToplevel: boolean;
constructor(editor: Editor, id: string, makeIcon: () => Element | null, title: string, clickAction: () => void, localizationTable?: ToolbarLocalization, mustBeToplevel?: boolean, autoDisableInReadOnlyEditors?: boolean);
/**
* Sets the text shown in a help overlay for this button.
*
* See {@link getHelpText}.
*/
setHelpText(helpText: string): void;
protected getHelpText(): string | undefined;
protected shouldAutoDisableInReadOnlyEditor(): boolean;
protected handleClick(): void;
protected getTitle(): string;
protected createIcon(): Element | null;
protected fillDropdown(_dropdown: HTMLElement): boolean;
mustBeInToplevelMenu(): boolean;
}