In Files

  • tk/lib/tk/canvastag.rb

Parent

Methods

Class/Module Index [+]

Quicksearch

TkcNamedTag

Public Class Methods

new(parent, name, *args) click to toggle source
 
               # File tk/lib/tk/canvastag.rb, line 291
def self.new(parent, name, *args)
  if CTagID_TBL[parent.path] && CTagID_TBL[parent.path][name]
    return CTagID_TBL[parent.path][name]
  else
    super(parent, name, *args)
  end
end
            
new(parent, name, mode=nil, *args) click to toggle source
 
               # File tk/lib/tk/canvastag.rb, line 299
def initialize(parent, name, mode=nil, *args)
  #unless parent.kind_of?(TkCanvas)
  #  fail ArgumentError, "expect TkCanvas for 1st argument"
  #end
  @c = parent
  @cpath = parent.path
  @path = @id = name
  CTagID_TBL[@cpath] = {} unless CTagID_TBL[@cpath]
  CTagID_TBL[@cpath][@id] = self
  if mode
    tk_call_without_enc(@c.path, "addtag", @id, mode, *args)
  end
end