import { ISignal } from '@phosphor/signaling'; import { Token } from '@phosphor/application'; import { IInstanceTracker, InstanceTracker } from '../common/instancetracker'; import { NotebookPanel } from './'; import { BaseCellWidget } from '../cells'; /** * An object that tracks notebook widgets. */ export interface INotebookTracker extends IInstanceTracker { /** * The currently focused cell. * * #### Notes * If there is no cell with the focus, then this value is `null`. */ readonly activeCell: BaseCellWidget; /** * A signal emitted when the current active cell changes. * * #### Notes * If there is no cell with the focus, then `null` will be emitted. */ readonly activeCellChanged: ISignal; /** * A signal emitted when the selection state changes. */ readonly selectionChanged: ISignal; } /** * The notebook tracker token. */ export declare const INotebookTracker: Token; export declare class NotebookTracker extends InstanceTracker implements INotebookTracker { /** * The currently focused cell. * * #### Notes * This is a read-only property. If there is no cell with the focus, then this * value is `null`. */ readonly activeCell: BaseCellWidget; /** * A signal emitted when the current active cell changes. * * #### Notes * If there is no cell with the focus, then `null` will be emitted. */ readonly activeCellChanged: ISignal; /** * A signal emitted when the selection state changes. */ readonly selectionChanged: ISignal; /** * Add a new notebook panel to the tracker. * * @param panel - The notebook panel being added. */ add(panel: NotebookPanel): Promise; /** * Dispose of the resources held by the tracker. */ dispose(): void; /** * Handle the current change event. */ protected onCurrentChanged(widget: NotebookPanel): void; private _onActiveCellChanged(sender, cell); private _onSelectionChanged(sender); private _activeCell; private _activeCellChanged; private _selectionChanged; }