Class: Tk::Vu::NamedPieSlice

Class | Tk::Vu::NamedPieSlice
In: | tk/lib/tkextlib/vu/pie.rb
Parent: | PieSlice

### Methods

new new

### Public Class methods

new(parent, name, *args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 211
      def self.new(parent, name, *args)
        if SliceID_TBL[parent.path] && SliceID_TBL[parent.path][name]
          return SliceID_TBL[parent.path][name]
        else
          super(parent, name, *args)
        end
      end

new(parent, name, *args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 219
      def initialize(parent, name, *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
        @path = @id = name.to_s
        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

[Validate]