# # tk/scale.rb : treat scale widget # require 'tk' class Tk::Scalevalue) end def configure(slot, value=None) if (slot == 'command' || slot == :command) configure('command'=>value) elsif slot.kind_of?(Hash) && (slot.key?('command') || slot.key?(:command)) slot = _symbolkey2str(slot) slot['command'] = _wrap_command_arg(slot.delete('command')) end super(slot, value) end def command(cmd=Proc.new) configure('command'=>cmd) end def get(x=None, y=None) number(tk_send_without_enc('get', x, y)) end def coords(val=None) tk_split_list(tk_send_without_enc('coords', val)) end def identify(x, y) tk_send_without_enc('identify', x, y) end def set(val) tk_send_without_enc('set', val) end def value get end def value= (val) set(val) val end end #TkScale = Tk::Scale unless Object.const_defined? :TkScale #Tk.__set_toplevel_aliases__(:Tk, Tk::Scale, :TkScale) Tk.__set_loaded_toplevel_aliases__('tk/scale.rb', :Tk, Tk::Scale, :TkScale)