summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk/spinbox.rb
blob: 664df61755577b5a01ca4c82d6dfcc750a33956e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#
#		tk/spinbox.rb - Tk spinbox classes
#			$Date$
#			by Yukihiro Matsumoto <matz@caelum.co.jp>
#
require 'tk'
require 'tk/entry'

class TkSpinbox<TkEntry
  TkCommandNames = ['spinbox'.freeze].freeze
  WidgetClassName = 'Spinbox'.freeze
  WidgetClassNames[WidgetClassName] = self

  #def create_self(keys)
  #  tk_call_without_enc('spinbox', @path)
  #  if keys and keys != None
  #    configure(keys)
  #  end
  #end
  #private :create_self

  def identify(x, y)
    tk_send_without_enc('identify', x, y)
  end

  def spinup
    tk_send_without_enc('invoke', 'spinup')
    self
  end

  def spindown
    tk_send_without_enc('invoke', 'spindown')
    self
  end

  def set(str)
    _freomUTF8(tk_send_without_enc('set', _get_eval_enc_str(str)))
  end
end