# File tk/lib/tkextlib/tile/treeview.rb, line 709 def self.assign(tree, id) tpath = tree.path obj = nil Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] && Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] return Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] end obj = self.allocate obj.instance_eval{ @parent = @t = tree @tpath = tpath @path = @id = id } Tk::Tile::Treeview::Item::ItemID_TBL[tpath] ||= {} Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id] = obj } obj end
# File tk/lib/tkextlib/tile/treeview.rb, line 697 def self.id2obj(tree, id) tpath = tree.path Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ if Tk::Tile::Treeview::Item::ItemID_TBL[tpath] (Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id])? Tk::Tile::Treeview::Item::ItemID_TBL[tpath][id]: id else id end } end
# File tk/lib/tkextlib/tile/treeview.rb, line 742 def initialize(tree, parent_item = '', idx = 'end', keys = {}) if parent_item.kind_of?(Hash) keys = parent_item idx = 'end' parent_item = '' elsif idx.kind_of?(Hash) keys = idx idx = 'end' end @parent = @t = tree @tpath = tree.path @path = @id = _insert_item(@t, parent_item, idx, keys) Tk::Tile::Treeview::Item::ItemID_TBL.mutex.synchronize{ ItemID_TBL[@tpath] = {} unless ItemID_TBL[@tpath] ItemID_TBL[@tpath][@id] = self } end
# File tk/lib/tkextlib/tile/treeview.rb, line 804 def bbox(column=None) @t.bbox(@id, column) end
# File tk/lib/tkextlib/tile/treeview.rb, line 767 def cget(option) @t.itemcget(@id, option) end
# File tk/lib/tkextlib/tile/treeview.rb, line 770 def cget_strict(option) @t.itemcget_strict(@id, option) end
# File tk/lib/tkextlib/tile/treeview.rb, line 764 def cget_tkstring(option) @t.itemcget_tkstring(@id, option) end
# File tk/lib/tkextlib/tile/treeview.rb, line 808 def children @t.children(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 794 def close configure('open', false) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 779 def configinfo(key=nil) @t.itemconfiginfo(@id, key) end
# File tk/lib/tkextlib/tile/treeview.rb, line 774 def configure(key, value=None) @t.itemconfigure(@id, key, value) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 783 def current_configinfo(key=nil) @t.current_itemconfiginfo(@id, key) end
# File tk/lib/tkextlib/tile/treeview.rb, line 816 def delete @t.delete(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 821 def detach @t.detach(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 826 def exist? @t.exist?(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 830 def focus @t.focus_item(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 889 def get(col) @t.get(@id, col) end
# File tk/lib/tkextlib/tile/treeview.rb, line 884 def get_directory @t.get_directory(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 834 def index @t.index(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 838 def insert(idx='end', keys={}) @t.insert(@id, idx, keys) end
# File tk/lib/tkextlib/tile/treeview.rb, line 842 def move(parent, idx) @t.move(@id, parent, idx) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 847 def next_item @t.next_item(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 790 def open configure('open', true) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 787 def open? cget('open') end
# File tk/lib/tkextlib/tile/treeview.rb, line 851 def parent_item @t.parent_item(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 855 def prev_item @t.prev_item(@id) end
# File tk/lib/tkextlib/tile/treeview.rb, line 859 def see @t.see(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 864 def selection_add @t.selection_add(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 869 def selection_remove @t.selection_remove(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 874 def selection_set @t.selection_set(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 879 def selection_toggle @t.selection_toggle(@id) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 893 def set(col, value) @t.set(@id, col, value) end
# File tk/lib/tkextlib/tile/treeview.rb, line 811 def set_children(*items) @t.set_children(@id, *items) self end
# File tk/lib/tkextlib/tile/treeview.rb, line 799 def tag_has?(tag) @t.tag_has?(tag, @id) end
Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.
If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.
If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.
If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.