summaryrefslogtreecommitdiff
path: root/ruby_1_8_5/ext/tk/lib/tkextlib/iwidgets/feedback.rb
blob: 0a25237a2429d0432c3c720c6ad0433409453985 (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