summaryrefslogtreecommitdiff
path: root/ext/tk/lib/tkcanvas.rb
diff options
context:
space:
mode:
Diffstat (limited to 'ext/tk/lib/tkcanvas.rb')
-rw-r--r--ext/tk/lib/tkcanvas.rb18
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/tk/lib/tkcanvas.rb b/ext/tk/lib/tkcanvas.rb
index 5f03b0f3a96..80c36f6ed85 100644
--- a/ext/tk/lib/tkcanvas.rb
+++ b/ext/tk/lib/tkcanvas.rb
@@ -489,15 +489,15 @@ class TkcTag<TkObject
CTagID_TBL[id]? CTagID_TBL[id]: id
end
- $tk_canvas_tag = 'ctag0000'
+ Tk_CanvasTag_ID = ['ctag0000']
def initialize(parent, mode=nil, *args)
if not parent.kind_of?(TkCanvas)
fail format("%s need to be TkCanvas", parent.inspect)
end
@c = parent
- @path = @id = $tk_canvas_tag
+ @path = @id = Tk_CanvasTag_ID[0]
CTagID_TBL[@id] = self
- $tk_canvas_tag = $tk_canvas_tag.succ
+ Tk_CanvasTag_ID[0] = Tk_CanvasTag_ID[0].succ
if mode
tk_call @c.path, "addtag", @id, mode, *args
end
@@ -572,15 +572,15 @@ class TkcTagCurrent<TkcTag
end
class TkcGroup<TkcTag
- $tk_group_id = 'tkg00000'
+ Tk_cGroup_ID = ['tkcg00000']
def create_self(parent, *args)
if not parent.kind_of?(TkCanvas)
fail format("%s need to be TkCanvas", parent.inspect)
end
@c = parent
- @path = @id = $tk_group_id
+ @path = @id = Tk_cGroup_ID[0]
CTagID_TBL[@id] = self
- $tk_group_id = $tk_group_id.succ
+ Tk_cGroup_ID[0] = Tk_cGroup_ID[0].succ
add(*args) if args != []
end
@@ -702,10 +702,10 @@ class TkImage<TkObject
Tk_IMGTBL = {}
- $tk_image_id = 'i00000'
+ Tk_Image_ID = ['i00000']
def initialize(keys=nil)
- @path = $tk_image_id
- $tk_image_id = $tk_image_id.succ
+ @path = Tk_Image_ID[0]
+ Tk_Image_ID[0] = Tk_Image_ID[0].succ
tk_call 'image', 'create', @type, @path, *hash_kv(keys)
Tk_IMGTBL[@path] = self
end