Module: Tk::TreeCtrl::ConfigMethod

Includes:
TkItemConfigMethod
Included in:
Tk::TreeCtrl
Defined in:
lib/tkextlib/treectrl/tktreectrl.rb,
lib/tkextlib/treectrl/tktreectrl.rb

Constant Summary

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Instance Method Summary collapse

Methods included from TkItemConfigMethod

__IGNORE_UNKNOWN_CONFIGURE_OPTION__, #__check_available_itemconfigure_options, #__current_itemconfiginfo, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!, #current_itemconfiginfo, #itemcget, #itemcget_strict, #itemcget_tkstring, #itemconfiginfo, #itemconfigure

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

#column_cget(tagOrId, option) ⇒ Object


435
436
437
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 435

def column_cget(tagOrId, option)
  itemcget(['column', tagOrId], option)
end

#column_cget_strict(tagOrId, option) ⇒ Object


438
439
440
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 438

def column_cget_strict(tagOrId, option)
  itemcget_strict(['column', tagOrId], option)
end

#column_cget_tkstring(tagOrId, option) ⇒ Object


432
433
434
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 432

def column_cget_tkstring(tagOrId, option)
  itemcget_tkstring(['column', tagOrId], option)
end

#column_configinfo(tagOrId, slot = nil) ⇒ Object


444
445
446
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 444

def column_configinfo(tagOrId, slot=nil)
  itemconfiginfo(['column', tagOrId], slot)
end

#column_configure(tagOrId, slot, value = None) ⇒ Object


441
442
443
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 441

def column_configure(tagOrId, slot, value=None)
  itemconfigure(['column', tagOrId], slot, value)
end

#column_dragcget(option) ⇒ Object


454
455
456
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 454

def column_dragcget(option)
  itemcget(['column', 'drag'], option)
end

#column_dragcget_strict(option) ⇒ Object


457
458
459
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 457

def column_dragcget_strict(option)
  itemcget_strict(['column', 'drag'], option)
end

#column_dragcget_tkstring(option) ⇒ Object


451
452
453
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 451

def column_dragcget_tkstring(option)
  itemcget_tkstring(['column', 'drag'], option)
end

#column_dragconfiginfo(slot = nil) ⇒ Object


463
464
465
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 463

def column_dragconfiginfo(slot=nil)
  itemconfiginfo(['column', 'drag'], slot)
end

#column_dragconfigure(slot, value = None) ⇒ Object


460
461
462
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 460

def column_dragconfigure(slot, value=None)
  itemconfigure(['column', 'drag'], slot, value)
end

#current_column_configinfo(tagOrId, slot = nil) ⇒ Object


447
448
449
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 447

def current_column_configinfo(tagOrId, slot=nil)
  current_itemconfiginfo(['column', tagOrId], slot)
end

#current_column_dragconfiginfo(slot = nil) ⇒ Object


466
467
468
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 466

def current_column_dragconfiginfo(slot=nil)
  current_itemconfiginfo(['column', 'drag'], slot)
end

#current_debug_configinfo(slot = nil) ⇒ Object


485
486
487
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 485

def current_debug_configinfo(slot=nil)
  current_itemconfiginfo('debug', slot)
end

#current_dragimage_configinfo(slot = nil) ⇒ Object


504
505
506
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 504

def current_dragimage_configinfo(slot=nil)
  current_itemconfiginfo('dragimage', slot)
end

#current_element_configinfo(tagOrId, slot = nil) ⇒ Object


523
524
525
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 523

def current_element_configinfo(tagOrId, slot=nil)
  current_itemconfiginfo(['element', tagOrId], slot)
end

#current_item_configinfo(tagOrId, slot = nil) ⇒ Object


542
543
544
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 542

def current_item_configinfo(tagOrId, slot=nil)
  current_itemconfiginfo(['item', tagOrId], slot)
end

#current_item_element_configinfo(item, column, elem, slot = nil) ⇒ Object


561
562
563
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 561

def current_item_element_configinfo(item, column, elem, slot=nil)
  current_itemconfiginfo([['item', 'element'], [item, column, elem]], slot)
end

#current_marquee_configinfo(slot = nil) ⇒ Object


580
581
582
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 580

def current_marquee_configinfo(slot=nil)
  current_itemconfiginfo('marquee', slot)
end

#current_notify_configinfo(tagOrId, slot = nil) ⇒ Object


613
614
615
616
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 613

def current_notify_configinfo(tagOrId, slot=nil)
  pattern = "<#{pattern}>"
  current_itemconfiginfo(['notify', [win, pattern]], slot)
end

#current_style_configinfo(tagOrId, slot = nil) ⇒ Object


633
634
635
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 633

def current_style_configinfo(tagOrId, slot=nil)
  current_itemconfiginfo(['style', tagOrId], slot)
end

#debug_cget(option) ⇒ Object


473
474
475
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 473

def debug_cget(option)
  itemcget('debug', option)
end

#debug_cget_strict(option) ⇒ Object


476
477
478
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 476

def debug_cget_strict(option)
  itemcget_strict('debug', option)
end

#debug_cget_tkstring(option) ⇒ Object


470
471
472
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 470

def debug_cget_tkstring(option)
  itemcget_tkstring('debug', option)
end

#debug_configinfo(slot = nil) ⇒ Object


482
483
484
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 482

def debug_configinfo(slot=nil)
  itemconfiginfo('debug', slot)
end

#debug_configure(slot, value = None) ⇒ Object


479
480
481
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 479

def debug_configure(slot, value=None)
  itemconfigure('debug', slot, value)
end

#dragimage_cget(option) ⇒ Object


492
493
494
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 492

def dragimage_cget(option)
  itemcget('dragimage', option)
end

#dragimage_cget_strict(option) ⇒ Object


495
496
497
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 495

def dragimage_cget_strict(option)
  itemcget_strict('dragimage', option)
end

#dragimage_cget_tkstring(option) ⇒ Object


489
490
491
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 489

def dragimage_cget_tkstring(option)
  itemcget_tkstring('dragimage', option)
end

#dragimage_configinfo(slot = nil) ⇒ Object


501
502
503
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 501

def dragimage_configinfo(slot=nil)
  itemconfiginfo('dragimage', slot)
end

#dragimage_configure(slot, value = None) ⇒ Object


498
499
500
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 498

def dragimage_configure(slot, value=None)
  itemconfigure('dragimage', slot, value)
end

#element_cget(tagOrId, option) ⇒ Object


511
512
513
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 511

def element_cget(tagOrId, option)
  itemcget(['element', tagOrId], option)
end

#element_cget_strict(tagOrId, option) ⇒ Object


514
515
516
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 514

def element_cget_strict(tagOrId, option)
  itemcget_strict(['element', tagOrId], option)
end

#element_cget_tkstring(tagOrId, option) ⇒ Object


508
509
510
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 508

def element_cget_tkstring(tagOrId, option)
  itemcget_tkstring(['element', tagOrId], option)
end

#element_configinfo(tagOrId, slot = nil) ⇒ Object


520
521
522
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 520

def element_configinfo(tagOrId, slot=nil)
  itemconfiginfo(['element', tagOrId], slot)
end

#element_configure(tagOrId, slot, value = None) ⇒ Object


517
518
519
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 517

def element_configure(tagOrId, slot, value=None)
  itemconfigure(['element', tagOrId], slot, value)
end

#item_cget(tagOrId, option) ⇒ Object


530
531
532
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 530

def item_cget(tagOrId, option)
  itemcget(['item', tagOrId], option)
end

#item_cget_strict(tagOrId, option) ⇒ Object


533
534
535
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 533

def item_cget_strict(tagOrId, option)
  itemcget_strict(['item', tagOrId], option)
end

#item_cget_tkstring(tagOrId, option) ⇒ Object


527
528
529
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 527

def item_cget_tkstring(tagOrId, option)
  itemcget_tkstring(['item', tagOrId], option)
end

#item_configinfo(tagOrId, slot = nil) ⇒ Object


539
540
541
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 539

def item_configinfo(tagOrId, slot=nil)
  itemconfiginfo(['item', tagOrId], slot)
end

#item_configure(tagOrId, slot, value = None) ⇒ Object


536
537
538
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 536

def item_configure(tagOrId, slot, value=None)
  itemconfigure(['item', tagOrId], slot, value)
end

#item_element_cget(item, column, elem, option) ⇒ Object


549
550
551
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 549

def item_element_cget(item, column, elem, option)
  itemcget([['item', 'element'], [item, column, elem]], option)
end

#item_element_cget_strict(item, column, elem, option) ⇒ Object


552
553
554
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 552

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) ⇒ Object


546
547
548
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 546

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) ⇒ Object


558
559
560
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 558

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) ⇒ Object


555
556
557
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 555

def item_element_configure(item, column, elem, slot, value=None)
  itemconfigure([['item', 'element'], [item, column, elem]], slot, value)
end

#marquee_cget(option) ⇒ Object


568
569
570
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 568

def marquee_cget(option)
  itemcget('marquee', option)
end

#marquee_cget_strict(option) ⇒ Object


571
572
573
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 571

def marquee_cget_strict(option)
  itemcget_strict('marquee', option)
end

#marquee_cget_tkstring(option) ⇒ Object


565
566
567
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 565

def marquee_cget_tkstring(option)
  itemcget_tkstring('marquee', option)
end

#marquee_configinfo(slot = nil) ⇒ Object


577
578
579
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 577

def marquee_configinfo(slot=nil)
  itemconfiginfo('marquee', slot)
end

#marquee_configure(slot, value = None) ⇒ Object


574
575
576
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 574

def marquee_configure(slot, value=None)
  itemconfigure('marquee', slot, value)
end

#notify_cget(win, pattern, option) ⇒ Object


589
590
591
592
593
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 589

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) ⇒ Object


594
595
596
597
598
599
600
601
602
603
604
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 594

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) ⇒ Object


584
585
586
587
588
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 584

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) ⇒ Object


609
610
611
612
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 609

def notify_configinfo(win, pattern, slot=nil)
  pattern = "<#{pattern}>"
  itemconfiginfo(['notify', [win, pattern]], slot)
end

#notify_configure(win, pattern, slot, value = None) ⇒ Object


605
606
607
608
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 605

def notify_configure(win, pattern, slot, value=None)
  pattern = "<#{pattern}>"
  itemconfigure(['notify', [win, pattern]], slot, value)
end

#style_cget(tagOrId, option) ⇒ Object


621
622
623
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 621

def style_cget(tagOrId, option)
  itemcget(['style', tagOrId], option)
end

#style_cget_strict(tagOrId, option) ⇒ Object


624
625
626
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 624

def style_cget_strict(tagOrId, option)
  itemcget_strict(['style', tagOrId], option)
end

#style_cget_tkstring(tagOrId, option) ⇒ Object


618
619
620
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 618

def style_cget_tkstring(tagOrId, option)
  itemcget_tkstring(['style', tagOrId], option)
end

#style_configinfo(tagOrId, slot = nil) ⇒ Object


630
631
632
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 630

def style_configinfo(tagOrId, slot=nil)
  itemconfiginfo(['style', tagOrId], slot)
end

#style_configure(tagOrId, slot, value = None) ⇒ Object


627
628
629
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 627

def style_configure(tagOrId, slot, value=None)
  itemconfigure(['style', tagOrId], slot, value)
end

#tagid(mixed_id) ⇒ Object


223
224
225
226
227
228
229
230
231
232
233
234
235
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 223

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) ⇒ Object


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
# File 'lib/tkextlib/treectrl/tktreectrl.rb', line 179

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