Note
This documentation is for a development version of IPython. There may be significant differences from the latest stable release (1.2.1).
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 widget which closes the underlying comm. When the comm is closed, all of the widget views are automatically removed from the front-end.
Gets the Comm associated with this widget.
If a Comm doesn’t exist yet, a Comm will be created automagically.
Gets the widget state, or a piece of it.
Parameters: | key : unicode (optional)
|
---|
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)
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 (optional)
|
---|
Bases: IPython.html.widgets.widget.Widget
Add class[es] to a DOM element.
Parameters: | class_names: unicode or list
selector: unicode (optional)
|
---|
Get a CSS property of the widget.
Note: This function does not actually request the CSS from the front-end; Only properties that have been set with set_css can be read.
Parameters: | key: unicode
selector: unicode (optional)
|
---|
Remove class[es] from a DOM element.
Parameters: | class_names: unicode or list
selector: unicode (optional)
|
---|
Set one or more CSS properties of the widget.
This function has two signatures: - set_css(css_dict, selector=’‘) - set_css(key, value, selector=’‘)
Parameters: | css_dict : dict
key: unicode
value:
selector: unicode (optional, kwarg only)
|
---|