* ext/tk/lib/tkextlib/tile.rb, lib/tkextlib/tile/* : support Tile 0.7.6.
* ext/tk/lib/tkextlib/SUPPORT_STATUS: [ruby-talk:211939] check links of extensions. * ext/tk/lib/tkextlib/blt/container.rb: define instance methods properly. * ext/tk/lib/tkextlib/tile/tcombobox.rb: bug fix [ruby-talk:213003]. * ext/tk/lib/tkextlib/tile/tnotebook.rb: ditto. * ext/tk/lib/tkextlib/tile/treeview.rb: ditto. * ext/tk/lib/tkextlib/tile/sizegrip.rb: [new] add 'ttk::sizegrip' widget. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11081 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
feafc46363
commit
438e33e3d2
@ -1,3 +1,8 @@
|
|||||||
|
Wed Oct 4 18:47:25 2006 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* ext/tk/lib/tkextlib/*: bugfix and update
|
||||||
|
(see ext/tk/ChangeLog.tkextlib).
|
||||||
|
|
||||||
Wed Oct 4 17:25:14 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Wed Oct 4 17:25:14 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* eval.c (rb_call): check protected visibility based on real self,
|
* eval.c (rb_call): check protected visibility based on real self,
|
||||||
|
@ -1,3 +1,22 @@
|
|||||||
|
2006-10-04 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* lib/tkextlib/tile.rb, lib/tkextlib/tile/* : support Tile 0.7.6.
|
||||||
|
|
||||||
|
2006-10-03 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
|
* lib/tkextlib/SUPPORT_STATUS: [ruby-talk:211939] check links
|
||||||
|
of extensions.
|
||||||
|
|
||||||
|
* lib/tkextlib/blt/container.rb: define instance methods properly.
|
||||||
|
|
||||||
|
* lib/tkextlib/tile/tcombobox.rb: bug fix [ruby-talk:213003].
|
||||||
|
|
||||||
|
* lib/tkextlib/tile/tnotebook.rb: ditto.
|
||||||
|
|
||||||
|
* lib/tkextlib/tile/treeview.rb: ditto.
|
||||||
|
|
||||||
|
* lib/tkextlib/tile/sizegrip.rb: [new] add 'ttk::sizegrip' widget.
|
||||||
|
|
||||||
2006-08-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
2006-08-31 Hidetoshi NAGAI <nagai@ai.kyutech.ac.jp>
|
||||||
|
|
||||||
* lib/tkextlib/blt.rb: double dashes (--) option doesn't work
|
* lib/tkextlib/blt.rb: double dashes (--) option doesn't work
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
|
|
||||||
[ current support status of Tcl/Tk extensions ]
|
[ current support status of Tcl/Tk extensions ]
|
||||||
|
|
||||||
*******<<< RELEASE_DATE of the libraries : 2005/12/11 >>>*******
|
*******<<< RELEASE_DATE of the libraries : 2006/10/04 >>>*******
|
||||||
|
|
||||||
The following list shows *CURRENT* status when this file was modifyed
|
The following list shows *CURRENT* status when this file was modifyed
|
||||||
at last. If you want to add other Tcl/Tk extensions to the planed list
|
at last. If you want to add other Tcl/Tk extensions to the planed list
|
||||||
@ -56,23 +56,23 @@ script may give you some hints about that.
|
|||||||
===< support with some examples (may be beta quality) >=======================
|
===< support with some examples (may be beta quality) >=======================
|
||||||
|
|
||||||
Tcllib 1.8
|
Tcllib 1.8
|
||||||
Tklib 0.4.1 http://sf.net/projects/tcllib ==> tcllib
|
Tklib 0.4.1 http://sourceforge.net/projects/tcllib ==> tcllib
|
||||||
|
|
||||||
IWidgets 4.0.2 http://sf.net/projects/incrTcl ==> iwidgets
|
IWidgets 4.0.2 http://sourceforge.net/projects/incrtcl ==> iwidgets
|
||||||
|
|
||||||
BWidgets 1.7 http://sf.net/projects/tcllib ==> bwidget
|
BWidgets 1.7 http://sourceforge.net/projects/tcllib ==> bwidget
|
||||||
|
|
||||||
TkTable 2.9 http://sf.net/projects/tktable ==> tktable
|
TkTable 2.9 http://sourceforge.net/projects/tktable ==> tktable
|
||||||
* see also <http://www.korus.hu/~fery/ruby/tktable.rb>
|
* see also <http://www.korus.hu/~fery/ruby/tktable.rb>
|
||||||
written by Ferenc Engard (ferenc@engard.hu)
|
written by Ferenc Engard (ferenc@engard.hu)
|
||||||
|
|
||||||
vu 2.3.0 http://tktable.sourceforge.net ==> vu
|
vu 2.3.0 http://sourceforge.net/projects/tktable ==> vu
|
||||||
|
|
||||||
TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/index.html ==> tkHTML
|
TkHTML 2.0 http://www.hwaci.com/sw/tkhtml/ ==> tkHTML
|
||||||
|
|
||||||
ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS
|
ICONS 1.0 http://www.satisoft.com/tcltk/icons/ ==> ICONS
|
||||||
|
|
||||||
TkImg 1.3 http://sf.net/projects/tkimg ==> tkimg
|
TkImg 1.3 http://sourceforge.net/projects/tkimg ==> tkimg
|
||||||
|
|
||||||
|
|
||||||
BLT 2.4z http://sourceforge.net/projects/blt
|
BLT 2.4z http://sourceforge.net/projects/blt
|
||||||
@ -81,20 +81,20 @@ BLT 2.4z http://sourceforge.net/projects/blt
|
|||||||
==> blt
|
==> blt
|
||||||
|
|
||||||
TkTreeCtrl CVS/Hd(2005-12-02)
|
TkTreeCtrl CVS/Hd(2005-12-02)
|
||||||
http://tktreectrl.sourceforge.net/ ==> treectrl
|
http://sourceforge.net/projects/tktreectrl ==> treectrl
|
||||||
|
|
||||||
Tile CVS/Hd(2005-12-07)
|
Tile CVS/Hd(2006-10-01)
|
||||||
http://tktable.sourceforge.net/tile/ ==> tile
|
http://sourceforge.net/projects/tktable ==> tile
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
===< support (may be alpha or beta quality) >=================================
|
===< support (may be alpha or beta quality) >=================================
|
||||||
|
|
||||||
IncrTcl CVS/Hd(2005-02-14)
|
IncrTcl CVS/Hd(2005-02-14)
|
||||||
http://sf.net/projects/incrTcl ==> itcl, itk
|
http://sourceforge.net/projects/incrtcl ==> itcl, itk
|
||||||
|
|
||||||
TclX CVS/Hd(2005-02-07)
|
TclX CVS/Hd(2005-02-07)
|
||||||
http://sf.net/projects/tclx
|
http://sourceforge.net/projects/tclx
|
||||||
==> tclx (partial support; infox command and
|
==> tclx (partial support; infox command and
|
||||||
XPG/3 message catalogs only)
|
XPG/3 message catalogs only)
|
||||||
|
|
||||||
@ -105,7 +105,7 @@ Trofs 0.4.3 http://math.nist.gov/~DPorter/tcltk/trofs/
|
|||||||
===< possibly available (not tested; alpha quality) >=========================
|
===< possibly available (not tested; alpha quality) >=========================
|
||||||
|
|
||||||
winico 0.6
|
winico 0.6
|
||||||
http://tktable.sourceforge.net
|
http://sourceforge.net/projects/tktable
|
||||||
==> winico (win32 only)
|
==> winico (win32 only)
|
||||||
|
|
||||||
TkTrans latest(2004-10-11)
|
TkTrans latest(2004-10-11)
|
||||||
@ -160,17 +160,17 @@ QuickTimeTcl *** http://hem.fyristorg.com/matben/qt/
|
|||||||
|
|
||||||
===< may not support (already exist, out of Ruby/Tk scope, and so on) >=======
|
===< may not support (already exist, out of Ruby/Tk scope, and so on) >=======
|
||||||
|
|
||||||
TkCon *** http://sf.net/projects/tkcon
|
TkCon *** http://sourceforge.net/projects/tkcon
|
||||||
|
|
||||||
Expect *** http://sf.net/projects/expect
|
Expect *** http://sourceforge.net/projects/expect
|
||||||
|
|
||||||
TclXML *** http://sf.net/projects/tclxml
|
TclXML *** http://sourceforge.net/projects/tclxml
|
||||||
|
|
||||||
TclXSLT *** http://sf.net/projects/tclxml
|
TclXSLT *** http://sourceforge.net/projects/tclxml
|
||||||
|
|
||||||
TclDOM *** http://sf.net/projects/tclxml
|
TclDOM *** http://sourceforge.net/projects/tclxml
|
||||||
|
|
||||||
TclSOAP *** http://sf.net/projects/tclsoap
|
TclSOAP *** http://sourceforge.net/projects/tclsoap
|
||||||
|
|
||||||
Snack *** http://www.speech.kth.se/~kare/snack2.2.tar.gz
|
Snack *** http://www.speech.kth.se/~kare/snack2.2.tar.gz
|
||||||
* use Snack for Ruby
|
* use Snack for Ruby
|
||||||
@ -182,7 +182,7 @@ tDOM *** http://www.tdom.org
|
|||||||
|
|
||||||
Mk4tcl *** http://www.equi4.com/metakit/tcl.html
|
Mk4tcl *** http://www.equi4.com/metakit/tcl.html
|
||||||
|
|
||||||
Memchan *** http://memchan.sourceforge.net/
|
Memchan *** http://sourceforge.net/projects/memchan
|
||||||
|
|
||||||
XOTcl *** http://www.xotcl.org/
|
XOTcl *** http://www.xotcl.org/
|
||||||
|
|
||||||
|
@ -11,18 +11,18 @@ module Tk::BLT
|
|||||||
TkCommandNames = ['::blt::container'.freeze].freeze
|
TkCommandNames = ['::blt::container'.freeze].freeze
|
||||||
WidgetClassName = 'Container'.freeze
|
WidgetClassName = 'Container'.freeze
|
||||||
WidgetClassNames[WidgetClassName] = self
|
WidgetClassNames[WidgetClassName] = self
|
||||||
end
|
|
||||||
|
|
||||||
def __strval_optkeys
|
def __strval_optkeys
|
||||||
super() << 'name'
|
super() << 'name'
|
||||||
end
|
end
|
||||||
private :__strval_optkeys
|
private :__strval_optkeys
|
||||||
|
|
||||||
def find_command(pat)
|
def find_command(pat)
|
||||||
list(tk_send_without_enc(tk_call(self.path, 'find', '-command', pat)))
|
Hash[*simplelist(tk_send_without_enc('find', '-command', pat))]
|
||||||
end
|
end
|
||||||
|
|
||||||
def find_name(pat)
|
def find_name(pat)
|
||||||
list(tk_send_without_enc(tk_call(self.path, 'find', '-name', pat)))
|
Hash[*simplelist(tk_send_without_enc('find', '-name', pat))]
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -158,6 +158,11 @@ module Tk
|
|||||||
list(tk_send('state'))
|
list(tk_send('state'))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def identify(x, y)
|
||||||
|
ret = tk_send_without_enc('identify', x, y)
|
||||||
|
(ret.empty?)? nil: ret
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
######################################
|
######################################
|
||||||
|
25
ext/tk/lib/tkextlib/tile/sizegrip.rb
Normal file
25
ext/tk/lib/tkextlib/tile/sizegrip.rb
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# ttk::sizegrip widget
|
||||||
|
# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)
|
||||||
|
#
|
||||||
|
require 'tk'
|
||||||
|
require 'tkextlib/tile.rb'
|
||||||
|
|
||||||
|
module Tk
|
||||||
|
module Tile
|
||||||
|
class SizeGrip < TkWindow
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
class Tk::Tile::SizeGrip < TkWindow
|
||||||
|
include Tk::Tile::TileWidget
|
||||||
|
|
||||||
|
TkCommandNames = ['::ttk::sizegrip'.freeze].freeze
|
||||||
|
WidgetClassName = 'TSizegrip'.freeze
|
||||||
|
WidgetClassNames[WidgetClassName] = self
|
||||||
|
|
||||||
|
def self.style(*args)
|
||||||
|
[self::WidgetClassName, *(args.map!{|a| _get_eval_string(a)})].join('.')
|
||||||
|
end
|
||||||
|
end
|
@ -52,6 +52,10 @@ class << Tk::Tile::Style
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def lookup(style, opt, state=None, fallback_value=None)
|
||||||
|
tk_call('style', 'lookup', style, '-' << opt.to_s, state, fallback_value)
|
||||||
|
end
|
||||||
|
|
||||||
include Tk::Tile::ParseStyleLayout
|
include Tk::Tile::ParseStyleLayout
|
||||||
|
|
||||||
def layout(style=nil, spec=nil)
|
def layout(style=nil, spec=nil)
|
||||||
|
@ -39,16 +39,12 @@ class Tk::Tile::TCombobox < Tk::Tile::TEntry
|
|||||||
end
|
end
|
||||||
|
|
||||||
def current
|
def current
|
||||||
number(tk_send_without_enc('current', idx))
|
number(tk_send_without_enc('current'))
|
||||||
end
|
end
|
||||||
def current=(idx)
|
def current=(idx)
|
||||||
tk_send_without_enc('current', idx)
|
tk_send_without_enc('current', idx)
|
||||||
end
|
end
|
||||||
|
|
||||||
def identify(x, y)
|
|
||||||
tk_send_without_enc('identify', x, y)
|
|
||||||
end
|
|
||||||
|
|
||||||
def set(val)
|
def set(val)
|
||||||
tk_send('set', val)
|
tk_send('set', val)
|
||||||
end
|
end
|
||||||
|
@ -27,15 +27,15 @@ class Tk::Tile::TNotebook < TkWindow
|
|||||||
end
|
end
|
||||||
private :__item_config_cmd
|
private :__item_config_cmd
|
||||||
|
|
||||||
def __item_listval_optkeys
|
def __item_listval_optkeys(id)
|
||||||
[]
|
[]
|
||||||
end
|
end
|
||||||
private :__item_listval_optkeys
|
private :__item_listval_optkeys
|
||||||
|
|
||||||
def __item_methodcall_optkeys # { key=>method, ... }
|
def __item_methodcall_optkeys(id) # { key=>method, ... }
|
||||||
{}
|
{}
|
||||||
end
|
end
|
||||||
private :__item_listval_optkeys
|
private :__item_methodcall_optkeys
|
||||||
|
|
||||||
#alias tabcget itemcget
|
#alias tabcget itemcget
|
||||||
alias tabconfigure itemconfigure
|
alias tabconfigure itemconfigure
|
||||||
@ -104,6 +104,10 @@ class Tk::Tile::TNotebook < TkWindow
|
|||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def selected
|
||||||
|
window(tk_send_without_enc('select'))
|
||||||
|
end
|
||||||
|
|
||||||
def tabs
|
def tabs
|
||||||
list(tk_send('tabs'))
|
list(tk_send('tabs'))
|
||||||
end
|
end
|
||||||
|
@ -158,6 +158,10 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def bbox(item, column=None)
|
||||||
|
list(tk_send('item', 'bbox', item, column))
|
||||||
|
end
|
||||||
|
|
||||||
def children(item)
|
def children(item)
|
||||||
simplelist(tk_send_without_enc('children', item))
|
simplelist(tk_send_without_enc('children', item))
|
||||||
end
|
end
|
||||||
@ -186,6 +190,7 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
end
|
end
|
||||||
|
|
||||||
def identify(x, y)
|
def identify(x, y)
|
||||||
|
# tile-0.7.2 or previous
|
||||||
ret = simplelist(tk_send('identify', x, y))
|
ret = simplelist(tk_send('identify', x, y))
|
||||||
case ret[0]
|
case ret[0]
|
||||||
when 'heading', 'separator', 'cell'
|
when 'heading', 'separator', 'cell'
|
||||||
@ -193,6 +198,14 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def row_identify(x, y)
|
||||||
|
tk_send('identify', 'row', x, y)
|
||||||
|
end
|
||||||
|
|
||||||
|
def column_identify(x, y)
|
||||||
|
tk_send('identify', 'column', x, y)
|
||||||
|
end
|
||||||
|
|
||||||
def index(item)
|
def index(item)
|
||||||
number(tk_send('index', item))
|
number(tk_send('index', item))
|
||||||
end
|
end
|
||||||
@ -201,11 +214,10 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
keys = _symbolkey2str(keys)
|
keys = _symbolkey2str(keys)
|
||||||
id = keys.delete('id')
|
id = keys.delete('id')
|
||||||
if id
|
if id
|
||||||
tk_send('insert', parent, idx, '-id', id, *hash_kv(keys))
|
num_or_str(tk_send('insert', parent, idx, '-id', id, *hash_kv(keys)))
|
||||||
else
|
else
|
||||||
tk_send('insert', parent, idx, *hash_kv(keys))
|
num_or_str(tk_send('insert', parent, idx, *hash_kv(keys)))
|
||||||
end
|
end
|
||||||
self
|
|
||||||
end
|
end
|
||||||
|
|
||||||
def instate(spec, cmd=Proc.new)
|
def instate(spec, cmd=Proc.new)
|
||||||
@ -270,6 +282,8 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
end
|
end
|
||||||
ret
|
ret
|
||||||
end
|
end
|
||||||
|
alias get_dictionary get_directory
|
||||||
|
|
||||||
def get(item, col)
|
def get(item, col)
|
||||||
tk_send('set', item, col)
|
tk_send('set', item, col)
|
||||||
end
|
end
|
||||||
@ -277,4 +291,37 @@ class Tk::Tile::Treeview < TkWindow
|
|||||||
tk_send('set', item, col, value)
|
tk_send('set', item, col, value)
|
||||||
self
|
self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def tag_bind(tag, seq, *args)
|
||||||
|
if TkComm._callback_entry?(args[0]) || !block_given?
|
||||||
|
cmd = args.shift
|
||||||
|
else
|
||||||
|
cmd = Proc.new
|
||||||
|
end
|
||||||
|
_bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
alias tagbind tag_bind
|
||||||
|
|
||||||
|
def tag_bind_append(tag, seq, *args)
|
||||||
|
if TkComm._callback_entry?(args[0]) || !block_given?
|
||||||
|
cmd = args.shift
|
||||||
|
else
|
||||||
|
cmd = Proc.new
|
||||||
|
end
|
||||||
|
_bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
alias tagbind_append tag_bind_append
|
||||||
|
|
||||||
|
def tag_bind_remove(tag, seq)
|
||||||
|
_bind_remove([@path, 'tag', 'bind', tag], seq)
|
||||||
|
self
|
||||||
|
end
|
||||||
|
alias tagbind_remove tag_bind_remove
|
||||||
|
|
||||||
|
def tag_bindinfo(tag, context=nil)
|
||||||
|
_bindinfo([@path, 'tag', 'bind', tag], context)
|
||||||
|
end
|
||||||
|
alias tagbindinfo tag_bindinfo
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user