##// END OF EJS Templates
Fix typo in deprecated class name.
Jonathan Frederic -
Show More
@@ -1,23 +1,23 b''
1 from .widget import Widget, DOMWidget, CallbackDispatcher
1 from .widget import Widget, DOMWidget, CallbackDispatcher
2
2
3 from .widget_bool import Checkbox, ToggleButton
3 from .widget_bool import Checkbox, ToggleButton
4 from .widget_button import Button
4 from .widget_button import Button
5 from .widget_box import Box, Popup, FlexBox, HBox, VBox
5 from .widget_box import Box, Popup, FlexBox, HBox, VBox
6 from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress
6 from .widget_float import FloatText, BoundedFloatText, FloatSlider, FloatProgress
7 from .widget_image import Image
7 from .widget_image import Image
8 from .widget_int import IntText, BoundedIntText, IntSlider, IntProgress
8 from .widget_int import IntText, BoundedIntText, IntSlider, IntProgress
9 from .widget_selection import RadioButtons, ToggleButtons, Dropdown, Select
9 from .widget_selection import RadioButtons, ToggleButtons, Dropdown, Select
10 from .widget_selectioncontainer import Tab, Accordion
10 from .widget_selectioncontainer import Tab, Accordion
11 from .widget_string import HTML, Latex, Text, Textarea
11 from .widget_string import HTML, Latex, Text, Textarea
12 from .interaction import interact, interactive, fixed
12 from .interaction import interact, interactive, fixed
13
13
14 # Deprecated classes
14 # Deprecated classes
15 from .widget_bool import CheckBox, ToggleButtonWidget
15 from .widget_bool import CheckboxWidget, ToggleButtonWidget
16 from .widget_button import ButtonWidget
16 from .widget_button import ButtonWidget
17 from .widget_box import ContainerWidget, PopupWidget
17 from .widget_box import ContainerWidget, PopupWidget
18 from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
18 from .widget_float import FloatTextWidget, BoundedFloatTextWidget, FloatSliderWidget, FloatProgressWidget
19 from .widget_image import ImageWidget
19 from .widget_image import ImageWidget
20 from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
20 from .widget_int import IntTextWidget, BoundedIntTextWidget, IntSliderWidget, IntProgressWidget
21 from .widget_selection import RadioButtonsWidget, ToggleButtonsWidget, DropdownWidget, SelectWidget
21 from .widget_selection import RadioButtonsWidget, ToggleButtonsWidget, DropdownWidget, SelectWidget
22 from .widget_selectioncontainer import TabWidget, AccordionWidget
22 from .widget_selectioncontainer import TabWidget, AccordionWidget
23 from .widget_string import HTMLWidget, LatexWidget, TextWidget, TextareaWidget
23 from .widget_string import HTMLWidget, LatexWidget, TextWidget, TextareaWidget
@@ -1,43 +1,43 b''
1 """Bool class.
1 """Bool class.
2
2
3 Represents a boolean using a widget.
3 Represents a boolean using a widget.
4 """
4 """
5 #-----------------------------------------------------------------------------
5 #-----------------------------------------------------------------------------
6 # Copyright (c) 2013, the IPython Development Team.
6 # Copyright (c) 2013, the IPython Development Team.
7 #
7 #
8 # Distributed under the terms of the Modified BSD License.
8 # Distributed under the terms of the Modified BSD License.
9 #
9 #
10 # The full license is in the file COPYING.txt, distributed with this software.
10 # The full license is in the file COPYING.txt, distributed with this software.
11 #-----------------------------------------------------------------------------
11 #-----------------------------------------------------------------------------
12
12
13 #-----------------------------------------------------------------------------
13 #-----------------------------------------------------------------------------
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
16 from .widget import DOMWidget
17 from IPython.utils.traitlets import Unicode, Bool
17 from IPython.utils.traitlets import Unicode, Bool
18 from IPython.utils.warn import DeprecatedClass
18 from IPython.utils.warn import DeprecatedClass
19
19
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21 # Classes
21 # Classes
22 #-----------------------------------------------------------------------------
22 #-----------------------------------------------------------------------------
23 class _Bool(DOMWidget):
23 class _Bool(DOMWidget):
24 """A base class for creating widgets that represent booleans."""
24 """A base class for creating widgets that represent booleans."""
25 value = Bool(False, help="Bool value", sync=True)
25 value = Bool(False, help="Bool value", sync=True)
26 description = Unicode('', help="Description of the boolean (label).", sync=True)
26 description = Unicode('', help="Description of the boolean (label).", sync=True)
27 disabled = Bool(False, help="Enable or disable user changes.", sync=True)
27 disabled = Bool(False, help="Enable or disable user changes.", sync=True)
28
28
29
29
30 class Checkbox(_Bool):
30 class Checkbox(_Bool):
31 """Displays a boolean `value`."""
31 """Displays a boolean `value`."""
32 _view_name = Unicode('CheckboxView', sync=True)
32 _view_name = Unicode('CheckboxView', sync=True)
33
33
34
34
35 class ToggleButton(_Bool):
35 class ToggleButton(_Bool):
36 """Displays a boolean `value`."""
36 """Displays a boolean `value`."""
37
37
38 _view_name = Unicode('ToggleButtonView', sync=True)
38 _view_name = Unicode('ToggleButtonView', sync=True)
39
39
40
40
41 # Remove in IPython 4.0
41 # Remove in IPython 4.0
42 CheckBox = DeprecatedClass(Checkbox, 'CheckBox')
42 CheckboxWidget = DeprecatedClass(Checkbox, 'CheckboxWidget')
43 ToggleButtonWidget = DeprecatedClass(ToggleButton, 'ToggleButtonWidget')
43 ToggleButtonWidget = DeprecatedClass(ToggleButton, 'ToggleButtonWidget')
General Comments 0
You need to be logged in to leave comments. Login now