UNPKG

1.44 kBTypeScriptView Raw
1import { WidgetTracker } from '@jupyterlab/apputils';
2import { Cell } from '@jupyterlab/cells';
3import { ISignal } from '@lumino/signaling';
4import { NotebookPanel } from './panel';
5import { INotebookTracker } from './tokens';
6export declare class NotebookTracker extends WidgetTracker<NotebookPanel> implements INotebookTracker {
7 /**
8 * The currently focused cell.
9 *
10 * #### Notes
11 * This is a read-only property. If there is no cell with the focus, then this
12 * value is `null`.
13 */
14 get activeCell(): Cell | null;
15 /**
16 * A signal emitted when the current active cell changes.
17 *
18 * #### Notes
19 * If there is no cell with the focus, then `null` will be emitted.
20 */
21 get activeCellChanged(): ISignal<this, Cell | null>;
22 /**
23 * A signal emitted when the selection state changes.
24 */
25 get selectionChanged(): ISignal<this, void>;
26 /**
27 * Add a new notebook panel to the tracker.
28 *
29 * @param panel - The notebook panel being added.
30 */
31 add(panel: NotebookPanel): Promise<void>;
32 /**
33 * Dispose of the resources held by the tracker.
34 */
35 dispose(): void;
36 /**
37 * Handle the current change event.
38 */
39 protected onCurrentChanged(widget: NotebookPanel): void;
40 private _onActiveCellChanged;
41 private _onSelectionChanged;
42 private _activeCell;
43 private _activeCellChanged;
44 private _selectionChanged;
45}