Class: Tk::Vu::PieSlice (Ruby 2.3.4)

In Files

  • tk/lib/tkextlib/vu/pie.rb

Class/Module Index [+]

Quicksearch

Tk::Vu::PieSlice

Public Class Methods

id2obj(pie, id)
 
               # 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
            
new(parent, *args)
 
               # 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
            

Public Instance Methods

[](key)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 168
def [](key)
  cget key
end
            
[]=(key,val)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 172
def []=(key,val)
  configure key, val
  val
end
            
cget(slot)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 181
def cget(slot)
  @pie.itemcget(@id, slot)
end
            
cget_strict(slot)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 185
def cget_strict(slot)
  @pie.itemcget_strict(@id, slot)
end
            
cget_tkstring(slot)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 177
def cget_tkstring(slot)
  @pie.itemcget_tkstring(@id, slot)
end
            
configinfo(*args)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 194
def configinfo(*args)
  @pie.itemconfiginfo(@id, *args)
end
            
configure(*args)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 189
def configure(*args)
  @pie.itemconfigure(@id, *args)
  self
end
            
current_configinfo(*args)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 198
def current_configinfo(*args)
  @pie.current_itemconfiginfo(@id, *args)
end
            
delete()
 
               # File tk/lib/tkextlib/vu/pie.rb, line 202
def delete
  @pie.delete(@id)
end
            
explode(value)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 206
def explode(value)
  @pie.explode(@id, value)
  self
end
            
explode_value()
 
               # File tk/lib/tkextlib/vu/pie.rb, line 211
def explode_value
  @pie.explode_value(@id)
end
            
id()
 
               # File tk/lib/tkextlib/vu/pie.rb, line 164
def id
  @id
end
            
lower(other=None)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 215
def lower(other=None)
  @pie.lower(@id, other)
  self
end
            
mutex()
 
               # File tk/lib/tkextlib/vu/pie.rb, line 123
def mutex; @mutex; end
            
raise(other=None)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 220
def raise(other=None)
  @pie.raise(@id, other)
  self
end
            
set(value)
 
               # File tk/lib/tkextlib/vu/pie.rb, line 225
def set(value)
  @pie.set(@id, value)
  self
end
            
Also aliased as: set_value
set_value(value)
Alias for: set
value()
 
               # File tk/lib/tkextlib/vu/pie.rb, line 231
def value
  @pie.set(@id)
end