1# 2# tkextlib/iwidgets/canvasprintbox.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 Canvasprintbox < Tk::Itk::Widget 12 end 13 end 14end 15 16class Tk::Iwidgets::Canvasprintbox 17 TkCommandNames = ['::iwidgets::canvasprintbox'.freeze].freeze 18 WidgetClassName = 'Canvasprintbox'.freeze 19 WidgetClassNames[WidgetClassName] ||= self 20 21 def __strval_optkeys 22 super() << 'filename' 23 end 24 private :__strval_optkeys 25 26 def __boolval_optkeys 27 super() << 'stretch' 28 end 29 private :__boolval_optkeys 30 31 def get_output 32 tk_call(@path, 'getoutput') 33 end 34 35 def print 36 bool(tk_call(@path, 'print')) 37 end 38 39 def refresh 40 tk_call(@path, 'refresh') 41 self 42 end 43 44 def set_canvas(win) 45 tk_call(@path, 'setcanvas', win) 46 self 47 end 48 49 def stop 50 tk_call(@path, 'stop') 51 self 52 end 53end 54