# class Tk::TreeCtrl::Item

### Constants

TreeCtrlItemID_TBL

### Public Class Methods

id2obj(tree, id) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 1976
    def self.id2obj(tree, id)
      tpath = tree.path
      Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
        if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath]
          Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id]?                          Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[tpath][id] : id
        else
          id
        end
      }
    end

new(parent, keys={}) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 1988
    def initialize(parent, keys={})
      @tree = parent
      @tpath = parent.path
      @path = @id = @tree.item_create(keys)

      Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{
        Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath] ||= {}
        Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[@tpath][@id] = self
      }
    end

### Public Instance Methods

ancestor?(des)
Alias for: isancestor
ancestors() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2007
    def ancestors
      @tree.item_ancestors(@id)
    end

bbox(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2011
    def bbox(*args)
      @tree.item_bbox(@id, *args)
    end

cget(opt) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2037
    def cget(opt)
      @tree.item_cget(@id, opt)
    end

cget_strict(opt) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2040
    def cget_strict(opt)
      @tree.item_cget_strict(@id, opt)
    end

cget_tkstring(opt) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2034
    def cget_tkstring(opt)
      @tree.item_cget_tkstring(@id, opt)
    end

children() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2015
    def children
      @tree.item_children(@id)
    end

children_size()
Alias for: numchildren
collapse() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2019
    def collapse
      @tree.item_collapse(@id)
      self
    end

collapse_recurse() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2024
    def collapse_recurse
      @tree.item_collapse_recurse(@id)
      self
    end

complex(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2029
    def complex(*args)
      @tree.item_complex(@id, *args)
      self
    end

configinfo(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2048
    def configinfo(*args)
      @tree.item_configinfo(@id, *args)
    end

configure(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2044
    def configure(*args)
      @tree.item_configure(@id, *args)
    end

current_configinfo(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2052
    def current_configinfo(*args)
      @tree.current_item_configinfo(@id, *args)
    end

current_element_configinfo(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2091
    def current_element_configinfo(*args)
      @tree.current_item_element_configinfo(@id, *args)
    end

delete() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2056
    def delete
      @tree.item_delete(@id)
      self
    end

element_actual(column, elem, key) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2069
    def element_actual(column, elem, key)
      @tree.item_element_actual(@id, column, elem, key)
    end

element_cget_strict(opt) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2079
    def element_cget_strict(opt)
      @tree.item_element_cget_strict(@id, opt)
    end

element_cget_tkstring(opt) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2073
    def element_cget_tkstring(opt)
      @tree.item_element_cget(@id, opt)
    end

element_configinfo(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2087
    def element_configinfo(*args)
      @tree.item_element_configinfo(@id, *args)
    end

element_configure(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2083
    def element_configure(*args)
      @tree.item_element_configure(@id, *args)
    end

element_dump() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2061
    def element_dump
      @tree.item_dump(@id)
    end

element_dump_hash() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2065
    def element_dump_hash
      @tree.item_dump_hash(@id)
    end

expand() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2095
    def expand
      @tree.item_expand(@id)
      self
    end

expand_recurse() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2100
    def expand_recurse
      @tree.item_expand_recurse(@id)
      self
    end

first_child(child=nil)
Alias for: firstchild
firstchild(child=nil) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2105
    def firstchild(child=nil)
      if child
        @tree.item_firstchild(@id, child)
        self
      else
        @tree.item_firstchild(@id)
      end
    end

Also aliased as: first_child
has_button(st=None)
Alias for: hasbutton
has_button?()
Alias for: hasbutton?
hasbutton(st=None) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2115
    def hasbutton(st=None)
      if st == None
        @tree.item_hasbutton(@id)
      else
        @tree.item_hasbutton(@id, st)
        self
      end
    end

Also aliased as: has_button
hasbutton?() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2125
    def hasbutton?
      @tree.item_hasbutton(@id)
    end

Also aliased as: has_button?
id() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 1999
    def id
      @id
    end

index() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2130
    def index
      @tree.item_index(@id)
    end

is_ancestor(des)
Alias for: isancestor
is_ancestor?(des)
Alias for: isancestor
is_open()
Alias for: isopen
is_open?()
Alias for: isopen
is_opened?()
Alias for: isopen
isancestor(des) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2134
    def isancestor(des)
      @tree.item_isancestor(@id, des)
    end

Also aliased as: is_ancestor, isancestor?, is_ancestor?, ancestor?
isancestor?(des)
Alias for: isancestor
isopen() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2142
    def isopen
      @tree.item_isopen(@id)
    end

Also aliased as: is_open, isopen?, is_open?, isopened?, is_opened?, open?
isopen?()
Alias for: isopen
isopened?()
Alias for: isopen
item_text(column, txt=nil, *args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2241
    def item_text(column, txt=nil, *args)
      if args.empty?
        if txt
          @tree.item_text(@id, column, txt)
          self
        else
          @tree.item_text(@id, column)
        end
      else
        @tree.item_text(@id, column, txt, *args)
        self
      end
    end

last_child(child=nil)
Alias for: lastchild
lastchild(child=nil) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2152
    def lastchild(child=nil)
      if child
        @tree.item_lastchild(@id, child)
        self
      else
        @tree.item_lastchild(@id)
      end
    end

Also aliased as: last_child
next_sibling(nxt=nil)
Alias for: nextsibling
nextsibling(nxt=nil) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2162
    def nextsibling(nxt=nil)
      if nxt
        @tree.item_nextsibling(@id, nxt)
        self
      else
        @tree.item_nextsibling(@id)
      end
    end

Also aliased as: next_sibling
num_children()
Alias for: numchildren
numchildren() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2172
    def numchildren
      @tree.item_numchildren(@id)
    end

Also aliased as: num_children, children_size
open?()
Alias for: isopen
parent_index() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2178
    def parent_index
      @tree.item_parent(@id)
    end

prev_sibling(nxt=nil)
Alias for: prevsibling
prevsibling(nxt=nil) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2182
    def prevsibling(nxt=nil)
      if nxt
        @tree.item_prevsibling(@id, nxt)
        self
      else
        @tree.item_prevsibling(@id)
      end
    end

Also aliased as: prev_sibling
remove() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2192
    def remove
      @tree.item_remove(@id)
    end

rnc() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2196
    def rnc
      @tree.item_rnc(@id)
    end

sort(*opts) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2200
    def sort(*opts)
      @tree.item_sort(@id, *opts)
    end

sort_not_really(*opts) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2203
    def sort_not_really(*opts)
      @tree.item_sort_not_really(@id, *opts)
      self
    end

state_for_column(column, *args)
Alias for: state_forcolumn
state_forcolumn(column, *args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2208
    def state_forcolumn(column, *args)
      @tree.item_state_forcolumn(@id, column, *args)
      self
    end

Also aliased as: state_for_column
state_get(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2214
    def state_get(*args)
      @tree.item_state_get(@id, *args)
    end

state_set(*args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2218
    def state_set(*args)
      @tree.item_state_set(@id, *args)
      self
    end

style_elements(column) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2223
    def style_elements(column)
      @tree.item_style_elements(@id, column)
    end

style_map(column, style, map) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2227
    def style_map(column, style, map)
      @tree.item_style_map(@id, column, style, map)
      self
    end

style_set(column=nil, *args) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2232
    def style_set(column=nil, *args)
      if args.empty?
        @tree.item_style_set(@id, column)
      else
        @tree.item_style_set(@id, column, *args)
        self
      end
    end

to_s() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2003
    def to_s
      @id.to_s.dup
    end

toggle() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2255
    def toggle
      @tree.item_toggle(@id)
      self
    end

toggle_recurse() click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2260
    def toggle_recurse
      @tree.item_toggle_recurse(@id)
      self
    end

visible(st=None) click to toggle source

    # File lib/tkextlib/treectrl/tktreectrl.rb, line 2265
    def visible(st=None)
      if st == None
        @tree.item_visible(@id)
      else
        @tree.item_visible(@id, st)
        self
      end
    end