# File tk/lib/tkextlib/blt/treeview.rb, line 1058 def self.id2obj(tree, id) tpath = tree.path return id unless TreeTagID_TBL[tpath] if TreeTagID_TBL[tpath][id] TreeTagID_TBL[tpath][id] else begin self.new(tree, nil, nil, 'name'=>Integer(id)) rescue id end end end
# File tk/lib/tkextlib/blt/treeview.rb, line 1079 def self.new(tree, *ids) if tree.kind_of?(Array) super(tree[0], tree[1], ids) else super(tree, nil, ids) end end
# File tk/lib/tkextlib/blt/treeview.rb, line 1087 def initialize(tree, name, ids) @parent = @tree = tree @tpath = @parent.path if name @path = @id = name else @path = @id = TreeTag_ID.join(TkCore::INTERP._ip_id_).freeze TreeTag_ID[1].succ! end TreeTagID_TBL[@tpath] = {} unless TreeTagID_TBL[@tpath] TreeTagID_TBL[@tpath][@id] = self unless ids.empty? tk_call(@tpath, 'tag', 'add', @id, *(ids.collect{|id| tagid(id)})) end end
# File tk/lib/tkextlib/blt/treeview.rb, line 1120 def add(*ids) tk_call(@tpath, 'tag', 'add', @id, *(ids{|id| tagid(id)})) self end
# File tk/lib/tkextlib/blt/treeview.rb, line 1130 def forget tk_call(@tpath, 'tag', 'forget', @id) self end