summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tk
diff options
context:
space:
mode:
authornagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-07 14:53:02 +0000
committernagai <nagai@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2004-11-07 14:53:02 +0000
commit0be5de09a047e89523acfd7a07eb7e75b40db52a (patch)
treea626610a621907f04f452642dd2ffb3d34077499 /ext/tk/lib/tk
parentd55f1f480a83b3f91d7d32679da3d6d55a5ae30f (diff)
* ext/tk/lib/tk.rb: bind-event methods accept multi substitution arguments.
* ext/tk/lib/tk/canvas.rb: ditto. * ext/tk/lib/tk/canvastag.rb: ditto. * ext/tk/lib/tk/text.rb: ditto. * ext/tk/lib/tk/texttag.rb: ditto. * ext/tk/lib/tkextlib/iwidgets/scrolledcanvas.rb: ditto. * ext/tk/lib/tkextlib/tktable/tktable.rb: ditto. * ext/tk/lib/tkextlib/treectrl/tktreectrl.rb: ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/tk/lib/tk')
-rw-r--r--ext/tk/lib/tk/canvas.rb8
-rw-r--r--ext/tk/lib/tk/canvastag.rb52
-rw-r--r--ext/tk/lib/tk/text.rb8
-rw-r--r--ext/tk/lib/tk/texttag.rb8
4 files changed, 38 insertions, 38 deletions
diff --git a/ext/tk/lib/tk/canvas.rb b/ext/tk/lib/tk/canvas.rb
index 1a8a7927d3..9a042155e3 100644
--- a/ext/tk/lib/tk/canvas.rb
+++ b/ext/tk/lib/tk/canvas.rb
@@ -94,13 +94,13 @@ class TkCanvas<TkWindow
*tags.collect{|t| tagid(t)}))
end
- def itembind(tag, context, cmd=Proc.new, args=nil)
- _bind([path, "bind", tagid(tag)], context, cmd, args)
+ def itembind(tag, context, cmd=Proc.new, *args)
+ _bind([path, "bind", tagid(tag)], context, cmd, *args)
self
end
- def itembind_append(tag, context, cmd=Proc.new, args=nil)
- _bind_append([path, "bind", tagid(tag)], context, cmd, args)
+ def itembind_append(tag, context, cmd=Proc.new, *args)
+ _bind_append([path, "bind", tagid(tag)], context, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/canvastag.rb b/ext/tk/lib/tk/canvastag.rb
index f27111bd84..3d5c6703d2 100644
--- a/ext/tk/lib/tk/canvastag.rb
+++ b/ext/tk/lib/tk/canvastag.rb
@@ -21,31 +21,31 @@ module TkcTagAccess
@c.bbox(@id)
end
- def bind(seq, cmd=Proc.new, args=nil)
- @c.itembind @id, seq, cmd, args
+ def bind(seq, cmd=Proc.new, *args)
+ @c.itembind(@id, seq, cmd, *args)
self
end
- def bind_append(seq, cmd=Proc.new, args=nil)
- @c.itembind_append @id, seq, cmd, args
+ def bind_append(seq, cmd=Proc.new, *args)
+ @c.itembind_append(@id, seq, cmd, *args)
self
end
def bind_remove(seq)
- @c.itembind_remove @id, seq
+ @c.itembind_remove(@id, seq)
self
end
def bindinfo(seq=nil)
- @c.itembindinfo @id, seq
+ @c.itembindinfo(@id, seq)
end
def cget(option)
- @c.itemcget @id, option
+ @c.itemcget(@id, option)
end
def configure(key, value=None)
- @c.itemconfigure @id, key, value
+ @c.itemconfigure(@id, key, value)
self
end
# def configure(keys)
@@ -53,71 +53,71 @@ module TkcTagAccess
# end
def configinfo(key=nil)
- @c.itemconfiginfo @id, key
+ @c.itemconfiginfo(@id, key)
end
def current_configinfo(key=nil)
- @c.current_itemconfiginfo @id, key
+ @c.current_itemconfiginfo(@id, key)
end
def coords(*args)
- @c.coords @id, *args
+ @c.coords(@id, *args)
end
def dchars(first, last=None)
- @c.dchars @id, first, last
+ @c.dchars(@id, first, last)
self
end
def dtag(tag_to_del=None)
- @c.dtag @id, tag_to_del
+ @c.dtag(@id, tag_to_del)
self
end
def find
- @c.find 'withtag', @id
+ @c.find('withtag', @id)
end
alias list find
def focus
- @c.itemfocus @id
+ @c.itemfocus(@id)
end
def gettags
- @c.gettags @id
+ @c.gettags(@id)
end
def icursor(index)
- @c.icursor @id, index
+ @c.icursor(@id, index)
self
end
def index(index)
- @c.index @id, index
+ @c.index(@id, index)
end
def insert(beforethis, string)
- @c.insert @id, beforethis, string
+ @c.insert(@id, beforethis, string)
self
end
def lower(belowthis=None)
- @c.lower @id, belowthis
+ @c.lower(@id, belowthis)
self
end
def move(xamount, yamount)
- @c.move @id, xamount, yamount
+ @c.move(@id, xamount, yamount)
self
end
def raise(abovethis=None)
- @c.raise @id, abovethis
+ @c.raise(@id, abovethis)
self
end
def scale(xorigin, yorigin, xscale, yscale)
- @c.scale @id, xorigin, yorigin, xscale, yscale
+ @c.scale(@id, xorigin, yorigin, xscale, yscale)
self
end
@@ -135,7 +135,7 @@ module TkcTagAccess
end
def itemtype
- @c.itemtype @id
+ @c.itemtype(@id)
end
# Following operators support logical expressions of canvas tags
@@ -337,14 +337,14 @@ class TkcGroup<TkcTag
def include(*tags)
for i in tags
- i.addtag @id
+ i.addtag(@id)
end
self
end
def exclude(*tags)
for i in tags
- i.delete @id
+ i.delete(@id)
end
self
end
diff --git a/ext/tk/lib/tk/text.rb b/ext/tk/lib/tk/text.rb
index efede9861f..fbe1c08c76 100644
--- a/ext/tk/lib/tk/text.rb
+++ b/ext/tk/lib/tk/text.rb
@@ -519,13 +519,13 @@ class TkText<TkTextWin
alias deltag tag_delete
alias delete_tag tag_delete
- def tag_bind(tag, seq, cmd=Proc.new, args=nil)
- _bind([@path, 'tag', 'bind', tag], seq, cmd, args)
+ def tag_bind(tag, seq, cmd=Proc.new, *args)
+ _bind([@path, 'tag', 'bind', tag], seq, cmd, *args)
self
end
- def tag_bind_append(tag, seq, cmd=Proc.new, args=nil)
- _bind_append([@path, 'tag', 'bind', tag], seq, cmd, args)
+ def tag_bind_append(tag, seq, cmd=Proc.new, *args)
+ _bind_append([@path, 'tag', 'bind', tag], seq, cmd, *args)
self
end
diff --git a/ext/tk/lib/tk/texttag.rb b/ext/tk/lib/tk/texttag.rb
index d2611509a4..78f7469869 100644
--- a/ext/tk/lib/tk/texttag.rb
+++ b/ext/tk/lib/tk/texttag.rb
@@ -162,13 +162,13 @@ class TkTextTag<TkObject
@t.current_tag_configinfo @id, key
end
- def bind(seq, cmd=Proc.new, args=nil)
- _bind([@t.path, 'tag', 'bind', @id], seq, cmd, args)
+ def bind(seq, cmd=Proc.new, *args)
+ _bind([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self
end
- def bind_append(seq, cmd=Proc.new, args=nil)
- _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, args)
+ def bind_append(seq, cmd=Proc.new, *args)
+ _bind_append([@t.path, 'tag', 'bind', @id], seq, cmd, *args)
self
end