Added int widget

pull/37/head
Jonathan Frederic 13 years ago
parent 26f31184e7
commit f3a3e7c9cb

@ -0,0 +1,4 @@
require(["notebook/js/widget"], function(){
var IntWidgetModel = IPython.WidgetModel.extend({});
IPython.notebook.widget_manager.register_widget_model('IntWidgetModel', IntWidgetModel);
});

@ -4,6 +4,7 @@ from bool import BoolWidget
from container import ContainerWidget
from float import FloatWidget
from float_range import FloatRangeWidget
from int import IntWidget
from int_range import IntRangeWidget
from selection import SelectionWidget
from string import StringWidget

@ -0,0 +1,10 @@
from base import Widget
from IPython.utils.traitlets import Unicode, Int, Bool, List
class IntWidget(Widget):
target_name = Unicode('IntWidgetModel')
default_view_name = Unicode('IntTextView')
_keys = ['value', 'disabled']
value = Int(0)
disabled = Bool(False) # Enable or disable user changes
Loading…
Cancel
Save