# # tk/panedwindow.rb : treat panedwindow # require 'tk' class TkPanedWindow conf } else ret = {} #tk_split_simplelist(tk_send_without_enc('paneconfigure', # win)).each{|conflist| # conf = tk_split_simplelist(conflist) tk_split_simplelist(tk_send_without_enc('paneconfigure', win), false, false).each{|conflist| conf = tk_split_simplelist(conflist, false, true) key = conf.shift[1..-1] if key if key == 'hide' conf[2] = bool(conf[2]) unless conf[2].empty? elsif conf[2].index('{') conf[2] = tk_split_list(conf[2]) else conf[2] = tk_tcl2ruby(conf[2]) end end if conf[3] if key == 'hide' conf[3] = bool(conf[3]) unless conf[3].empty? elsif conf[3].index('{') conf[3] = tk_split_list(conf[3]) else conf[3] = tk_tcl2ruby(conf[3]) end end if conf.size == 1 ret[key] = conf[0][1..-1] # alias info else ret[key] = conf end } ret end end end alias pane_configinfo paneconfiginfo def current_paneconfiginfo(win, key=nil) if TkComm::GET_CONFIGINFO_AS_ARRAY if key conf = paneconfiginfo(win, key) {conf[0] => conf[4]} else ret = {} paneconfiginfo(win).each{|conf| ret[conf[0]] = conf[4] if conf.size > 2 } ret end else # ! TkComm::GET_CONFIGINFO_AS_ARRAY ret = {} paneconfiginfo(win, key).each{|k, conf| ret[k] = conf[-1] if conf.kind_of?(Array) } ret end end alias current_pane_configinfo current_paneconfiginfo def panes list(tk_send_without_enc('panes')) end end TkPanedwindow = TkPanedWindow