Class: CWM::IntField
- Inherits:
-
AbstractWidget
- Object
- AbstractWidget
- CWM::IntField
- Includes:
- ValueBasedWidget
- Defined in:
- library/cwm/src/lib/cwm/common_widgets.rb
Overview
An integer field widget. The AbstractWidget#label method is mandatory. It supports optional #minimum and #maximum methods for limiting the range. See #cwm_definition method for minimum and maximum example
Instance Attribute Summary
Attributes inherited from AbstractWidget
#handle_all_events, #widget_id
Instance Method Summary collapse
-
#cwm_definition ⇒ WidgetHash
The definition for IntField additionally supports
minimum
andmaximum
methods. -
#maximum ⇒ Fixnum
Limited by C signed int range (-2*30 to 2*31-1).
-
#minimum ⇒ Fixnum
Limited by C signed int range (-2*30 to 2*31-1).
Methods included from ValueBasedWidget
Methods inherited from AbstractWidget
#cleanup, #disable, #displayed?, #enable, #enabled?, #focus, #fun_ref, #handle, #help, #init, #label, #my_event?, #opt, #refresh_help, #store, #validate, widget_type=
Instance Method Details
#cwm_definition ⇒ WidgetHash
The definition for IntField additionally supports
minimum
and maximum
methods.
286 287 288 289 290 291 292 293 |
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 286 def cwm_definition res = {} res["minimum"] = minimum if respond_to?(:minimum) res["maximum"] = maximum if respond_to?(:maximum) super.merge(res) end |
#maximum ⇒ Fixnum
Returns limited by C signed int range (-2*30 to 2*31-1).
|
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 271
|
#minimum ⇒ Fixnum
Returns limited by C signed int range (-2*30 to 2*31-1).
|
# File 'library/cwm/src/lib/cwm/common_widgets.rb', line 268
|