Methods
- #
- C
- D
- E
- I
- M
- N
- O
- P
- R
- S
- T
- V
Included Modules
Constants
TreeNode_TBL | = | TkCore::INTERP.create_table |
TreeNode_ID | = | ['bw:node'.freeze, TkUtil.untrust('00000')]).instance_eval{ @mutex = Mutex.new |
Class Public methods
id2obj(tree, id)
Link
new(tree, *args)
Link
# File ext/tk/lib/tkextlib/bwidget/tree.rb, line 333 def initialize(tree, *args) if tree.kind_of?(Tk::BWidget::Tree) @tree = tree parent = args.shift if parent.kind_of?(Tk::BWidget::Tree::Node) if parent.tree.path != @tree.path fail RuntimeError, 'tree of parent node is not match' end end elsif tree.kind_of?(Tk::BWidget::Tree::Node) @tree = tree.tree parent = tree.parent else fail RuntimeError, "expect Tk::BWidget::Tree or Tk::BWidget::Tree::Node for 1st argument" end if args[-1].kind_of?(Hash) keys = _symbolkey2str(args.pop) else keys = {} end index = keys.delete('index') unless args.empty? index = args.shift end index = 'end' unless index unless args.empty? fail RuntimeError, 'too much arguments' end @tpath = @tree.path if keys.key?('nodename') @path = @id = keys.delete('nodename') else TreeNode_ID.mutex.synchronize{ @path = @id = TreeNode_ID.join(TkCore::INTERP._ip_id_) TreeNode_ID[1].succ! } end TreeNode_TBL.mutex.synchronize{ TreeNode_TBL[@id] = self TreeNode_TBL[@tpath] = {} unless TreeNode_TBL[@tpath] TreeNode_TBL[@tpath][@id] = self } @tree.insert(index, parent, @id, keys) end
Instance Public methods
[](key)
Link
[]=(key, val)
Link
cget(key)
Link
cget_strict(key)
Link
cget_tkstring(key)
Link
close_tree(recurse=None)
Link
configinfo(key=nil)
Link
configure(key, val=None)
Link
current_configinfo(key=nil)
Link
delete()
Link
edit(*args)
Link
exist?()
Link
id()
Link
index()
Link
move(index, parent=nil)
Link
mutex()
Link
open?()
Link
open_tree(recurse=None)
Link
parent()
Link
reorder(neworder)
Link
see()
Link
selection_add()
Link
selection_remove()
Link
selection_set()
Link
selection_toggle()
Link
toggle()
Link
tree()
Link