Class | Tk::BLT::PlotComponent::Pen
In: | tk/lib/tkextlib/blt/component.rb
Parent: | TkObject

### Methods

cget configinfo configure current_configinfo delete id id2obj name new new to_eval

### Constants

OBJ_ID | = | ['blt_chart_pen'.freeze, '00000'.taint].freeze
OBJ_TBL | = | {}

### Public Class methods

id2obj(chart, id)

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 735
          def self.id2obj(chart, id)
            cpath = chart.path
            return id unless OBJ_TBL[cpath]
            OBJ_TBL[cpath][id]? OBJ_TBL[cpath][id]: id
          end

new(chart, pen=nil, keys={})

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 751
          def initialize(chart, pen=nil, keys={})
            if pen.kind_of?(Hash)
              keys = pen
              pen = nil
            end
            if pen
              @pen = @id = pen.to_s
            else
              @pen = @id = OBJ_ID.join(TkCore::INTERP._ip_id_).freeze
              OBJ_ID[1].succ!
            end
            @path = @id
            @parent = @chart = chart
            @cpath = @chart.path
            Pen::OBJ_TBL[@cpath][@pen] = self
            keys = _symbolkey2str(keys)
            unless keys.delete('without_creating')
              # @chart.pen_create(@pen, keys)
              tk_call(@chart, 'pen', 'create', @pen, keys)
            end
          end

new(chart, pen=nil, keys={})

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 741
          def self.new(chart, pen=nil, keys={})
            if pen.kind_of?(Hash)
              keys = pen
              pen = nil
            end
            OBJ_TBL[chart.path] = {} unless OBJ_TBL[chart.path]
            return OBJ_TBL[chart.path][pen] if pen && OBJ_TBL[chart.path][pen]
            super(chart, pen, keys)
          end

### Public Instance methods

cget(option)

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 781
          def cget(option)
            @chart.pen_cget(@id, option)
          end

configinfo(key=nil)

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 788
          def configinfo(key=nil)
            @chart.pen_configinfo(@id, key)
          end

configure(key, value=None)

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 784
          def configure(key, value=None)
            @chart.pen_configure(@id, key, value)
            self
          end

current_configinfo(key=nil)

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 791
          def current_configinfo(key=nil)
            @chart.current_pen_configinfo(@id, key)
          end

delete()

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 795
          def delete
            @chart.pen_delete(@id)
            self
          end

id()

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 773
          def id
            @id
          end

name()

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 800
          def name
            @pen
          end

to_eval()

[Source]

    # File tk/lib/tkextlib/blt/component.rb, line 777
          def to_eval
            @id
          end

[Validate]