In Files

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

Class/Module Index [+]

Quicksearch

Tk::Vu::PieSlice

Public Class Methods

id2obj(pie, id) click to toggle source
 
               # 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) click to toggle source
 
               # 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) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 168
def [](key)
  cget key
end
            
[]=(key,val) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 172
def []=(key,val)
  configure key, val
  val
end
            
cget(slot) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 181
def cget(slot)
  @pie.itemcget(@id, slot)
end
            
cget_strict(slot) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 185
def cget_strict(slot)
  @pie.itemcget_strict(@id, slot)
end
            
cget_tkstring(slot) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 177
def cget_tkstring(slot)
  @pie.itemcget_tkstring(@id, slot)
end
            
configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 194
def configinfo(*args)
  @pie.itemconfiginfo(@id, *args)
end
            
configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 189
def configure(*args)
  @pie.itemconfigure(@id, *args)
  self
end
            
current_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 198
def current_configinfo(*args)
  @pie.current_itemconfiginfo(@id, *args)
end
            
delete() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 202
def delete
  @pie.delete(@id)
end
            
explode(value) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 206
def explode(value)
  @pie.explode(@id, value)
  self
end
            
explode_value() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 211
def explode_value
  @pie.explode_value(@id)
end
            
id() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 164
def id
  @id
end
            
lower(other=None) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 215
def lower(other=None)
  @pie.lower(@id, other)
  self
end
            
mutex() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 123
def mutex; @mutex; end
            
raise(other=None) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 220
def raise(other=None)
  @pie.raise(@id, other)
  self
end
            
set(value) click to toggle source
 
               # 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) click to toggle source
Alias for: set
value() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 231
def value
  @pie.set(@id)
end
            

Commenting is here to help enhance the documentation. For example, code samples, or clarification of the documentation.

If you have questions about Ruby or the documentation, please post to one of the Ruby mailing lists. You will get better, faster, help that way.

If you wish to post a correction of the docs, please do so, but also file bug report so that it can be corrected for the next release. Thank you.

If you want to help improve the Ruby documentation, please visit Documenting-ruby.org.