Class: Tk::BLT::PlotComponent::Crosshairs (Ruby 2.3.4)

In Files

  • tk/lib/tkextlib/blt/component.rb

Class/Module Index [+]

Quicksearch

Tk::BLT::PlotComponent::Crosshairs

Constants

CrosshairsID_TBL

Public Class Methods

new(chart, keys={})
 
               # File tk/lib/tkextlib/blt/component.rb, line 589
def self.new(chart, keys={})
  obj = nil
  CrosshairsID_TBL.mutex.synchronize{
    unless (obj = CrosshairsID_TBL[chart.path])
      (obj = self.allocate).instance_eval{
        @parent = @chart = chart
        @cpath = @chart.path
        @path = @id = 'crosshairs'
        Crosshairs::CrosshairsID_TBL[@cpath] = self
      }
    end
  }
  chart.crosshair_configure(keys) if obj && ! keys.empty?
  obj
end
            
new(chart, keys={})
 
               # File tk/lib/tkextlib/blt/component.rb, line 605
def initialize(chart, keys={})
  # dummy:: not called by 'new' method

  @parent = @chart = chart
  @cpath = @chart.path
  # Crosshairs::CrosshairsID_TBL[@cpath] = self
  @chart.crosshair_configure(keys) unless keys.empty?
  @path = @id = 'crosshairs'
end
            

Public Instance Methods

cget(option)
 
               # File tk/lib/tkextlib/blt/component.rb, line 626
def cget(option)
  @chart.crosshair_cget(option)
end
            
cget_strict(option)
 
               # File tk/lib/tkextlib/blt/component.rb, line 629
def cget_strict(option)
  @chart.crosshair_cget_strict(option)
end
            
cget_tkstring(option)
 
               # File tk/lib/tkextlib/blt/component.rb, line 623
def cget_tkstring(option)
  @chart.crosshair_cget_tkstring(option)
end
            
configinfo(key=nil)
 
               # File tk/lib/tkextlib/blt/component.rb, line 636
def configinfo(key=nil)
  @chart.crosshair_configinfo(key)
end
            
configure(key, value=None)
 
               # File tk/lib/tkextlib/blt/component.rb, line 632
def configure(key, value=None)
  @chart.crosshair_configure(key, value)
  self
end
            
current_configinfo(key=nil)
 
               # File tk/lib/tkextlib/blt/component.rb, line 639
def current_configinfo(key=nil)
  @chart.current_crosshair_configinfo(key)
end
            
id()
 
               # File tk/lib/tkextlib/blt/component.rb, line 615
def id
  @id
end
            
off()
 
               # File tk/lib/tkextlib/blt/component.rb, line 643
def off
  @chart.crosshair_off
  self
end
            
on()
 
               # File tk/lib/tkextlib/blt/component.rb, line 647
def on
  @chart.crosshair_on
  self
end
            
to_eval()
 
               # File tk/lib/tkextlib/blt/component.rb, line 619
def to_eval
  @id
end
            
toggle()
 
               # File tk/lib/tkextlib/blt/component.rb, line 651
def toggle
  @chart.crosshair_toggle
  self
end