# File tk/lib/tkextlib/vu/pie.rb, line 131
def self.id2obj(pie, id)
pie_path = pie.path
SliceID_TBL.mutex.synchronize{
if SliceID_TBL[pie_path]
SliceID_TBL[pie_path][id]? SliceID_TBL[pie_path][id]: id
else
id
end
}
end
# File tk/lib/tkextlib/vu/pie.rb, line 142
def initialize(parent, *args)
unless parent.kind_of?(Tk::Vu::Pie)
fail ArgumentError, "expect a Tk::Vu::Pie instance for 1st argument"
end
@parent = @pie = parent
@ppath = parent.path
Pie_Slice_ID.mutex.synchronize{
@path = @id = Pie_Slice_ID.join(TkCore::INTERP._ip_id_)
Pie_Slice_ID[1].succ!
}
SliceID_TBL.mutex.synchronize{
SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
SliceID_TBL[@ppath][@id] = self
}
if args[-1].kind_of?(Hash)
keys = args.unshift
end
@pie.set(@id, *args)
configure(keys)
end
# File tk/lib/tkextlib/vu/pie.rb, line 172
def []=(key,val)
configure key, val
val
end
# File tk/lib/tkextlib/vu/pie.rb, line 181
def cget(slot)
@pie.itemcget(@id, slot)
end
# File tk/lib/tkextlib/vu/pie.rb, line 185
def cget_strict(slot)
@pie.itemcget_strict(@id, slot)
end
# File tk/lib/tkextlib/vu/pie.rb, line 177
def cget_tkstring(slot)
@pie.itemcget_tkstring(@id, slot)
end
# File tk/lib/tkextlib/vu/pie.rb, line 194
def configinfo(*args)
@pie.itemconfiginfo(@id, *args)
end
# File tk/lib/tkextlib/vu/pie.rb, line 189
def configure(*args)
@pie.itemconfigure(@id, *args)
self
end
# File tk/lib/tkextlib/vu/pie.rb, line 198
def current_configinfo(*args)
@pie.current_itemconfiginfo(@id, *args)
end
# File tk/lib/tkextlib/vu/pie.rb, line 202
def delete
@pie.delete(@id)
end
# File tk/lib/tkextlib/vu/pie.rb, line 206
def explode(value)
@pie.explode(@id, value)
self
end
# File tk/lib/tkextlib/vu/pie.rb, line 211
def explode_value
@pie.explode_value(@id)
end
# File tk/lib/tkextlib/vu/pie.rb, line 215
def lower(other=None)
@pie.lower(@id, other)
self
end
# File tk/lib/tkextlib/vu/pie.rb, line 220
def raise(other=None)
@pie.raise(@id, other)
self
end
# File tk/lib/tkextlib/vu/pie.rb, line 225
def set(value)
@pie.set(@id, value)
self
end