class Tk::TreeCtrl::Item

Constants

TreeCtrlItemID_TBL

Public Class Methods

id2obj(tree, id) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 1968
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 1980
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 1999
def ancestors
  @tree.item_ancestors(@id)
end
bbox(*args) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2003
def bbox(*args)
  @tree.item_bbox(@id, *args)
end
cget(opt) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2029
def cget(opt)
  @tree.item_cget(@id, opt)
end
cget_strict(opt) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2032
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 2026
def cget_tkstring(opt)
  @tree.item_cget_tkstring(@id, opt)
end
children() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2007
def children
  @tree.item_children(@id)
end
children_size()
Alias for: numchildren
collapse() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2011
def collapse
  @tree.item_collapse(@id)
  self
end
collapse_recurse() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2016
def collapse_recurse
  @tree.item_collapse_recurse(@id)
  self
end
complex(*args) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2021
def complex(*args)
  @tree.item_complex(@id, *args)
  self
end
configinfo(*args) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2040
def configinfo(*args)
  @tree.item_configinfo(@id, *args)
end
configure(*args) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2036
def configure(*args)
  @tree.item_configure(@id, *args)
end
current_configinfo(*args) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2044
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 2083
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 2048
def delete
  @tree.item_delete(@id)
  self
end
element_actual(column, elem, key) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2061
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 2071
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 2065
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 2079
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 2075
def element_configure(*args)
  @tree.item_element_configure(@id, *args)
end
element_dump() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2053
def element_dump
  @tree.item_dump(@id)
end
element_dump_hash() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2057
def element_dump_hash
  @tree.item_dump_hash(@id)
end
expand() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2087
def expand
  @tree.item_expand(@id)
  self
end
expand_recurse() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2092
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 2097
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 2107
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 2117
def hasbutton?
  @tree.item_hasbutton(@id)
end
Also aliased as: has_button?
id() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 1991
def id
  @id
end
index() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2122
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 2126
def isancestor(des)
  @tree.item_isancestor(@id, des)
end
isancestor?(des)
Alias for: isancestor
isopen() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2134
def isopen
  @tree.item_isopen(@id)
end
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 2233
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 2144
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 2154
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 2164
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 2170
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 2174
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 2184
def remove
  @tree.item_remove(@id)
end
rnc() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2188
def rnc
  @tree.item_rnc(@id)
end
sort(*opts) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2192
def sort(*opts)
  @tree.item_sort(@id, *opts)
end
sort_not_really(*opts) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2195
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 2200
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 2206
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 2210
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 2215
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 2219
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 2224
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 1995
def to_s
  @id.to_s.dup
end
toggle() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2247
def toggle
  @tree.item_toggle(@id)
  self
end
toggle_recurse() click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2252
def toggle_recurse
  @tree.item_toggle_recurse(@id)
  self
end
visible(st=None) click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 2257
def visible(st=None)
  if st == None
    @tree.item_visible(@id)
  else
    @tree.item_visible(@id, st)
    self
  end
end