sophon-notebook-notebook
Version:
JupyterLab - Notebook
46 lines (45 loc) • 1.44 kB
TypeScript
import { WidgetTracker } from 'sophon-notebook-apputils';
import { Cell } from 'sophon-notebook-cells';
import { ISignal } from '@phosphor/signaling';
import { INotebookTracker } from './tokens';
import { NotebookPanel } from './panel';
export declare class NotebookTracker extends WidgetTracker<NotebookPanel> 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: Cell;
/**
* 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<this, Cell>;
/**
* A signal emitted when the selection state changes.
*/
readonly selectionChanged: ISignal<this, void>;
/**
* Add a new notebook panel to the tracker.
*
* @param panel - The notebook panel being added.
*/
add(panel: NotebookPanel): Promise<void>;
/**
* Dispose of the resources held by the tracker.
*/
dispose(): void;
/**
* Handle the current change event.
*/
protected onCurrentChanged(widget: NotebookPanel): void;
private _onActiveCellChanged;
private _onSelectionChanged;
private _activeCell;
private _activeCellChanged;
private _selectionChanged;
}