Class: UnderOs::UI::Slider
- Includes:
- Editable
- Defined in:
- lib/under_os/ui/slider.rb
Constant Summary
Constants included from Editable
Constants included from Wrap
Wrap::INSTANCES_CACHE, Wrap::RAW_WRAPS_MAP, Wrap::WRAPS_TAGS_MAP
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Slider
constructor
A new instance of Slider.
- #max ⇒ Object
- #max=(value) ⇒ Object
- #min ⇒ Object
- #min=(value) ⇒ Object
- #value ⇒ Object
- #value=(value) ⇒ Object
Methods included from Editable
#keyboard, #keyboard=, #placeholder, #placeholder=
Methods inherited from View
Methods included from Manipulation
#append, #clear, #insert, #insertTo, #prepend, #remove
Methods included from Traversing
#children, #empty?, #find, #first, #matches, #parent, #siblings
Methods included from Dimensions
#position, #position=, #size, #size=
Methods included from Animation
#animate, #fade_in, #fade_out, #highlight
Methods included from Commons
#data, #data=, #hidden, #hide, #id, #id=, #page, #show, #tagName, #toggle, #visible
Methods included from Styles
#addClass, #className, #className=, #classNames, #classNames=, #hasClass, #radioClass, #removeClass, #repaint, #style, #style=, #toggleClass
Methods included from Events
Methods included from Wrap
Constructor Details
#initialize(options = {}) ⇒ Slider
Returns a new instance of Slider.
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/under_os/ui/slider.rb', line 6 def initialize(={}) super self.min = [:min] if [:min] self.max = [:max] if [:max] self.value = [:value] if [:value] @_.continuous = .delete(:track) || true # track the changes as they go @_.addTarget self, action: :fire_change_event, forControlEvents:UIControlEventValueChanged end |
Instance Method Details
#max ⇒ Object
33 34 35 |
# File 'lib/under_os/ui/slider.rb', line 33 def max @_.maximumValue end |
#max=(value) ⇒ Object
37 38 39 |
# File 'lib/under_os/ui/slider.rb', line 37 def max=(value) @_.maximumValue = value.to_f end |
#min ⇒ Object
25 26 27 |
# File 'lib/under_os/ui/slider.rb', line 25 def min @_.minimumValue end |
#min=(value) ⇒ Object
29 30 31 |
# File 'lib/under_os/ui/slider.rb', line 29 def min=(value) @_.minimumValue = value.to_f end |
#value ⇒ Object
17 18 19 |
# File 'lib/under_os/ui/slider.rb', line 17 def value @_.value end |
#value=(value) ⇒ Object
21 22 23 |
# File 'lib/under_os/ui/slider.rb', line 21 def value=(value) @_.value = value.to_f end |