TkBindTag (Class)

In: tk/lib/tk/bindtag.rb
Parent: Object

Methods

id2obj   inspect   name   new   new_by_name   to_eval  

Constants

BTagID_TBL = TkCore::INTERP.create_table
  BTagID_TBL = {}
Tk_BINDTAG_ID = ["btag".freeze, "00000".taint].freeze
ALL = self.new_by_name('all')

Included Modules

TkBindCore

Public Class methods

[Source]

# File tk/lib/tk/bindtag.rb, line 15
  def TkBindTag.id2obj(id)
    BTagID_TBL[id]? BTagID_TBL[id]: id
  end

[Source]

# File tk/lib/tk/bindtag.rb, line 28
  def initialize(*args, &b)
    @id = Tk_BINDTAG_ID.join('')
    Tk_BINDTAG_ID[1].succ!
    BTagID_TBL[@id] = self
    bind(*args, &b) if args != []
  end

[Source]

# File tk/lib/tk/bindtag.rb, line 19
  def TkBindTag.new_by_name(name, *args, &b)
    return BTagID_TBL[name] if BTagID_TBL[name]
    self.new(*args, &b).instance_eval{
      BTagID_TBL.delete @id
      @id = name
      BTagID_TBL[@id] = self
    }
  end

Public Instance methods

[Source]

# File tk/lib/tk/bindtag.rb, line 45
  def inspect
    #Kernel.format "#<TkBindTag: %s>", @id

    '#<TkBindTag: ' + @id + '>'
  end

[Source]

# File tk/lib/tk/bindtag.rb, line 37
  def name
    @id
  end

[Source]

# File tk/lib/tk/bindtag.rb, line 41
  def to_eval
    @id
  end

[Validate]