In Files

  • tk/lib/tkextlib/treectrl/tktreectrl.rb

Class/Module Index [+]

Quicksearch

Tk::TreeCtrl::Item

Constants

TreeCtrlItemID_TBL

Public Class Methods

id2obj(tree, id) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1975
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1987
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) click to toggle source
Alias for: isancestor
ancestors() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2006
def ancestors
  @tree.item_ancestors(@id)
end
            
bbox(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2010
def bbox(*args)
  @tree.item_bbox(@id, *args)
end
            
cget(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2036
def cget(opt)
  @tree.item_cget(@id, opt)
end
            
cget_strict(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2039
def cget_strict(opt)
  @tree.item_cget_strict(@id, opt)
end
            
cget_tkstring(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2033
def cget_tkstring(opt)
  @tree.item_cget_tkstring(@id, opt)
end
            
children() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2014
def children
  @tree.item_children(@id)
end
            
children_size() click to toggle source
Alias for: numchildren
collapse() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2018
def collapse
  @tree.item_collapse(@id)
  self
end
            
collapse_recurse() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2023
def collapse_recurse
  @tree.item_collapse_recurse(@id)
  self
end
            
complex(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2028
def complex(*args)
  @tree.item_complex(@id, *args)
  self
end
            
configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2047
def configinfo(*args)
  @tree.item_configinfo(@id, *args)
end
            
configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2043
def configure(*args)
  @tree.item_configure(@id, *args)
end
            
current_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2051
def current_configinfo(*args)
  @tree.current_item_configinfo(@id, *args)
end
            
current_element_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2090
def current_element_configinfo(*args)
  @tree.current_item_element_configinfo(@id, *args)
end
            
delete() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2055
def delete
  @tree.item_delete(@id)
  self
end
            
element_actual(column, elem, key) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2068
def element_actual(column, elem, key)
  @tree.item_element_actual(@id, column, elem, key)
end
            
element_cget_strict(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2078
def element_cget_strict(opt)
  @tree.item_element_cget_strict(@id, opt)
end
            
element_cget_tkstring(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2072
def element_cget_tkstring(opt)
  @tree.item_element_cget(@id, opt)
end
            
element_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2086
def element_configinfo(*args)
  @tree.item_element_configinfo(@id, *args)
end
            
element_configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2082
def element_configure(*args)
  @tree.item_element_configure(@id, *args)
end
            
element_dump() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2060
def element_dump
  @tree.item_dump(@id)
end
            
element_dump_hash() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2064
def element_dump_hash
  @tree.item_dump_hash(@id)
end
            
expand() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2094
def expand
  @tree.item_expand(@id)
  self
end
            
expand_recurse() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2099
def expand_recurse
  @tree.item_expand_recurse(@id)
  self
end
            
first_child(child=nil) click to toggle source
Alias for: firstchild
firstchild(child=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2104
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) click to toggle source
Alias for: hasbutton
has_button?() click to toggle source
Alias for: hasbutton?
hasbutton(st=None) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2114
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2124
def hasbutton?
  @tree.item_hasbutton(@id)
end
            
Also aliased as: has_button?
id() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1998
def id
  @id
end
            
index() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2129
def index
  @tree.item_index(@id)
end
            
is_ancestor(des) click to toggle source
Alias for: isancestor
is_ancestor?(des) click to toggle source
Alias for: isancestor
is_open() click to toggle source
Alias for: isopen
is_open?() click to toggle source
Alias for: isopen
is_opened?() click to toggle source
Alias for: isopen
isancestor(des) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2133
def isancestor(des)
  @tree.item_isancestor(@id, des)
end
            
isancestor?(des) click to toggle source
Alias for: isancestor
isopen() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2141
def isopen
  @tree.item_isopen(@id)
end
            
isopen?() click to toggle source
Alias for: isopen
isopened?() click to toggle source
Alias for: isopen
item_text(column, txt=nil, *args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2240
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) click to toggle source
Alias for: lastchild
lastchild(child=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2151
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) click to toggle source
Alias for: nextsibling
nextsibling(nxt=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2161
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() click to toggle source
Alias for: numchildren
numchildren() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2171
def numchildren
  @tree.item_numchildren(@id)
end
            
Also aliased as: num_children, children_size
open?() click to toggle source
Alias for: isopen
parent_index() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2177
def parent_index
  @tree.item_parent(@id)
end
            
prev_sibling(nxt=nil) click to toggle source
Alias for: prevsibling
prevsibling(nxt=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2181
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2191
def remove
  @tree.item_remove(@id)
end
            
rnc() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2195
def rnc
  @tree.item_rnc(@id)
end
            
sort(*opts) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2199
def sort(*opts)
  @tree.item_sort(@id, *opts)
end
            
sort_not_really(*opts) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2202
def sort_not_really(*opts)
  @tree.item_sort_not_really(@id, *opts)
  self
end
            
state_for_column(column, *args) click to toggle source
Alias for: state_forcolumn
state_forcolumn(column, *args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2207
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2213
def state_get(*args)
  @tree.item_state_get(@id, *args)
end
            
state_set(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2217
def state_set(*args)
  @tree.item_state_set(@id, *args)
  self
end
            
style_elements(column) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2222
def style_elements(column)
  @tree.item_style_elements(@id, column)
end
            
style_map(column, style, map) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2226
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2231
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 tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2002
def to_s
  @id.to_s.dup
end
            
toggle() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2254
def toggle
  @tree.item_toggle(@id)
  self
end
            
toggle_recurse() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2259
def toggle_recurse
  @tree.item_toggle_recurse(@id)
  self
end
            
visible(st=None) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2264
def visible(st=None)
  if st == None
    @tree.item_visible(@id)
  else
    @tree.item_visible(@id, st)
    self
  end
end