1# 2# tkextlib/iwidgets/hyperhelp.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 Hyperhelp < Tk::Iwidgets::Shell 12 end 13 end 14end 15 16class Tk::Iwidgets::Hyperhelp 17 TkCommandNames = ['::iwidgets::hyperhelp'.freeze].freeze 18 WidgetClassName = 'Hyperhelp'.freeze 19 WidgetClassNames[WidgetClassName] ||= self 20 21 def __strval_optkeys 22 super() << 'helpdir' 23 end 24 private :__strval_optkeys 25 26 def __listval_optkeys 27 super() << 'topics' 28 end 29 private :__listval_optkeys 30 31 def show_topic(topic) 32 tk_call(@path, 'showtopic', topic) 33 self 34 end 35 36 def follow_link(href) 37 tk_call(@path, 'followlink', href) 38 self 39 end 40 41 def forward 42 tk_call(@path, 'forward') 43 self 44 end 45 46 def back 47 tk_call(@path, 'back') 48 self 49 end 50end 51