diff options
author | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-06 09:42:12 +0000 |
---|---|---|
committer | nagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2004-07-06 09:42:12 +0000 |
commit | d8465ff9abf63545262b7d8f88b069522ae82823 (patch) | |
tree | ea1597d41d1de11febd12cc38b71838e0691bfcb /ext/tk/lib/tkextlib/bwidget/scrollableframe.rb | |
parent | 3d8fa5556164f3aa2f6f1733ffe4a96fc4f33ed8 (diff) |
* ext/tk/lib : improve framework of developping Tcl/Tk extension wrappers
* BWidget extension support on Ruby/Tk
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6586 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tkextlib/bwidget/scrollableframe.rb')
-rw-r--r-- | ext/tk/lib/tkextlib/bwidget/scrollableframe.rb | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb b/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb new file mode 100644 index 0000000000..a3986681a5 --- /dev/null +++ b/ext/tk/lib/tkextlib/bwidget/scrollableframe.rb @@ -0,0 +1,34 @@ +# +# tkextlib/bwidget/scrollableframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class ScrollableFrame < TkWindow + end + end +end + +class Tk::BWidget::ScrollableFrame + include Scrollable + + TkCommandNames = ['ScrollableFrame'.freeze].freeze + WidgetClassName = 'ScrollableFrame'.freeze + WidgetClassNames[WidgetClassName] = self + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + win.instance_eval(&b) if b + win + end + + def see(win, vert=None, horiz=None) + tk_send_without_enc('see', win, vert, horiz) + self + end +end |