Methods
- #
- A
- C
-
- canvasx,
- canvasy,
- collapse,
- collapse_recurse,
- column_bbox,
- column_compare,
- column_count,
- column_create,
- column_delete,
- column_id,
- column_index,
- column_list,
- column_move,
- column_needed_width,
- column_neededwidth,
- column_order,
- column_visible_list,
- column_visible_order,
- column_width,
- columns_size,
- compare,
- contentbox
- D
- E
- G
- I
-
- identify,
- image_tint,
- index,
- install_bind,
- item_ancestors,
- item_bbox,
- item_children,
- item_children_size,
- item_collapse,
- item_collapse_recurse,
- item_compare,
- item_complex,
- item_count,
- item_create,
- item_delete,
- item_dump,
- item_dump_hash,
- item_element_actual,
- item_element_perstate,
- item_expand,
- item_expand_recurse,
- item_first_child,
- item_firstchild,
- item_has_button,
- item_has_button?,
- item_hasbutton,
- item_hasbutton?,
- item_id,
- item_image,
- item_index,
- item_is_ancestor,
- item_is_ancestor?,
- item_is_open,
- item_is_open?,
- item_is_opened?,
- item_isancestor,
- item_isancestor?,
- item_isopen,
- item_isopen?,
- item_isopened?,
- item_last_child,
- item_lastchild,
- item_next_sibling,
- item_nextsibling,
- item_num_children,
- item_numchildren,
- item_order,
- item_parent,
- item_prev_sibling,
- item_prevsibling,
- item_range,
- item_remove,
- item_rnc,
- item_sort,
- item_sort_not_really,
- item_span,
- item_state_for_column,
- item_state_forcolumn,
- item_state_get,
- item_state_set,
- item_style_elements,
- item_style_map,
- item_style_set,
- item_text,
- item_toggle,
- item_toggle_recurse,
- item_visible,
- item_visible?,
- item_visible_order,
- items_size
- L
- M
- N
-
- notify_bind,
- notify_bind_append,
- notify_bind_remove,
- notify_bindinfo,
- notify_detailnames,
- notify_eventnames,
- notify_generate,
- notify_install,
- notify_install_detail,
- notify_install_event,
- notify_linkage,
- notify_unbind,
- notify_uninstall,
- notify_uninstall_detail,
- notify_uninstall_event,
- num_columns,
- num_items,
- numcolumns,
- numitems
- O
- P
- R
- S
-
- see,
- selection_add,
- selection_anchor,
- selection_clear,
- selection_count,
- selection_get,
- selection_includes,
- selection_modify,
- set_item_image,
- set_item_span,
- set_style_layout,
- state_define,
- state_linkage,
- state_names,
- state_undefine,
- style_create,
- style_delete,
- style_elements,
- style_layout,
- style_names
- T
Included Modules
- Tk::TreeCtrl::ConfigMethod
- Scrollable
Constants
| BindTag_FileList | = | TkBindTag.new_by_name('TreeCtrlFileList') |
| PACKAGE_NAME | = | 'treectrl'.freeze |
| HasColumnCreateCommand | = | (TkPackage.vcompare(self.package_version, '1.1') >= 0) |
| TkCommandNames | = | ['treectrl'.freeze].freeze |
| WidgetClassName | = | 'TreeCtrl'.freeze |
Class Public methods
image_tint(img, color, alpha)
Link
loupe(img, x, y, w, h, zoom)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 48 def self.loupe(img, x, y, w, h, zoom) # NOTE: platform == 'unix' only # img => TkPhotoImage # x, y => screen coords # w, h => magnifier width and height # zoom => zooming rate Tk.tk_call_without_enc('loupe', img, x, y, w, h, zoom) end
package_name()
Link
package_version()
Link
text_layout(font, text, keys={})
Link
Instance Public methods
__destroy_hook__()
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 653 def __destroy_hook__ Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.delete(@path) } Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.delete(@path) } Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.delete(@path) } Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.delete(@path) } end
activate(desc)
Link
canvasx(x)
Link
canvasy(y)
Link
collapse(*dsc)
Link
collapse_recurse(*dsc)
Link
column_bbox(idx)
Link
column_compare(column1, op, column2)
Link
column_count()
Link
column_create(keys=nil)
Link
column_delete(idx)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 755 def column_delete(idx) Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL.mutex.synchronize{ if Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path] Tk::TreeCtrl::Column::TreeCtrlColumnID_TBL[self.path].delete(idx) end } tk_send('column', 'delete', idx) self end
column_id(idx)
Link
column_index(idx)
Link
column_list(visible=false)
Link
column_move(idx, before)
Link
column_order(column, visible=false)
Link
column_visible_list()
Link
column_visible_order(column)
Link
column_width(idx)
Link
compare(item1, op, item2)
Link
contentbox()
Link
debug_dinfo()
Link
debug_scroll()
Link
depth(item=None)
Link
dragimage_add(item, *args)
Link
dragimage_clear()
Link
dragimage_offset(*args)
Link
dragimage_visible(*args)
Link
dragimage_visible?()
Link
element_class(elem)
Link
element_create(elem, type, keys=nil)
Link
element_delete(*elems)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 869 def element_delete(*elems) Tk::TreeCtrl::Element::TreeCtrlElementID_TBL.mutex.synchronize{ if Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path] elems.each{|elem| Tk::TreeCtrl::Element::TreeCtrlElementID_TBL[self.path].delete(elem) } end } tk_send('element', 'delete', *elems) self end
element_names()
Link
element_perstate(elem, opt, st_list)
Link
element_type(elem)
Link
expand(*dsc)
Link
expand_recurse(*dsc)
Link
get_item_image(item, column=nil)
Link
get_item_span(item, column=nil)
Link
get_style_layout(style, elem, opt=None)
Link
identify(x, y)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 921 def identify(x, y) lst = list(tk_send('identify', x, y)) if lst[0] == 'item' lst[1] = Tk::TreeCtrl::Item.id2obj(self, lst[1]) size = lst.size i = 2 while i < size case lst[i] when 'line' i += 1 lst[i] = Tk::TreeCtrl::Item.id2obj(self, lst[i]) i += 1 when 'button' i += 1 when 'column' i += 2 when 'elem' i += 1 lst[i] = Tk::TreeCtrl::Element.id2obj(self, lst[i]) i += 1 else i += 1 end end end lst end
index(idx)
Link
install_bind(cmd, *args)
Link
item_ancestors(item)
Link
item_bbox(item, *args)
Link
item_children(item)
Link
item_collapse(item)
Link
item_collapse_recurse(item)
Link
item_compare(item1, op, item2)
Link
item_complex(item, *args)
Link
item_count()
Link
item_create(keys={})
Link
item_delete(first, last=None)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1012 def item_delete(first, last=None) Tk::TreeCtrl::Item::TreeCtrlItemID_TBL.mutex.synchronize{ if Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path] if first == 'all' || first == :all || last == 'all' || last == :all Tk::TreeCtrl::Item::TreeCtrlItemID_TBL[self.path].clear elsif last == None _erase_children(first) else self.range(first, last).each{|id| _erase_children(id) } end end } tk_send('item', 'delete', first, last) self end
item_dump(item)
Link
item_dump_hash(item)
Link
item_element_actual(item, column, elem, key)
Link
item_element_perstate(elem, opt, st_list)
Link
item_expand(item)
Link
item_expand_recurse(item)
Link
item_firstchild(parent, child=nil)
Link
Also aliased as: item_first_child
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1056 def item_firstchild(parent, child=nil) if child tk_send_without_enc('item', 'firstchild', _get_eval_string(parent, true), _get_eval_string(child, true)) self else id = num_or_str(tk_send_without_enc('item', 'firstchild', _get_eval_string(parent, true))) Tk::TreeCtrl::Item.id2obj(self, id) end end
item_id(item)
Link
item_image(item, column=nil, *args)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1092 def item_image(item, column=nil, *args) if args.empty? if column img = tk_send('item', 'image', item, column) TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img else simplelist(tk_send('item', 'image', item)).collect!{|img| TkImage::Tk_IMGTBL[img]? TkImage::Tk_IMGTBL[img] : img } end else tk_send('item', 'image', item, column, *args) self end end
item_index(item)
Link
item_isancestor(item, des)
Link
item_isopen(item)
Link
item_lastchild(parent, child=nil)
Link
Also aliased as: item_last_child
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1134 def item_lastchild(parent, child=nil) if child tk_send_without_enc('item', 'lastchild', _get_eval_string(parent, true), _get_eval_string(child, true)) self else id = num_or_str(tk_send_without_enc('item', 'lastchild', _get_eval_string(parent, true))) Tk::TreeCtrl::Item.id2obj(self, id) end end
item_order(item, visible=false)
Link
item_parent(item)
Link
item_range(first, last)
Link
item_remove(item)
Link
item_rnc(item)
Link
item_sort(item, *opts)
Link
item_sort_not_really(item, *opts)
Link
item_span(item, column=nil, *args)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1271 def item_span(item, column=nil, *args) if args.empty? if column list(tk_send('item', 'span', item, column)) else simplelist(tk_send('item', 'span', item)).collect!{|elem| list(elem)} end else tk_send('item', 'span', item, column, *args) self end end
item_state_get(item, *args)
Link
item_state_set(item, *args)
Link
item_style_elements(item, column)
Link
item_style_map(item, column, style, map)
Link
item_style_set(item, column=nil, *args)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1318 def item_style_set(item, column=nil, *args) if args.empty? if column id = tk_send_without_enc('item', 'style', 'set', _get_eval_string(item, true), _get_eval_string(column, true)) Tk::TreeCtrl::Style.id2obj(self, id) else list(tk_send_without_enc('item', 'style', 'set', _get_eval_string(item, true))).collect!{|id| Tk::TreeCtrl::Style.id2obj(self, id) } end else tk_send_without_enc('item', 'style', 'set', _get_eval_string(item, true), _get_eval_string(column, true), *(args.flatten.map!{|arg| _get_eval_string(arg, true) })) self end end
item_text(item, column, txt=nil, *args)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1342 def item_text(item, column, txt=nil, *args) if args.empty? if txt tk_send('item', 'text', item, column, txt) self else tk_send('item', 'text', item, column) end else tk_send('item', 'text', item, column, txt, *args) self end end
item_toggle(item)
Link
item_toggle_recurse(item)
Link
item_visible(item, st=None)
Link
item_visible?(item)
Link
item_visible_order(item)
Link
marquee_anchor(*args)
Link
marquee_coords(*args)
Link
marquee_corner(*args)
Link
marquee_identify()
Link
marquee_visible(st=None)
Link
marquee_visible?()
Link
notify_bind(obj, event, *args)
Link
def #notify_bind(obj, event, cmd=Proc.new, *args)
_bind([@path, 'notify', 'bind', obj], event, cmd, *args)
self
end
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1427 def notify_bind(obj, event, *args) # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind([@path, 'notify', 'bind', obj], event, cmd, *args) self end
notify_bind_append(obj, event, *args)
Link
def #notify_bind_append(obj, event, cmd=Proc.new, *args)
_bind_append([@path, 'notify', 'bind', obj], event, cmd, *args)
self
end
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1442 def notify_bind_append(obj, event, *args) # if args[0].kind_of?(Proc) || args[0].kind_of?(Method) if TkComm._callback_entry?(args[0]) || !block_given? cmd = args.shift else cmd = Proc.new end _bind_append([@path, 'notify', 'bind', obj], event, cmd, *args) self end
notify_bind_remove(obj, event)
Link
notify_bindinfo(obj, event=nil)
Link
notify_detailnames(event)
Link
notify_eventnames()
Link
notify_generate(pattern, char_map=None, percents_cmd=None)
Link
notify_install(pattern, percents_cmd=nil, &b)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1476 def notify_install(pattern, percents_cmd=nil, &b) pattern = "<#{pattern}>" percents_cmd = Proc.new(&b) if !percents_cmd && b if percents_cmd procedure(tk_send('notify', 'install', pattern, percents_cmd)) else procedure(tk_send('notify', 'install', pattern)) end end
notify_install_detail(event, detail, percents_cmd=nil, &b)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1486 def notify_install_detail(event, detail, percents_cmd=nil, &b) percents_cmd = Proc.new(&b) if !percents_cmd && b if percents_cmd tk_send('notify', 'install', 'detail', event, detail, percents_cmd) else tk_send('notify', 'install', 'detail', event, detail) end end
notify_install_event(event, percents_cmd=nil, &b)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1495 def notify_install_event(event, percents_cmd=nil, &b) percents_cmd = Proc.new(&b) if !percents_cmd && b if percents_cmd tk_send('notify', 'install', 'event', event, percents_cmd) else tk_send('notify', 'install', 'event', event) end end
notify_linkage(pattern, detail=None)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1504 def notify_linkage(pattern, detail=None) if detail != None tk_send('notify', 'linkage', pattern, detail) else begin if pattern.to_s.index(?-) # TreeCtrl 1.1 format? begin tk_send('notify', 'linkage', "<#{pattern}>") rescue # TreeCtrl 1.0? tk_send('notify', 'linkage', pattern) end else # TreeCtrl 1.0 format? begin tk_send('notify', 'linkage', pattern) rescue # TreeCtrl 1.1? tk_send('notify', 'linkage', "<#{pattern}>") end end end end end
notify_unbind(pattern=nil)
Link
notify_uninstall(pattern)
Link
notify_uninstall_detail(event, detail)
Link
notify_uninstall_event(event)
Link
orphans()
Link
range(first, last)
Link
see(item, column=None, keys={})
Link
selection_add(first, last=None)
Link
selection_anchor(item=None)
Link
selection_clear(*args)
Link
selection_count()
Link
selection_get()
Link
selection_includes(item)
Link
selection_modify(sel, desel)
Link
set_item_image(item, col, img, *args)
Link
set_item_span(item, col, num, *args)
Link
set_style_layout(style, elem, slot, value=None)
Link
state_define(name)
Link
state_linkage(name)
Link
state_names()
Link
state_undefine(*names)
Link
style_create(style, keys=None)
Link
style_delete(*args)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1644 def style_delete(*args) Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL.mutex.synchronize{ if Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path] args.each{|sty| Tk::TreeCtrl::Style::TreeCtrlStyleID_TBL[self.path].delete(sty) } end } tk_send('style', 'delete', *args) self end
style_elements(style, *elems)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1656 def style_elements(style, *elems) if elems.empty? list(tk_send('style', 'elements', style)).collect!{|id| Tk::TreeCtrl::Element.id2obj(self, id) } else tk_send('style', 'elements', style, elems.flatten) self end end
style_layout(style, elem, keys=None)
Link
# File ext/tk/lib/tkextlib/treectrl/tktreectrl.rb, line 1684 def style_layout(style, elem, keys=None) if keys && keys != None if keys.kind_of?(Hash) tk_send('style', 'layout', style, elem, *hash_kv(keys)) self else _conv_style_layout_val(keys, tk_send('style', 'layout', style, elem, "-#{keys}")) end else ret = Hash.new Hash[*simplelist(tk_send('style', 'layout', style, elem))].each{|k, v| k = k[1..-1] ret[k] = _conv_style_layout_val(k, v) } ret end end
style_names()
Link
toggle(*items)
Link