Canvas Toolkit
← Class index

CAbstractButton

Widgets · extends CWidget

Abstract base class for abstract button widgets.

Module widgets/CAbstractButton.js. This class is available through the browser modules in the download.

Declared members

readonly clicked: CSignal<[]>;

Public clicked member.

readonly toggled: CSignal<[boolean]>;

Public toggled member.

constructor(parent?: CWidget | null);

Creates a new instance.

text(): string;

Provides text behavior.

setText(text: string): void;

Sets the text.

isCheckable(): boolean;

Returns whether the checkable condition is active.

setCheckable(checkable: boolean): void;

Sets the checkable.

isChecked(): boolean;

Returns whether the checked condition is active.

setChecked(checked: boolean): void;

Sets the checked.

toggle(): void;

Toggles the current state.

setAutoRepeat(delay: number, interval: number): void;

Sets the auto repeat.

resetAutoRepeat(): void;

Provides reset auto repeat behavior.

isAutoRepeat(): boolean;

Returns whether the auto repeat condition is active.

protected startAutoRepeat(): void;

Handles start auto repeat behavior.

protected stopAutoRepeat(): void;

Handles stop auto repeat behavior.