1# 2# tkextlib/blt/ted.rb 3# 4# *** This is alpha version, because there is no document on BLT. *** 5# 6# by Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp) 7# 8 9require 'tk' 10require 'tkextlib/blt.rb' 11 12module Tk::BLT 13 module Ted 14 extend TkCore 15 16 TkCommandNames = ['::blt::ted'.freeze].freeze 17 18 ############################## 19 20 extend TkItemConfigMethod 21 22 class << self 23 def __item_cget_cmd(id) 24 ['::blt::ted', 'cget', id] 25 end 26 private :__item_cget_cmd 27 28 def __item_config_cmd(id) 29 ['::blt::ted', 'configure', id] 30 end 31 private :__item_config_cmd 32 33 private :itemcget_tkstring, :itemcget, :itemcget_strict 34 private :itemconfigure, :itemconfiginfo, :current_itemconfiginfo 35 36 def cget_tkstring(master, option) 37 itemcget_tkstring(master, option) 38 end 39 def cget(master, option) 40 itemcget(master, option) 41 end 42 def cget_strict(master, option) 43 itemcget_strict(master, option) 44 end 45 def configure(master, slot, value=None) 46 itemconfigure(master, slot, value) 47 end 48 def configinfo(master, slot=nil) 49 itemconfiginfo(master, slot) 50 end 51 def current_configinfo(master, slot=nil) 52 current_itemconfiginfo(master, slot) 53 end 54 end 55 56 ############################## 57 58 def self.edit(master, *args) 59 tk_call('::blt::ted', 'edit', master, *args) 60 end 61 def self.rep(master, *args) 62 tk_call('::blt::ted', 'rep', master, *args) 63 end 64 def self.select(master, *args) 65 tk_call('::blt::ted', 'select', master, *args) 66 end 67 end 68end 69