1# 2# tkextlib/bwidget/scrollableframe.rb 3# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) 4# 5 6require 'tk' 7require 'tk/frame' 8require 'tkextlib/bwidget.rb' 9 10module Tk 11 module BWidget 12 class ScrollableFrame < TkWindow 13 end 14 end 15end 16 17class Tk::BWidget::ScrollableFrame 18 include Scrollable 19 20 TkCommandNames = ['ScrollableFrame'.freeze].freeze 21 WidgetClassName = 'ScrollableFrame'.freeze 22 WidgetClassNames[WidgetClassName] ||= self 23 24 def get_frame(&b) 25 win = window(tk_send_without_enc('getframe')) 26 if b 27 if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! 28 win.instance_exec(self, &b) 29 else 30 win.instance_eval(&b) 31 end 32 end 33 win 34 end 35 36 def see(win, vert=None, horiz=None) 37 tk_send_without_enc('see', win, vert, horiz) 38 self 39 end 40end 41