Methods
- C
- D
- I
- M
- N
- T
Constants
OBJ_ID | = | ['blt_chart_pen'.freeze, TkUtil.untrust('00000')]).instance_eval{ @mutex = Mutex.new |
PenID_TBL | = | TkCore::INTERP.create_table |
Class Public methods
id2obj(chart, id)
Link
new(chart, pen=nil, keys={})
Link
# File ext/tk/lib/tkextlib/blt/component.rb, line 1057 def initialize(chart, pen=nil, keys={}) if pen.kind_of?(Hash) keys = pen pen = nil end if pen @pen = @id = pen.to_s else OBJ_ID.mutex.synchronize{ @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze OBJ_ID[1].succ! } end @path = @id @parent = @chart = chart @cpath = @chart.path Pen::PenID_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
new(chart, pen=nil, keys={})
Link
# File ext/tk/lib/tkextlib/blt/component.rb, line 1013 def self.new(chart, pen=nil, keys={}) if pen.kind_of?(Hash) keys = pen pen = nil end if keys keys = _symbolkey2str(keys) not_create = keys.delete('without_creating') else not_create = false end obj = nil PenID_TBL.mutex.synchronize{ chart_path = chart.path PenID_TBL[chart_path] ||= {} if pen && PenID_TBL[chart_path][pen] obj = PenID_TBL[chart_path][pen] else (obj = self.allocate).instance_eval{ if pen @pen = @id = pen.to_s else OBJ_ID.mutex.synchronize{ @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze OBJ_ID[1].succ! } end @path = @id @parent = @chart = chart @cpath = @chart.path Pen::PenID_TBL[@cpath][@pen] = self unless not_create tk_call(@chart, 'pen', 'create', @pen, keys) return obj end } end } obj.configure(keys) if obj && ! keys.empty? obj end
Instance Public methods
cget(option)
Link
cget_strict(option)
Link
cget_tkstring(option)
Link
configinfo(key=nil)
Link
configure(key, value=None)
Link
current_configinfo(key=nil)
Link
delete()
Link
id()
Link
mutex()
Link
name()
Link