module Tk::TreeCtrl::ConfigMethod
Public Instance Methods
column_cget(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 434 def column_cget(tagOrId, option) itemcget(['column', tagOrId], option) end
column_cget_strict(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 437 def column_cget_strict(tagOrId, option) itemcget_strict(['column', tagOrId], option) end
column_cget_tkstring(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 431 def column_cget_tkstring(tagOrId, option) itemcget_tkstring(['column', tagOrId], option) end
column_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 443 def column_configinfo(tagOrId, slot=nil) itemconfiginfo(['column', tagOrId], slot) end
column_configure(tagOrId, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 440 def column_configure(tagOrId, slot, value=None) itemconfigure(['column', tagOrId], slot, value) end
column_dragcget(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 453 def column_dragcget(option) itemcget(['column', 'drag'], option) end
column_dragcget_strict(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 456 def column_dragcget_strict(option) itemcget_strict(['column', 'drag'], option) end
column_dragcget_tkstring(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 450 def column_dragcget_tkstring(option) itemcget_tkstring(['column', 'drag'], option) end
column_dragconfiginfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 462 def column_dragconfiginfo(slot=nil) itemconfiginfo(['column', 'drag'], slot) end
column_dragconfigure(slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 459 def column_dragconfigure(slot, value=None) itemconfigure(['column', 'drag'], slot, value) end
current_column_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 446 def current_column_configinfo(tagOrId, slot=nil) current_itemconfiginfo(['column', tagOrId], slot) end
current_column_dragconfiginfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 465 def current_column_dragconfiginfo(slot=nil) current_itemconfiginfo(['column', 'drag'], slot) end
current_debug_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 484 def current_debug_configinfo(slot=nil) current_itemconfiginfo('debug', slot) end
current_dragimage_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 503 def current_dragimage_configinfo(slot=nil) current_itemconfiginfo('dragimage', slot) end
current_element_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 522 def current_element_configinfo(tagOrId, slot=nil) current_itemconfiginfo(['element', tagOrId], slot) end
current_item_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 541 def current_item_configinfo(tagOrId, slot=nil) current_itemconfiginfo(['item', tagOrId], slot) end
current_item_element_configinfo(item, column, elem, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 560 def current_item_element_configinfo(item, column, elem, slot=nil) current_itemconfiginfo([['item', 'element'], [item, column, elem]], slot) end
current_marquee_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 579 def current_marquee_configinfo(slot=nil) current_itemconfiginfo('marquee', slot) end
current_notify_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 612 def current_notify_configinfo(tagOrId, slot=nil) pattern = "<#{pattern}>" current_itemconfiginfo(['notify', [win, pattern]], slot) end
current_style_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 632 def current_style_configinfo(tagOrId, slot=nil) current_itemconfiginfo(['style', tagOrId], slot) end
debug_cget(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 472 def debug_cget(option) itemcget('debug', option) end
debug_cget_strict(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 475 def debug_cget_strict(option) itemcget_strict('debug', option) end
debug_cget_tkstring(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 469 def debug_cget_tkstring(option) itemcget_tkstring('debug', option) end
debug_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 481 def debug_configinfo(slot=nil) itemconfiginfo('debug', slot) end
debug_configure(slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 478 def debug_configure(slot, value=None) itemconfigure('debug', slot, value) end
dragimage_cget(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 491 def dragimage_cget(option) itemcget('dragimage', option) end
dragimage_cget_strict(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 494 def dragimage_cget_strict(option) itemcget_strict('dragimage', option) end
dragimage_cget_tkstring(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 488 def dragimage_cget_tkstring(option) itemcget_tkstring('dragimage', option) end
dragimage_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 500 def dragimage_configinfo(slot=nil) itemconfiginfo('dragimage', slot) end
dragimage_configure(slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 497 def dragimage_configure(slot, value=None) itemconfigure('dragimage', slot, value) end
element_cget(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 510 def element_cget(tagOrId, option) itemcget(['element', tagOrId], option) end
element_cget_strict(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 513 def element_cget_strict(tagOrId, option) itemcget_strict(['element', tagOrId], option) end
element_cget_tkstring(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 507 def element_cget_tkstring(tagOrId, option) itemcget_tkstring(['element', tagOrId], option) end
element_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 519 def element_configinfo(tagOrId, slot=nil) itemconfiginfo(['element', tagOrId], slot) end
element_configure(tagOrId, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 516 def element_configure(tagOrId, slot, value=None) itemconfigure(['element', tagOrId], slot, value) end
item_cget(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 529 def item_cget(tagOrId, option) itemcget(['item', tagOrId], option) end
item_cget_strict(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 532 def item_cget_strict(tagOrId, option) itemcget_strict(['item', tagOrId], option) end
item_cget_tkstring(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 526 def item_cget_tkstring(tagOrId, option) itemcget_tkstring(['item', tagOrId], option) end
item_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 538 def item_configinfo(tagOrId, slot=nil) itemconfiginfo(['item', tagOrId], slot) end
item_configure(tagOrId, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 535 def item_configure(tagOrId, slot, value=None) itemconfigure(['item', tagOrId], slot, value) end
item_element_cget(item, column, elem, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 548 def item_element_cget(item, column, elem, option) itemcget([['item', 'element'], [item, column, elem]], option) end
item_element_cget_strict(item, column, elem, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 551 def item_element_cget_strict(item, column, elem, option) itemcget_strict([['item', 'element'], [item, column, elem]], option) end
item_element_cget_tkstring(item, column, elem, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 545 def item_element_cget_tkstring(item, column, elem, option) itemcget_tkstring([['item', 'element'], [item, column, elem]], option) end
item_element_configinfo(item, column, elem, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 557 def item_element_configinfo(item, column, elem, slot=nil) itemconfiginfo([['item', 'element'], [item, column, elem]], slot) end
item_element_configure(item, column, elem, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 554 def item_element_configure(item, column, elem, slot, value=None) itemconfigure([['item', 'element'], [item, column, elem]], slot, value) end
marquee_cget(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 567 def marquee_cget(option) itemcget('marquee', option) end
marquee_cget_strict(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 570 def marquee_cget_strict(option) itemcget_strict('marquee', option) end
marquee_cget_tkstring(option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 564 def marquee_cget_tkstring(option) itemcget_tkstring('marquee', option) end
marquee_configinfo(slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 576 def marquee_configinfo(slot=nil) itemconfiginfo('marquee', slot) end
marquee_configure(slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 573 def marquee_configure(slot, value=None) itemconfigure('marquee', slot, value) end
notify_cget(win, pattern, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 588 def notify_cget(win, pattern, option) pattern = "<#{pattern}>" # "notify" doesn't have cget subcommand. current_itemconfiginfo(['notify', [win, pattern]])[option.to_s] end
notify_cget_strict(win, pattern, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 593 def notify_cget_strict(win, pattern, option) pattern = "<#{pattern}>" # "notify" doesn't have cget subcommand. info = current_itemconfiginfo(['notify', [win, pattern]]) option = option.to_s unless info.has_key?(option) fail RuntimeError, "unknown option \"#{option}\"" else info[option] end end
notify_cget_tkstring(win, pattern, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 583 def notify_cget_tkstring(win, pattern, option) pattern = "<#{pattern}>" # "notify" doesn't have cget subcommand. tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(['notify', [win, pattern]])) << "-#{option}")), false, true)[-1] end
notify_configinfo(win, pattern, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 608 def notify_configinfo(win, pattern, slot=nil) pattern = "<#{pattern}>" itemconfiginfo(['notify', [win, pattern]], slot) end
notify_configure(win, pattern, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 604 def notify_configure(win, pattern, slot, value=None) pattern = "<#{pattern}>" itemconfigure(['notify', [win, pattern]], slot, value) end
style_cget(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 620 def style_cget(tagOrId, option) itemcget(['style', tagOrId], option) end
style_cget_strict(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 623 def style_cget_strict(tagOrId, option) itemcget_strict(['style', tagOrId], option) end
style_cget_tkstring(tagOrId, option)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 617 def style_cget_tkstring(tagOrId, option) itemcget_tkstring(['style', tagOrId], option) end
style_configinfo(tagOrId, slot=nil)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 629 def style_configinfo(tagOrId, slot=nil) itemconfiginfo(['style', tagOrId], slot) end
style_configure(tagOrId, slot, value=None)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 626 def style_configure(tagOrId, slot, value=None) itemconfigure(['style', tagOrId], slot, value) end
tagid(mixed_id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 222 def tagid(mixed_id) if mixed_id == 'debug' ['debug', None] elsif mixed_id == 'dragimage' ['dragimage', None] elsif mixed_id == 'marquee' ['marquee', None] elsif mixed_id.kind_of?(Array) [mixed_id[0], treectrl_tagid(*mixed_id)] else tagid(mixed_id.split(':')) end end
treectrl_tagid(key, obj)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 178 def treectrl_tagid(key, obj) if key.kind_of?(Array) key = key.join(' ') else key = key.to_s end if (obj.kind_of?(Tk::TreeCtrl::Column) || obj.kind_of?(Tk::TreeCtrl::Element) || obj.kind_of?(Tk::TreeCtrl::Item) || obj.kind_of?(Tk::TreeCtrl::Style)) obj = obj.id end case key when 'column' obj when 'debug' None when 'dragimage' None when 'element' obj when 'item element' obj when 'marquee' None when 'notify' obj when 'style' obj else obj end end
Private Instance Methods
__item_boolval_optkeys(id)
click to toggle source
Calls superclass method
# File lib/tkextlib/treectrl/tktreectrl.rb, line 323 def __item_boolval_optkeys(id) if id == 'debug' ['data', 'display', 'enable', 'span', 'textlayout'] elsif id == 'dragimage' ['visible'] elsif id == 'marquee' ['visible'] elsif id.kind_of?(Array) case id[0] when 'item' ['visible', 'wrap', 'open', 'returnid', 'visible'] when 'column' if id[1] == 'drag' ['enable'] else ['button', 'expand', 'resize', 'squeeze', 'sunken', 'visible', 'widthhack'] end when 'element' ['draw', 'filled', 'showfocus', 'clip', 'destroy'] when 'notify' ['active'] when 'style' ['detach', 'indent', 'visible'] else if id[0].kind_of?(Array) && id[0][1] == 'element' ['filled', 'showfocus'] else super(id) end end else super(id) end end
__item_cget_cmd(mixed_id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 236 def __item_cget_cmd(mixed_id) if mixed_id[0] == 'column' && mixed_id[1] == 'drag' return [self.path, 'column', 'dragcget'] end if mixed_id[1].kind_of?(Array) id = mixed_id[1] else id = [mixed_id[1]] end if mixed_id[0].kind_of?(Array) ([self.path].concat(mixed_id[0]) << 'cget').concat(id) else [self.path, mixed_id[0], 'cget'].concat(id) end end
__item_config_cmd(mixed_id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 255 def __item_config_cmd(mixed_id) if mixed_id[0] == 'column' && mixed_id[1] == 'drag' return [self.path, 'column', 'dragconfigure'] end if mixed_id[1].kind_of?(Array) id = mixed_id[1] else id = [mixed_id[1]] end if mixed_id[0].kind_of?(Array) ([self.path].concat(mixed_id[0]) << 'configure').concat(id) else [self.path, mixed_id[0], 'configure'].concat(id) end end
__item_configinfo_struct(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 292 def __item_configinfo_struct(id) if id.kind_of?(Array) && id[0].to_s == 'notify' {:key=>0, :alias=>nil, :db_name=>nil, :db_class=>nil, :default_value=>nil, :current_value=>1} else {:key=>0, :alias=>1, :db_name=>1, :db_class=>2, :default_value=>3, :current_value=>4} end end
__item_font_optkeys(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 304 def __item_font_optkeys(id) if id.kind_of?(Array) && (id[0] == 'element' || (id[0].kind_of?(Array) && id[0][1] == 'element')) [] else ['font'] end end
__item_keyonly_optkeys(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 418 def __item_keyonly_optkeys(id) # { def_key=>(undef_key|nil), ... } { 'notreally'=>nil, 'increasing'=>'decreasing', 'decreasing'=>'increasing', 'ascii'=>nil, 'dictionary'=>nil, 'integer'=>nil, 'real'=>nil } end
__item_listval_optkeys(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 382 def __item_listval_optkeys(id) if id.kind_of?(Array) case id[0] when 'column' ['itembackground'] when 'element' ['relief'] when 'style' ['union'] else if id[0].kind_of?(Array) && id[0][1] == 'element' ['relief'] else [] end end else [] end end
__item_numstrval_optkeys(id)
click to toggle source
Calls superclass method
# File lib/tkextlib/treectrl/tktreectrl.rb, line 314 def __item_numstrval_optkeys(id) if id == 'debug' ['displaydelay'] else super(id) end end
__item_pathname(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 274 def __item_pathname(id) if id.kind_of?(Array) key = id[0] if key.kind_of?(Array) key = key.join(' ') end tag = id[1] if tag.kind_of?(Array) tag = tag.join(' ') end id = [key, tag].join(':') end [self.path, id].join(';') end
__item_strval_optkeys(id)
click to toggle source
Calls superclass method
# File lib/tkextlib/treectrl/tktreectrl.rb, line 360 def __item_strval_optkeys(id) if id == 'debug' ['erasecolor'] elsif id.kind_of?(Array) case id[0] when 'column' if id[1] == 'drag' ['indicatorcolor'] else super(id) << 'textcolor' end when 'element' super(id) << 'fill' << 'outline' << 'format' else super(id) end else super(id) end end
__item_val2ruby_optkeys(id)
click to toggle source
# File lib/tkextlib/treectrl/tktreectrl.rb, line 404 def __item_val2ruby_optkeys(id) if id.kind_of?(Array) case id[0] when 'item' { 'button' => proc{|id,val| (val == 'auto')? val: TkComm.bool(val)} } else [] end else [] end end