2004-07-01 09:38:48 +00:00
|
|
|
#
|
|
|
|
# tbutton widget
|
|
|
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
|
|
|
#
|
|
|
|
require 'tk'
|
2004-07-06 09:42:12 +00:00
|
|
|
require 'tkextlib/tile.rb'
|
2004-07-01 09:38:48 +00:00
|
|
|
|
2004-07-06 09:42:12 +00:00
|
|
|
module Tk
|
|
|
|
module Tile
|
|
|
|
class TButton < TkButton
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2004-07-01 09:38:48 +00:00
|
|
|
|
|
|
|
class Tk::Tile::TButton < TkButton
|
|
|
|
include Tk::Tile::TileWidget
|
|
|
|
|
2005-03-05 07:35:41 +00:00
|
|
|
if Tk::Tile::USE_TTK_NAMESPACE
|
|
|
|
TkCommandNames = ['::ttk::button'.freeze].freeze
|
|
|
|
else
|
|
|
|
TkCommandNames = ['::tbutton'.freeze].freeze
|
|
|
|
end
|
2004-07-01 09:38:48 +00:00
|
|
|
WidgetClassName = 'TButton'.freeze
|
|
|
|
WidgetClassNames[WidgetClassName] = self
|
2005-04-09 09:27:54 +00:00
|
|
|
|
|
|
|
def self.style(*args)
|
|
|
|
[self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
|
|
|
|
end
|
2004-07-01 09:38:48 +00:00
|
|
|
end
|