##// END OF EJS Templates
Dev meeting Jan 2014, widget review day 2
Dev meeting Jan 2014, widget review day 2

File last commit:

r14587:d8f5efb7
r14587:d8f5efb7
Show More
widget_container.py
32 lines | 1.3 KiB | text/x-python | PythonLexer
Jonathan Frederic
Cleaned up Python widget code.
r14283 """ContainerWidget class.
Represents a container that can be used to group other widgets.
"""
#-----------------------------------------------------------------------------
# Copyright (c) 2013, the IPython Development Team.
#
# Distributed under the terms of the Modified BSD License.
#
# The full license is in the file COPYING.txt, distributed with this software.
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
# Imports
#-----------------------------------------------------------------------------
Jonathan Frederic
s/Widget/DOMWidget s/BaseWidget/Widget
r14540 from .widget import DOMWidget
Jason Grout
Intermediate changes to javascript side of backbone widgets
r14486 from IPython.utils.traitlets import Unicode, Bool, List, Instance
Jonathan Frederic
Add container widget
r14239
Jonathan Frederic
Cleaned up Python widget code.
r14283 #-----------------------------------------------------------------------------
# Classes
#-----------------------------------------------------------------------------
Jonathan Frederic
s/Widget/DOMWidget s/BaseWidget/Widget
r14540 class ContainerWidget(DOMWidget):
Jonathan Frederic
Made registered model name look like other model names
r14275 target_name = Unicode('ContainerWidgetModel')
Jonathan Frederic
s/default_view_name/view_name
r14541 view_name = Unicode('ContainerView')
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268
Jonathan Frederic
Cleaned up Python widget code.
r14283 # Keys, all private and managed by helper methods. Flexible box model
# classes...
Jonathan Frederic
Dev meeting Jan 2014, widget review day 2
r14587 keys = ['description', 'button_text', 'children'] + DOMWidget.keys # TODO: Use add/remove_class
Jonathan Frederic
s/Widget/DOMWidget s/BaseWidget/Widget
r14540 children = List(Instance(DOMWidget))
Jason Grout
Make sure containers transmit the children; take care of case where children is possibly empty.
r14498
Jonathan Frederic
Added ModalView
r14409 description = Unicode()
button_text = Unicode()