Module: Tk::Tile::TreeviewConfig
Constant Summary
Constants included from TkUtil
TkUtil::None, TkUtil::RELEASE_DATE
Instance Method Summary collapse
- #__itemconfiginfo_core(tagOrId, slot = nil) ⇒ Object
- #__tile_specific_item_optkeys(id) ⇒ Object
- #columncget(tagOrId, option) ⇒ Object (also: #column_cget)
- #columncget_strict(tagOrId, option) ⇒ Object (also: #column_cget_strict)
-
#columncget_tkstring(tagOrId, option) ⇒ Object
(also: #column_cget_tkstring)
Treeview Column.
- #columnconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #column_configinfo)
- #columnconfigure(tagOrId, slot, value = None) ⇒ Object (also: #column_configure)
- #current_columnconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #current_column_configinfo)
- #current_headingconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #current_heading_configinfo)
- #current_itemconfiginfo(tagOrId, slot = nil) ⇒ Object
- #current_tagconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #current_tag_configinfo)
- #headingcget(tagOrId, option) ⇒ Object (also: #heading_cget)
- #headingcget_strict(tagOrId, option) ⇒ Object (also: #heading_cget_strict)
-
#headingcget_tkstring(tagOrId, option) ⇒ Object
(also: #heading_cget_tkstring)
Treeview Heading.
- #headingconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #heading_configinfo)
- #headingconfigure(tagOrId, slot, value = None) ⇒ Object (also: #heading_configure)
- #itemcget(tagOrId, option) ⇒ Object
- #itemcget_strict(tagOrId, option) ⇒ Object
-
#itemcget_tkstring(tagOrId, option) ⇒ Object
Treeview Item.
- #itemconfiginfo(tagOrId, slot = nil) ⇒ Object
- #itemconfigure(tagOrId, slot, value = None) ⇒ Object
- #tagcget(tagOrId, option) ⇒ Object (also: #tag_cget)
- #tagcget_strict(tagOrId, option) ⇒ Object (also: #tag_cget_strict)
-
#tagcget_tkstring(tagOrId, option) ⇒ Object
(also: #tag_cget_tkstring)
Treeview Tag.
- #tagconfiginfo(tagOrId, slot = nil) ⇒ Object (also: #tag_configinfo)
- #tagconfigure(tagOrId, slot, value = None) ⇒ Object (also: #tag_configure)
Methods included from TkItemConfigMethod
__IGNORE_UNKNOWN_CONFIGURE_OPTION__, #__check_available_itemconfigure_options, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!, #tagid
Methods included from TkItemConfigOptkeys
#__conv_item_keyonly_opts, #itemconfig_hash_kv
Methods included from TkUtil
#_conv_args, _conv_args, #_fromUTF8, #_get_eval_enc_str, _get_eval_enc_str, #_get_eval_string, _get_eval_string, _symbolkey2str, #_symbolkey2str, #_toUTF8, #bool, bool, callback, eval_cmd, #hash_kv, hash_kv, install_cmd, #num_or_nil, num_or_nil, num_or_str, #num_or_str, number, #number, string, #string, uninstall_cmd, untrust
Methods included from TkTreatItemFont
#kanjifont_copy, #kanjitagfont_configure, #latintagfont_configure, #latintagfont_copy, #tagfont_configinfo, #tagfont_configure, #tagfont_copy
Instance Method Details
#__itemconfiginfo_core(tagOrId, slot = nil) ⇒ Object
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 |
# File 'lib/tkextlib/tile/treeview.rb', line 26 def __itemconfiginfo_core(tagOrId, slot = nil) if TkComm::GET_CONFIGINFO_AS_ARRAY if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) fontkey = $2 return [slot.to_s, tagfontobj(tagid(tagOrId), fontkey)] else if slot slot = slot.to_s alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} if real_name slot = real_name.to_s end case slot when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/ begin # On tile-0.7.{2-8}, 'state' options has no '-' at its head. val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot)) rescue # Maybe, 'state' option has '-' in future. val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) end return [slot, val] when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) begin val = method.call(tagOrId, optval) rescue => e warn("Warning:: #{e.} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG val = optval end return [slot, val] when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] return [slot, self.__send__(method, tagOrId)] when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ begin val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) rescue val = nil end return [slot, val] when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) return [slot, val] when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ begin val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) rescue val = nil end return [slot, val] when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) return [slot, val] when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val =~ /^[0-9]/ return [slot, list(val)] else return [slot, val] end when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) return [slot, val] when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val.empty? return [slot, nil] else return [slot, TkVarAccess.new(val)] end else val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val.index('{') return [slot, tk_split_list(val)] else return [slot, tk_tcl2ruby(val)] end end else # ! slot ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf| conf[0] = conf[0][1..-1] if conf[0][0] == ?- case conf[0] when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[conf[0]] optval = conf[1] begin val = method.call(tagOrId, optval) rescue => e warn("Warning:: #{e.} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG val = optval end conf[1] = val when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ # do nothing when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ begin conf[1] = number(conf[1]) rescue conf[1] = nil end when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ conf[1] = num_or_str(conf[1]) when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ begin conf[1] = bool(conf[1]) rescue conf[1] = nil end when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ conf[1] = simplelist(conf[1]) when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ if conf[1] =~ /^[0-9]/ conf[1] = list(conf[1]) end when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ if conf[1].empty? conf[1] = nil else conf[1] = TkVarAccess.new(conf[1]) end else if conf[1].index('{') conf[1] = tk_split_list(conf[1]) else conf[1] = tk_tcl2ruby(conf[1]) end end conf } __item_font_optkeys(tagid(tagOrId)).each{|optkey| optkey = optkey.to_s fontconf = ret.assoc(optkey) if fontconf ret.delete_if{|inf| inf[0] =~ /^(|latin|ascii|kanji)#{optkey}$/} fontconf[1] = tagfontobj(tagid(tagOrId), optkey) ret.push(fontconf) end } __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| ret << [optkey.to_s, self.__send__(method, tagOrId)] } ret end end else # ! TkComm::GET_CONFIGINFO_AS_ARRAY if (slot && slot.to_s =~ /^(|latin|ascii|kanji)(#{__item_font_optkeys(tagid(tagOrId)).join('|')})$/) fontkey = $2 return {slot.to_s => tagfontobj(tagid(tagOrId), fontkey)} else if slot slot = slot.to_s alias_name, real_name = __item_optkey_aliases(tagid(tagOrId)).find{|k, v| k.to_s == slot} if real_name slot = real_name.to_s end case slot when /^(#{__tile_specific_item_optkeys(tagid(tagOrId)).join('|')})$/ begin # On tile-0.7.{2-8}, 'state' option has no '-' at its head. val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << slot)) rescue # Maybe, 'state' option has '-' in future. val = tk_call(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) end return {slot => val} when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[slot] optval = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) begin val = method.call(tagOrId, optval) rescue => e warn("Warning:: #{e.} (when #{method}lcall(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG val = optval end return {slot => val} when /^(#{__item_methodcall_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_methodcall_optkeys(tagid(tagOrId)))[slot] return {slot => self.__send__(method, tagOrId)} when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ begin val = number(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) rescue val = nil end return {slot => val} when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ val = num_or_str(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) return {slot => val} when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ begin val = bool(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) rescue val = nil end return {slot => val} when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ val = simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}"))) return {slot => val} when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val =~ /^[0-9]/ return {slot => list(val)} else return {slot => val} end when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) return {slot => val} when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val.empty? return {slot => nil} else return {slot => TkVarAccess.new(val)} end else val = tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)) << "-#{slot}")) if val.index('{') return {slot => tk_split_list(val)} else return {slot => tk_tcl2ruby(val)} end end else # ! slot ret = {} ret = Hash[*(tk_split_simplelist(tk_call_without_enc(*(__item_confinfo_cmd(tagid(tagOrId)))), false, false))].to_a.collect{|conf| conf[0] = conf[0][1..-1] if conf[0][0] == ?- optkey = conf[0] case optkey when /^(#{__item_val2ruby_optkeys(tagid(tagOrId)).keys.join('|')})$/ method = _symbolkey2str(__item_val2ruby_optkeys(tagid(tagOrId)))[optkey] optval = conf[1] begin val = method.call(tagOrId, optval) rescue => e warn("Warning:: #{e.} (when #{method}.call(#{tagOrId.inspect}, #{optval.inspect})") if $DEBUG val = optval end conf[1] = val when /^(#{__item_strval_optkeys(tagid(tagOrId)).join('|')})$/ # do nothing when /^(#{__item_numval_optkeys(tagid(tagOrId)).join('|')})$/ begin conf[1] = number(conf[1]) rescue conf[1] = nil end when /^(#{__item_numstrval_optkeys(tagid(tagOrId)).join('|')})$/ conf[1] = num_or_str(conf[1]) when /^(#{__item_boolval_optkeys(tagid(tagOrId)).join('|')})$/ begin conf[1] = bool(conf[1]) rescue conf[1] = nil end when /^(#{__item_listval_optkeys(tagid(tagOrId)).join('|')})$/ conf[1] = simplelist(conf[1]) when /^(#{__item_numlistval_optkeys(tagid(tagOrId)).join('|')})$/ if conf[1] =~ /^[0-9]/ conf[1] = list(conf[1]) end when /^(#{__item_tkvariable_optkeys(tagid(tagOrId)).join('|')})$/ if conf[1].empty? conf[1] = nil else conf[1] = TkVarAccess.new(conf[1]) end else if conf[1].index('{') return [slot, tk_split_list(conf[1])] else return [slot, tk_tcl2ruby(conf[1])] end end ret[conf[0]] = conf[1] } __item_font_optkeys(tagid(tagOrId)).each{|optkey| optkey = optkey.to_s fontconf = ret[optkey] if fontconf.kind_of?(Array) ret.delete(optkey) ret.delete('latin' << optkey) ret.delete('ascii' << optkey) ret.delete('kanji' << optkey) fontconf[1] = tagfontobj(tagid(tagOrId), optkey) ret[optkey] = fontconf end } __item_methodcall_optkeys(tagid(tagOrId)).each{|optkey, method| ret[optkey.to_s] = self.__send__(method, tagOrId) } ret end end end end |
#__tile_specific_item_optkeys(id) ⇒ Object
469 470 471 472 473 474 475 476 477 478 479 480 |
# File 'lib/tkextlib/tile/treeview.rb', line 469 def __tile_specific_item_optkeys(id) case id[0] when :item, 'item' [] when :column, 'column' [] when :heading, 'heading' ['state'] # On tile-0.7.{2-8}, 'state' options has no '-' at its head. else [] end end |
#columncget(tagOrId, option) ⇒ Object Also known as: column_cget
554 555 556 |
# File 'lib/tkextlib/tile/treeview.rb', line 554 def columncget(tagOrId, option) __itemcget([:column, tagOrId], option) end |
#columncget_strict(tagOrId, option) ⇒ Object Also known as: column_cget_strict
557 558 559 |
# File 'lib/tkextlib/tile/treeview.rb', line 557 def columncget_strict(tagOrId, option) __itemcget_strict([:column, tagOrId], option) end |
#columncget_tkstring(tagOrId, option) ⇒ Object Also known as: column_cget_tkstring
Treeview Column
551 552 553 |
# File 'lib/tkextlib/tile/treeview.rb', line 551 def columncget_tkstring(tagOrId, option) __itemcget_tkstring([:column, tagOrId], option) end |
#columnconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: column_configinfo
563 564 565 |
# File 'lib/tkextlib/tile/treeview.rb', line 563 def columnconfiginfo(tagOrId, slot=nil) __itemconfiginfo([:column, tagOrId], slot) end |
#columnconfigure(tagOrId, slot, value = None) ⇒ Object Also known as: column_configure
560 561 562 |
# File 'lib/tkextlib/tile/treeview.rb', line 560 def columnconfigure(tagOrId, slot, value=None) __itemconfigure([:column, tagOrId], slot, value) end |
#current_columnconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: current_column_configinfo
566 567 568 |
# File 'lib/tkextlib/tile/treeview.rb', line 566 def current_columnconfiginfo(tagOrId, slot=nil) __current_itemconfiginfo([:column, tagOrId], slot) end |
#current_headingconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: current_heading_configinfo
649 650 651 |
# File 'lib/tkextlib/tile/treeview.rb', line 649 def current_headingconfiginfo(tagOrId, slot=nil) __current_itemconfiginfo([:heading, tagOrId], slot) end |
#current_itemconfiginfo(tagOrId, slot = nil) ⇒ Object
487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 |
# File 'lib/tkextlib/tile/treeview.rb', line 487 def current_itemconfiginfo(tagOrId, slot = nil) if TkComm::GET_CONFIGINFO_AS_ARRAY if slot org_slot = slot begin conf = __itemconfiginfo_core(tagOrId, slot) if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) return {conf[0] => conf[-1]} end slot = conf[__item_configinfo_struct(tagid(tagOrId))[:alias]] end while(org_slot != slot) fail RuntimeError, "there is a configure alias loop about '#{org_slot}'" else ret = {} __itemconfiginfo_core(tagOrId).each{|conf| if ( ! __item_configinfo_struct(tagid(tagOrId))[:alias] \ || conf.size > __item_configinfo_struct(tagid(tagOrId))[:alias] + 1 ) ret[conf[0]] = conf[-1] end } ret end else # ! TkComm::GET_CONFIGINFO_AS_ARRAY ret = {} __itemconfiginfo_core(tagOrId, slot).each{|key, conf| ret[key] = conf[-1] if conf.kind_of?(Array) } ret end end |
#current_tagconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: current_tag_configinfo
675 676 677 |
# File 'lib/tkextlib/tile/treeview.rb', line 675 def current_tagconfiginfo(tagOrId, slot=nil) __current_itemconfiginfo([:tag, :configure, tagOrId], slot) end |
#headingcget(tagOrId, option) ⇒ Object Also known as: heading_cget
603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 |
# File 'lib/tkextlib/tile/treeview.rb', line 603 def headingcget(tagOrId, option) unless TkItemConfigMethod.__IGNORE_UNKNOWN_CONFIGURE_OPTION__ headingcget_strict(tagOrId, option) else begin headingcget_strict(tagOrId, option) rescue => e begin if current_headingconfiginfo(tagOrId).has_key?(option.to_s) # not tag error & option is known -> error on known option fail e else # not tag error & option is unknown nil end rescue fail e # tag error end end end end |
#headingcget_strict(tagOrId, option) ⇒ Object Also known as: heading_cget_strict
590 591 592 593 594 595 596 597 598 599 600 601 602 |
# File 'lib/tkextlib/tile/treeview.rb', line 590 def headingcget_strict(tagOrId, option) if __tile_specific_item_optkeys([:heading, tagOrId]).index(option.to_s) begin # On tile-0.7.{2-8}, 'state' options has no '-' at its head. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << option.to_s)) rescue # Maybe, 'state' option has '-' in future. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{option}")) end else __itemcget_strict([:heading, tagOrId], option) end end |
#headingcget_tkstring(tagOrId, option) ⇒ Object Also known as: heading_cget_tkstring
Treeview Heading
577 578 579 580 581 582 583 584 585 586 587 588 589 |
# File 'lib/tkextlib/tile/treeview.rb', line 577 def headingcget_tkstring(tagOrId, option) if __tile_specific_item_optkeys([:heading, tagOrId]).index(option.to_s) begin # On tile-0.7.{2-8}, 'state' options has no '-' at its head. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << option.to_s)) rescue # Maybe, 'state' option has '-' in future. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{option}")) end else __itemcget_tkstring([:heading, tagOrId], option) end end |
#headingconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: heading_configinfo
646 647 648 |
# File 'lib/tkextlib/tile/treeview.rb', line 646 def headingconfiginfo(tagOrId, slot=nil) __itemconfiginfo([:heading, tagOrId], slot) end |
#headingconfigure(tagOrId, slot, value = None) ⇒ Object Also known as: heading_configure
624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 |
# File 'lib/tkextlib/tile/treeview.rb', line 624 def headingconfigure(tagOrId, slot, value=None) if slot.kind_of?(Hash) slot = _symbolkey2str(slot) sp_kv = [] __tile_specific_item_optkeys([:heading, tagOrId]).each{|k| sp_kv << k << _get_eval_string(slot.delete(k)) if slot.has_key?(k) } tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(sp_kv))) tk_call(*(__item_config_cmd([:heading, tagOrId]).concat(hash_kv(slot)))) elsif __tile_specific_item_optkeys([:heading, tagOrId]).index(slot.to_s) begin # On tile-0.7.{2-8}, 'state' options has no '-' at its head. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << slot.to_s << value)) rescue # Maybe, 'state' option has '-' in future. tk_call(*(__item_cget_cmd([:heading, tagOrId]) << "-#{slot}" << value)) end else __itemconfigure([:heading, tagOrId], slot, value) end self end |
#itemcget(tagOrId, option) ⇒ Object
534 535 536 |
# File 'lib/tkextlib/tile/treeview.rb', line 534 def itemcget(tagOrId, option) __itemcget([:item, tagOrId], option) end |
#itemcget_strict(tagOrId, option) ⇒ Object
537 538 539 |
# File 'lib/tkextlib/tile/treeview.rb', line 537 def itemcget_strict(tagOrId, option) __itemcget_strict([:item, tagOrId], option) end |
#itemcget_tkstring(tagOrId, option) ⇒ Object
Treeview Item
531 532 533 |
# File 'lib/tkextlib/tile/treeview.rb', line 531 def itemcget_tkstring(tagOrId, option) __itemcget_tkstring([:item, tagOrId], option) end |
#itemconfiginfo(tagOrId, slot = nil) ⇒ Object
483 484 485 |
# File 'lib/tkextlib/tile/treeview.rb', line 483 def itemconfiginfo(tagOrId, slot = nil) __itemconfiginfo_core(tagOrId, slot) end |
#itemconfigure(tagOrId, slot, value = None) ⇒ Object
540 541 542 |
# File 'lib/tkextlib/tile/treeview.rb', line 540 def itemconfigure(tagOrId, slot, value=None) __itemconfigure([:item, tagOrId], slot, value) end |
#tagcget(tagOrId, option) ⇒ Object Also known as: tag_cget
663 664 665 |
# File 'lib/tkextlib/tile/treeview.rb', line 663 def tagcget(tagOrId, option) __itemcget([:tag, :configure, tagOrId], option) end |
#tagcget_strict(tagOrId, option) ⇒ Object Also known as: tag_cget_strict
666 667 668 |
# File 'lib/tkextlib/tile/treeview.rb', line 666 def tagcget_strict(tagOrId, option) __itemcget_strict([:tag, :configure, tagOrId], option) end |
#tagcget_tkstring(tagOrId, option) ⇒ Object Also known as: tag_cget_tkstring
Treeview Tag
660 661 662 |
# File 'lib/tkextlib/tile/treeview.rb', line 660 def tagcget_tkstring(tagOrId, option) __itemcget_tkstring([:tag, :configure, tagOrId], option) end |
#tagconfiginfo(tagOrId, slot = nil) ⇒ Object Also known as: tag_configinfo
672 673 674 |
# File 'lib/tkextlib/tile/treeview.rb', line 672 def tagconfiginfo(tagOrId, slot=nil) __itemconfiginfo([:tag, :configure, tagOrId], slot) end |
#tagconfigure(tagOrId, slot, value = None) ⇒ Object Also known as: tag_configure
669 670 671 |
# File 'lib/tkextlib/tile/treeview.rb', line 669 def tagconfigure(tagOrId, slot, value=None) __itemconfigure([:tag, :configure, tagOrId], slot, value) end |