From fcbf63e62c627deae76c1b8cb8c0876c536ed811 Mon Sep 17 00:00:00 2001 From: Jari Vetoniemi Date: Mon, 16 Mar 2020 18:49:26 +0900 Subject: Fresh start --- jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb (limited to 'jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb') diff --git a/jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb b/jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb new file mode 100644 index 0000000..7187911 --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/bwidget/titleframe.rb @@ -0,0 +1,33 @@ +# +# tkextlib/bwidget/titleframe.rb +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# + +require 'tk' +require 'tk/frame' +require 'tkextlib/bwidget.rb' + +module Tk + module BWidget + class TitleFrame < TkWindow + end + end +end + +class Tk::BWidget::TitleFrame + TkCommandNames = ['TitleFrame'.freeze].freeze + WidgetClassName = 'TitleFrame'.freeze + WidgetClassNames[WidgetClassName] ||= self + + def get_frame(&b) + win = window(tk_send_without_enc('getframe')) + if b + if TkCore::WITH_RUBY_VM ### Ruby 1.9 !!!! + win.instance_exec(self, &b) + else + win.instance_eval(&b) + end + end + win + end +end -- cgit v1.2.3