UNPKG

906 BTypeScriptView Raw
1import { IChangedArgs } from '@jupyterlab/coreutils';
2import { ISignal } from '@lumino/signaling';
3import { Widget } from '@lumino/widgets';
4/**
5 * A Switch widget
6 */
7export declare class Switch extends Widget {
8 constructor();
9 /**
10 * The value of the switch.
11 */
12 get value(): boolean;
13 set value(newValue: boolean);
14 /**
15 * A signal emitted when the value changes.
16 */
17 get valueChanged(): ISignal<this, IChangedArgs<boolean, boolean, 'value'>>;
18 /**
19 * The visible label of the switch.
20 */
21 get label(): string;
22 set label(x: string);
23 /**
24 * The caption (title) of the switch.
25 */
26 get caption(): string;
27 set caption(x: string);
28 handleEvent(event: Event): void;
29 protected onAfterAttach(): void;
30 protected onBeforeDetach(): void;
31 private _button;
32 private _label;
33 private _value;
34 private _valueChanged;
35}