Private _activePrivate _activePrivate _activePrivate Optional _cellPrivate _checkPrivate _dragPrivate _dragPrivate _ensureEnsure that the notebook has proper focus.
Private _evtHandle contextmenu event.
Private _evtHandle dblclick events for the widget.
Private _evtHandle the 'mousemove' event for the widget.
Private _evtHandle the 'mouseup' event on the document.
Private _evtHandle the 'lm-dragenter' event for the widget.
Private _evtHandle the 'lm-dragleave' event for the widget.
Private _evtHandle the 'lm-dragover' event for the widget.
Private _evtHandle the 'lm-drop' event for the widget.
Private _evtHandle focus events for the widget.
Private _evtHandle focusout events for the notebook.
Private _evtHandle mousedown events for the widget.
Private _evtHandle mousedown event in the capture phase for the widget.
Private _findPrivate _findFind the target of html mouse event and cell index containing this target.
Returned index is -1 if the cell is not found.
Private _lastPrivate _modePrivate _mousePrivate _onHandle edge request signals from cells.
Private _parsePrivate _selectedPrivate _selectionPrivate _startStart a drag event.
Private _statePrivate _trimRemove selections from inactive cells to avoid spurious cursors.
Private _updateUpdate the notebook node with class indicating read-write state.
Private _updateProtected cellsReadonly contentThe cell factory used by the widget.
Protected jumpedA signal that emits the index when the virtual scrollbar jumps to an item.
Readonly kernelReadonly nodeGet the DOM node owned by the widget.
Protected rendererThe renderer for this windowed list. Set at instantiation.
Readonly rendermimeThe Rendermime instance used by the widget.
Readonly translatorTranslator to be used by cell renderers
Static Readonly DEFAULT_Default widget size
A signal emitted when the active cell changes.
This can be due to the active index changing or the cell at the active index changing.
The active cell index of the notebook.
The index will be clamped to the bounds of the notebook cells.
Get the mimetype for code cells.
The dataset for the widget's DOM node.
A configuration object for cell editor settings.
Get the method for hiding the widget.
Set the method for hiding the widget.
Get the id of the widget's DOM node.
Set the id of the widget's DOM node.
Test whether the widget's node is attached to the DOM.
Test whether the widget has been disposed.
Test whether the widget is explicitly hidden.
Whether the parent is hidden or not.
This should be set externally if a container is hidden to stop updating the widget size when hidden.
Test whether the widget is visible.
A widget is visible when it is attached to the DOM, is not explicitly hidden, and has no explicitly hidden ancestors.
Widget layout
The interactivity mode of the notebook.
The model for the widget.
A configuration object for notebook settings.
The outer container of the windowed list.
Get the parent of the widget.
Set the parent of the widget.
Children are typically added to a widget by using a layout, which means user code will not normally set the parent widget directly.
The widget will be automatically removed from its old parent.
This is a no-op if there is no effective parent change.
Flag to enable virtual scrollbar.
List of selected and active cells
A signal emitted when the state of the notebook changes.
The title object for the widget.
The title object is used by some container widgets when displaying the widget alongside some title, such as a tab panel or side bar.
Since not all widgets will use the title, it is created on demand.
The owner property of the title is set to this widget.
Protected viewWindowed list view model
Viewport
A read-only sequence of the widgets in the notebook.
Protected _onHandle a change cells event.
Post an 'activate-request' message to the widget.
This is a simple convenience method for posting the message.
Add a class name to the widget's DOM node.
The class name to add to the node.
If the class name is already added to the node, this is a no-op.
The class name must not contain whitespace.
Protected addAdds a footer to the notebook.
Protected addCreate an iterator over the widget's children.
A new iterator over the children of the widget.
The widget must have a populated layout in order to have children.
If a layout is not installed, the returned iterator will be empty.
Send a 'close-request' message to the widget.
This is a simple convenience method for sending the message.
Test whether a widget is a descendant of this widget.
The descendant widget of interest.
true if the widget is a descendant, false otherwise.
Deselect a cell widget.
It is a no-op if the value does not change.
It will emit the selectionChanged signal.
Move the head of an existing contiguous selection to extend the selection.
The new head of the existing selection.
If there is no existing selection, the active cell is considered an existing one-cell selection.
If the new selection is a single cell, that cell becomes the active cell and all cells are deselected.
There is no change if there are no cells (i.e., activeCellIndex is -1).
Post a 'fit-request' message to the widget.
This is a simple convenience method for posting the message.
Get the head and anchor of a contiguous cell selection.
The head of a contiguous selection is always the active cell.
If there are no cells selected, {head: null, anchor: null} is returned.
Throws an error if the currently selected cells do not form a contiguous selection.
Whether a cell is selected.
Whether a cell is selected or is the active cell.
Move cells preserving widget view state.
This is required because at the model level a move is a deletion followed by an insertion. Hence the view state is not preserved.
The index of the cell to move
The new index of the cell
Optional n: numberNumber of cells to move
Protected notifyInvoke the message processing routine of the widget's layout.
The message to dispatch to the layout.
This is a no-op if the widget does not have a layout.
This will not typically be called directly by user code.
Protected onProtected onProtected onA message handler invoked on an 'after-detach' message.
The default implementation of this handler is a no-op.
Protected onA message handler invoked on an 'after-hide' message.
The default implementation of this handler is a no-op.
Protected onProtected onA message handler invoked on a 'before-attach' message.
The default implementation of this handler is a no-op.
Protected onProtected onProtected onA message handler invoked on a 'before-show' message.
The default implementation of this handler is a no-op.
Protected onHandle a cell being inserted.
Protected onHandle a cell being removed.
Protected onA message handler invoked on a 'child-added' message.
The default implementation of this handler is a no-op.
Protected onA message handler invoked on a 'child-removed' message.
The default implementation of this handler is a no-op.
Protected onA message handler invoked on a 'close-request' message.
The default implementation unparents or detaches the widget.
Protected onA message handler invoked on a 'fit-request' message.
The default implementation of this handler is a no-op.
Protected onHandle changes to the notebook model metadata.
The default implementation updates the mimetypes of the code cells
when the language_info metadata changes.
Protected onHandle a new model.
Protected onHandle changes to the notebook model content.
The default implementation emits the modelContentChanged signal.
Protected onProtected onCallback on scroll event
Scroll event
Protected onCallback on view model change
Windowed list model
Change
Protected onRemove a class name from the widget's DOM node.
The class name to remove from the node.
If the class name is not yet added to the node, this is a no-op.
The class name must not contain whitespace.
Protected removeForce rendering the cell outputs of a given cell if it is still a placeholder.
The goal of this method is to allow search on cell outputs (that is based on DOM tree introspection).
The cell index
Scroll so that the given cell is in view. Selects and activates cell.
A cell in the notebook widget.
Optional align: ScrollToAlignType of alignment.
Scroll to the specified item.
By default, the list will scroll as little as possible to ensure the item is fully visible (auto).
You can control the alignment of the item though by specifying a second alignment parameter.
Acceptable values are:
auto - Automatically align with the top or bottom minimising the amount scrolled,
If alignPreference is given, follow such preferred alignment.
If item is smaller than the viewport and fully visible, do not scroll at all.
smart - If the item is significantly visible, don't scroll at all (regardless of whether it fits in the viewport).
If the item is less than one viewport away, scroll so that it becomes fully visible (following the auto heuristics).
If the item is more than one viewport away, scroll so that it is centered within the viewport (center if smaller than viewport, top-center otherwise).
center - Align the middle of the item with the middle of the viewport (it only works well for items smaller than the viewport).
top-center - Align the top of the item with the middle of the viewport (works well for items larger than the viewport).
end - Align the bottom of the item to the bottom of the list.
start - Align the top of item to the top of the list.
Item index to scroll to
Optional align: ScrollToAlignType of alignment
Optional margin: numberIn 'smart' mode the viewport proportion to add
Optional alignPreference: BaseScrollToAlignmentAllows to override the alignment of item when the auto heuristic decides that the item needs to be scrolled into view.
Select a cell widget.
It is a no-op if the value does not change.
It will emit the selectionChanged signal.
Show or hide the widget according to a boolean value.
true to hide the widget, or false to show it.
This is a convenience method for hide() and show().
Protected setSet the notebook mode.
Notebook mode
Optional options: { Control mode side-effect
Optional focus?: booleanWhether to ensure focus (default) or not when setting the mode.
Test whether the given widget flag is set.
This will not typically be called directly by user code.
Toggle a class name on the widget's DOM node.
The class name to toggle on the node.
Optional force: booleanWhether to force add the class (true) or force
remove the class (false). If not provided, the presence of
the class will be toggled from its current state.
true if the class is now present, false otherwise.
The class name must not contain whitespace.
Post an 'update-request' message to the widget.
This is a simple convenience method for posting the message.
Generated using TypeDoc
A notebook widget that supports interactivity.