From 39563af99459820ada08e30e379c84b4560c3fe9 Mon Sep 17 00:00:00 2001 From: matz Date: Mon, 20 Nov 2000 07:31:55 +0000 Subject: matz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/tk/lib/tk.rb | 49 +++++++++++++++++++++-- ext/tk/lib/tkcanvas.rb | 3 ++ ext/tk/lib/tkclass.rb | 2 +- ext/tk/lib/tkentry.rb | 105 ++++++++++++++++++++++++++++++++++++++++++++++--- 4 files changed, 150 insertions(+), 9 deletions(-) (limited to 'ext/tk') diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb index 54d5d861f8..e5c2c2ece0 100644 --- a/ext/tk/lib/tk.rb +++ b/ext/tk/lib/tk.rb @@ -269,40 +269,61 @@ module TkComm end class Event - def initialize(seq,b,f,h,k,s,t,w,x,y,aa,ee,kk,nn,ww,tt,xx,yy) + def initialize(seq,a,b,c,d,f,h,k,m,o,p,s,t,w,x,y, + aa,bb,dd,ee,kk,nn,rr,ss,tt,ww,xx,yy) @serial = seq + @above = a @num = b + @count = c + @detail = d @focus = (f == 1) @height = h @keycode = k + @mode = m + @override = (o == 1) + @place = p @state = s @time = t @width = w @x = x @y = y @char = aa + @borderwidth = bb + @wheel_delta = dd @send_event = (ee == 1) @keysym = kk @keysym_num = nn + @rootwin_id = rr + @subwindow = ss @type = tt @widget = ww @x_root = xx @y_root = yy end attr :serial + attr :above attr :num + attr :count + attr :detail attr :focus attr :height attr :keycode + attr :mode + attr :override + attr :place attr :state attr :time attr :width attr :x attr :y attr :char + attr :borderwidth + attr :wheel_delta attr :send_event attr :keysym attr :keysym_num + attr :rootwin_id + attr :subwindow attr :type attr :widget attr :x_root @@ -319,7 +340,8 @@ module TkComm id = install_cmd(proc{|arg| TkUtil.eval_cmd cmd, Event.new(*arg) }) - id + ' %# %b %f %h %k %s %t %w %x %y %A %E %K %N %W %T %X %Y' + id + ' %# %a %b %c %d %f %h %k %m %o %p %s %t %w %x %y' + + ' %A %B %D %E %K %N %R %S %T %W %X %Y' end end @@ -550,6 +572,10 @@ module TkCore tk_call 'tk_chooseColor', *hash_kv(keys) end + def chooseDirectory(keys = nil) + tk_call 'tk_chooseDirectory', *hash_kv(keys) + end + def tk_call(*args) print args.join(" "), "\n" if $DEBUG args.collect! {|x|ruby2tcl(x)} @@ -2352,7 +2378,7 @@ class TkRadiobutton