import { BaseLabel } from './BaseLabel.js'; import type { LabelProperties } from './BaseLabel.js'; import type { WidgetAutoXML } from '../xml/WidgetAutoXML.js'; import type { ObservableCallback } from '../state/ObservableCallback.js'; import type { Observable } from '../state/Observable.js'; /** * A widget which displays a line of text. * * Similar to {@link Label}, except the observable attached to this label is * watched; when its value changes, the displayed text is updated. The * observable can also be swapped via the {@link LiveLabel#textSource} * accessor. * * @category Widget */ export declare class LiveLabel extends BaseLabel { static autoXML: WidgetAutoXML; /** * The current observable in this label. For internal use only, check * {@link LiveLabel#textSource} for the public accessor. */ protected _textSource: Observable; /** * The watch callback for the observable. For internal use only, used for * cleaning up the watcher. */ protected _textWatcher: ObservableCallback | null; /** * Does the displayed value need to be updated? */ private textDirty; /** * @param textSource - The observable to get the text for the label. */ constructor(textSource: Observable, properties?: Readonly); protected handlePreLayoutUpdate(): void; /** The current text value. */ get currentText(): string; /** The observable that is displayed in this label */ set textSource(textSource: Observable); get textSource(): Observable; protected handleAttachment(): void; protected handleDetachment(): void; }