Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release.
Base Widget class. Allows user to create widgets in the back-end that render in the IPython notebook front-end.
Bases: IPython.config.configurable.LoggingConfigurable
A structure for registering and running callbacks
(Un)Register a callback
| Parameters: | callback: method handle :
remove=False: bool :
|
|---|
Bases: IPython.config.configurable.LoggingConfigurable
Public constructor
Close method.
Closes the underlying comm. When the comm is closed, all of the widget views are automatically removed from the front-end.
Gets the widget state, or a piece of it.
| Parameters: | key : unicode or iterable (optional)
|
|---|
Static method, called when a widget is constructed.
Hold syncing any state until the context manager is released
Gets the model id of this widget.
If a Comm doesn’t exist yet, a Comm will be created automagically.
(Un)Register a widget displayed callback.
| Parameters: | callback: method handler :
remove: bool :
|
|---|
(Un)Register a custom msg receive callback.
| Parameters: | callback: callable :
remove: bool :
|
|---|
Registers a callback to be called when a widget is constructed.
The callback must have the following signature: callback(widget)
Open a comm to the frontend if one isn’t already open.
Sends a custom msg to the widget model in the front-end.
| Parameters: | content : dict
|
|---|
Sends the widget state, or a piece of it, to the front-end.
| Parameters: | key : unicode, or iterable (optional)
|
|---|
Called when a state is received from the front-end.
Bases: IPython.html.widgets.widget.Widget
Returns a decorator registering a widget class in the widget registry. If no key is provided, the class name is used as a key. A key is provided for each core IPython widget so that the frontend can use this key regardless of the language of the kernel