Methods
- A
- C
- D
- E
- I
- M
- N
- T
Constants
ElementTypeName | = | 'element' |
ElementTypeToClass | = | { ElementTypeName=>self } |
ElementID_TBL | = | TkCore::INTERP.create_table |
OBJ_ID | = | ['blt_chart_element'.freeze, TkUtil.untrust('00000')]).instance_eval{ @mutex = Mutex.new |
Class Public methods
id2obj(chart, id)
Link
new(chart, element=nil, keys={})
Link
# File ext/tk/lib/tkextlib/blt/component.rb, line 692 def self.new(chart, element=nil, keys={}) if element.kind_of?(Hash) keys = element element = nil end if keys keys = _symbolkey2str(keys) not_create = keys.delete('without_creating') else not_create = false end obj = nil ElementID_TBL.mutex.synchronize{ chart_path = chart.path ElementID_TBL[chart_path] ||= {} if element && ElementID_TBL[chart_path][element] obj = ElementID_TBL[chart_path][element] else (obj = self.allocate).instance_eval{ if element @element = @id = element.to_s else OBJ_ID.mutex.synchronize{ @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze OBJ_ID[1].succ! } end @path = @id @parent = @chart = chart @cpath = @chart.path @typename = self.class::ElementTypeName Element::ElementID_TBL[@cpath][@element] = self unless not_create tk_call(@chart, @typename, 'create', @element, keys) return obj end } end } obj.configure(keys) if obj && ! keys.empty? obj end
new(chart, element=nil, keys={})
Link
# File ext/tk/lib/tkextlib/blt/component.rb, line 737 def initialize(chart, element=nil, keys={}) # dummy:: not called by 'new' method if element.kind_of?(Hash) keys = element element = nil end if element @element = @id = element.to_s else OBJ_ID.mutex.synchronize{ @element = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze OBJ_ID[1].succ! } end @path = @id @parent = @chart = chart @cpath = @chart.path @typename = self.class::ElementTypeName # Element::ElementID_TBL[@cpath][@element] = self keys = _symbolkey2str(keys) unless keys.delete('without_creating') # @chart.element_create(@element, keys) tk_call(@chart, @typename, 'create', @element, keys) end end
type2class(type)
Link
Instance Public methods
activate(*args)
Link
cget(option)
Link
cget_strict(option)
Link
cget_tkstring(option)
Link
closest(x, y, var, keys={})
Link
configinfo(key=nil)
Link
configure(key, value=None)
Link
current_configinfo(key=nil)
Link
deactivate()
Link
delete()
Link
exist?()
Link
id()
Link
mutex()
Link
name()
Link
to_eval()
Link