##// END OF EJS Templates
s/Int/CInt s/Float/CFloat
Jonathan Frederic -
Show More
@@ -18,7 +18,7 b' import inspect'
18 import types
18 import types
19
19
20 from .widget import DOMWidget
20 from .widget import DOMWidget
21 from IPython.utils.traitlets import Unicode, Bool, Int
21 from IPython.utils.traitlets import Unicode, Bool
22
22
23 #-----------------------------------------------------------------------------
23 #-----------------------------------------------------------------------------
24 # Classes
24 # Classes
@@ -14,7 +14,7 b' Represents an unbounded float using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
16 from .widget import DOMWidget
17 from IPython.utils.traitlets import Unicode, Float, Bool, List
17 from IPython.utils.traitlets import Unicode, CFloat, Bool, List
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
@@ -23,6 +23,6 b' class FloatTextWidget(DOMWidget):'
23 view_name = Unicode('FloatTextView', sync=True)
23 view_name = Unicode('FloatTextView', sync=True)
24
24
25 # Keys
25 # Keys
26 value = Float(0.0, help="Float value", sync=True)
26 value = CFloat(0.0, help="Float value", 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 description = Unicode(help="Description of the value this widget represents", sync=True)
28 description = Unicode(help="Description of the value this widget represents", sync=True)
@@ -14,18 +14,18 b' Represents a bounded float using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
16 from .widget import DOMWidget
17 from IPython.utils.traitlets import Unicode, Float, Bool, List
17 from IPython.utils.traitlets import Unicode, CFloat, Bool, List
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
21 #-----------------------------------------------------------------------------
21 #-----------------------------------------------------------------------------
22 class BoundedFloatTextWidget(DOMWidget):
22 class BoundedFloatTextWidget(DOMWidget):
23 view_name = Unicode('FloatTextView', sync=True)
23 view_name = Unicode('FloatTextView', sync=True)
24 value = Float(0.0, help="Float value", sync=True)
24 value = CFloat(0.0, help="Float value", sync=True)
25 max = Float(100.0, help="Max value", sync=True)
25 max = CFloat(100.0, help="Max value", sync=True)
26 min = Float(0.0, help="Min value", sync=True)
26 min = CFloat(0.0, help="Min value", 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 step = Float(0.1, help="Minimum step that the value can take (ignored by some views)", sync=True)
28 step = CFloat(0.1, help="Minimum step that the value can take (ignored by some views)", sync=True)
29 description = Unicode(help="Description of the value this widget represents", sync=True)
29 description = Unicode(help="Description of the value this widget represents", sync=True)
30
30
31
31
@@ -14,7 +14,7 b' Represents an unbounded int using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
16 from .widget import DOMWidget
17 from IPython.utils.traitlets import Unicode, Int, Bool, List
17 from IPython.utils.traitlets import Unicode, CInt, Bool, List
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
@@ -23,6 +23,6 b' class IntTextWidget(DOMWidget):'
23 view_name = Unicode('IntTextView', sync=True)
23 view_name = Unicode('IntTextView', sync=True)
24
24
25 # Keys
25 # Keys
26 value = Int(0, help="Int value", sync=True)
26 value = CInt(0, help="Int value", 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 description = Unicode(help="Description of the value this widget represents", sync=True)
28 description = Unicode(help="Description of the value this widget represents", sync=True)
@@ -14,7 +14,7 b' Represents a bounded int using a widget.'
14 # Imports
14 # Imports
15 #-----------------------------------------------------------------------------
15 #-----------------------------------------------------------------------------
16 from .widget import DOMWidget
16 from .widget import DOMWidget
17 from IPython.utils.traitlets import Unicode, Int, Bool, List
17 from IPython.utils.traitlets import Unicode, CInt, Bool, List
18
18
19 #-----------------------------------------------------------------------------
19 #-----------------------------------------------------------------------------
20 # Classes
20 # Classes
@@ -23,11 +23,11 b' class BoundedIntTextWidget(DOMWidget):'
23 view_name = Unicode('IntTextView', sync=True)
23 view_name = Unicode('IntTextView', sync=True)
24
24
25 # Keys
25 # Keys
26 value = Int(0, help="Int value", sync=True)
26 value = CInt(0, help="Int value", sync=True)
27 max = Int(100, help="Max value", sync=True)
27 max = CInt(100, help="Max value", sync=True)
28 min = Int(0, help="Min value", sync=True)
28 min = CInt(0, help="Min value", sync=True)
29 disabled = Bool(False, help="Enable or disable user changes", sync=True)
29 disabled = Bool(False, help="Enable or disable user changes", sync=True)
30 step = Int(1, help="Minimum step that the value can take (ignored by some views)", sync=True)
30 step = CInt(1, help="Minimum step that the value can take (ignored by some views)", sync=True)
31 description = Unicode(help="Description of the value this widget represents", sync=True)
31 description = Unicode(help="Description of the value this widget represents", sync=True)
32
32
33
33
@@ -15,7 +15,7 b' pages.'
15 # Imports
15 # Imports
16 #-----------------------------------------------------------------------------
16 #-----------------------------------------------------------------------------
17 from .widget import DOMWidget
17 from .widget import DOMWidget
18 from IPython.utils.traitlets import Unicode, Dict, Int, List, Instance
18 from IPython.utils.traitlets import Unicode, Dict, CInt, List, Instance
19
19
20 #-----------------------------------------------------------------------------
20 #-----------------------------------------------------------------------------
21 # Classes
21 # Classes
@@ -25,7 +25,7 b' class AccordionWidget(DOMWidget):'
25
25
26 # Keys
26 # Keys
27 _titles = Dict(help="Titles of the pages", sync=True)
27 _titles = Dict(help="Titles of the pages", sync=True)
28 selected_index = Int(0, sync=True)
28 selected_index = CInt(0, sync=True)
29
29
30 children = List(Instance(DOMWidget), sync=True)
30 children = List(Instance(DOMWidget), sync=True)
31
31
@@ -17,7 +17,7 b' import inspect'
17 import types
17 import types
18
18
19 from .widget import DOMWidget
19 from .widget import DOMWidget
20 from IPython.utils.traitlets import Unicode, Bool, List, Int
20 from IPython.utils.traitlets import Unicode, Bool, List
21
21
22 #-----------------------------------------------------------------------------
22 #-----------------------------------------------------------------------------
23 # Classes
23 # Classes
General Comments 0
You need to be logged in to leave comments. Login now