Extended maintenance of Ruby 1.9.3 ended on February 23, 2015. Read more

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 130
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 141
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 167
def [](key)
  cget key
end
            
[]=(key,val) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 171
def []=(key,val)
  configure key, val
  val
end
            
cget(slot) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 180
def cget(slot)
  @pie.itemcget(@id, slot)
end
            
cget_strict(slot) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 184
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 176
def cget_tkstring(slot)
  @pie.itemcget_tkstring(@id, slot)
end
            
configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 193
def configinfo(*args)
  @pie.itemconfiginfo(@id, *args)
end
            
configure(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 188
def configure(*args)
  @pie.itemconfigure(@id, *args)
  self
end
            
current_configinfo(*args) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 197
def current_configinfo(*args)
  @pie.current_itemconfiginfo(@id, *args)
end
            
delete() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 201
def delete
  @pie.delete(@id)
end
            
explode(value) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 205
def explode(value)
  @pie.explode(@id, value)
  self
end
            
explode_value() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 210
def explode_value
  @pie.explode_value(@id)
end
            
id() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 163
def id
  @id
end
            
lower(other=None) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 214
def lower(other=None)
  @pie.lower(@id, other)
  self
end
            
mutex() click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 122
def mutex; @mutex; end
            
raise(other=None) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 219
def raise(other=None)
  @pie.raise(@id, other)
  self
end
            
set(value) click to toggle source
 
               # File tk/lib/tkextlib/vu/pie.rb, line 224
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 230
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.