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/tile/tseparator.rb | 34 +++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 jni/ruby/ext/tk/lib/tkextlib/tile/tseparator.rb (limited to 'jni/ruby/ext/tk/lib/tkextlib/tile/tseparator.rb') diff --git a/jni/ruby/ext/tk/lib/tkextlib/tile/tseparator.rb b/jni/ruby/ext/tk/lib/tkextlib/tile/tseparator.rb new file mode 100644 index 0000000..ffd2f6f --- /dev/null +++ b/jni/ruby/ext/tk/lib/tkextlib/tile/tseparator.rb @@ -0,0 +1,34 @@ +# +# tseparator widget +# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) +# +require 'tk' +require 'tkextlib/tile.rb' + +module Tk + module Tile + class TSeparator < TkWindow + end + Separator = TSeparator + end +end + +class Tk::Tile::TSeparator < TkWindow + include Tk::Tile::TileWidget + + if Tk::Tile::USE_TTK_NAMESPACE + TkCommandNames = ['::ttk::separator'.freeze].freeze + else + TkCommandNames = ['::tseparator'.freeze].freeze + end + WidgetClassName = 'TSeparator'.freeze + WidgetClassNames[WidgetClassName] ||= self + + def self.style(*args) + [self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.') + end +end + +#Tk.__set_toplevel_aliases__(:Ttk, Tk::Tile::Separator, :TkSeparator) +Tk.__set_loaded_toplevel_aliases__('tkextlib/tile/tseparator.rb', + :Ttk, Tk::Tile::Separator, :TkSeparator) -- cgit v1.2.3