summaryrefslogtreecommitdiff
path: root/jni/ruby/ext/tk/lib/tkextlib/iwidgets/feedback.rb
blob: 29d04c8a5d0e851b741cfdd28fac0b728172a3c9 (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
#
#  tkextlib/iwidgets/feedback.rb
#                               by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
#

require 'tk'
require 'tkextlib/iwidgets.rb'

module Tk
  module Iwidgets
    class Feedback < Tk::Iwidgets::Labeledwidget
    end
  end
end

class Tk::Iwidgets::Feedback
  TkCommandNames = ['::iwidgets::feedback'.freeze].freeze
  WidgetClassName = 'Feedback'.freeze
  WidgetClassNames[WidgetClassName] ||= self

  def __strval_optkeys
    super() << 'barcolor'
  end
  private :__strval_optkeys

  def reset
    tk_call(@path, 'reset')
    self
  end

  def step(inc=1)
    tk_call(@path, 'step', inc)
    self
  end
end