Added ViewWidget

This commit is contained in:
Jonathan Frederic 2014-01-02 14:23:34 -08:00 committed by Jonathan Frederic
parent 399f11e2b2
commit 1b4e2ad6fe

View File

@ -27,6 +27,8 @@ from IPython.utils.traitlets import Unicode, Dict, List, Instance, Bool
from IPython.display import Javascript, display
from IPython.utils.py3compat import string_types
from .widget_view import ViewWidget
#-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
@ -436,3 +438,9 @@ class Widget(BaseWidget):
self.send({"msg_type": "remove_class",
"class_list": class_name,
"selector": selector})
def view(self, view_name=None):
"""Return a widget that can be displayed to display this widget using
a non-default view"""
return ViewWidget(self, view_name)