From 54ec1c4fe81672ca66f327ef6ae170f458cd79e5 Mon Sep 17 00:00:00 2001 From: shyouhei Date: Wed, 15 Aug 2007 20:57:30 +0000 Subject: sorry. I made wrong tags. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/tags/v1_8_5_54@13009 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ruby_1_8_5/ext/tk/lib/tk/canvastag.rb | 375 ---------------------------------- 1 file changed, 375 deletions(-) delete mode 100644 ruby_1_8_5/ext/tk/lib/tk/canvastag.rb (limited to 'ruby_1_8_5/ext/tk/lib/tk/canvastag.rb') diff --git a/ruby_1_8_5/ext/tk/lib/tk/canvastag.rb b/ruby_1_8_5/ext/tk/lib/tk/canvastag.rb deleted file mode 100644 index a5650ee68b..0000000000 --- a/ruby_1_8_5/ext/tk/lib/tk/canvastag.rb +++ /dev/null @@ -1,375 +0,0 @@ -# -# tk/canvastag.rb - methods for treating canvas tags -# -require 'tk' -require 'tk/tagfont' - -module TkcTagAccess - include TkComm - include TkTreatTagFont -end - -require 'tk/canvas' - -module TkcTagAccess - def addtag(tag) - @c.addtag(tag, 'withtag', @id) - self - end - - def bbox - @c.bbox(@id) - end - - #def bind(seq, cmd=Proc.new, *args) - # @c.itembind(@id, seq, cmd, *args) - # self - #end - def bind(seq, *args) - # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) - if TkComm._callback_entry?(args[0]) || !block_given? - cmd = args.shift - else - cmd = Proc.new - end - @c.itembind(@id, seq, cmd, *args) - self - end - - #def bind_append(seq, cmd=Proc.new, *args) - # @c.itembind_append(@id, seq, cmd, *args) - # self - #end - def bind_append(seq, *args) - # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) - if TkComm._callback_entry?(args[0]) || !block_given? - cmd = args.shift - else - cmd = Proc.new - end - @c.itembind_append(@id, seq, cmd, *args) - self - end - - def bind_remove(seq) - @c.itembind_remove(@id, seq) - self - end - - def bindinfo(seq=nil) - @c.itembindinfo(@id, seq) - end - - def cget(option) - @c.itemcget(@id, option) - end - - def configure(key, value=None) - @c.itemconfigure(@id, key, value) - self - end -# def configure(keys) -# @c.itemconfigure @id, keys -# end - - def configinfo(key=nil) - @c.itemconfiginfo(@id, key) - end - - def current_configinfo(key=nil) - @c.current_itemconfiginfo(@id, key) - end - - def coords(*args) - @c.coords(@id, *args) - end - - def dchars(first, last=None) - @c.dchars(@id, first, last) - self - end - - def dtag(tag_to_del=None) - @c.dtag(@id, tag_to_del) - self - end - alias deltag dtag - - def find - @c.find('withtag', @id) - end - alias list find - - def focus - @c.itemfocus(@id) - end - - def gettags - @c.gettags(@id) - end - - def icursor(index) - @c.icursor(@id, index) - self - end - - def index(idx) - @c.index(@id, idx) - end - - def insert(beforethis, string) - @c.insert(@id, beforethis, string) - self - end - - def lower(belowthis=None) - @c.lower(@id, belowthis) - self - end - - def move(xamount, yamount) - @c.move(@id, xamount, yamount) - self - end - - def raise(abovethis=None) - @c.raise(@id, abovethis) - self - end - - def scale(xorigin, yorigin, xscale, yscale) - @c.scale(@id, xorigin, yorigin, xscale, yscale) - self - end - - def select_adjust(index) - @c.select('adjust', @id, index) - self - end - def select_from(index) - @c.select('from', @id, index) - self - end - def select_to(index) - @c.select('to', @id, index) - self - end - - def itemtype - @c.itemtype(@id) - end - - # Following operators support logical expressions of canvas tags - # (for Tk8.3+). - # If tag1.path is 't1' and tag2.path is 't2', then - # ltag = tag1 & tag2; ltag.path => "(t1)&&(t2)" - # ltag = tag1 | tag2; ltag.path => "(t1)||(t2)" - # ltag = tag1 ^ tag2; ltag.path => "(t1)^(t2)" - # ltag = - tag1; ltag.path => "!(t1)" - def & (tag) - if tag.kind_of? TkObject - TkcTagString.new(@c, '(' + @id + ')&&(' + tag.path + ')') - else - TkcTagString.new(@c, '(' + @id + ')&&(' + tag.to_s + ')') - end - end - - def | (tag) - if tag.kind_of? TkObject - TkcTagString.new(@c, '(' + @id + ')||(' + tag.path + ')') - else - TkcTagString.new(@c, '(' + @id + ')||(' + tag.to_s + ')') - end - end - - def ^ (tag) - if tag.kind_of? TkObject - TkcTagString.new(@c, '(' + @id + ')^(' + tag.path + ')') - else - TkcTagString.new(@c, '(' + @id + ')^(' + tag.to_s + ')') - end - end - - def -@ - TkcTagString.new(@c, '!(' + @id + ')') - end -end - -class TkcTag