Class: Gtk::ScaleButton

Inherits:
Object
  • Object
show all
Defined in:
lib/gtk3/scale-button.rb

Instance Method Summary collapse

Constructor Details

#initialize(options = {}) ⇒ ScaleButton

Returns a new instance of ScaleButton


20
21
22
23
24
25
26
27
28
29
30
31
32
33
# File 'lib/gtk3/scale-button.rb', line 20

def initialize(options={})
  icon_size = options[:icon_size] || :button
  min       = options[:min]       || 0
  max       = options[:max]       || 100
  step      = options[:step]      || 2
  icons     = options[:icons]     || nil

  case icon_size
  when Symbol, String
    icon_size = IconSize.new(icon_size.to_s)
  end

  initialize_raw(icon_size, min, max, step, icons)
end

Instance Method Details

#initialize_rawObject


19
# File 'lib/gtk3/scale-button.rb', line 19

alias_method :initialize_raw, :initialize