In Files

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

Class/Module Index [+]

Quicksearch

Tk::TreeCtrl::Element

Public Class Methods

id2obj(tree, id) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1858
def self.id2obj(tree, id)
  tpath = tree.path
  Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
    if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath]
      Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id]? \
               Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[tpath][id] : id
    else
      id
    end
  }
end
            
new(parent, type, keys=nil) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1870
def initialize(parent, type, keys=nil)
  @tree = parent
  @tpath = parent.path
  @type = type.to_s
  Tk::TreeCtrl::Element::TreeCtrlElementID.mutex.synchronize{
    @path = @id =
      Tk::TreeCtrl::Element::TreeCtrlElementID.join(TkCore::INTERP._ip_id_)
    Tk::TreeCtrl::Element::TreeCtrlElementID[1].succ!
  }

  Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{
    Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath] ||= {}
    Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[@tpath][@id] = self
  }

  @tree.element_create(@id, @type, keys)
end
            
type2class(type) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1854
def self.type2class(type)
  TreeCtrlElemTypeToClass[type] || type
end
            

Public Instance Methods

cget(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1899
def cget(opt)
  @tree.element_cget(@id, opt)
end
            
cget_strict(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1902
def cget_strict(opt)
  @tree.element_cget_strict(@id, opt)
end
            
cget_tkstring(opt) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1896
def cget_tkstring(opt)
  @tree.element_cget_tkstring(@id, opt)
end
            
configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1910
def configinfo(*args)
  @tree.element_configinfo(@id, *args)
end
            
configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1906
def configure(*args)
  @tree.element_configure(@id, *args)
end
            
current_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1914
def current_configinfo(*args)
  @tree.current_element_configinfo(@id, *args)
end
            
delete() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1918
def delete
  @tree.element_delete(@id)
  self
end
            
element_class() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1927
def element_class
  @tree.element_class(@id)
end
            
element_type() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1923
def element_type
  @tree.element_type(@id)
end
            
id() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1888
def id
  @id
end
            
mutex() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1843
def mutex; @mutex; end
            
to_s() click to toggle source
 
               # File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1892
def to_s
  @id.dup
end