Show More
@@ -0,0 +1,25 b'' | |||
|
1 | Notebook Widgets | |
|
2 | ---------------- | |
|
3 | ||
|
4 | Available in the new `IPython.html.widgets` namespace, widgets provide an easy | |
|
5 | way for IPython notebook users to display GUI controls in the IPython notebook. | |
|
6 | IPython comes with bundle of built-in widgets and also the ability for users | |
|
7 | to define their own widgets. A widget is displayed in the front-end using | |
|
8 | using a view. For example, a FloatRangeWidget can be displayed using a | |
|
9 | FloatSliderView (which is the default if no view is specified when displaying | |
|
10 | the widget). IPython also comes with a bundle of views and the ability for the | |
|
11 | user to define custom views. One widget can be displayed multiple times, in on | |
|
12 | or more cells, using one or more views. All views will automatically remain in | |
|
13 | sync with the widget which is accessible in the back-end. | |
|
14 | ||
|
15 | The widget layer provides an MVC-like architecture on top of the comm layer. | |
|
16 | It's useful for widgets that can be expressed via a list of properties. | |
|
17 | Widgets work by synchronizing IPython traitlet models in the back-end with | |
|
18 | backbone models in the front-end. The widget layer automatically handles | |
|
19 | ||
|
20 | * delta compression (only sending the state information that has changed) | |
|
21 | * wiring the message callbacks to the correct cells automatically | |
|
22 | * inter-view synchronization (handled by backbone) | |
|
23 | * message throttling (to avoid flooding the kernel) | |
|
24 | * parent/child relationships between views (which one can override to specify custom parent/child relationships) | |
|
25 | * ability to manipulate the widget view's DOM from python using CSS, $().addClass, and $().removeClass methods |
General Comments 0
You need to be logged in to leave comments.
Login now