##// END OF EJS Templates
Merge pull request #6174 from Carreau/pagemain...
Merge pull request #6174 from Carreau/pagemain remove pagemain.js

File last commit:

r17173:3708014c
r17281:9c9262fc merge
Show More
widget_container.py
33 lines | 1.0 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.
"""
Jonathan Frederic
Allow a widget to be displayed more than once within a parent widget.
r17172
# Copyright (c) IPython Development Team.
Jonathan Frederic
Cleaned up Python widget code.
r14283 # Distributed under the terms of the Modified BSD License.
Jonathan Frederic
s/Widget/DOMWidget s/BaseWidget/Widget
r14540 from .widget import DOMWidget
MinRK
don't validate ContainerWidget.children...
r15480 from IPython.utils.traitlets import Unicode, Tuple, TraitError
Jonathan Frederic
Add container widget
r14239
Jonathan Frederic
s/Widget/DOMWidget s/BaseWidget/Widget
r14540 class ContainerWidget(DOMWidget):
Jonathan Frederic
s/view_name/_view_name
r14701 _view_name = Unicode('ContainerView', sync=True)
Jonathan Frederic
Attempt 1, HBox and VBox implementation.
r14268
MinRK
don't validate ContainerWidget.children...
r15480 # Child widgets in the container.
# Using a tuple here to force reassignment to update the list.
# When a proper notifying-list trait exists, that is what should be used here.
Jonathan Frederic
Fixed buggy behavior
r17173 children = Tuple(sync=True)
zah
Children fire event...
r15446
def __init__(self, **kwargs):
super(ContainerWidget, self).__init__(**kwargs)
self.on_displayed(ContainerWidget._fire_children_displayed)
def _fire_children_displayed(self):
Jonathan Frederic
Fixed buggy behavior
r17173 for child in self.children:
zah
Children fire event...
r15446 child._handle_displayed()
Jonathan Frederic
More PEP8 changes
r14607
Jonathan Frederic
s/ModalView/PopupView
r14676 class PopupWidget(ContainerWidget):
Jonathan Frederic
s/view_name/_view_name
r14701 _view_name = Unicode('PopupView', sync=True)
Jonathan Frederic
containers and selectioncontainers now only allow one of any single child
r14608
description = Unicode(sync=True)
button_text = Unicode(sync=True)