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

#itemconfigure

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_str, #num_or_str, number, #number, string, #string, uninstall_cmd

Methods included from TkTreatItemFont

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

Instance Method Details

#__destroy_hook__Object



1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
# File 'lib/tkextlib/blt/component.rb', line 1039

def __destroy_hook__
  Axis::OBJ_TBL.delete(@path)
  Crosshairs::OBJ_TBL.delete(@path)
  Element::OBJ_TBL.delete(@path)
  GridLine::OBJ_TBL.delete(@path)
  Legend::OBJ_TBL.delete(@path)
  Pen::OBJ_TBL.delete(@path)
  Postscript::OBJ_TBL.delete(@path)
  Marker::OBJ_TBL.delete(@path)
  super()
end

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



1096
1097
1098
# File 'lib/tkextlib/blt/component.rb', line 1096

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

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



1099
1100
1101
# File 'lib/tkextlib/blt/component.rb', line 1099

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

#axis_bind_remove(tag, context) ⇒ Object



1102
1103
1104
# File 'lib/tkextlib/blt/component.rb', line 1102

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

#axis_bindinfo(tag, context = nil) ⇒ Object



1105
1106
1107
# File 'lib/tkextlib/blt/component.rb', line 1105

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

#axis_cget(id, option) ⇒ Object



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

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

#axis_configinfo(id, slot = nil) ⇒ Object



111
112
113
# File 'lib/tkextlib/blt/component.rb', line 111

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

#axis_configure(*args) ⇒ Object



88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# File 'lib/tkextlib/blt/component.rb', line 88

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



1176
1177
1178
1179
# File 'lib/tkextlib/blt/component.rb', line 1176

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



1180
1181
1182
1183
# File 'lib/tkextlib/blt/component.rb', line 1180

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

#axis_invtransform(id, val) ⇒ Object



1184
1185
1186
# File 'lib/tkextlib/blt/component.rb', line 1184

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

#axis_limits(id) ⇒ Object



1187
1188
1189
# File 'lib/tkextlib/blt/component.rb', line 1187

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

#axis_names(*pats) ⇒ Object



1190
1191
1192
1193
1194
1195
# File 'lib/tkextlib/blt/component.rb', line 1190

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



1196
1197
1198
# File 'lib/tkextlib/blt/component.rb', line 1196

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

#axis_use(id, target = nil) ⇒ Object



1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
# File 'lib/tkextlib/blt/component.rb', line 1203

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



1199
1200
1201
1202
# File 'lib/tkextlib/blt/component.rb', line 1199

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

#bar_activate(*args) ⇒ Object



1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
# File 'lib/tkextlib/blt/component.rb', line 1292

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



1122
1123
1124
# File 'lib/tkextlib/blt/component.rb', line 1122

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

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



1125
1126
1127
# File 'lib/tkextlib/blt/component.rb', line 1125

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

#bar_bind_remove(tag, context) ⇒ Object



1128
1129
1130
# File 'lib/tkextlib/blt/component.rb', line 1128

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

#bar_bindinfo(tag, context = nil) ⇒ Object



1131
1132
1133
# File 'lib/tkextlib/blt/component.rb', line 1131

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

#bar_cget(id, option) ⇒ Object



152
153
154
# File 'lib/tkextlib/blt/component.rb', line 152

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

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



1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
# File 'lib/tkextlib/blt/component.rb', line 1303

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



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

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

#bar_configure(*args) ⇒ Object



155
156
157
158
159
160
161
162
163
164
165
# File 'lib/tkextlib/blt/component.rb', line 155

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



1287
1288
1289
1290
# File 'lib/tkextlib/blt/component.rb', line 1287

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



1313
1314
1315
1316
# File 'lib/tkextlib/blt/component.rb', line 1313

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

#bar_delete(*ids) ⇒ Object



1317
1318
1319
1320
# File 'lib/tkextlib/blt/component.rb', line 1317

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

#bar_exist?(id) ⇒ Boolean



1321
1322
1323
# File 'lib/tkextlib/blt/component.rb', line 1321

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

#bar_names(*pats) ⇒ Object



1324
1325
1326
1327
1328
1329
# File 'lib/tkextlib/blt/component.rb', line 1324

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



1330
1331
1332
1333
1334
1335
1336
1337
# File 'lib/tkextlib/blt/component.rb', line 1330

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



1338
1339
1340
# File 'lib/tkextlib/blt/component.rb', line 1338

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

#crosshairs_cget(option) ⇒ Object



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

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

#crosshairs_configinfo(slot = nil) ⇒ Object



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

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

#crosshairs_configure(slot, value = None) ⇒ Object



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

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

#crosshairs_offObject



1216
1217
1218
1219
# File 'lib/tkextlib/blt/component.rb', line 1216

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

#crosshairs_onObject



1220
1221
1222
1223
# File 'lib/tkextlib/blt/component.rb', line 1220

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

#crosshairs_toggleObject



1224
1225
1226
1227
# File 'lib/tkextlib/blt/component.rb', line 1224

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

#current_axis_configinfo(id, slot = nil) ⇒ Object



114
115
116
# File 'lib/tkextlib/blt/component.rb', line 114

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

#current_bar_configinfo(id, slot = nil) ⇒ Object



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

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

#current_crosshairs_configinfo(slot = nil) ⇒ Object



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

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

#current_element_configinfo(id, slot = nil) ⇒ Object



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

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

#current_gridline_configinfo(slot = nil) ⇒ Object



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

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

#current_legend_configinfo(slot = nil) ⇒ Object



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

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

#current_line_configinfo(id, slot = nil) ⇒ Object



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

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

#current_marker_configinfo(id, slot = nil) ⇒ Object



271
272
273
# File 'lib/tkextlib/blt/component.rb', line 271

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

#current_pen_configinfo(id, slot = nil) ⇒ Object



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

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

#current_postscript_configinfo(slot = nil) ⇒ Object



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

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

#current_x2axis_configinfo(slot = nil) ⇒ Object



1650
1651
1652
# File 'lib/tkextlib/blt/component.rb', line 1650

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

#current_xaxis_configinfo(slot = nil) ⇒ Object



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

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

#current_y2axis_configinfo(slot = nil) ⇒ Object



1788
1789
1790
# File 'lib/tkextlib/blt/component.rb', line 1788

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

#current_yaxis_configinfo(slot = nil) ⇒ Object



1719
1720
1721
# File 'lib/tkextlib/blt/component.rb', line 1719

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

#element_activate(*args) ⇒ Object



1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
# File 'lib/tkextlib/blt/component.rb', line 1235

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



1109
1110
1111
# File 'lib/tkextlib/blt/component.rb', line 1109

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

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



1112
1113
1114
# File 'lib/tkextlib/blt/component.rb', line 1112

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

#element_bind_remove(tag, context) ⇒ Object



1115
1116
1117
# File 'lib/tkextlib/blt/component.rb', line 1115

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

#element_bindinfo(tag, context = nil) ⇒ Object



1118
1119
1120
# File 'lib/tkextlib/blt/component.rb', line 1118

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

#element_cget(id, option) ⇒ Object



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

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

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



1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
# File 'lib/tkextlib/blt/component.rb', line 1246

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



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

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

#element_configure(*args) ⇒ Object



134
135
136
137
138
139
140
141
142
143
144
# File 'lib/tkextlib/blt/component.rb', line 134

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



1231
1232
1233
1234
# File 'lib/tkextlib/blt/component.rb', line 1231

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



1256
1257
1258
1259
# File 'lib/tkextlib/blt/component.rb', line 1256

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

#element_delete(*ids) ⇒ Object



1260
1261
1262
1263
# File 'lib/tkextlib/blt/component.rb', line 1260

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

#element_exist?(id) ⇒ Boolean



1264
1265
1266
# File 'lib/tkextlib/blt/component.rb', line 1264

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

#element_names(*pats) ⇒ Object



1267
1268
1269
1270
1271
1272
# File 'lib/tkextlib/blt/component.rb', line 1267

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



1273
1274
1275
1276
1277
1278
1279
1280
# File 'lib/tkextlib/blt/component.rb', line 1273

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



1281
1282
1283
# File 'lib/tkextlib/blt/component.rb', line 1281

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

#gridline_cget(option) ⇒ Object



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

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

#gridline_configinfo(slot = nil) ⇒ Object



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

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

#gridline_configure(slot, value = None) ⇒ Object



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

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

#gridline_offObject



1401
1402
1403
1404
# File 'lib/tkextlib/blt/component.rb', line 1401

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

#gridline_onObject



1405
1406
1407
1408
# File 'lib/tkextlib/blt/component.rb', line 1405

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

#gridline_toggleObject



1409
1410
1411
1412
# File 'lib/tkextlib/blt/component.rb', line 1409

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

#legend_activate(*pats) ⇒ Object



1444
1445
1446
1447
1448
1449
# File 'lib/tkextlib/blt/component.rb', line 1444

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



1148
1149
1150
# File 'lib/tkextlib/blt/component.rb', line 1148

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

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



1151
1152
1153
# File 'lib/tkextlib/blt/component.rb', line 1151

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

#legend_bind_remove(tag, context) ⇒ Object



1154
1155
1156
# File 'lib/tkextlib/blt/component.rb', line 1154

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

#legend_bindinfo(tag, context = nil) ⇒ Object



1157
1158
1159
# File 'lib/tkextlib/blt/component.rb', line 1157

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

#legend_cget(option) ⇒ Object



207
208
209
# File 'lib/tkextlib/blt/component.rb', line 207

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

#legend_configinfo(slot = nil) ⇒ Object



213
214
215
# File 'lib/tkextlib/blt/component.rb', line 213

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

#legend_configure(slot, value = None) ⇒ Object



210
211
212
# File 'lib/tkextlib/blt/component.rb', line 210

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

#legend_deactivate(*pats) ⇒ Object



1450
1451
1452
1453
1454
1455
# File 'lib/tkextlib/blt/component.rb', line 1450

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



1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
# File 'lib/tkextlib/blt/component.rb', line 1456

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



1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
# File 'lib/tkextlib/blt/component.rb', line 1416

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



1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
# File 'lib/tkextlib/blt/component.rb', line 1349

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



1135
1136
1137
# File 'lib/tkextlib/blt/component.rb', line 1135

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

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



1138
1139
1140
# File 'lib/tkextlib/blt/component.rb', line 1138

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

#line_bind_remove(tag, context) ⇒ Object



1141
1142
1143
# File 'lib/tkextlib/blt/component.rb', line 1141

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

#line_bindinfo(tag, context = nil) ⇒ Object



1144
1145
1146
# File 'lib/tkextlib/blt/component.rb', line 1144

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

#line_cget(id, option) ⇒ Object



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

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

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



1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
# File 'lib/tkextlib/blt/component.rb', line 1360

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



187
188
189
# File 'lib/tkextlib/blt/component.rb', line 187

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

#line_configure(*args) ⇒ Object



176
177
178
179
180
181
182
183
184
185
186
# File 'lib/tkextlib/blt/component.rb', line 176

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



1344
1345
1346
1347
# File 'lib/tkextlib/blt/component.rb', line 1344

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



1370
1371
1372
1373
# File 'lib/tkextlib/blt/component.rb', line 1370

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

#line_delete(*ids) ⇒ Object



1374
1375
1376
1377
# File 'lib/tkextlib/blt/component.rb', line 1374

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

#line_exist?(id) ⇒ Boolean



1378
1379
1380
# File 'lib/tkextlib/blt/component.rb', line 1378

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

#line_names(*pats) ⇒ Object



1381
1382
1383
1384
1385
1386
# File 'lib/tkextlib/blt/component.rb', line 1381

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



1387
1388
1389
1390
1391
1392
1393
1394
# File 'lib/tkextlib/blt/component.rb', line 1387

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



1395
1396
1397
# File 'lib/tkextlib/blt/component.rb', line 1395

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

#marker_after(id, target = nil) ⇒ Object



1524
1525
1526
1527
1528
1529
1530
1531
# File 'lib/tkextlib/blt/component.rb', line 1524

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



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

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



1161
1162
1163
# File 'lib/tkextlib/blt/component.rb', line 1161

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

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



1164
1165
1166
# File 'lib/tkextlib/blt/component.rb', line 1164

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

#marker_bind_remove(tag, context) ⇒ Object



1167
1168
1169
# File 'lib/tkextlib/blt/component.rb', line 1167

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

#marker_bindinfo(tag, context = nil) ⇒ Object



1170
1171
1172
# File 'lib/tkextlib/blt/component.rb', line 1170

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

#marker_cget(id, option) ⇒ Object



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

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

#marker_configinfo(id, slot = nil) ⇒ Object



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

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

#marker_configure(*args) ⇒ Object



257
258
259
260
261
262
263
264
265
266
267
# File 'lib/tkextlib/blt/component.rb', line 257

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



1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
# File 'lib/tkextlib/blt/component.rb', line 1502

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



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

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

#marker_exist?(id) ⇒ Boolean



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

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

#marker_names(*pats) ⇒ Object



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

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



1553
1554
1555
# File 'lib/tkextlib/blt/component.rb', line 1553

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

#pen_cget(id, option) ⇒ Object



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

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

#pen_configinfo(id, slot = nil) ⇒ Object



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

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

#pen_configure(*args) ⇒ Object



223
224
225
226
227
228
229
230
231
232
233
# File 'lib/tkextlib/blt/component.rb', line 223

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



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

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



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

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

#pen_names(*pats) ⇒ Object



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

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



241
242
243
# File 'lib/tkextlib/blt/component.rb', line 241

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

#postscript_configinfo(slot = nil) ⇒ Object



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

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

#postscript_configure(slot, value = None) ⇒ Object



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

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

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



1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
# File 'lib/tkextlib/blt/component.rb', line 1486

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



1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
# File 'lib/tkextlib/blt/component.rb', line 1053

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 paramters
  end
end

#x2axis_bind(context, *args) ⇒ Object



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

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



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

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



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

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

#x2axis_bindinfo(context = nil) ⇒ Object



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

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

#x2axis_cget(option) ⇒ Object



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

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

#x2axis_configinfo(slot = nil) ⇒ Object



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

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

#x2axis_configure(slot, value = None) ⇒ Object



1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
# File 'lib/tkextlib/blt/component.rb', line 1631

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



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

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

#x2axis_limitsObject



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

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

#x2axis_transform(val) ⇒ Object



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

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

#x2axis_use(target = nil) ⇒ Object



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

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



1584
1585
1586
1587
1588
1589
1590
1591
1592
# File 'lib/tkextlib/blt/component.rb', line 1584

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



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

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



1602
1603
1604
1605
# File 'lib/tkextlib/blt/component.rb', line 1602

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

#xaxis_bindinfo(context = nil) ⇒ Object



1606
1607
1608
# File 'lib/tkextlib/blt/component.rb', line 1606

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

#xaxis_cget(option) ⇒ Object



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

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

#xaxis_configinfo(slot = nil) ⇒ Object



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

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

#xaxis_configure(slot, value = None) ⇒ Object



1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
# File 'lib/tkextlib/blt/component.rb', line 1562

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



1609
1610
1611
# File 'lib/tkextlib/blt/component.rb', line 1609

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

#xaxis_limitsObject



1612
1613
1614
# File 'lib/tkextlib/blt/component.rb', line 1612

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

#xaxis_transform(val) ⇒ Object



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

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

#xaxis_use(target = nil) ⇒ Object



1618
1619
1620
1621
1622
1623
1624
1625
1626
# File 'lib/tkextlib/blt/component.rb', line 1618

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



1791
1792
1793
1794
1795
1796
1797
1798
1799
# File 'lib/tkextlib/blt/component.rb', line 1791

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



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

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



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

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

#y2axis_bindinfo(context = nil) ⇒ Object



1813
1814
1815
# File 'lib/tkextlib/blt/component.rb', line 1813

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

#y2axis_cget(option) ⇒ Object



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

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

#y2axis_configinfo(slot = nil) ⇒ Object



1785
1786
1787
# File 'lib/tkextlib/blt/component.rb', line 1785

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

#y2axis_configure(slot, value = None) ⇒ Object



1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
# File 'lib/tkextlib/blt/component.rb', line 1769

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



1816
1817
1818
# File 'lib/tkextlib/blt/component.rb', line 1816

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

#y2axis_limitsObject



1819
1820
1821
# File 'lib/tkextlib/blt/component.rb', line 1819

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

#y2axis_transform(val) ⇒ Object



1822
1823
1824
# File 'lib/tkextlib/blt/component.rb', line 1822

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

#y2axis_use(target = nil) ⇒ Object



1825
1826
1827
1828
1829
1830
1831
1832
1833
# File 'lib/tkextlib/blt/component.rb', line 1825

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



1722
1723
1724
1725
1726
1727
1728
1729
1730
# File 'lib/tkextlib/blt/component.rb', line 1722

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



1731
1732
1733
1734
1735
1736
1737
1738
1739
# File 'lib/tkextlib/blt/component.rb', line 1731

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



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

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

#yaxis_bindinfo(context = nil) ⇒ Object



1744
1745
1746
# File 'lib/tkextlib/blt/component.rb', line 1744

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

#yaxis_cget(option) ⇒ Object



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

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

#yaxis_configinfo(slot = nil) ⇒ Object



1716
1717
1718
# File 'lib/tkextlib/blt/component.rb', line 1716

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

#yaxis_configure(slot, value = None) ⇒ Object



1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
# File 'lib/tkextlib/blt/component.rb', line 1700

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



1747
1748
1749
# File 'lib/tkextlib/blt/component.rb', line 1747

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

#yaxis_limitsObject



1750
1751
1752
# File 'lib/tkextlib/blt/component.rb', line 1750

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

#yaxis_transform(val) ⇒ Object



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

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

#yaxis_use(target = nil) ⇒ Object



1756
1757
1758
1759
1760
1761
1762
1763
1764
# File 'lib/tkextlib/blt/component.rb', line 1756

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