class UnderOs::UI::Slider

Public Class Methods

new(options={}) click to toggle source
Calls superclass method UnderOs::UI::Input::new
# File lib/under_os/ui/slider.rb, line 4
def initialize(options={})
  super

  self.min   = options[:min]   if options[:min]
  self.max   = options[:max]   if options[:max]

  @_.continuous = options.delete(:track) || true # track the changes as they go
  @_.addTarget self, action: :handle_change, forControlEvents:UIControlEventValueChanged
end

Public Instance Methods

max() click to toggle source
# File lib/under_os/ui/slider.rb, line 30
def max
  @_.maximumValue
end
max=(value) click to toggle source
# File lib/under_os/ui/slider.rb, line 34
def max=(value)
  @_.maximumValue = value.to_f
end
min() click to toggle source
# File lib/under_os/ui/slider.rb, line 22
def min
  @_.minimumValue
end
min=(value) click to toggle source
# File lib/under_os/ui/slider.rb, line 26
def min=(value)
  @_.minimumValue = value.to_f
end
value() click to toggle source
# File lib/under_os/ui/slider.rb, line 14
def value
  @_.value
end
value=(value) click to toggle source
# File lib/under_os/ui/slider.rb, line 18
def value=(value)
  @_.value = value.to_f
end