Class: Gtk::SpinButton

Inherits:
Object
  • Object
show all
Extended by:
GLib::Deprecatable
Defined in:
lib/gtk3/deprecated.rb,
lib/gtk3/spin-button.rb

Instance Method Summary collapse

Constructor Details

#initialize(arg0, arg1 = nil, arg2 = nil) ⇒ SpinButton

Returns a new instance of SpinButton.



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

def initialize(arg0, arg1=nil, arg2=nil)
  if arg0.is_a?(Adjustment)
    adjustment = arg0
    climb_rate = arg1 || 0.0
    digits     = arg2 || 0
    initialize_raw(adjustment, climb_rate, digits)
  else
    min  = arg0
    max  = arg1
    step = arg2
    initialize_new_with_range(min, max, step)
  end
end

Instance Method Details

#initialize_rawObject



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

alias_method :initialize_raw, :initialize