Class: TkcTagString

Class | TkcTagString
In: | tk/lib/tk/canvastag.rb
Parent: | TkcTag

### Methods

new new

### Public Class methods

new(parent, name, *args)

[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)

[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

[Validate]