Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2291
def self.id2obj(tree, id)
tpath = tree.path
Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath]
Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id]? Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[tpath][id] : id
else
id
end
}
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2303
def initialize(parent, keys=nil)
@tree = parent
@tpath = parent.path
Tk::TreeCtrl::Style::TreeCtrlStyleID.mutex.synchronize{
@path = @id =
Tk::TreeCtrl::Style::TreeCtrlStyleID.join(TkCore::INTERP._ip_id_)
Tk::TreeCtrl::Style::TreeCtrlStyleID[1].succ!
}
Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{
Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath] ||= {}
Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[@tpath][@id] = self
}
@tree.style_create(@id, keys)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2332
def cget(opt)
@tree.style_cget(@id, opt)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2335
def cget_strict(opt)
@tree.style_cget_strict(@id, opt)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2329
def cget_tkstring(opt)
@tree.style_cget_tkstring(@id, opt)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2343
def configinfo(*args)
@tree.style_configinfo(@id, *args)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2339
def configure(*args)
@tree.style_configure(@id, *args)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2347
def current_configinfo(*args)
@tree.current_style_configinfo(@id, *args)
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2351
def delete
@tree.style_delete(@id)
self
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2356
def elements(*elems)
if elems.empty?
@tree.style_elements(@id)
else
@tree.style_elements(@id, *elems)
self
end
end
# File tk/lib/tkextlib/treectrl/tktreectrl.rb, line 2365
def layout(elem, keys=None)
if keys && keys != None && keys.kind_of?(Hash)
@tree.style_layout(@id, elem, keys)
self
else
@tree.style_layout(@id, elem, keys)
end
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.