1# 2# tkextlib/iwidgets/finddialog.rb 3# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) 4# 5 6require 'tk' 7require 'tkextlib/iwidgets.rb' 8 9module Tk 10 module Iwidgets 11 class Finddialog < Tk::Iwidgets::Dialogshell 12 end 13 end 14end 15 16class Tk::Iwidgets::Finddialog 17 TkCommandNames = ['::iwidgets::finddialog'.freeze].freeze 18 WidgetClassName = 'Finddialog'.freeze 19 WidgetClassNames[WidgetClassName] ||= self 20 21 def __strval_optkeys 22 super() + [ 23 'patternbackground', 'patternforeground', 24 'searchbackground', 'searchforeground' 25 ] 26 end 27 private :__strval_optkeys 28 29 def __val2ruby_optkeys # { key=>proc, ... } 30 super().update('textwidget'=>proc{|v| window(v)}) 31 end 32 private :__val2ruby_optkeys 33 34 def clear 35 tk_call(@path, 'clear') 36 self 37 end 38 39 def find 40 tk_call(@path, 'find') 41 end 42end 43