Module: Tk::BLT::PlotComponent

Includes:
OptKeys, TkItemConfigMethod
Included in:
Barchart, Graph, Stripchart
Defined in:
lib/tkextlib/blt/component.rb

Defined Under Namespace

Modules: OptKeys Classes: Axis, Bar, BitmapMarker, Crosshairs, Element, GridLine, ImageMarker, Legend, Line, LineMarker, Marker, Pen, PolygonMarker, Postscript, TextMarker, WindowMarker

Constant Summary

Constants included from TkUtil

TkUtil::None, TkUtil::RELEASE_DATE

Instance Method Summary collapse

Methods included from TkItemConfigMethod

__IGNORE_UNKNOWN_CONFIGURE_OPTION__, #__check_available_itemconfigure_options, __set_IGNORE_UNKNOWN_CONFIGURE_OPTION__!

Methods included from TkItemConfigOptkeys

#__conv_item_keyonly_opts, #itemconfig_hash_kv

Methods included from TkUtil

#_conv_args, _conv_args, #_fromUTF8, #_get_eval_enc_str, _get_eval_enc_str, #_get_eval_string, _get_eval_string, _symbolkey2str, #_symbolkey2str, #_toUTF8, #bool, bool, callback, eval_cmd, #hash_kv, hash_kv, install_cmd, #num_or_nil, num_or_nil, num_or_str, #num_or_str, number, #number, string, #string, uninstall_cmd, untrust

Methods included from TkTreatItemFont

#kanjifont_copy, #kanjitagfont_configure, #latintagfont_configure, #latintagfont_copy, #tagfont_configinfo, #tagfont_configure, #tagfont_copy

Instance Method Details

#__destroy_hook__Object



1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
# File 'lib/tkextlib/blt/component.rb', line 1398

def __destroy_hook__
  Axis::AxisID_TBL.delete(@path)
  Crosshairs::CrosshairsID_TBL.delete(@path)
  Element::ElementID_TBL.delete(@path)
  GridLine::GridLineID_TBL.delete(@path)
  Legend::LegendID_TBL.delete(@path)
  Pen::PenID_TBL.delete(@path)
  Postscript::PostscriptID_TBL.delete(@path)
  Marker::MarkerID_TBL.delete(@path)
  super()
end

#__itemcget_strictObject



337
# File 'lib/tkextlib/blt/component.rb', line 337

alias __itemcget_strict itemcget_strict

#axis_bind(tag, context, *args) ⇒ Object



1455
1456
1457
# File 'lib/tkextlib/blt/component.rb', line 1455

def axis_bind(tag, context, *args)
  _component_bind('axis', tag, context, *args)
end

#axis_bind_append(tag, context, *args) ⇒ Object



1458
1459
1460
# File 'lib/tkextlib/blt/component.rb', line 1458

def axis_bind_append(tag, context, *args)
  _component_bind_append('axis', tag, context, *args)
end

#axis_bind_remove(tag, context) ⇒ Object



1461
1462
1463
# File 'lib/tkextlib/blt/component.rb', line 1461

def axis_bind_remove(tag, context)
  _component_bind_remove('axis', tag, context)
end

#axis_bindinfo(tag, context = nil) ⇒ Object



1464
1465
1466
# File 'lib/tkextlib/blt/component.rb', line 1464

def axis_bindinfo(tag, context=nil)
  _component_bindinfo('axis', tag, context)
end

#axis_cget(id, option) ⇒ Object



88
89
90
# File 'lib/tkextlib/blt/component.rb', line 88

def axis_cget(id, option)
  ret = itemcget(['axis', tagid(id)], option)
end

#axis_cget_strict(id, option) ⇒ Object



91
92
93
# File 'lib/tkextlib/blt/component.rb', line 91

def axis_cget_strict(id, option)
  ret = itemcget_strict(['axis', tagid(id)], option)
end

#axis_cget_tkstring(id, option) ⇒ Object



85
86
87
# File 'lib/tkextlib/blt/component.rb', line 85

def axis_cget_tkstring(id, option)
  ret = itemcget_tkstring(['axis', tagid(id)], option)
end

#axis_configinfo(id, slot = nil) ⇒ Object



117
118
119
# File 'lib/tkextlib/blt/component.rb', line 117

def axis_configinfo(id, slot=nil)
  itemconfiginfo(['axis', tagid(id)], slot)
end

#axis_configure(*args) ⇒ Object



94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/tkextlib/blt/component.rb', line 94

def axis_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
    slot = _symbolkey2str(slot)
    if cmd = slot.delete('command')
      slot['command'] = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  else
    value = slot
    slot = args.pop
    if slot == :command || slot == 'command'
      cmd = value
      value = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('axis')
  itemconfigure(id_list, slot, value)
end

#axis_create(id = nil, keys = {}) ⇒ Object



1535
1536
1537
1538
# File 'lib/tkextlib/blt/component.rb', line 1535

def axis_create(id=nil, keys={})
  # tk_send('axis', 'create', tagid(id), keys)
  Tk::BLT::PlotComponent::Axis.new(self, tagid(id), keys)
end

#axis_delete(*ids) ⇒ Object



1539
1540
1541
1542
# File 'lib/tkextlib/blt/component.rb', line 1539

def axis_delete(*ids)
  tk_send('axis', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#axis_invtransform(id, val) ⇒ Object



1543
1544
1545
# File 'lib/tkextlib/blt/component.rb', line 1543

def axis_invtransform(id, val)
  list(tk_send('axis', 'invtransform', tagid(id), val))
end

#axis_limits(id) ⇒ Object



1546
1547
1548
# File 'lib/tkextlib/blt/component.rb', line 1546

def axis_limits(id)
  list(tk_send('axis', 'limits', tagid(id)))
end

#axis_names(*pats) ⇒ Object



1549
1550
1551
1552
1553
1554
# File 'lib/tkextlib/blt/component.rb', line 1549

def axis_names(*pats)
  simplelist(tk_send('axis', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|axis|
    Tk::BLT::PlotComponent::Axis.id2obj(self, axis)
  }
end

#axis_transform(id, val) ⇒ Object



1555
1556
1557
# File 'lib/tkextlib/blt/component.rb', line 1555

def axis_transform(id, val)
  list(tk_send('axis', 'transform', tagid(id), val))
end

#axis_use(id, target = nil) ⇒ Object



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
# File 'lib/tkextlib/blt/component.rb', line 1562

def axis_use(id, target=nil)
  if target
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('axis', 'use',
                                                tagid(id), tagid(target)))
  else
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('axis', 'use', tagid(id)))
  end
end

#axis_view(id) ⇒ Object



1558
1559
1560
1561
# File 'lib/tkextlib/blt/component.rb', line 1558

def axis_view(id)
  tk_send('axis', 'view', tagid(id))
  self
end

#bar_activate(*args) ⇒ Object



1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
# File 'lib/tkextlib/blt/component.rb', line 1651

def bar_activate(*args)
  if args.empty?
    list(tk_send('bar', 'activate')).collect{|elem|
      Tk::BLT::PlotComponent::Element.id2obj(self, elem)
    }
  else
    # id, *indices
    id = args.shift
    tk_send('bar', 'activate', tagid(id), *args)
  end
end

#bar_bind(tag, context, *args) ⇒ Object



1481
1482
1483
# File 'lib/tkextlib/blt/component.rb', line 1481

def bar_bind(tag, context, *args)
  _component_bind('bar', tag, context, *args)
end

#bar_bind_append(tag, context, *args) ⇒ Object



1484
1485
1486
# File 'lib/tkextlib/blt/component.rb', line 1484

def bar_bind_append(tag, context, *args)
  _component_bind_append('bar', tag, context, *args)
end

#bar_bind_remove(tag, context) ⇒ Object



1487
1488
1489
# File 'lib/tkextlib/blt/component.rb', line 1487

def bar_bind_remove(tag, context)
  _component_bind_remove('bar', tag, context)
end

#bar_bindinfo(tag, context = nil) ⇒ Object



1490
1491
1492
# File 'lib/tkextlib/blt/component.rb', line 1490

def bar_bindinfo(tag, context=nil)
  _component_bindinfo('bar', tag, context)
end

#bar_cget(id, option) ⇒ Object



173
174
175
# File 'lib/tkextlib/blt/component.rb', line 173

def bar_cget(id, option)
  itemcget(['bar', tagid(id)], option)
end

#bar_cget_strict(id, option) ⇒ Object



176
177
178
# File 'lib/tkextlib/blt/component.rb', line 176

def bar_cget_strict(id, option)
  itemcget_strict(['bar', tagid(id)], option)
end

#bar_cget_tkstring(id, option) ⇒ Object



170
171
172
# File 'lib/tkextlib/blt/component.rb', line 170

def bar_cget_tkstring(id, option)
  itemcget_tkstring(['bar', tagid(id)], option)
end

#bar_closest(x, y, var, *args) ⇒ Object



1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
# File 'lib/tkextlib/blt/component.rb', line 1662

def bar_closest(x, y, var, *args)
  if args[-1].kind_of?(Hash)
    keys = args.pop
    bool(tk_send('bar', 'closest', x, y, var,
                 *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
  else
    bool(tk_send('bar', 'closest', x, y, var,
                 *(args.collect{|id| tagid(id)})))
  end
end

#bar_configinfo(id, slot = nil) ⇒ Object



190
191
192
# File 'lib/tkextlib/blt/component.rb', line 190

def bar_configinfo(id, slot=nil)
  itemconfiginfo(['bar', tagid(id)], slot)
end

#bar_configure(*args) ⇒ Object



179
180
181
182
183
184
185
186
187
188
189
# File 'lib/tkextlib/blt/component.rb', line 179

def bar_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
  else
    value = slot
    slot = args.pop
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('bar')
  itemconfigure(id_list, slot, value)
end

#bar_create(id = nil, keys = {}) ⇒ Object



1646
1647
1648
1649
# File 'lib/tkextlib/blt/component.rb', line 1646

def bar_create(id=nil, keys={})
  # tk_send('bar', 'create', tagid(id), keys)
  Tk::BLT::PlotComponent::Bar.new(self, tagid(id), keys)
end

#bar_deactivate(*ids) ⇒ Object



1672
1673
1674
1675
# File 'lib/tkextlib/blt/component.rb', line 1672

def bar_deactivate(*ids)
  tk_send('bar', 'deactivate', *(ids.collect{|id| tagid(id)}))
  self
end

#bar_delete(*ids) ⇒ Object



1676
1677
1678
1679
# File 'lib/tkextlib/blt/component.rb', line 1676

def bar_delete(*ids)
  tk_send('bar', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#bar_exist?(id) ⇒ Boolean

Returns:

  • (Boolean)


1680
1681
1682
# File 'lib/tkextlib/blt/component.rb', line 1680

def bar_exist?(id)
  bool(tk_send('bar', 'exists', tagid(id)))
end

#bar_names(*pats) ⇒ Object



1683
1684
1685
1686
1687
1688
# File 'lib/tkextlib/blt/component.rb', line 1683

def bar_names(*pats)
  simplelist(tk_send('bar', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
    Tk::BLT::PlotComponent::Element.id2obj(self, elem)
  }
end

#bar_show(*names) ⇒ Object



1689
1690
1691
1692
1693
1694
1695
1696
# File 'lib/tkextlib/blt/component.rb', line 1689

def bar_show(*names)
  if names.empty?
    simplelist(tk_send('bar', 'show'))
  else
    tk_send('bar', 'show', *(names.collect{|n| tagid(n)}))
    self
  end
end

#bar_type(id) ⇒ Object



1697
1698
1699
# File 'lib/tkextlib/blt/component.rb', line 1697

def bar_type(id)
  tk_send('bar', 'type', tagid(id))
end

#crosshairs_cget(option) ⇒ Object



127
128
129
# File 'lib/tkextlib/blt/component.rb', line 127

def crosshairs_cget(option)
  itemcget('crosshairs', option)
end

#crosshairs_cget_strict(option) ⇒ Object



130
131
132
# File 'lib/tkextlib/blt/component.rb', line 130

def crosshairs_cget_strict(option)
  itemcget_strict('crosshairs', option)
end

#crosshairs_cget_tkstring(option) ⇒ Object



124
125
126
# File 'lib/tkextlib/blt/component.rb', line 124

def crosshairs_cget_tkstring(option)
  itemcget_tkstring('crosshairs', option)
end

#crosshairs_configinfo(slot = nil) ⇒ Object



136
137
138
# File 'lib/tkextlib/blt/component.rb', line 136

def crosshairs_configinfo(slot=nil)
  itemconfiginfo('crosshairs', slot)
end

#crosshairs_configure(slot, value = None) ⇒ Object



133
134
135
# File 'lib/tkextlib/blt/component.rb', line 133

def crosshairs_configure(slot, value=None)
  itemconfigure('crosshairs', slot, value)
end

#crosshairs_offObject



1575
1576
1577
1578
# File 'lib/tkextlib/blt/component.rb', line 1575

def crosshairs_off
  tk_send_without_enc('crosshairs', 'off')
  self
end

#crosshairs_onObject



1579
1580
1581
1582
# File 'lib/tkextlib/blt/component.rb', line 1579

def crosshairs_on
  tk_send_without_enc('crosshairs', 'on')
  self
end

#crosshairs_toggleObject



1583
1584
1585
1586
# File 'lib/tkextlib/blt/component.rb', line 1583

def crosshairs_toggle
  tk_send_without_enc('crosshairs', 'toggle')
  self
end

#current_axis_configinfo(id, slot = nil) ⇒ Object



120
121
122
# File 'lib/tkextlib/blt/component.rb', line 120

def current_axis_configinfo(id, slot=nil)
  current_itemconfiginfo(['axis', tagid(id)], slot)
end

#current_bar_configinfo(id, slot = nil) ⇒ Object



193
194
195
# File 'lib/tkextlib/blt/component.rb', line 193

def current_bar_configinfo(id, slot=nil)
  current_itemconfiginfo(['bar', tagid(id)], slot)
end

#current_crosshairs_configinfo(slot = nil) ⇒ Object



139
140
141
# File 'lib/tkextlib/blt/component.rb', line 139

def current_crosshairs_configinfo(slot=nil)
  current_itemconfiginfo('crosshairs', slot)
end

#current_element_configinfo(id, slot = nil) ⇒ Object



166
167
168
# File 'lib/tkextlib/blt/component.rb', line 166

def current_element_configinfo(id, slot=nil)
  current_itemconfiginfo(['element', tagid(id)], slot)
end

#current_gridline_configinfo(slot = nil) ⇒ Object



239
240
241
# File 'lib/tkextlib/blt/component.rb', line 239

def current_gridline_configinfo(slot=nil)
  current_itemconfiginfo('grid', slot)
end

#current_legend_configinfo(slot = nil) ⇒ Object



258
259
260
# File 'lib/tkextlib/blt/component.rb', line 258

def current_legend_configinfo(slot=nil)
  current_itemconfiginfo('legend', slot)
end

#current_line_configinfo(id, slot = nil) ⇒ Object



220
221
222
# File 'lib/tkextlib/blt/component.rb', line 220

def current_line_configinfo(id, slot=nil)
  current_itemconfiginfo(['line', tagid(id)], slot)
end

#current_marker_configinfo(id, slot = nil) ⇒ Object



331
332
333
# File 'lib/tkextlib/blt/component.rb', line 331

def current_marker_configinfo(id, slot=nil)
  current_itemconfiginfo(['marker', tagid(id)], slot)
end

#current_pen_configinfo(id, slot = nil) ⇒ Object



285
286
287
# File 'lib/tkextlib/blt/component.rb', line 285

def current_pen_configinfo(id, slot=nil)
  current_itemconfiginfo(['pen', tagid(id)], slot)
end

#current_postscript_configinfo(slot = nil) ⇒ Object



304
305
306
# File 'lib/tkextlib/blt/component.rb', line 304

def current_postscript_configinfo(slot=nil)
  current_itemconfiginfo('postscript', slot)
end

#current_x2axis_configinfo(slot = nil) ⇒ Object



2021
2022
2023
# File 'lib/tkextlib/blt/component.rb', line 2021

def current_x2axis_configinfo(slot=nil)
  current_itemconfiginfo('x2axis', slot)
end

#current_xaxis_configinfo(slot = nil) ⇒ Object



1946
1947
1948
# File 'lib/tkextlib/blt/component.rb', line 1946

def current_xaxis_configinfo(slot=nil)
  current_itemconfiginfo('xaxis', slot)
end

#current_y2axis_configinfo(slot = nil) ⇒ Object



2171
2172
2173
# File 'lib/tkextlib/blt/component.rb', line 2171

def current_y2axis_configinfo(slot=nil)
  current_itemconfiginfo('y2axis', slot)
end

#current_yaxis_configinfo(slot = nil) ⇒ Object



2096
2097
2098
# File 'lib/tkextlib/blt/component.rb', line 2096

def current_yaxis_configinfo(slot=nil)
  current_itemconfiginfo('yaxis', slot)
end

#element_activate(*args) ⇒ Object



1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
# File 'lib/tkextlib/blt/component.rb', line 1594

def element_activate(*args)
  if args.empty?
    list(tk_send('element', 'activate')).collect{|elem|
      Tk::BLT::PlotComponent::Element.id2obj(self, elem)
    }
  else
    # id, *indices
    id = args.shift
    tk_send('element', 'activate', tagid(id), *args)
  end
end

#element_bind(tag, context, *args) ⇒ Object



1468
1469
1470
# File 'lib/tkextlib/blt/component.rb', line 1468

def element_bind(tag, context, *args)
  _component_bind('element', tag, context, *args)
end

#element_bind_append(tag, context, *args) ⇒ Object



1471
1472
1473
# File 'lib/tkextlib/blt/component.rb', line 1471

def element_bind_append(tag, context, *args)
  _component_bind_append('element', tag, context, *args)
end

#element_bind_remove(tag, context) ⇒ Object



1474
1475
1476
# File 'lib/tkextlib/blt/component.rb', line 1474

def element_bind_remove(tag, context)
  _component_bind_remove('element', tag, context)
end

#element_bindinfo(tag, context = nil) ⇒ Object



1477
1478
1479
# File 'lib/tkextlib/blt/component.rb', line 1477

def element_bindinfo(tag, context=nil)
  _component_bindinfo('element', tag, context)
end

#element_cget(id, option) ⇒ Object



146
147
148
# File 'lib/tkextlib/blt/component.rb', line 146

def element_cget(id, option)
  itemcget(['element', tagid(id)], option)
end

#element_cget_strict(id, option) ⇒ Object



149
150
151
# File 'lib/tkextlib/blt/component.rb', line 149

def element_cget_strict(id, option)
  itemcget_strict(['element', tagid(id)], option)
end

#element_cget_tkstring(id, option) ⇒ Object



143
144
145
# File 'lib/tkextlib/blt/component.rb', line 143

def element_cget_tkstring(id, option)
  itemcget_tkstring(['element', tagid(id)], option)
end

#element_closest(x, y, var, *args) ⇒ Object



1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
# File 'lib/tkextlib/blt/component.rb', line 1605

def element_closest(x, y, var, *args)
  if args[-1].kind_of?(Hash)
    keys = args.pop
    bool(tk_send('element', 'closest', x, y, var,
                 *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
  else
    bool(tk_send('element', 'closest', x, y, var,
                 *(args.collect{|id| tagid(id)})))
  end
end

#element_configinfo(id, slot = nil) ⇒ Object



163
164
165
# File 'lib/tkextlib/blt/component.rb', line 163

def element_configinfo(id, slot=nil)
  itemconfiginfo(['element', tagid(id)], slot)
end

#element_configure(*args) ⇒ Object



152
153
154
155
156
157
158
159
160
161
162
# File 'lib/tkextlib/blt/component.rb', line 152

def element_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
  else
    value = slot
    slot = args.pop
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('element')
  itemconfigure(id_list, slot, value)
end

#element_create(id = nil, keys = {}) ⇒ Object



1590
1591
1592
1593
# File 'lib/tkextlib/blt/component.rb', line 1590

def element_create(id=nil, keys={})
  # tk_send('element', 'create', tagid(id), keys)
  Tk::BLT::PlotComponent::Element.new(self, tagid(id), keys)
end

#element_deactivate(*ids) ⇒ Object



1615
1616
1617
1618
# File 'lib/tkextlib/blt/component.rb', line 1615

def element_deactivate(*ids)
  tk_send('element', 'deactivate', *(ids.collect{|id| tagid(id)}))
  self
end

#element_delete(*ids) ⇒ Object



1619
1620
1621
1622
# File 'lib/tkextlib/blt/component.rb', line 1619

def element_delete(*ids)
  tk_send('element', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#element_exist?(id) ⇒ Boolean

Returns:

  • (Boolean)


1623
1624
1625
# File 'lib/tkextlib/blt/component.rb', line 1623

def element_exist?(id)
  bool(tk_send('element', 'exists', tagid(id)))
end

#element_names(*pats) ⇒ Object



1626
1627
1628
1629
1630
1631
# File 'lib/tkextlib/blt/component.rb', line 1626

def element_names(*pats)
  simplelist(tk_send('element', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
    Tk::BLT::PlotComponent::Element.id2obj(self, elem)
  }
end

#element_show(*names) ⇒ Object



1632
1633
1634
1635
1636
1637
1638
1639
# File 'lib/tkextlib/blt/component.rb', line 1632

def element_show(*names)
  if names.empty?
    simplelist(tk_send('element', 'show'))
  else
    tk_send('element', 'show', *(names.collect{|n| tagid(n)}))
    self
  end
end

#element_type(id) ⇒ Object



1640
1641
1642
# File 'lib/tkextlib/blt/component.rb', line 1640

def element_type(id)
  tk_send('element', 'type', tagid(id))
end

#gridline_cget(option) ⇒ Object



227
228
229
# File 'lib/tkextlib/blt/component.rb', line 227

def gridline_cget(option)
  itemcget('grid', option)
end

#gridline_cget_strict(option) ⇒ Object



230
231
232
# File 'lib/tkextlib/blt/component.rb', line 230

def gridline_cget_strict(option)
  itemcget_strict('grid', option)
end

#gridline_cget_tkstring(option) ⇒ Object



224
225
226
# File 'lib/tkextlib/blt/component.rb', line 224

def gridline_cget_tkstring(option)
  itemcget_tkstring('grid', option)
end

#gridline_configinfo(slot = nil) ⇒ Object



236
237
238
# File 'lib/tkextlib/blt/component.rb', line 236

def gridline_configinfo(slot=nil)
  itemconfiginfo('grid', slot)
end

#gridline_configure(slot, value = None) ⇒ Object



233
234
235
# File 'lib/tkextlib/blt/component.rb', line 233

def gridline_configure(slot, value=None)
  itemconfigure('grid', slot, value)
end

#gridline_offObject



1760
1761
1762
1763
# File 'lib/tkextlib/blt/component.rb', line 1760

def gridline_off
  tk_send_without_enc('grid', 'off')
  self
end

#gridline_onObject



1764
1765
1766
1767
# File 'lib/tkextlib/blt/component.rb', line 1764

def gridline_on
  tk_send_without_enc('grid', 'on')
  self
end

#gridline_toggleObject



1768
1769
1770
1771
# File 'lib/tkextlib/blt/component.rb', line 1768

def gridline_toggle
  tk_send_without_enc('grid', 'toggle')
  self
end

#legend_activate(*pats) ⇒ Object



1803
1804
1805
1806
1807
1808
# File 'lib/tkextlib/blt/component.rb', line 1803

def legend_activate(*pats)
  list(tk_send('legend', 'activate',
               *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
    Tk::BLT::PlotComponent::Element.id2obj(self, elem)
  }
end

#legend_bind(tag, context, *args) ⇒ Object



1507
1508
1509
# File 'lib/tkextlib/blt/component.rb', line 1507

def legend_bind(tag, context, *args)
  _component_bind('legend', tag, context, *args)
end

#legend_bind_append(tag, context, *args) ⇒ Object



1510
1511
1512
# File 'lib/tkextlib/blt/component.rb', line 1510

def legend_bind_append(tag, context, *args)
  _component_bind_append('legend', tag, context, *args)
end

#legend_bind_remove(tag, context) ⇒ Object



1513
1514
1515
# File 'lib/tkextlib/blt/component.rb', line 1513

def legend_bind_remove(tag, context)
  _component_bind_remove('legend', tag, context)
end

#legend_bindinfo(tag, context = nil) ⇒ Object



1516
1517
1518
# File 'lib/tkextlib/blt/component.rb', line 1516

def legend_bindinfo(tag, context=nil)
  _component_bindinfo('legend', tag, context)
end

#legend_cget(option) ⇒ Object



246
247
248
# File 'lib/tkextlib/blt/component.rb', line 246

def legend_cget(option)
  itemcget('legend', option)
end

#legend_cget_strict(option) ⇒ Object



249
250
251
# File 'lib/tkextlib/blt/component.rb', line 249

def legend_cget_strict(option)
  itemcget_strict('legend', option)
end

#legend_cget_tkstring(option) ⇒ Object



243
244
245
# File 'lib/tkextlib/blt/component.rb', line 243

def legend_cget_tkstring(option)
  itemcget_tkstring('legend', option)
end

#legend_configinfo(slot = nil) ⇒ Object



255
256
257
# File 'lib/tkextlib/blt/component.rb', line 255

def legend_configinfo(slot=nil)
  itemconfiginfo('legend', slot)
end

#legend_configure(slot, value = None) ⇒ Object



252
253
254
# File 'lib/tkextlib/blt/component.rb', line 252

def legend_configure(slot, value=None)
  itemconfigure('legend', slot, value)
end

#legend_deactivate(*pats) ⇒ Object



1809
1810
1811
1812
1813
1814
# File 'lib/tkextlib/blt/component.rb', line 1809

def legend_deactivate(*pats)
  list(tk_send('legend', 'deactivate',
               *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
    Tk::BLT::PlotComponent::Element.id2obj(self, elem)
  }
end

#legend_get(pos, y = nil) ⇒ Object



1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
# File 'lib/tkextlib/blt/component.rb', line 1815

def legend_get(pos, y=nil)
  if y
    Tk::BLT::PlotComponent::Element.id2obj(self,
                                           tk_send('legend', 'get',
                                                   _at(pos, y)))
  else
    Tk::BLT::PlotComponent::Element.id2obj(self,
                                           tk_send('legend', 'get', pos))
  end
end

#legend_window_create(parent = nil, keys = nil) ⇒ Object



1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
# File 'lib/tkextlib/blt/component.rb', line 1775

def legend_window_create(parent=nil, keys=nil)
  if parent.kind_of?(Hash)
    keys = _symbolkey2str(parent)
    parent = keys.delete('parent')
    widgetname = keys.delete('widgetname')
    keys.delete('without_creating')
  elsif keys
    keys = _symbolkey2str(keys)
    widgetname = keys.delete('widgetname')
    keys.delete('without_creating')
  end

  legend = self.class.new(parent, :without_creating=>true,
                          :widgetname=>widgetname)
  class << legend
    def __destroy_hook__
      TkCore::INTERP.tk_windows.delete(@path)
    end
  end

  if keys
    self.legend_configure(keys.update('position'=>legend))
  else
    self.legend_configure('position'=>legend)
  end
  legend
end

#line_activate(*args) ⇒ Object



1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
# File 'lib/tkextlib/blt/component.rb', line 1708

def line_activate(*args)
  if args.empty?
    list(tk_send('line', 'activate')).collect{|elem|
      Tk::BLT::PlotComponent::Element.id2obj(self, elem)
    }
  else
    # id, *indices
    id = args.shift
    tk_send('line', 'activate', tagid(id), *args)
  end
end

#line_bind(tag, context, *args) ⇒ Object



1494
1495
1496
# File 'lib/tkextlib/blt/component.rb', line 1494

def line_bind(tag, context, *args)
  _component_bind('line', tag, context, *args)
end

#line_bind_append(tag, context, *args) ⇒ Object



1497
1498
1499
# File 'lib/tkextlib/blt/component.rb', line 1497

def line_bind_append(tag, context, *args)
  _component_bind_append('line', tag, context, *args)
end

#line_bind_remove(tag, context) ⇒ Object



1500
1501
1502
# File 'lib/tkextlib/blt/component.rb', line 1500

def line_bind_remove(tag, context)
  _component_bind_remove('line', tag, context)
end

#line_bindinfo(tag, context = nil) ⇒ Object



1503
1504
1505
# File 'lib/tkextlib/blt/component.rb', line 1503

def line_bindinfo(tag, context=nil)
  _component_bindinfo('line', tag, context)
end

#line_cget(id, option) ⇒ Object



200
201
202
# File 'lib/tkextlib/blt/component.rb', line 200

def line_cget(id, option)
  itemcget(['line', tagid(id)], option)
end

#line_cget_strict(id, option) ⇒ Object



203
204
205
# File 'lib/tkextlib/blt/component.rb', line 203

def line_cget_strict(id, option)
  itemcget_strict(['line', tagid(id)], option)
end

#line_cget_tkstring(id, option) ⇒ Object



197
198
199
# File 'lib/tkextlib/blt/component.rb', line 197

def line_cget_tkstring(id, option)
  itemcget_tkstring(['line', tagid(id)], option)
end

#line_closest(x, y, var, *args) ⇒ Object



1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
# File 'lib/tkextlib/blt/component.rb', line 1719

def line_closest(x, y, var, *args)
  if args[-1].kind_of?(Hash)
    keys = args.pop
    bool(tk_send('line', 'closest', x, y, var,
                 *(hash_kv(keys).concat(args.collect{|id| tagid(id)}))))
  else
    bool(tk_send('line', 'closest', x, y, var,
                 *(args.collect{|id| tagid(id)})))
  end
end

#line_configinfo(id, slot = nil) ⇒ Object



217
218
219
# File 'lib/tkextlib/blt/component.rb', line 217

def line_configinfo(id, slot=nil)
  itemconfiginfo(['line', tagid(id)], slot)
end

#line_configure(*args) ⇒ Object



206
207
208
209
210
211
212
213
214
215
216
# File 'lib/tkextlib/blt/component.rb', line 206

def line_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
  else
    value = slot
    slot = args.pop
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('line')
  itemconfigure(id_list, slot, value)
end

#line_create(id = nil, keys = {}) ⇒ Object Also known as: bar



1703
1704
1705
1706
# File 'lib/tkextlib/blt/component.rb', line 1703

def line_create(id=nil, keys={})
  # tk_send('line', 'create', tagid(id), keys)
  Tk::BLT::PlotComponent::Line.new(self, tagid(id), keys)
end

#line_deactivate(*ids) ⇒ Object



1729
1730
1731
1732
# File 'lib/tkextlib/blt/component.rb', line 1729

def line_deactivate(*ids)
  tk_send('line', 'deactivate', *(ids.collect{|id| tagid(id)}))
  self
end

#line_delete(*ids) ⇒ Object



1733
1734
1735
1736
# File 'lib/tkextlib/blt/component.rb', line 1733

def line_delete(*ids)
  tk_send('line', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#line_exist?(id) ⇒ Boolean

Returns:

  • (Boolean)


1737
1738
1739
# File 'lib/tkextlib/blt/component.rb', line 1737

def line_exist?(id)
  bool(tk_send('line', 'exists', tagid(id)))
end

#line_names(*pats) ⇒ Object



1740
1741
1742
1743
1744
1745
# File 'lib/tkextlib/blt/component.rb', line 1740

def line_names(*pats)
  simplelist(tk_send('line', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|elem|
    Tk::BLT::PlotComponent::Element.id2obj(self, elem)
  }
end

#line_show(*names) ⇒ Object



1746
1747
1748
1749
1750
1751
1752
1753
# File 'lib/tkextlib/blt/component.rb', line 1746

def line_show(*names)
  if names.empty?
    simplelist(tk_send('line', 'show'))
  else
    tk_send('line', 'show', *(names.collect{|n| tagid(n)}))
    self
  end
end

#line_type(id) ⇒ Object



1754
1755
1756
# File 'lib/tkextlib/blt/component.rb', line 1754

def line_type(id)
  tk_send('line', 'type', tagid(id))
end

#marker_after(id, target = nil) ⇒ Object



1883
1884
1885
1886
1887
1888
1889
1890
# File 'lib/tkextlib/blt/component.rb', line 1883

def marker_after(id, target=nil)
  if target
    tk_send_without_enc('marker', 'after', tagid(id), tagid(target))
  else
    tk_send_without_enc('marker', 'after', tagid(id))
  end
  self
end

#marker_before(id, target = None) ⇒ Object



1891
1892
1893
1894
1895
1896
1897
1898
# File 'lib/tkextlib/blt/component.rb', line 1891

def marker_before(id, target=None)
  if target
    tk_send_without_enc('marker', 'before', tagid(id), tagid(target))
  else
    tk_send_without_enc('marker', 'before', tagid(id))
  end
  self
end

#marker_bind(tag, context, *args) ⇒ Object



1520
1521
1522
# File 'lib/tkextlib/blt/component.rb', line 1520

def marker_bind(tag, context, *args)
  _component_bind('marker', tag, context, *args)
end

#marker_bind_append(tag, context, *args) ⇒ Object



1523
1524
1525
# File 'lib/tkextlib/blt/component.rb', line 1523

def marker_bind_append(tag, context, *args)
  _component_bind_append('marker', tag, context, *args)
end

#marker_bind_remove(tag, context) ⇒ Object



1526
1527
1528
# File 'lib/tkextlib/blt/component.rb', line 1526

def marker_bind_remove(tag, context)
  _component_bind_remove('marker', tag, context)
end

#marker_bindinfo(tag, context = nil) ⇒ Object



1529
1530
1531
# File 'lib/tkextlib/blt/component.rb', line 1529

def marker_bindinfo(tag, context=nil)
  _component_bindinfo('marker', tag, context)
end

#marker_cget(id, option) ⇒ Object



311
312
313
# File 'lib/tkextlib/blt/component.rb', line 311

def marker_cget(id, option)
  itemcget(['marker', tagid(id)], option)
end

#marker_cget_strict(id, option) ⇒ Object



314
315
316
# File 'lib/tkextlib/blt/component.rb', line 314

def marker_cget_strict(id, option)
  itemcget_strict(['marker', tagid(id)], option)
end

#marker_cget_tkstring(id, option) ⇒ Object



308
309
310
# File 'lib/tkextlib/blt/component.rb', line 308

def marker_cget_tkstring(id, option)
  itemcget_tkstring(['marker', tagid(id)], option)
end

#marker_configinfo(id, slot = nil) ⇒ Object



328
329
330
# File 'lib/tkextlib/blt/component.rb', line 328

def marker_configinfo(id, slot=nil)
  itemconfiginfo(['marker', tagid(id)], slot)
end

#marker_configure(*args) ⇒ Object



317
318
319
320
321
322
323
324
325
326
327
# File 'lib/tkextlib/blt/component.rb', line 317

def marker_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
  else
    value = slot
    slot = args.pop
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('marker')
  itemconfigure(id_list, slot, value)
end

#marker_create(type, keys = {}) ⇒ Object



1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
# File 'lib/tkextlib/blt/component.rb', line 1861

def marker_create(type, keys={})
  case type
  when :text, 'text'
    Tk::BLT::PlotComponent::TextMarker.new(self, keys)
  when :line, 'line'
    Tk::BLT::PlotComponent::LineMarker.new(self, keys)
  when :bitmap, 'bitmap'
    Tk::BLT::PlotComponent::BitmapMarker.new(self, keys)
  when :image, 'image'
    Tk::BLT::PlotComponent::ImageMarker.new(self, keys)
  when :polygon, 'polygon'
    Tk::BLT::PlotComponent::PolygonMarker.new(self, keys)
  when :window, 'window'
    Tk::BLT::PlotComponent::WindowMarker.new(self, keys)
  else
    if type.kind_of?(Tk::BLT::PlotComponent::Marker)
      type.new(self, keys)
    else
      Tk::BLT::PlotComponent::Marker.create_type(self, type, keys)
    end
  end
end

#marker_delete(*ids) ⇒ Object



1899
1900
1901
1902
# File 'lib/tkextlib/blt/component.rb', line 1899

def marker_delete(*ids)
  tk_send('marker', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#marker_exist?(id) ⇒ Boolean

Returns:

  • (Boolean)


1903
1904
1905
# File 'lib/tkextlib/blt/component.rb', line 1903

def marker_exist?(id)
  bool(tk_send('marker', 'exists', tagid(id)))
end

#marker_names(*pats) ⇒ Object



1906
1907
1908
1909
1910
1911
# File 'lib/tkextlib/blt/component.rb', line 1906

def marker_names(*pats)
  simplelist(tk_send('marker', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|id|
    Tk::BLT::PlotComponent::Marker.id2obj(self, id)
  }
end

#marker_type(id) ⇒ Object



1912
1913
1914
# File 'lib/tkextlib/blt/component.rb', line 1912

def marker_type(id)
  tk_send('marker', 'type', tagid(id))
end

#pen_cget(id, option) ⇒ Object



265
266
267
# File 'lib/tkextlib/blt/component.rb', line 265

def pen_cget(id, option)
  itemcget(['pen', tagid(id)], option)
end

#pen_cget_strict(id, option) ⇒ Object



268
269
270
# File 'lib/tkextlib/blt/component.rb', line 268

def pen_cget_strict(id, option)
  itemcget_strict(['pen', tagid(id)], option)
end

#pen_cget_tkstring(id, option) ⇒ Object



262
263
264
# File 'lib/tkextlib/blt/component.rb', line 262

def pen_cget_tkstring(id, option)
  itemcget_tkstring(['pen', tagid(id)], option)
end

#pen_configinfo(id, slot = nil) ⇒ Object



282
283
284
# File 'lib/tkextlib/blt/component.rb', line 282

def pen_configinfo(id, slot=nil)
  itemconfiginfo(['pen', tagid(id)], slot)
end

#pen_configure(*args) ⇒ Object



271
272
273
274
275
276
277
278
279
280
281
# File 'lib/tkextlib/blt/component.rb', line 271

def pen_configure(*args)
  slot = args.pop
  if slot.kind_of?(Hash)
    value = None
  else
    value = slot
    slot = args.pop
  end
  id_list = args.flatten.collect!{|id| tagid(id)}.unshift('pen')
  itemconfigure(id_list, slot, value)
end

#pen_create(id = nil, keys = {}) ⇒ Object



1828
1829
1830
1831
# File 'lib/tkextlib/blt/component.rb', line 1828

def pen_create(id=nil, keys={})
  # tk_send('pen', 'create', tagid(id), keys)
  Tk::BLT::PlotComponent::Pen.new(self, tagid(id), keys)
end

#pen_delete(*ids) ⇒ Object



1832
1833
1834
1835
# File 'lib/tkextlib/blt/component.rb', line 1832

def pen_delete(*ids)
  tk_send('pen', 'delete', *(ids.collect{|id| tagid(id)}))
  self
end

#pen_names(*pats) ⇒ Object



1836
1837
1838
1839
1840
1841
# File 'lib/tkextlib/blt/component.rb', line 1836

def pen_names(*pats)
  simplelist(tk_send('pen', 'names',
                     *(pats.collect{|pat| tagid(pat)}))).collect{|pen|
    Tk::BLT::PlotComponent::Pen.id2obj(self, pen)
  }
end

#postscript_cget(option) ⇒ Object



292
293
294
# File 'lib/tkextlib/blt/component.rb', line 292

def postscript_cget(option)
  itemcget('postscript', option)
end

#postscript_cget_strict(option) ⇒ Object



295
296
297
# File 'lib/tkextlib/blt/component.rb', line 295

def postscript_cget_strict(option)
  itemcget_strict('postscript', option)
end

#postscript_cget_tkstring(option) ⇒ Object



289
290
291
# File 'lib/tkextlib/blt/component.rb', line 289

def postscript_cget_tkstring(option)
  itemcget_tkstring('postscript', option)
end

#postscript_configinfo(slot = nil) ⇒ Object



301
302
303
# File 'lib/tkextlib/blt/component.rb', line 301

def postscript_configinfo(slot=nil)
  itemconfiginfo('postscript', slot)
end

#postscript_configure(slot, value = None) ⇒ Object



298
299
300
# File 'lib/tkextlib/blt/component.rb', line 298

def postscript_configure(slot, value=None)
  itemconfigure('postscript', slot, value)
end

#postscript_output(file = nil, keys = {}) ⇒ Object



1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
# File 'lib/tkextlib/blt/component.rb', line 1845

def postscript_output(file=nil, keys={})
  if file.kind_of?(Hash)
    keys = file
    file = nil
  end

  if file
    tk_send('postscript', 'output', file, keys)
    self
  else
    tk_send('postscript', 'output', keys)
  end
end

#tagid(tag) ⇒ Object



1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
# File 'lib/tkextlib/blt/component.rb', line 1412

def tagid(tag)
  if tag.kind_of?(Axis) ||
      tag.kind_of?(Crosshairs) ||
      tag.kind_of?(Element) ||
      tag.kind_of?(GridLine) ||
      tag.kind_of?(Legend) ||
      tag.kind_of?(Pen) ||
      tag.kind_of?(Postscript) ||
      tag.kind_of?(Marker)
    tag.id
  else
    tag  # maybe an Array of configure parameters
  end
end

#x2axis_bind(context, *args) ⇒ Object



2024
2025
2026
2027
2028
2029
2030
2031
2032
# File 'lib/tkextlib/blt/component.rb', line 2024

def x2axis_bind(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind([path, 'x2axis', 'bind'], context, cmd, *args)
  self
end

#x2axis_bind_append(context, *args) ⇒ Object



2033
2034
2035
2036
2037
2038
2039
2040
2041
# File 'lib/tkextlib/blt/component.rb', line 2033

def x2axis_bind_append(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind_append([path, 'x2axis', 'bind'], context, cmd, *args)
  self
end

#x2axis_bind_remove(context) ⇒ Object



2042
2043
2044
2045
# File 'lib/tkextlib/blt/component.rb', line 2042

def x2axis_bind_remove(context)
  _bind_remove([path, 'x2axis', 'bind'], context)
  self
end

#x2axis_bindinfo(context = nil) ⇒ Object



2046
2047
2048
# File 'lib/tkextlib/blt/component.rb', line 2046

def x2axis_bindinfo(context=nil)
  _bindinfo([path, 'x2axis', 'bind'], context)
end

#x2axis_cget(option) ⇒ Object



1996
1997
1998
# File 'lib/tkextlib/blt/component.rb', line 1996

def x2axis_cget(option)
  itemcget('x2axis', option)
end

#x2axis_cget_strict(option) ⇒ Object



1999
2000
2001
# File 'lib/tkextlib/blt/component.rb', line 1999

def x2axis_cget_strict(option)
  itemcget_strict('x2axis', option)
end

#x2axis_cget_tkstring(option) ⇒ Object



1993
1994
1995
# File 'lib/tkextlib/blt/component.rb', line 1993

def x2axis_cget_tkstring(option)
  itemcget_tkstring('x2axis', option)
end

#x2axis_configinfo(slot = nil) ⇒ Object



2018
2019
2020
# File 'lib/tkextlib/blt/component.rb', line 2018

def x2axis_configinfo(slot=nil)
  itemconfiginfo('x2axis', slot)
end

#x2axis_configure(slot, value = None) ⇒ Object



2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
# File 'lib/tkextlib/blt/component.rb', line 2002

def x2axis_configure(slot, value=None)
  if slot.kind_of?(Hash)
    slot = _symbolkey2str(slot)
    if cmd = slot.delete('command')
      slot['command'] = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  elsif slot == :command || slot == 'command'
    cmd = value
    value = proc{|w, tick|
      cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
    }
  end
  itemconfigure('x2axis', slot, value)
end

#x2axis_invtransform(val) ⇒ Object



2049
2050
2051
# File 'lib/tkextlib/blt/component.rb', line 2049

def x2axis_invtransform(val)
  list(tk_send('x2axis', 'invtransform', val))
end

#x2axis_limitsObject



2052
2053
2054
# File 'lib/tkextlib/blt/component.rb', line 2052

def x2axis_limits
  list(tk_send('x2axis', 'limits'))
end

#x2axis_transform(val) ⇒ Object



2055
2056
2057
# File 'lib/tkextlib/blt/component.rb', line 2055

def x2axis_transform(val)
  list(tk_send('x2axis', 'transform', val))
end

#x2axis_use(target = nil) ⇒ Object



2058
2059
2060
2061
2062
2063
2064
2065
2066
# File 'lib/tkextlib/blt/component.rb', line 2058

def x2axis_use(target=nil)
  if target
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('x2axis', 'use',
                                                tagid(target)))
  else
    Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('x2axis', 'use'))
  end
end

#xaxis_bind(context, *args) ⇒ Object



1949
1950
1951
1952
1953
1954
1955
1956
1957
# File 'lib/tkextlib/blt/component.rb', line 1949

def xaxis_bind(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind([path, 'xaxis', 'bind'], context, cmd, *args)
  self
end

#xaxis_bind_append(context, *args) ⇒ Object



1958
1959
1960
1961
1962
1963
1964
1965
1966
# File 'lib/tkextlib/blt/component.rb', line 1958

def xaxis_bind_append(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind_append([path, 'xaxis', 'bind'], context, cmd, *args)
  self
end

#xaxis_bind_remove(context) ⇒ Object



1967
1968
1969
1970
# File 'lib/tkextlib/blt/component.rb', line 1967

def xaxis_bind_remove(context)
  _bind_remove([path, 'xaxis', 'bind'], context)
  self
end

#xaxis_bindinfo(context = nil) ⇒ Object



1971
1972
1973
# File 'lib/tkextlib/blt/component.rb', line 1971

def xaxis_bindinfo(context=nil)
  _bindinfo([path, 'xaxis', 'bind'], context)
end

#xaxis_cget(option) ⇒ Object



1921
1922
1923
# File 'lib/tkextlib/blt/component.rb', line 1921

def xaxis_cget(option)
  itemcget('xaxis', option)
end

#xaxis_cget_strict(option) ⇒ Object



1924
1925
1926
# File 'lib/tkextlib/blt/component.rb', line 1924

def xaxis_cget_strict(option)
  itemcget_strict('xaxis', option)
end

#xaxis_cget_tkstring(option) ⇒ Object



1918
1919
1920
# File 'lib/tkextlib/blt/component.rb', line 1918

def xaxis_cget_tkstring(option)
  itemcget_tkstring('xaxis', option)
end

#xaxis_configinfo(slot = nil) ⇒ Object



1943
1944
1945
# File 'lib/tkextlib/blt/component.rb', line 1943

def xaxis_configinfo(slot=nil)
  itemconfiginfo('xaxis', slot)
end

#xaxis_configure(slot, value = None) ⇒ Object



1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
# File 'lib/tkextlib/blt/component.rb', line 1927

def xaxis_configure(slot, value=None)
  if slot.kind_of?(Hash)
    slot = _symbolkey2str(slot)
    if cmd = slot.delete('command')
      slot['command'] = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  elsif slot == :command || slot == 'command'
    cmd = value
    value = proc{|w, tick|
      cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
    }
  end
  itemconfigure('xaxis', slot, value)
end

#xaxis_invtransform(val) ⇒ Object



1974
1975
1976
# File 'lib/tkextlib/blt/component.rb', line 1974

def xaxis_invtransform(val)
  list(tk_send('xaxis', 'invtransform', val))
end

#xaxis_limitsObject



1977
1978
1979
# File 'lib/tkextlib/blt/component.rb', line 1977

def xaxis_limits
  list(tk_send('xaxis', 'limits'))
end

#xaxis_transform(val) ⇒ Object



1980
1981
1982
# File 'lib/tkextlib/blt/component.rb', line 1980

def xaxis_transform(val)
  list(tk_send('xaxis', 'transform', val))
end

#xaxis_use(target = nil) ⇒ Object



1983
1984
1985
1986
1987
1988
1989
1990
1991
# File 'lib/tkextlib/blt/component.rb', line 1983

def xaxis_use(target=nil)
  if target
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('xaxis', 'use',
                                                tagid(target)))
  else
    Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('xaxis', 'use'))
  end
end

#y2axis_bind(context, *args) ⇒ Object



2174
2175
2176
2177
2178
2179
2180
2181
2182
# File 'lib/tkextlib/blt/component.rb', line 2174

def y2axis_bind(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind([path, 'y2axis', 'bind'], context, cmd, *args)
  self
end

#y2axis_bind_append(context, *args) ⇒ Object



2183
2184
2185
2186
2187
2188
2189
2190
2191
# File 'lib/tkextlib/blt/component.rb', line 2183

def y2axis_bind_append(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind_append([path, 'y2axis', 'bind'], context, cmd, *args)
  self
end

#y2axis_bind_remove(context) ⇒ Object



2192
2193
2194
2195
# File 'lib/tkextlib/blt/component.rb', line 2192

def y2axis_bind_remove(context)
  _bind_remove([path, 'y2axis', 'bind'], context)
  self
end

#y2axis_bindinfo(context = nil) ⇒ Object



2196
2197
2198
# File 'lib/tkextlib/blt/component.rb', line 2196

def y2axis_bindinfo(context=nil)
  _bindinfo([path, 'y2axis', 'bind'], context)
end

#y2axis_cget(option) ⇒ Object



2146
2147
2148
# File 'lib/tkextlib/blt/component.rb', line 2146

def y2axis_cget(option)
  itemcget('y2axis', option)
end

#y2axis_cget_strict(option) ⇒ Object



2149
2150
2151
# File 'lib/tkextlib/blt/component.rb', line 2149

def y2axis_cget_strict(option)
  itemcget_strict('y2axis', option)
end

#y2axis_cget_tkstring(option) ⇒ Object



2143
2144
2145
# File 'lib/tkextlib/blt/component.rb', line 2143

def y2axis_cget_tkstring(option)
  itemcget_tkstring('y2axis', option)
end

#y2axis_configinfo(slot = nil) ⇒ Object



2168
2169
2170
# File 'lib/tkextlib/blt/component.rb', line 2168

def y2axis_configinfo(slot=nil)
  axis_configinfo('y2axis', slot)
end

#y2axis_configure(slot, value = None) ⇒ Object



2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
# File 'lib/tkextlib/blt/component.rb', line 2152

def y2axis_configure(slot, value=None)
  if slot.kind_of?(Hash)
    slot = _symbolkey2str(slot)
    if cmd = slot.delete('command')
      slot['command'] = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  elsif slot == :command || slot == 'command'
    cmd = value
    value = proc{|w, tick|
      cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
    }
  end
  itemconfigure('y2axis', slot, value)
end

#y2axis_invtransform(val) ⇒ Object



2199
2200
2201
# File 'lib/tkextlib/blt/component.rb', line 2199

def y2axis_invtransform(val)
  list(tk_send('y2axis', 'invtransform', val))
end

#y2axis_limitsObject



2202
2203
2204
# File 'lib/tkextlib/blt/component.rb', line 2202

def y2axis_limits
  list(tk_send('y2axis', 'limits'))
end

#y2axis_transform(val) ⇒ Object



2205
2206
2207
# File 'lib/tkextlib/blt/component.rb', line 2205

def y2axis_transform(val)
  list(tk_send('y2axis', 'transform', val))
end

#y2axis_use(target = nil) ⇒ Object



2208
2209
2210
2211
2212
2213
2214
2215
2216
# File 'lib/tkextlib/blt/component.rb', line 2208

def y2axis_use(target=nil)
  if target
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('y2axis', 'use',
                                                tagid(target)))
  else
    Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('y2axis', 'use'))
  end
end

#yaxis_bind(context, *args) ⇒ Object



2099
2100
2101
2102
2103
2104
2105
2106
2107
# File 'lib/tkextlib/blt/component.rb', line 2099

def yaxis_bind(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind([path, 'yaxis', 'bind'], context, cmd, *args)
  self
end

#yaxis_bind_append(context, *args) ⇒ Object



2108
2109
2110
2111
2112
2113
2114
2115
2116
# File 'lib/tkextlib/blt/component.rb', line 2108

def yaxis_bind_append(context, *args)
  if TkComm._callback_entry?(args[0]) || !block_given?
    cmd = args.shift
  else
    cmd = Proc.new
  end
  _bind_append([path, 'yaxis', 'bind'], context, cmd, *args)
  self
end

#yaxis_bind_remove(context) ⇒ Object



2117
2118
2119
2120
# File 'lib/tkextlib/blt/component.rb', line 2117

def yaxis_bind_remove(context)
  _bind_remove([path, 'yaxis', 'bind'], context)
  self
end

#yaxis_bindinfo(context = nil) ⇒ Object



2121
2122
2123
# File 'lib/tkextlib/blt/component.rb', line 2121

def yaxis_bindinfo(context=nil)
  _bindinfo([path, 'yaxis', 'bind'], context)
end

#yaxis_cget(option) ⇒ Object



2071
2072
2073
# File 'lib/tkextlib/blt/component.rb', line 2071

def yaxis_cget(option)
  itemcget('yaxis', option)
end

#yaxis_cget_strict(option) ⇒ Object



2074
2075
2076
# File 'lib/tkextlib/blt/component.rb', line 2074

def yaxis_cget_strict(option)
  itemcget_strict('yaxis', option)
end

#yaxis_cget_tkstring(option) ⇒ Object



2068
2069
2070
# File 'lib/tkextlib/blt/component.rb', line 2068

def yaxis_cget_tkstring(option)
  itemcget_tkstring('yaxis', option)
end

#yaxis_configinfo(slot = nil) ⇒ Object



2093
2094
2095
# File 'lib/tkextlib/blt/component.rb', line 2093

def yaxis_configinfo(slot=nil)
  itemconfiginfo('yaxis', slot)
end

#yaxis_configure(slot, value = None) ⇒ Object



2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
# File 'lib/tkextlib/blt/component.rb', line 2077

def yaxis_configure(slot, value=None)
  if slot.kind_of?(Hash)
    slot = _symbolkey2str(slot)
    if cmd = slot.delete('command')
      slot['command'] = proc{|w, tick|
        cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
      }
    end
  elsif slot == :command || slot == 'command'
    cmd = value
    value = proc{|w, tick|
      cmd.call(TkComm.window(w), TkComm.num_or_str(tick))
    }
  end
  itemconfigure('yaxis', slot, value)
end

#yaxis_invtransform(val) ⇒ Object



2124
2125
2126
# File 'lib/tkextlib/blt/component.rb', line 2124

def yaxis_invtransform(val)
  list(tk_send('yaxis', 'invtransform', val))
end

#yaxis_limitsObject



2127
2128
2129
# File 'lib/tkextlib/blt/component.rb', line 2127

def yaxis_limits
  list(tk_send('yaxis', 'limits'))
end

#yaxis_transform(val) ⇒ Object



2130
2131
2132
# File 'lib/tkextlib/blt/component.rb', line 2130

def yaxis_transform(val)
  list(tk_send('yaxis', 'transform', val))
end

#yaxis_use(target = nil) ⇒ Object



2133
2134
2135
2136
2137
2138
2139
2140
2141
# File 'lib/tkextlib/blt/component.rb', line 2133

def yaxis_use(target=nil)
  if target
    Tk::BLT::PlotComponent::Axis.id2obj(self,
                                        tk_send('yaxis', 'use',
                                                tagid(target)))
  else
    Tk::BLT::PlotComponent::Axis.id2obj(self, tk_send('yaxis', 'use'))
  end
end