Class: Tk::Vu::PieSlice

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

### Methods

[] []= cget configinfo configure current_configinfo delete explode explode_value id id2obj lower new raise set set_value value

### Constants

SliceID_TBL | = | TkCore::INTERP.create_table
Pie_Slice_ID | = | ['vu:pie'.freeze, '00000'.taint].freeze

### Public Class methods

id2obj(pie, id)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 122
      def self.id2obj(pie, id)
        pie_path = pie.path
        return id unless SliceID_TBL[pie_path]
        SliceID_TBL[pie_path][id]? SliceID_TBL[pie_path][id]: id
      end

new(parent, *args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 128
      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
        @path = @id = Pie_Slice_ID.join(TkCore::INTERP._ip_id_)
        SliceID_TBL[@ppath] = {} unless SliceID_TBL[@ppath]
        SliceID_TBL[@ppath][@id] = self
        Pie_Slice_ID[1].succ!

        if args[-1].kind_of?(Hash)
          keys = args.unshift
        end
        @pie.set(@id, *args)
        configure(keys)
      end

### Public Instance methods

[](key)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 150
      def [](key)
        cget key
      end

[]=(key,val)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 154
      def []=(key,val)
        configure key, val
        val
      end

cget(slot)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 159
      def cget(slot)
        @pie.itemcget(@id, slot)
      end

configinfo(*args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 168
      def configinfo(*args)
        @pie.itemconfiginfo(@id, *args)
      end

configure(*args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 163
      def configure(*args)
        @pie.itemconfigure(@id, *args)
        self
      end

current_configinfo(*args)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 172
      def current_configinfo(*args)
        @pie.current_itemconfiginfo(@id, *args)
      end

delete()

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 176
      def delete
        @pie.delete(@id)
      end

explode(value)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 180
      def explode(value)
        @pie.explode(@id, value)
        self
      end

explode_value()

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 185
      def explode_value
        @pie.explode_value(@id)
      end

id()

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 146
      def id
        @id
      end

lower(other=None)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 189
      def lower(other=None)
        @pie.lower(@id, other)
        self
      end

raise(other=None)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 194
      def raise(other=None)
        @pie.raise(@id, other)
        self
      end

set(value)

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 199
      def set(value)
        @pie.set(@id, value)
        self
      end

set_value(value)

Alias for set

value()

[Source]

    # File tk/lib/tkextlib/vu/pie.rb, line 205
      def value
        @pie.set(@id)
      end

[Validate]