|
|
import { _WidgetBaseConstructor } from "../_WidgetBase";
|
|
|
import _ButtonMixin = require("./_ButtonMixin");
|
|
|
import _FormWidget = require("./_FormWidget");
|
|
|
|
|
|
interface Button extends _FormWidget, _ButtonMixin {
|
|
|
/**
|
|
|
* Set this to true to hide the label text and display only the icon.
|
|
|
* (If showLabel=false then iconClass must be specified.)
|
|
|
* Especially useful for toolbars.
|
|
|
* If showLabel=true, the label will become the title (a.k.a. tooltip/hint)
|
|
|
*/
|
|
|
showLabel: boolean;
|
|
|
|
|
|
/**
|
|
|
* Class to apply to DOMNode in button to make it display an icon
|
|
|
*/
|
|
|
iconClass: string;
|
|
|
|
|
|
baseClass: string;
|
|
|
templateString: string;
|
|
|
postCreate(): void;
|
|
|
setLabel(content: string): void;
|
|
|
onLabelSet(e: DocumentEvent): void;
|
|
|
|
|
|
onClick(e: DocumentEvent): boolean;
|
|
|
|
|
|
set(name: 'showLabel', value: boolean): this;
|
|
|
set(name: 'value', value: string): this;
|
|
|
set(name: 'name', value: string): this;
|
|
|
set(name: 'label', value: string): this;
|
|
|
set(name: string, value: any): this;
|
|
|
set(values: Object): this;
|
|
|
}
|
|
|
|
|
|
type ButtonConstructor = _WidgetBaseConstructor<Button>;
|
|
|
declare const Button: ButtonConstructor;
|
|
|
export = Button;
|
|
|
|