Create a new widget tracker.
The instantiation options for a widget tracker.
Private
_activePrivate
_activePrivate
_selectionReadonly
namespaceA namespace for all tracked widgets, (e.g., notebook
).
The currently focused cell.
This is a read-only property. If there is no cell with the focus, then this
value is null
.
A signal emitted when the current active cell changes.
If there is no cell with the focus, then null
will be emitted.
Test whether the tracker is disposed.
The number of widgets held by the tracker.
Private
_onPrivate
_onAdd a new notebook panel to the tracker.
The notebook panel being added.
Save the restore options for this tracker, but do not restore yet.
The configuration options that describe restoration.
This function is useful when starting the shell in 'single-document' mode, to avoid restoring all useless widgets. It should not ordinarily be called by client code.
Filter the widgets in the tracker based on a predicate.
The function by which to filter.
Find the first widget in the tracker that satisfies a filter function.
The filter function to call on each widget.
If no widget is found, the value returned is undefined
.
Iterate through each widget in the tracker.
The function to call on each widget.
Check if this tracker has the specified widget.
The widget whose existence is being checked.
Inject a foreign widget into the widget tracker.
The widget to inject into the tracker.
Injected widgets will not have their state saved by the tracker.
The primary use case for widget injection is for a plugin that offers a
sub-class of an extant plugin to have its instances share the same commands
as the parent plugin (since most relevant commands will use the
currentWidget
of the parent plugin's widget tracker). In this situation,
the sub-class plugin may well have its own widget tracker for layout and
state restoration in addition to injecting its widgets into the parent
plugin's widget tracker.
Protected
onHandle the current change event.
Restore the widgets in this tracker's namespace.
Optional
options: IRestorable.IOptions<NotebookPanel>The configuration options that describe restoration.
A promise that resolves when restoration has completed.
This function should not typically be invoked by client code. Its primary use case is to be invoked by a restorer.
Save the restore data for a given widget.
The widget being saved.
An object that tracks notebook widgets.