ipython/ipython — pull request #6493 by SylvainCorlay (2014-09-17 21:21:19+00:00)
Title: Creating a widget registry on the Python side.

Widgets classes are registered on definition of the class using a decorator called `register`.

```Python
@register(key='Foo')
class Baz(Widget)
# ....
```
When not specifying any argument, the view name is used as a key.
```Python
@register()
class Baz(Widget)
# ....
```

The motivation is twofold:
1- Creation of Widgets from the JavaScript side
2- Graphical gui building interface, that needs to know about a registry of widgets.

For the latter case rather than using a registry in the form of a `key: widget_class` dictionary as now, we could have some other metadata store with it:
```Python
key: {
class: widget_class,
metadata: {}
}
```
The metadata could be used for categorization of widget (control, visualization, container) etc...