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