# File tk/lib/tkextlib/blt/component.rb, line 735 def self.id2obj(chart, id) cpath = chart.path return id unless OBJ_TBL[cpath] OBJ_TBL[cpath][id]? OBJ_TBL[cpath][id]: id end
# File tk/lib/tkextlib/blt/component.rb, line 741 def self.new(chart, pen=nil, keys={}) if pen.kind_of?(Hash) keys = pen pen = nil end OBJ_TBL[chart.path] = {} unless OBJ_TBL[chart.path] return OBJ_TBL[chart.path][pen] if pen && OBJ_TBL[chart.path][pen] super(chart, pen, keys) end
# File tk/lib/tkextlib/blt/component.rb, line 751 def initialize(chart, pen=nil, keys={}) if pen.kind_of?(Hash) keys = pen pen = nil end if pen @pen = @id = pen.to_s else @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze OBJ_ID[1].succ! end @path = @id @parent = @chart = chart @cpath = @chart.path Pen::OBJ_TBL[@cpath][@pen] = self keys = _symbolkey2str(keys) unless keys.delete('without_creating') # @chart.pen_create(@pen, keys) tk_call(@chart, 'pen', 'create', @pen, keys) end end
# File tk/lib/tkextlib/blt/component.rb, line 781 def cget(option) @chart.pen_cget(@id, option) end
# File tk/lib/tkextlib/blt/component.rb, line 788 def configinfo(key=nil) @chart.pen_configinfo(@id, key) end
# File tk/lib/tkextlib/blt/component.rb, line 784 def configure(key, value=None) @chart.pen_configure(@id, key, value) self end
# File tk/lib/tkextlib/blt/component.rb, line 791 def current_configinfo(key=nil) @chart.current_pen_configinfo(@id, key) end